[llvm] 8d2e9bc - [NFC][IndVarSimplify] Autogenerate exit_value_test2.ll check lines
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 30 09:11:20 PST 2020
Author: Roman Lebedev
Date: 2020-01-30T20:11:02+03:00
New Revision: 8d2e9bca7e53123ae242fe983a0cc231efcdc2b4
URL: https://github.com/llvm/llvm-project/commit/8d2e9bca7e53123ae242fe983a0cc231efcdc2b4
DIFF: https://github.com/llvm/llvm-project/commit/8d2e9bca7e53123ae242fe983a0cc231efcdc2b4.diff
LOG: [NFC][IndVarSimplify] Autogenerate exit_value_test2.ll check lines
Added:
Modified:
llvm/test/Transforms/IndVarSimplify/exit_value_test2.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/IndVarSimplify/exit_value_test2.ll b/llvm/test/Transforms/IndVarSimplify/exit_value_test2.ll
index 7b6e91a742b2..96847933fdba 100644
--- a/llvm/test/Transforms/IndVarSimplify/exit_value_test2.ll
+++ b/llvm/test/Transforms/IndVarSimplify/exit_value_test2.ll
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; PR23538
; RUN: opt < %s -indvars -loop-deletion -S | FileCheck %s
@@ -10,7 +11,40 @@ declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
define i32 @_Z3fooPKcjj(i8* nocapture readonly %s, i32 %len, i32 %c) {
; CHECK-LABEL: @_Z3fooPKcjj(
-; CHECK-NOT: udiv
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[A:%.*]] = alloca i32, align 4
+; CHECK-NEXT: [[TMP:%.*]] = bitcast i32* [[A]] to i8*
+; CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 4, i8* [[TMP]])
+; CHECK-NEXT: store i32 -1640531527, i32* [[A]], align 4
+; CHECK-NEXT: [[CMP8:%.*]] = icmp ugt i32 [[LEN:%.*]], 11
+; CHECK-NEXT: br i1 [[CMP8]], label [[WHILE_BODY_LR_PH:%.*]], label [[WHILE_END:%.*]]
+; CHECK: while.body.lr.ph:
+; CHECK-NEXT: br label [[WHILE_BODY:%.*]]
+; CHECK: while.body:
+; CHECK-NEXT: [[KEYLEN_010:%.*]] = phi i32 [ [[LEN]], [[WHILE_BODY_LR_PH]] ], [ [[SUB:%.*]], [[WHILE_BODY]] ]
+; CHECK-NEXT: [[S_ADDR_09:%.*]] = phi i8* [ [[S:%.*]], [[WHILE_BODY_LR_PH]] ], [ [[ADD_PTR:%.*]], [[WHILE_BODY]] ]
+; CHECK-NEXT: [[TMP1:%.*]] = bitcast i8* [[S_ADDR_09]] to i32*
+; CHECK-NEXT: [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
+; CHECK-NEXT: [[SHL_I:%.*]] = shl i32 [[TMP2]], 1
+; CHECK-NEXT: [[AND_I:%.*]] = and i32 [[SHL_I]], 16843008
+; CHECK-NEXT: [[TMP3:%.*]] = load i32, i32* [[A]], align 4
+; CHECK-NEXT: [[SUB_I:%.*]] = add i32 [[TMP3]], [[TMP2]]
+; CHECK-NEXT: [[ADD:%.*]] = sub i32 [[SUB_I]], [[AND_I]]
+; CHECK-NEXT: store i32 [[ADD]], i32* [[A]], align 4
+; CHECK-NEXT: [[ADD_PTR]] = getelementptr inbounds i8, i8* [[S_ADDR_09]], i64 12
+; CHECK-NEXT: [[SUB]] = add i32 [[KEYLEN_010]], -12
+; CHECK-NEXT: [[CMP:%.*]] = icmp ugt i32 [[SUB]], 11
+; CHECK-NEXT: br i1 [[CMP]], label [[WHILE_BODY]], label [[WHILE_COND_WHILE_END_CRIT_EDGE:%.*]]
+; CHECK: while.cond.while.end_crit_edge:
+; CHECK-NEXT: [[SUB_LCSSA:%.*]] = phi i32 [ [[SUB]], [[WHILE_BODY]] ]
+; CHECK-NEXT: br label [[WHILE_END]]
+; CHECK: while.end:
+; CHECK-NEXT: [[KEYLEN_0_LCSSA:%.*]] = phi i32 [ [[SUB_LCSSA]], [[WHILE_COND_WHILE_END_CRIT_EDGE]] ], [ [[LEN]], [[ENTRY:%.*]] ]
+; CHECK-NEXT: call void @_Z3mixRjj(i32* dereferenceable(4) [[A]], i32 [[KEYLEN_0_LCSSA]])
+; CHECK-NEXT: [[TMP4:%.*]] = load i32, i32* [[A]], align 4
+; CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 4, i8* [[TMP]])
+; CHECK-NEXT: ret i32 [[TMP4]]
+;
entry:
%a = alloca i32, align 4
%tmp = bitcast i32* %a to i8*
@@ -52,6 +86,14 @@ while.end: ; preds = %while.cond.while.en
define i32 @zero_backedge_count_test(i32 %unknown_init, i32* %unknown_mem) {
; CHECK-LABEL: @zero_backedge_count_test(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: br label [[LOOP:%.*]]
+; CHECK: loop:
+; CHECK-NEXT: [[UNKNOWN_NEXT:%.*]] = load volatile i32, i32* [[UNKNOWN_MEM:%.*]]
+; CHECK-NEXT: br i1 false, label [[LOOP]], label [[LEAVE:%.*]]
+; CHECK: leave:
+; CHECK-NEXT: ret i32 [[UNKNOWN_INIT:%.*]]
+;
entry:
br label %loop
@@ -67,8 +109,6 @@ leave:
; We can fold %unknown_phi even though the backedge value for it is completely
; unknown, since we can prove that the loop's backedge taken count is 0.
-; CHECK: leave:
-; CHECK: ret i32 %unknown_init
%exit_val = phi i32 [ %unknown_phi, %loop ]
ret i32 %exit_val
}
More information about the llvm-commits
mailing list