From cdff95b29b8d552d09965511e81122d1123a5def Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Mon, 22 Jul 2019 22:08:27 +0000 Subject: [PATCH] [IndVarSimplify][NFC] Autogenerate check lines in loop_evaluate_1.ll Being affected by upcoming patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366746 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../IndVarSimplify/loop_evaluate_1.ll | 45 +++++++++++-------- 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/test/Transforms/IndVarSimplify/loop_evaluate_1.ll b/test/Transforms/IndVarSimplify/loop_evaluate_1.ll index 3e2e0451375..a1e1d013124 100644 --- a/test/Transforms/IndVarSimplify/loop_evaluate_1.ll +++ b/test/Transforms/IndVarSimplify/loop_evaluate_1.ll @@ -1,34 +1,43 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py ; RUN: opt < %s -indvars -loop-deletion -simplifycfg -S | FileCheck %s ; Testcase distilled from 256.bzip2 -; CHECK-LABEL: @test1 -; CHECK-NOT: br define i32 @test1() { +; CHECK-LABEL: @test1( +; CHECK-NEXT: entry: +; CHECK-NEXT: ret i32 364 +; entry: - br label %loopentry + br label %loopentry loopentry: ; preds = %loopentry, %entry - %indvar1 = phi i32 [ 0, %entry ], [ %indvar.next2, %loopentry ] ; [#uses=1] - %h.0 = phi i32 [ %tmp.2, %loopentry ], [ 4, %entry ] ; [#uses=1] - %tmp.1 = mul i32 %h.0, 3 ; [#uses=1] - %tmp.2 = add i32 %tmp.1, 1 ; [#uses=2] - %indvar.next2 = add i32 %indvar1, 1 ; [#uses=2] - %exitcond3 = icmp ne i32 %indvar.next2, 4 ; [#uses=1] - br i1 %exitcond3, label %loopentry, label %loopexit + %indvar1 = phi i32 [ 0, %entry ], [ %indvar.next2, %loopentry ] ; [#uses=1] + %h.0 = phi i32 [ %tmp.2, %loopentry ], [ 4, %entry ] ; [#uses=1] + %tmp.1 = mul i32 %h.0, 3 ; [#uses=1] + %tmp.2 = add i32 %tmp.1, 1 ; [#uses=2] + %indvar.next2 = add i32 %indvar1, 1 ; [#uses=2] + %exitcond3 = icmp ne i32 %indvar.next2, 4 ; [#uses=1] + br i1 %exitcond3, label %loopentry, label %loopexit loopexit: ; preds = %loopentry - ret i32 %tmp.2 + ret i32 %tmp.2 } - ; PR12377 -; CHECK-LABEL: @test2 -; CHECK: [[VAR1:%.+]] = add i32 %arg, -11 -; CHECK: [[VAR2:%.+]] = lshr i32 [[VAR1]], 1 -; CHECK: [[VAR3:%.+]] = add nuw i32 [[VAR2]], 1 -; CHECK: [[VAR4:%.+]] = phi i32 [ 0, %bb ], [ [[VAR3]], %bb1.preheader ] -; CHECK: ret i32 [[VAR4]] define i32 @test2(i32 %arg) { +; CHECK-LABEL: @test2( +; CHECK-NEXT: bb: +; CHECK-NEXT: [[TMP:%.*]] = icmp ugt i32 [[ARG:%.*]], 10 +; CHECK-NEXT: br i1 [[TMP]], label [[BB1_PREHEADER:%.*]], label [[BB7:%.*]] +; CHECK: bb1.preheader: +; CHECK-NEXT: [[TMP0:%.*]] = add i32 [[ARG]], -11 +; CHECK-NEXT: [[TMP1:%.*]] = lshr i32 [[TMP0]], 1 +; CHECK-NEXT: [[TMP2:%.*]] = add nuw i32 [[TMP1]], 1 +; CHECK-NEXT: br label [[BB7]] +; CHECK: bb7: +; CHECK-NEXT: [[TMP8:%.*]] = phi i32 [ 0, [[BB:%.*]] ], [ [[TMP2]], [[BB1_PREHEADER]] ] +; CHECK-NEXT: ret i32 [[TMP8]] +; bb: %tmp = icmp ugt i32 %arg, 10 br i1 %tmp, label %bb1, label %bb7 -- 2.40.0