summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/Reassociate/2002-05-15-SubReassociate.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Transforms/Reassociate/2002-05-15-SubReassociate.ll')
-rw-r--r--llvm/test/Transforms/Reassociate/2002-05-15-SubReassociate.ll9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/test/Transforms/Reassociate/2002-05-15-SubReassociate.ll b/llvm/test/Transforms/Reassociate/2002-05-15-SubReassociate.ll
index 8039ddef44e..f3709c819d9 100644
--- a/llvm/test/Transforms/Reassociate/2002-05-15-SubReassociate.ll
+++ b/llvm/test/Transforms/Reassociate/2002-05-15-SubReassociate.ll
@@ -1,9 +1,10 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -reassociate -constprop -instcombine -dce -S | FileCheck %s
; With sub reassociation, constant folding can eliminate all of the constants.
define i32 @test1(i32 %A, i32 %B) {
; CHECK-LABEL: @test1(
-; CHECK-NEXT: [[Z:%.*]] = sub i32 %A, %B
+; CHECK-NEXT: [[Z:%.*]] = sub i32 [[A:%.*]], [[B:%.*]]
; CHECK-NEXT: ret i32 [[Z]]
;
%W = add i32 5, %B
@@ -16,9 +17,9 @@ define i32 @test1(i32 %A, i32 %B) {
; With sub reassociation, constant folding can eliminate the two 12 constants.
define i32 @test2(i32 %A, i32 %B, i32 %C, i32 %D) {
; CHECK-LABEL: @test2(
-; CHECK-NEXT: [[SUM:%.*]] = add i32 %B, %A
-; CHECK-NEXT: [[SUM1:%.*]] = add i32 [[SUM]], %C
-; CHECK-NEXT: [[Q:%.*]] = sub i32 %D, [[SUM1]]
+; CHECK-NEXT: [[TMP1:%.*]] = add i32 [[B:%.*]], [[A:%.*]]
+; CHECK-NEXT: [[TMP2:%.*]] = add i32 [[TMP1]], [[C:%.*]]
+; CHECK-NEXT: [[Q:%.*]] = sub i32 [[D:%.*]], [[TMP2]]
; CHECK-NEXT: ret i32 [[Q]]
;
%M = add i32 %A, 12
OpenPOWER on IntegriCloud