diff options
Diffstat (limited to 'test/Transforms/InstCombine/fast-math.ll')
-rw-r--r-- | test/Transforms/InstCombine/fast-math.ll | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/Transforms/InstCombine/fast-math.ll b/test/Transforms/InstCombine/fast-math.ll index b0ec895..c6081c3 100644 --- a/test/Transforms/InstCombine/fast-math.ll +++ b/test/Transforms/InstCombine/fast-math.ll @@ -93,7 +93,7 @@ define float @fold9(float %f1, float %f2) { ret float %t3 ; CHECK-LABEL: @fold9( -; CHECK: fsub fast float 0.000000e+00, %f2 +; CHECK: fsub fast float -0.000000e+00, %f2 } ; Let C3 = C1 + C2. (f1 + C1) + (f2 + C2) => (f1 + f2) + C3 instead of @@ -322,6 +322,14 @@ define float @fneg1(float %f1, float %f2) { ; CHECK: fmul float %f1, %f2 } +define float @fneg2(float %x) { + %sub = fsub nsz float 0.0, %x + ret float %sub +; CHECK-LABEL: @fneg2( +; CHECK-NEXT: fsub nsz float -0.000000e+00, %x +; CHECK-NEXT: ret float +} + ; ========================================================================= ; ; Testing-cases about div |