[test] Testing write access to llvm
[oota-llvm.git] / test / Bitcode / fcmp-fast.ll
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
6 ; Make sure flags on fcmp instructions are serialized/deserialized properly.
7
8 define i1 @foo(float %a, float %b, double %c, double %d) {
9   ; CHECK:   %plain = fcmp ueq float %a, %b
10   %plain = fcmp ueq float %a, %b
11   ; CHECK:   %fast = fcmp fast olt float %a, %b
12   %fast = fcmp fast olt float %a, %b
13   ; CHECK:   %nsz = fcmp nsz uge float %a, %b
14   %nsz = fcmp nsz uge float %a, %b
15   ; CHECK:   %nnan = fcmp nnan nsz oge double %c, %d
16   %nnan = fcmp nnan nsz oge double %c, %d
17
18   %dce1 = or i1 %plain, %fast
19   %dce2 = or i1 %dce1, %nsz
20   %dce3 = or i1 %dce2, %nnan
21
22   ret i1 %dce3
23 }