added IR generation for if statements