[llvm] acc163d - Inliner: Regenerate test
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 31 05:05:20 PDT 2023
Author: Matt Arsenault
Date: 2023-07-31T08:05:12-04:00
New Revision: acc163d4abdc2e79a4ad542c66ab84a41e86e734
URL: https://github.com/llvm/llvm-project/commit/acc163d4abdc2e79a4ad542c66ab84a41e86e734
DIFF: https://github.com/llvm/llvm-project/commit/acc163d4abdc2e79a4ad542c66ab84a41e86e734.diff
LOG: Inliner: Regenerate test
Test claims to be autogenerated but some functions are inexplicibly
missing checks.
Added:
Modified:
llvm/test/Transforms/Inline/dynamic-alloca-simplified-large.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/Inline/dynamic-alloca-simplified-large.ll b/llvm/test/Transforms/Inline/dynamic-alloca-simplified-large.ll
index fabbfa4ec2d1e4..bd85abf1a21ba8 100644
--- a/llvm/test/Transforms/Inline/dynamic-alloca-simplified-large.ll
+++ b/llvm/test/Transforms/Inline/dynamic-alloca-simplified-large.ll
@@ -1,15 +1,16 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature
; RUN: opt -passes=inline < %s -S -o - | FileCheck %s
target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.15.0"
define void @caller1(ptr %p1, i1 %b) {
-; CHECK-LABEL: @caller1(
+; CHECK-LABEL: define {{[^@]+}}@caller1
+; CHECK-SAME: (ptr [[P1:%.*]], i1 [[B:%.*]]) {
; CHECK-NEXT: entry:
-; CHECK-NEXT: [[COND:%.*]] = icmp eq i1 [[B:%.*]], true
+; CHECK-NEXT: [[COND:%.*]] = icmp eq i1 [[B]], true
; CHECK-NEXT: br i1 [[COND]], label [[EXIT:%.*]], label [[SPLIT:%.*]]
; CHECK: split:
-; CHECK-NEXT: call void @callee(ptr [[P1:%.*]], i32 0, i32 -1)
+; CHECK-NEXT: call void @callee(ptr [[P1]], i32 0, i32 -1)
; CHECK-NEXT: br label [[EXIT]]
; CHECK: exit:
; CHECK-NEXT: ret void
@@ -28,6 +29,14 @@ exit:
}
define void @callee(ptr %p1, i32 %l1, i32 %l2) {
+; CHECK-LABEL: define {{[^@]+}}@callee
+; CHECK-SAME: (ptr [[P1:%.*]], i32 [[L1:%.*]], i32 [[L2:%.*]]) {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[EXT:%.*]] = zext i32 [[L2]] to i64
+; CHECK-NEXT: [[VLA:%.*]] = alloca float, i64 [[EXT]], align 16
+; CHECK-NEXT: call void @extern_call(ptr nonnull [[VLA]]) #[[ATTR3:[0-9]+]]
+; CHECK-NEXT: ret void
+;
entry:
%ext = zext i32 %l2 to i64
%vla = alloca float, i64 %ext, align 16
@@ -37,15 +46,16 @@ entry:
define void @caller2_below_threshold(ptr %p1, i1 %b) {
-; CHECK-LABEL: @caller2_below_threshold(
+; CHECK-LABEL: define {{[^@]+}}@caller2_below_threshold
+; CHECK-SAME: (ptr [[P1:%.*]], i1 [[B:%.*]]) {
; CHECK-NEXT: entry:
; CHECK-NEXT: [[VLA_I:%.*]] = alloca float, i64 15000, align 16
-; CHECK-NEXT: [[COND:%.*]] = icmp eq i1 [[B:%.*]], true
+; CHECK-NEXT: [[COND:%.*]] = icmp eq i1 [[B]], true
; CHECK-NEXT: br i1 [[COND]], label [[EXIT:%.*]], label [[SPLIT:%.*]]
; CHECK: split:
; CHECK-NEXT: [[SAVEDSTACK:%.*]] = call ptr @llvm.stacksave()
; CHECK-NEXT: call void @llvm.lifetime.start.p0(i64 60000, ptr [[VLA_I]])
-; CHECK-NEXT: call void @extern_call(ptr nonnull [[VLA_I]]) #3
+; CHECK-NEXT: call void @extern_call(ptr nonnull [[VLA_I]]) #[[ATTR3]]
; CHECK-NEXT: call void @llvm.lifetime.end.p0(i64 60000, ptr [[VLA_I]])
; CHECK-NEXT: call void @llvm.stackrestore(ptr [[SAVEDSTACK]])
; CHECK-NEXT: br label [[EXIT]]
@@ -65,6 +75,19 @@ exit:
}
define void @callee2_not_in_entry(ptr %p1, i32 %l1, i32 %l2) {
+; CHECK-LABEL: define {{[^@]+}}@callee2_not_in_entry
+; CHECK-SAME: (ptr [[P1:%.*]], i32 [[L1:%.*]], i32 [[L2:%.*]]) {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[EXT:%.*]] = zext i32 [[L2]] to i64
+; CHECK-NEXT: [[C:%.*]] = icmp eq i32 [[L1]], 42
+; CHECK-NEXT: br i1 [[C]], label [[BB2:%.*]], label [[BB3:%.*]]
+; CHECK: bb2:
+; CHECK-NEXT: [[VLA:%.*]] = alloca float, i64 [[EXT]], align 16
+; CHECK-NEXT: call void @extern_call(ptr nonnull [[VLA]]) #[[ATTR3]]
+; CHECK-NEXT: ret void
+; CHECK: bb3:
+; CHECK-NEXT: ret void
+;
entry:
%ext = zext i32 %l2 to i64
%c = icmp eq i32 %l1, 42
@@ -78,9 +101,10 @@ bb3:
}
define void @caller3_alloca_not_in_entry(ptr %p1, i1 %b) {
-; CHECK-LABEL: @caller3_alloca_not_in_entry(
+; CHECK-LABEL: define {{[^@]+}}@caller3_alloca_not_in_entry
+; CHECK-SAME: (ptr [[P1:%.*]], i1 [[B:%.*]]) {
; CHECK-NEXT: entry:
-; CHECK-NEXT: [[COND:%.*]] = icmp eq i1 [[B:%.*]], true
+; CHECK-NEXT: [[COND:%.*]] = icmp eq i1 [[B]], true
; CHECK-NEXT: br i1 [[COND]], label [[EXIT:%.*]], label [[SPLIT:%.*]]
; CHECK: split:
; CHECK-NEXT: br label [[EXIT]]
@@ -100,12 +124,13 @@ exit:
}
define void @caller4_over_threshold(ptr %p1, i1 %b, i32 %len) {
-; CHECK-LABEL: @caller4_over_threshold(
+; CHECK-LABEL: define {{[^@]+}}@caller4_over_threshold
+; CHECK-SAME: (ptr [[P1:%.*]], i1 [[B:%.*]], i32 [[LEN:%.*]]) {
; CHECK-NEXT: entry:
-; CHECK-NEXT: [[COND:%.*]] = icmp eq i1 [[B:%.*]], true
+; CHECK-NEXT: [[COND:%.*]] = icmp eq i1 [[B]], true
; CHECK-NEXT: br i1 [[COND]], label [[EXIT:%.*]], label [[SPLIT:%.*]]
; CHECK: split:
-; CHECK-NEXT: call void @callee(ptr [[P1:%.*]], i32 0, i32 16500)
+; CHECK-NEXT: call void @callee(ptr [[P1]], i32 0, i32 16500)
; CHECK-NEXT: br label [[EXIT]]
; CHECK: exit:
; CHECK-NEXT: ret void
@@ -124,6 +149,22 @@ exit:
declare noalias ptr @malloc(i64)
define ptr @stack_allocate(i32 %size) #2 {
+; CHECK-LABEL: define {{[^@]+}}@stack_allocate
+; CHECK-SAME: (i32 [[SIZE:%.*]]) #[[ATTR0:[0-9]+]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[CMP:%.*]] = icmp ult i32 [[SIZE]], 100
+; CHECK-NEXT: [[CONV:%.*]] = zext i32 [[SIZE]] to i64
+; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; CHECK: if.then:
+; CHECK-NEXT: [[TMP0:%.*]] = alloca i8, i64 [[CONV]], align 8
+; CHECK-NEXT: br label [[RETURN:%.*]]
+; CHECK: if.end:
+; CHECK-NEXT: [[CALL:%.*]] = tail call ptr @malloc(i64 [[CONV]]) #[[ATTR3]]
+; CHECK-NEXT: br label [[RETURN]]
+; CHECK: return:
+; CHECK-NEXT: [[RETVAL_0:%.*]] = phi ptr [ [[TMP0]], [[IF_THEN]] ], [ [[CALL]], [[IF_END]] ]
+; CHECK-NEXT: ret ptr [[RETVAL_0]]
+;
entry:
%cmp = icmp ult i32 %size, 100
%conv = zext i32 %size to i64
@@ -143,17 +184,18 @@ return: ; preds = %if.end, %if.then
}
define ptr @test_stack_allocate_always(i32 %size) {
-; CHECK-LABEL: @test_stack_allocate_always(
+; CHECK-LABEL: define {{[^@]+}}@test_stack_allocate_always
+; CHECK-SAME: (i32 [[SIZE:%.*]]) {
; CHECK-NEXT: entry:
; CHECK-NEXT: [[SAVEDSTACK:%.*]] = call ptr @llvm.stacksave()
-; CHECK-NEXT: [[CMP_I:%.*]] = icmp ult i32 [[SIZE:%.*]], 100
+; CHECK-NEXT: [[CMP_I:%.*]] = icmp ult i32 [[SIZE]], 100
; CHECK-NEXT: [[CONV_I:%.*]] = zext i32 [[SIZE]] to i64
; CHECK-NEXT: br i1 [[CMP_I]], label [[IF_THEN_I:%.*]], label [[IF_END_I:%.*]]
; CHECK: if.then.i:
; CHECK-NEXT: [[TMP0:%.*]] = alloca i8, i64 [[CONV_I]], align 8
; CHECK-NEXT: br label [[STACK_ALLOCATE_EXIT:%.*]]
; CHECK: if.end.i:
-; CHECK-NEXT: [[CALL_I:%.*]] = tail call ptr @malloc(i64 [[CONV_I]]) #3
+; CHECK-NEXT: [[CALL_I:%.*]] = tail call ptr @malloc(i64 [[CONV_I]]) #[[ATTR3]]
; CHECK-NEXT: br label [[STACK_ALLOCATE_EXIT]]
; CHECK: stack_allocate.exit:
; CHECK-NEXT: [[RETVAL_0_I:%.*]] = phi ptr [ [[TMP0]], [[IF_THEN_I]] ], [ [[CALL_I]], [[IF_END_I]] ]
More information about the llvm-commits
mailing list