summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/Reassociate/fast-fp-commute.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Transforms/Reassociate/fast-fp-commute.ll')
-rw-r--r--llvm/test/Transforms/Reassociate/fast-fp-commute.ll38
1 files changed, 20 insertions, 18 deletions
diff --git a/llvm/test/Transforms/Reassociate/fast-fp-commute.ll b/llvm/test/Transforms/Reassociate/fast-fp-commute.ll
index 6565bbb3d20..46030a3b79e 100644
--- a/llvm/test/Transforms/Reassociate/fast-fp-commute.ll
+++ b/llvm/test/Transforms/Reassociate/fast-fp-commute.ll
@@ -3,13 +3,14 @@
declare void @use(float)
define void @test1(float %x, float %y) {
-; CHECK-LABEL: test1
-; CHECK: fmul fast float %y, %x
-; CHECK: fmul fast float %y, %x
-; CHECK: fsub fast float %1, %2
-; CHECK: call void @use(float %{{.*}})
-; CHECK: call void @use(float %{{.*}})
-
+; CHECK-LABEL: @test1(
+; CHECK-NEXT: [[TMP1:%.*]] = fmul fast float %y, %x
+; CHECK-NEXT: [[TMP2:%.*]] = fmul fast float %y, %x
+; CHECK-NEXT: [[TMP3:%.*]] = fsub fast float [[TMP1]], [[TMP2]]
+; CHECK-NEXT: call void @use(float [[TMP1]])
+; CHECK-NEXT: call void @use(float [[TMP3]])
+; CHECK-NEXT: ret void
+;
%1 = fmul fast float %x, %y
%2 = fmul fast float %y, %x
%3 = fsub fast float %1, %2
@@ -19,12 +20,12 @@ define void @test1(float %x, float %y) {
}
define float @test2(float %x, float %y) {
-; CHECK-LABEL: test2
-; CHECK-NEXT: fmul fast float %y, %x
-; CHECK-NEXT: fmul fast float %y, %x
-; CHECK-NEXT: fsub fast float %1, %2
-; CHECK-NEXT: ret float %3
-
+; CHECK-LABEL: @test2(
+; CHECK-NEXT: [[TMP1:%.*]] = fmul fast float %y, %x
+; CHECK-NEXT: [[TMP2:%.*]] = fmul fast float %y, %x
+; CHECK-NEXT: [[TMP3:%.*]] = fsub fast float [[TMP1]], [[TMP2]]
+; CHECK-NEXT: ret float [[TMP3]]
+;
%1 = fmul fast float %x, %y
%2 = fmul fast float %y, %x
%3 = fsub fast float %1, %2
@@ -32,13 +33,14 @@ define float @test2(float %x, float %y) {
}
define float @test3(float %x, float %y) {
-; CHECK-LABEL: test3
-; CHECK-NEXT: %factor = fmul fast float %x, 2.000000e+00
-; CHECK-NEXT: %tmp1 = fmul fast float %factor, %y
-; CHECK-NEXT: ret float %tmp1
-
+; CHECK-LABEL: @test3(
+; CHECK-NEXT: [[FACTOR:%.*]] = fmul fast float %x, 2.000000e+00
+; CHECK-NEXT: [[REASS_MUL:%.*]] = fmul fast float [[FACTOR]], %y
+; CHECK-NEXT: ret float [[REASS_MUL]]
+;
%1 = fmul fast float %x, %y
%2 = fmul fast float %y, %x
%3 = fadd fast float %1, %2
ret float %3
}
+
OpenPOWER on IntegriCloud