Skip to content

Commit

Permalink
[LoopSimplify] Regenerate test checks (NFC)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikic committed Aug 1, 2023
1 parent 7c64449 commit e9e2983
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions llvm/test/Transforms/LoopSimplify/ashr-crash.ll
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
; RUN: opt -passes='loop-mssa(loop-rotate,licm),instcombine,indvars,loop-unroll' -S %s | FileCheck %s
;
; PR18361: ScalarEvolution::getAddRecExpr():
Expand All @@ -24,15 +25,30 @@ target triple = "x86_64-apple-macosx"

; Check that the def-use chain that leads to the bad SCEV is still
; there.
;
; CHECK-LABEL: @foo
; CHECK-LABEL: entry:
; CHECK-LABEL: for.cond1.preheader:
; CHECK-LABEL: for.body3:
; CHECK: %cmp4.le.le
; CHECK: %conv.le.le = zext i1 %cmp4.le.le to i32
; CHECK: %xor.le.le = xor i32 %conv6.le.le, 1
define void @foo() {
; CHECK-LABEL: define void @foo() {
; CHECK-NEXT: entry:
; CHECK-NEXT: store i32 0, ptr @d, align 4
; CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr @c, align 4
; CHECK-NEXT: br label [[FOR_COND1_PREHEADER:%.*]]
; CHECK: for.cond1.preheader:
; CHECK-NEXT: br label [[FOR_BODY3:%.*]]
; CHECK: for.body3:
; CHECK-NEXT: store i32 1, ptr @a, align 4
; CHECK-NEXT: store i32 1, ptr @d, align 4
; CHECK-NEXT: [[CMP4_LE_LE:%.*]] = icmp sge i32 0, [[TMP0]]
; CHECK-NEXT: [[CONV_LE_LE:%.*]] = zext i1 [[CMP4_LE_LE]] to i32
; CHECK-NEXT: [[SEXT_LE_LE:%.*]] = shl i32 [[CONV_LE_LE]], 16
; CHECK-NEXT: [[CONV6_LE_LE:%.*]] = ashr exact i32 [[SEXT_LE_LE]], 16
; CHECK-NEXT: [[XOR_LE_LE:%.*]] = xor i32 [[CONV6_LE_LE]], 1
; CHECK-NEXT: [[CMP10:%.*]] = icmp sgt i32 [[XOR_LE_LE]], 0
; CHECK-NEXT: br i1 [[CMP10]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
; CHECK: if.then:
; CHECK-NEXT: store i32 0, ptr @b, align 4
; CHECK-NEXT: br label [[IF_END]]
; CHECK: if.end:
; CHECK-NEXT: ret void
;
entry:
br label %for.cond

Expand Down

0 comments on commit e9e2983

Please sign in to comment.