Skip to content

Commit 9573124

Browse files
committed
[SCCP] Generate test checks (NFC)
1 parent 7ed412a commit 9573124

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

llvm/test/Transforms/SCCP/pr27712.ll

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,25 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
12
; RUN: opt -passes=sccp -S < %s | FileCheck %s
2-
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
3-
target triple = "x86_64-unknown-linux-gnu"
43

54
define i32 @main() {
5+
; CHECK-LABEL: define i32 @main() {
6+
; CHECK-NEXT: [[ENTRY:.*]]:
7+
; CHECK-NEXT: br label %[[LBL_1154:.*]]
8+
; CHECK: [[LBL_1154]]:
9+
; CHECK-NEXT: [[B0_0:%.*]] = phi i32 [ -119, %[[ENTRY]] ], [ 0, %[[LBL_1154]] ]
10+
; CHECK-NEXT: [[CMP11:%.*]] = icmp slt i32 [[B0_0]], 0
11+
; CHECK-NEXT: [[SHL_OP:%.*]] = shl nuw nsw i32 33554432, [[B0_0]]
12+
; CHECK-NEXT: [[CMP1445:%.*]] = icmp ult i32 [[SHL_OP]], 33554432
13+
; CHECK-NEXT: [[CMP14:%.*]] = or i1 [[CMP11]], [[CMP1445]]
14+
; CHECK-NEXT: br i1 [[CMP14]], label %[[LBL_1154]], label %[[IF_END19:.*]]
15+
; CHECK: [[IF_END19]]:
16+
; CHECK-NEXT: br i1 [[CMP11]], label %[[IF_THEN22:.*]], label %[[CLEANUP26:.*]]
17+
; CHECK: [[IF_THEN22]]:
18+
; CHECK-NEXT: tail call void @abort()
19+
; CHECK-NEXT: unreachable
20+
; CHECK: [[CLEANUP26]]:
21+
; CHECK-NEXT: ret i32 [[SHL_OP]]
22+
;
623
entry:
724
br label %lbl_1154
825

@@ -24,7 +41,5 @@ if.then22:
2441
cleanup26:
2542
ret i32 %shl.op
2643
}
27-
; CHECK-LABEL: define i32 @main(
28-
; CHECK-NOT: ret i32 undef
2944

3045
declare void @abort()

0 commit comments

Comments
 (0)