Code generation for if statements