Core: Join a few if statements in IR.cpp