fcmp-fast.ll 690 B

1234567891011121314151617181920212223
  1. ; RUN: llvm-as < %s | llvm-dis > %t0
  2. ; RUN: opt -S < %s > %t1
  3. ; RUN: diff %t0 %t1
  4. ; RUN: FileCheck < %t1 %s
  5. ; Make sure flags on fcmp instructions are serialized/deserialized properly.
  6. define i1 @foo(float %a, float %b, double %c, double %d) {
  7. ; CHECK: %plain = fcmp ueq float %a, %b
  8. %plain = fcmp ueq float %a, %b
  9. ; CHECK: %fast = fcmp fast olt float %a, %b
  10. %fast = fcmp fast olt float %a, %b
  11. ; CHECK: %nsz = fcmp nsz uge float %a, %b
  12. %nsz = fcmp nsz uge float %a, %b
  13. ; CHECK: %nnan = fcmp nnan nsz oge double %c, %d
  14. %nnan = fcmp nnan nsz oge double %c, %d
  15. %dce1 = or i1 %plain, %fast
  16. %dce2 = or i1 %dce1, %nsz
  17. %dce3 = or i1 %dce2, %nnan
  18. ret i1 %dce3
  19. }