Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit d4a6a59

Browse files
committed
[InstCombine] add some random FMF to tests so we know it's not dropped; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325734 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 274527c commit d4a6a59

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/Transforms/InstCombine/fmul.ll

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,46 +4,46 @@
44
; (-0.0 - X) * C => X * -C
55
define float @test1(float %x) {
66
; CHECK-LABEL: @test1(
7-
; CHECK-NEXT: [[MUL:%.*]] = fmul float [[X:%.*]], -2.000000e+01
7+
; CHECK-NEXT: [[MUL:%.*]] = fmul ninf float [[X:%.*]], -2.000000e+01
88
; CHECK-NEXT: ret float [[MUL]]
99
;
1010
%sub = fsub float -0.000000e+00, %x
11-
%mul = fmul float %sub, 2.0e+1
11+
%mul = fmul ninf float %sub, 2.0e+1
1212
ret float %mul
1313
}
1414

1515
; (0.0 - X) * C => X * -C
1616
define float @test2(float %x) {
1717
; CHECK-LABEL: @test2(
18-
; CHECK-NEXT: [[MUL:%.*]] = fmul float [[X:%.*]], -2.000000e+01
18+
; CHECK-NEXT: [[MUL:%.*]] = fmul nnan float [[X:%.*]], -2.000000e+01
1919
; CHECK-NEXT: ret float [[MUL]]
2020
;
2121
%sub = fsub nsz float 0.000000e+00, %x
22-
%mul = fmul float %sub, 2.0e+1
22+
%mul = fmul nnan float %sub, 2.0e+1
2323
ret float %mul
2424
}
2525

2626
; (-0.0 - X) * (-0.0 - Y) => X * Y
2727
define float @test3(float %x, float %y) {
2828
; CHECK-LABEL: @test3(
29-
; CHECK-NEXT: [[MUL:%.*]] = fmul fast float [[X:%.*]], [[Y:%.*]]
29+
; CHECK-NEXT: [[MUL:%.*]] = fmul arcp float [[X:%.*]], [[Y:%.*]]
3030
; CHECK-NEXT: ret float [[MUL]]
3131
;
3232
%sub1 = fsub float -0.000000e+00, %x
3333
%sub2 = fsub float -0.000000e+00, %y
34-
%mul = fmul fast float %sub1, %sub2
34+
%mul = fmul arcp float %sub1, %sub2
3535
ret float %mul
3636
}
3737

3838
; (0.0 - X) * (0.0 - Y) => X * Y
3939
define float @test4(float %x, float %y) {
4040
; CHECK-LABEL: @test4(
41-
; CHECK-NEXT: [[MUL:%.*]] = fmul float [[X:%.*]], [[Y:%.*]]
41+
; CHECK-NEXT: [[MUL:%.*]] = fmul afn float [[X:%.*]], [[Y:%.*]]
4242
; CHECK-NEXT: ret float [[MUL]]
4343
;
4444
%sub1 = fsub nsz float 0.000000e+00, %x
4545
%sub2 = fsub nsz float 0.000000e+00, %y
46-
%mul = fmul float %sub1, %sub2
46+
%mul = fmul afn float %sub1, %sub2
4747
ret float %mul
4848
}
4949

0 commit comments

Comments
 (0)