[llvm] 21adcdb - [Test] Regenerate checks using auto-update script
Max Kazantsev via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 28 01:13:50 PDT 2021
Author: Max Kazantsev
Date: 2021-10-28T15:13:43+07:00
New Revision: 21adcdb712c6c8018d6eabf70c44212f92c8274e
URL: https://github.com/llvm/llvm-project/commit/21adcdb712c6c8018d6eabf70c44212f92c8274e
DIFF: https://github.com/llvm/llvm-project/commit/21adcdb712c6c8018d6eabf70c44212f92c8274e.diff
LOG: [Test] Regenerate checks using auto-update script
Added:
Modified:
llvm/test/Transforms/LoopUnswitch/2015-06-17-Metadata.ll
llvm/test/Transforms/SimplifyCFG/branch-fold-dbg.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/LoopUnswitch/2015-06-17-Metadata.ll b/llvm/test/Transforms/LoopUnswitch/2015-06-17-Metadata.ll
index 4c5ecc9f74067..5e4064307aa08 100644
--- a/llvm/test/Transforms/LoopUnswitch/2015-06-17-Metadata.ll
+++ b/llvm/test/Transforms/LoopUnswitch/2015-06-17-Metadata.ll
@@ -1,7 +1,36 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
;RUN: opt -loop-unswitch -enable-new-pm=0 -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S < %s | FileCheck %s
define i32 @foo(i32 %a, i32 %b) {
-;CHECK-LABEL: foo
+; CHECK-LABEL: @foo(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[CMP0:%.*]] = icmp sgt i32 [[B:%.*]], 0
+; CHECK-NEXT: br i1 [[CMP0]], label [[FOR_BODY_PREHEADER:%.*]], label [[FOR_COND_CLEANUP:%.*]]
+; CHECK: for.body.preheader:
+; CHECK-NEXT: [[CMP1:%.*]] = icmp eq i32 [[A:%.*]], 12345
+; CHECK-NEXT: br i1 [[CMP1]], label [[FOR_BODY_US:%.*]], label [[FOR_BODY:%.*]], !prof [[PROF0:![0-9]+]]
+; CHECK: for.body.us:
+; CHECK-NEXT: [[INC_I_US:%.*]] = phi i32 [ [[INC_US:%.*]], [[FOR_BODY_US]] ], [ 0, [[FOR_BODY_PREHEADER]] ]
+; CHECK-NEXT: [[MUL_I_US:%.*]] = phi i32 [ [[B]], [[FOR_BODY_US]] ], [ 3, [[FOR_BODY_PREHEADER]] ]
+; CHECK-NEXT: [[ADD_I_US:%.*]] = phi i32 [ [[ADD_US:%.*]], [[FOR_BODY_US]] ], [ [[A]], [[FOR_BODY_PREHEADER]] ]
+; CHECK-NEXT: [[ADD_US]] = add nsw i32 [[ADD_I_US]], 123
+; CHECK-NEXT: [[INC_US]] = add nuw nsw i32 [[INC_I_US]], 1
+; CHECK-NEXT: [[EXITCOND_US:%.*]] = icmp eq i32 [[INC_US]], [[B]]
+; CHECK-NEXT: br i1 [[EXITCOND_US]], label [[FOR_COND_CLEANUP]], label [[FOR_BODY_US]]
+; CHECK: for.body:
+; CHECK-NEXT: [[INC_I:%.*]] = phi i32 [ [[INC:%.*]], [[FOR_BODY]] ], [ 0, [[FOR_BODY_PREHEADER]] ]
+; CHECK-NEXT: [[MUL_I:%.*]] = phi i32 [ [[MUL:%.*]], [[FOR_BODY]] ], [ 3, [[FOR_BODY_PREHEADER]] ]
+; CHECK-NEXT: [[ADD_I:%.*]] = phi i32 [ [[A]], [[FOR_BODY]] ], [ [[A]], [[FOR_BODY_PREHEADER]] ]
+; CHECK-NEXT: [[MUL]] = mul nsw i32 [[MUL_I]], [[B]]
+; CHECK-NEXT: [[INC]] = add nuw nsw i32 [[INC_I]], 1
+; CHECK-NEXT: [[EXITCOND:%.*]] = icmp eq i32 [[INC]], [[B]]
+; CHECK-NEXT: br i1 [[EXITCOND]], label [[FOR_COND_CLEANUP]], label [[FOR_BODY]]
+; CHECK: for.cond.cleanup:
+; CHECK-NEXT: [[T2:%.*]] = phi i32 [ [[B]], [[ENTRY:%.*]] ], [ [[B]], [[FOR_BODY_US]] ], [ [[MUL]], [[FOR_BODY]] ]
+; CHECK-NEXT: [[T1:%.*]] = phi i32 [ [[A]], [[ENTRY]] ], [ [[ADD_US]], [[FOR_BODY_US]] ], [ [[A]], [[FOR_BODY]] ]
+; CHECK-NEXT: [[ADD3:%.*]] = add nsw i32 [[T2]], [[T1]]
+; CHECK-NEXT: ret i32 [[ADD3]]
+;
entry:
br label %for.body.lr.ph
@@ -15,24 +44,13 @@ for.body: ; preds = %for.inc, %for.body.
%add.i = phi i32 [ %a, %for.body.lr.ph ], [ %add.p, %for.inc ]
%cmp1 = icmp eq i32 %a, 12345
br i1 %cmp1, label %if.then, label %if.else, !prof !0
-; CHECK: %cmp1 = icmp eq i32 %a, 12345
-; CHECK-NEXT: br i1 %cmp1, label %for.body.us, label %for.body, !prof !0
if.then: ; preds = %for.body
-; CHECK: for.body.us:
-; CHECK: add nsw i32 %{{.*}}, 123
-; CHECK: %exitcond.us = icmp eq i32 %inc.us, %b
-; CHECK: br i1 %exitcond.us, label %for.cond.cleanup, label %for.body.us
%add = add nsw i32 %add.i, 123
br label %for.inc
if.else: ; preds = %for.body
%mul = mul nsw i32 %mul.i, %b
br label %for.inc
-; CHECK: for.body:
-; CHECK: %mul = mul nsw i32 %mul.i, %b
-; CHECK: %inc = add nuw nsw i32 %inc.i, 1
-; CHECK: %exitcond = icmp eq i32 %inc, %b
-; CHECK: br i1 %exitcond, label %for.cond.cleanup, label %for.body
for.inc: ; preds = %if.then, %if.else
%mul.p = phi i32 [ %b, %if.then ], [ %mul, %if.else ]
%add.p = phi i32 [ %add, %if.then ], [ %a, %if.else ]
@@ -48,13 +66,22 @@ for.cond.cleanup: ; preds = %for.inc, %for.body.
}
define void @foo_swapped(i32 %a, i32 %b) {
-;CHECK-LABEL: foo_swapped
+; CHECK-LABEL: @foo_swapped(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[CMP1:%.*]] = icmp eq i32 1, 2
+; CHECK-NEXT: br i1 [[CMP1]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP_SPLIT:%.*]], !prof [[PROF1:![0-9]+]]
+; CHECK: for.body:
+; CHECK-NEXT: [[INC_I:%.*]] = phi i32 [ [[INC:%.*]], [[FOR_BODY]] ], [ 0, [[ENTRY:%.*]] ]
+; CHECK-NEXT: [[ADD_I:%.*]] = phi i32 [ [[ADD:%.*]], [[FOR_BODY]] ], [ 100, [[ENTRY]] ]
+; CHECK-NEXT: [[INC]] = add nuw nsw i32 [[INC_I]], 1
+; CHECK-NEXT: [[ADD]] = add nsw i32 [[A:%.*]], [[ADD_I]]
+; CHECK-NEXT: [[EXITCOND:%.*]] = icmp eq i32 [[INC]], [[B:%.*]]
+; CHECK-NEXT: br i1 [[EXITCOND]], label [[FOR_COND_CLEANUP_SPLIT]], label [[FOR_BODY]]
+; CHECK: for.cond.cleanup.split:
+; CHECK-NEXT: ret void
+;
entry:
br label %for.body
-;CHECK: entry:
-;CHECK-NEXT: %cmp1 = icmp eq i32 1, 2
-;CHECK-NEXT: br i1 %cmp1, label %for.body, label %for.cond.cleanup.split, !prof !1
-;CHECK: for.body:
for.body: ; preds = %for.inc, %entry
%inc.i = phi i32 [ 0, %entry ], [ %inc, %if.then ]
%add.i = phi i32 [ 100, %entry ], [ %add, %if.then ]
diff --git a/llvm/test/Transforms/SimplifyCFG/branch-fold-dbg.ll b/llvm/test/Transforms/SimplifyCFG/branch-fold-dbg.ll
index a44abe041e771..e0378e2d95743 100644
--- a/llvm/test/Transforms/SimplifyCFG/branch-fold-dbg.ll
+++ b/llvm/test/Transforms/SimplifyCFG/branch-fold-dbg.ll
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S < %s | FileCheck %s
%0 = type { i32*, i32* }
@@ -5,6 +6,26 @@
@0 = external hidden constant [5 x %0], align 4
define void @foo(i32) nounwind ssp !dbg !0 {
+; CHECK-LABEL: @foo(
+; CHECK-NEXT: Entry:
+; CHECK-NEXT: [[TMP1:%.*]] = icmp slt i32 [[TMP0:%.*]], 0
+; CHECK-NEXT: [[TMP2:%.*]] = icmp sgt i32 [[TMP0]], 4
+; CHECK-NEXT: [[OR_COND:%.*]] = or i1 [[TMP1]], [[TMP2]]
+; CHECK-NEXT: br i1 [[OR_COND]], label [[COMMON_RET:%.*]], label [[BB2:%.*]]
+; CHECK: BB2:
+; CHECK-NEXT: [[TMP3:%.*]] = shl i32 1, [[TMP0]]
+; CHECK-NEXT: [[TMP4:%.*]] = and i32 [[TMP3]], 31
+; CHECK-NEXT: [[TMP5:%.*]] = icmp eq i32 [[TMP4]], 0
+; CHECK-NEXT: [[TMP6:%.*]] = getelementptr inbounds [5 x %0], [5 x %0]* @[[GLOB0:[0-9]+]], i32 0, i32 [[TMP0]]
+; CHECK-NEXT: [[TMP7:%.*]] = icmp eq %0* [[TMP6]], null
+; CHECK-NEXT: [[OR_COND2:%.*]] = select i1 [[TMP5]], i1 true, i1 [[TMP7]]
+; CHECK-NEXT: br i1 [[OR_COND2]], label [[COMMON_RET]], label [[BB4:%.*]]
+; CHECK: common.ret:
+; CHECK-NEXT: ret void
+; CHECK: BB4:
+; CHECK-NEXT: [[TMP8:%.*]] = icmp slt i32 [[TMP0]], 0
+; CHECK-NEXT: br label [[COMMON_RET]]
+;
Entry:
%1 = icmp slt i32 %0, 0, !dbg !5
br i1 %1, label %BB5, label %BB1, !dbg !5
@@ -19,9 +40,6 @@ BB2: ; preds = %BB1
%5 = icmp eq i32 %4, 0, !dbg !5
br i1 %5, label %BB5, label %BB3, !dbg !5
-;CHECK: icmp eq
-;CHECK-NEXT: getelementptr
-;CHECK-NEXT: icmp eq
BB3: ; preds = %BB2
%6 = getelementptr inbounds [5 x %0], [5 x %0]* @0, i32 0, i32 %0, !dbg !6
More information about the llvm-commits
mailing list