Update if code generation