[llvm] 5c09afe - [SCCP] Auto-generate check lines for ip-ranges-select.ll.
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 23 09:40:48 PST 2023
Author: Florian Hahn
Date: 2023-01-23T17:40:30Z
New Revision: 5c09afe77f838a348cdad199dde50c5241dd2827
URL: https://github.com/llvm/llvm-project/commit/5c09afe77f838a348cdad199dde50c5241dd2827
DIFF: https://github.com/llvm/llvm-project/commit/5c09afe77f838a348cdad199dde50c5241dd2827.diff
LOG: [SCCP] Auto-generate check lines for ip-ranges-select.ll.
Added:
Modified:
llvm/test/Transforms/SCCP/ip-ranges-select.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/SCCP/ip-ranges-select.ll b/llvm/test/Transforms/SCCP/ip-ranges-select.ll
index ac57bbf9943b..2173580cafb2 100644
--- a/llvm/test/Transforms/SCCP/ip-ranges-select.ll
+++ b/llvm/test/Transforms/SCCP/ip-ranges-select.ll
@@ -1,9 +1,11 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature
; RUN: opt -passes=ipsccp -S %s -o -| FileCheck %s
define void @caller.1(ptr %arg) {
-; CHECK-LABEL: define void @caller.1(ptr %arg) {
-; CHECK-NEXT: %r.1 = tail call i32 @callee.1(i32 4)
-; CHECK-NEXT: %r.2 = tail call i32 @callee.1(i32 2)
+; CHECK-LABEL: define {{[^@]+}}@caller.1
+; CHECK-SAME: (ptr [[ARG:%.*]]) {
+; CHECK-NEXT: [[R_1:%.*]] = tail call i32 @callee.1(i32 4)
+; CHECK-NEXT: [[R_2:%.*]] = tail call i32 @callee.1(i32 2)
; CHECK-NEXT: call void @use(i32 20)
; CHECK-NEXT: ret void
;
@@ -15,11 +17,11 @@ define void @caller.1(ptr %arg) {
}
define internal i32 @callee.1(i32 %arg) {
-; CHECK-LABEL: define internal i32 @callee.1(i32 %arg) {
-; CHECK-NEXT: %sel = select i1 false, i32 16, i32 %arg
-; CHECK-NEXT: br label %bb10
-;
-; CHECK-LABEL: bb10:
+; CHECK-LABEL: define {{[^@]+}}@callee.1
+; CHECK-SAME: (i32 [[ARG:%.*]]) {
+; CHECK-NEXT: [[SEL:%.*]] = select i1 false, i32 16, i32 [[ARG]]
+; CHECK-NEXT: br label [[BB10:%.*]]
+; CHECK: bb10:
; CHECK-NEXT: ret i32 undef
;
%c.1 = icmp slt i32 %arg, 0
@@ -37,14 +39,15 @@ bb12: ; preds = %bb8, %bb3, %bb
declare void @use(i32)
define internal i1 @f1(i32 %x, i32 %y, i1 %cmp) {
-; CHECK-LABEL: define internal i1 @f1(i32 %x, i32 %y, i1 %cmp) {
-; CHECK-NEXT: %sel.1 = select i1 %cmp, i32 %x, i32 %y
-; CHECK-NEXT: %c.2 = icmp sgt i32 %sel.1, 100
-; CHECK-NEXT: %c.3 = icmp eq i32 %sel.1, 50
-; CHECK-NEXT: %res.1 = add i1 false, %c.2
-; CHECK-NEXT: %res.2 = add i1 %res.1, %c.3
-; CHECK-NEXT: %res.3 = add i1 %res.2, false
-; CHECK-NEXT: ret i1 %res.3
+; CHECK-LABEL: define {{[^@]+}}@f1
+; CHECK-SAME: (i32 [[X:%.*]], i32 [[Y:%.*]], i1 [[CMP:%.*]]) {
+; CHECK-NEXT: [[SEL_1:%.*]] = select i1 [[CMP]], i32 [[X]], i32 [[Y]]
+; CHECK-NEXT: [[C_2:%.*]] = icmp sgt i32 [[SEL_1]], 100
+; CHECK-NEXT: [[C_3:%.*]] = icmp eq i32 [[SEL_1]], 50
+; CHECK-NEXT: [[RES_1:%.*]] = add i1 false, [[C_2]]
+; CHECK-NEXT: [[RES_2:%.*]] = add i1 [[RES_1]], [[C_3]]
+; CHECK-NEXT: [[RES_3:%.*]] = add i1 [[RES_2]], false
+; CHECK-NEXT: ret i1 [[RES_3]]
;
%sel.1 = select i1 %cmp, i32 %x, i32 %y
%c.1 = icmp sgt i32 %sel.1, 300
@@ -58,11 +61,12 @@ define internal i1 @f1(i32 %x, i32 %y, i1 %cmp) {
}
define i1 @caller1(i1 %cmp) {
-; CHECK-LABEL: define i1 @caller1(i1 %cmp) {
-; CHECK-NEXT: %call.1 = tail call i1 @f1(i32 10, i32 100, i1 %cmp)
-; CHECK-NEXT: %call.2 = tail call i1 @f1(i32 20, i32 200, i1 %cmp)
-; CHECK-NEXT: %res = and i1 %call.1, %call.2
-; CHECK-NEXT: ret i1 %res
+; CHECK-LABEL: define {{[^@]+}}@caller1
+; CHECK-SAME: (i1 [[CMP:%.*]]) {
+; CHECK-NEXT: [[CALL_1:%.*]] = tail call i1 @f1(i32 10, i32 100, i1 [[CMP]])
+; CHECK-NEXT: [[CALL_2:%.*]] = tail call i1 @f1(i32 20, i32 200, i1 [[CMP]])
+; CHECK-NEXT: [[RES:%.*]] = and i1 [[CALL_1]], [[CALL_2]]
+; CHECK-NEXT: ret i1 [[RES]]
;
%call.1 = tail call i1 @f1(i32 10, i32 100, i1 %cmp)
%call.2 = tail call i1 @f1(i32 20, i32 200, i1 %cmp)
@@ -72,16 +76,17 @@ define i1 @caller1(i1 %cmp) {
define i1 @f2(i32 %x, i32 %y, i1 %cmp) {
-; CHECK-LABEL: define i1 @f2(i32 %x, i32 %y, i1 %cmp) {
-; CHECK-NEXT: %sel.1 = select i1 %cmp, i32 %x, i32 %y
-; CHECK-NEXT: %c.1 = icmp sgt i32 %sel.1, 300
-; CHECK-NEXT: %c.2 = icmp sgt i32 %sel.1, 100
-; CHECK-NEXT: %c.3 = icmp eq i32 %sel.1, 50
-; CHECK-NEXT: %c.4 = icmp slt i32 %sel.1, 9
-; CHECK-NEXT: %res.1 = add i1 %c.1, %c.2
-; CHECK-NEXT: %res.2 = add i1 %res.1, %c.3
-; CHECK-NEXT: %res.3 = add i1 %res.2, %c.4
-; CHECK-NEXT: ret i1 %res.3
+; CHECK-LABEL: define {{[^@]+}}@f2
+; CHECK-SAME: (i32 [[X:%.*]], i32 [[Y:%.*]], i1 [[CMP:%.*]]) {
+; CHECK-NEXT: [[SEL_1:%.*]] = select i1 [[CMP]], i32 [[X]], i32 [[Y]]
+; CHECK-NEXT: [[C_1:%.*]] = icmp sgt i32 [[SEL_1]], 300
+; CHECK-NEXT: [[C_2:%.*]] = icmp sgt i32 [[SEL_1]], 100
+; CHECK-NEXT: [[C_3:%.*]] = icmp eq i32 [[SEL_1]], 50
+; CHECK-NEXT: [[C_4:%.*]] = icmp slt i32 [[SEL_1]], 9
+; CHECK-NEXT: [[RES_1:%.*]] = add i1 [[C_1]], [[C_2]]
+; CHECK-NEXT: [[RES_2:%.*]] = add i1 [[RES_1]], [[C_3]]
+; CHECK-NEXT: [[RES_3:%.*]] = add i1 [[RES_2]], [[C_4]]
+; CHECK-NEXT: ret i1 [[RES_3]]
;
%sel.1 = select i1 %cmp, i32 %x, i32 %y
%c.1 = icmp sgt i32 %sel.1, 300
@@ -95,11 +100,12 @@ define i1 @f2(i32 %x, i32 %y, i1 %cmp) {
}
define i1 @caller2(i32 %y, i1 %cmp) {
-; CHECK-LABEL: define i1 @caller2(i32 %y, i1 %cmp) {
-; CHECK-NEXT: %call.1 = tail call i1 @f2(i32 10, i32 %y, i1 %cmp)
-; CHECK-NEXT: %call.2 = tail call i1 @f2(i32 20, i32 %y, i1 %cmp)
-; CHECK-NEXT: %res = and i1 %call.1, %call.2
-; CHECK-NEXT: ret i1 %res
+; CHECK-LABEL: define {{[^@]+}}@caller2
+; CHECK-SAME: (i32 [[Y:%.*]], i1 [[CMP:%.*]]) {
+; CHECK-NEXT: [[CALL_1:%.*]] = tail call i1 @f2(i32 10, i32 [[Y]], i1 [[CMP]])
+; CHECK-NEXT: [[CALL_2:%.*]] = tail call i1 @f2(i32 20, i32 [[Y]], i1 [[CMP]])
+; CHECK-NEXT: [[RES:%.*]] = and i1 [[CALL_1]], [[CALL_2]]
+; CHECK-NEXT: ret i1 [[RES]]
;
%call.1 = tail call i1 @f2(i32 10, i32 %y, i1 %cmp)
%call.2 = tail call i1 @f2(i32 20, i32 %y, i1 %cmp)
@@ -110,20 +116,22 @@ define i1 @caller2(i32 %y, i1 %cmp) {
@GV = common global i32 0, align 4
define i32 @f3_constantexpr_cond(i32 %x, i32 %y) {
-; CHECK-LABEL: define i32 @f3_constantexpr_cond(i32 %x, i32 %y)
-; CHECK-NEXT: %sel.1 = select i1 icmp eq (ptr @f3_constantexpr_cond, ptr @GV), i32 %x, i32 %y
-; CHECK-NEXT: ret i32 %sel.1
+; CHECK-LABEL: define {{[^@]+}}@f3_constantexpr_cond
+; CHECK-SAME: (i32 [[X:%.*]], i32 [[Y:%.*]]) {
+; CHECK-NEXT: [[SEL_1:%.*]] = select i1 icmp eq (ptr @f3_constantexpr_cond, ptr @GV), i32 [[X]], i32 [[Y]]
+; CHECK-NEXT: ret i32 [[SEL_1]]
;
%sel.1 = select i1 icmp eq (ptr @f3_constantexpr_cond, ptr @GV), i32 %x, i32 %y
ret i32 %sel.1
}
define i32 @caller3(i32 %y) {
-; CHECK-LABEL: define i32 @caller3(i32 %y) {
-; CHECK-NEXT: %call.1 = tail call i32 @f3_constantexpr_cond(i32 10, i32 %y)
-; CHECK-NEXT: %call.2 = tail call i32 @f3_constantexpr_cond(i32 20, i32 %y)
-; CHECK-NEXT: %res = and i32 %call.1, %call.2
-; CHECK-NEXT: ret i32 %res
+; CHECK-LABEL: define {{[^@]+}}@caller3
+; CHECK-SAME: (i32 [[Y:%.*]]) {
+; CHECK-NEXT: [[CALL_1:%.*]] = tail call i32 @f3_constantexpr_cond(i32 10, i32 [[Y]])
+; CHECK-NEXT: [[CALL_2:%.*]] = tail call i32 @f3_constantexpr_cond(i32 20, i32 [[Y]])
+; CHECK-NEXT: [[RES:%.*]] = and i32 [[CALL_1]], [[CALL_2]]
+; CHECK-NEXT: ret i32 [[RES]]
;
%call.1 = tail call i32 @f3_constantexpr_cond(i32 10, i32 %y)
%call.2 = tail call i32 @f3_constantexpr_cond(i32 20, i32 %y)
More information about the llvm-commits
mailing list