if.ll 457 B

123456789101112131415161718192021
  1. declare double @foo()
  2. declare double @bar()
  3. define double @baz(double %x) {
  4. entry:
  5. %ifcond = fcmp one double %x, 0.000000e+00
  6. br i1 %ifcond, label %then, label %else
  7. then: ; preds = %entry
  8. %calltmp = call double @foo()
  9. br label %ifcont
  10. else: ; preds = %entry
  11. %calltmp1 = call double @bar()
  12. br label %ifcont
  13. ifcont: ; preds = %else, %then
  14. %iftmp = phi double [ %calltmp, %then ], [ %calltmp1, %else ]
  15. ret double %iftmp
  16. }