Skip to content

Commit b77e556

Browse files
committed
[TailCallElim] Regenerate test checks with --function-signature (NFC)
For checking the readonly attribute. Pre-commit test for D156793. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D156789
1 parent 5b95d17 commit b77e556

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

llvm/test/Transforms/TailCallElim/tre-byval-parameter-2.ll

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature
22
; RUN: opt < %s -passes=tailcallelim -verify-dom-info -S | FileCheck %s
33

44
; the test was generated from the following C++ source:
@@ -24,23 +24,24 @@
2424

2525
; Function Attrs: noinline nounwind uwtable
2626
define dso_local void @_Z7dostuff1AS_i(ptr nocapture byval(%struct.A) align 8 %a, ptr nocapture readonly byval(%struct.A) align 8 %b, i32 %i) local_unnamed_addr #0 {
27-
; CHECK-LABEL: @_Z7dostuff1AS_i(
27+
; CHECK-LABEL: define {{[^@]+}}@_Z7dostuff1AS_i
28+
; CHECK-SAME: (ptr nocapture byval([[STRUCT_A:%.*]]) align 8 [[A:%.*]], ptr nocapture readonly byval([[STRUCT_A]]) align 8 [[B:%.*]], i32 [[I:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
2829
; CHECK-NEXT: entry:
29-
; CHECK-NEXT: [[AGG_TMP52:%.*]] = alloca [[STRUCT_A:%.*]], align 8
30+
; CHECK-NEXT: [[AGG_TMP52:%.*]] = alloca [[STRUCT_A]], align 8
3031
; CHECK-NEXT: [[AGG_TMP1:%.*]] = alloca [[STRUCT_A]], align 8
3132
; CHECK-NEXT: [[AGG_TMP:%.*]] = alloca [[STRUCT_A]], align 8
3233
; CHECK-NEXT: [[AGG_TMP5:%.*]] = alloca [[STRUCT_A]], align 8
3334
; CHECK-NEXT: br label [[TAILRECURSE:%.*]]
3435
; CHECK: tailrecurse:
35-
; CHECK-NEXT: [[I_TR:%.*]] = phi i32 [ [[I:%.*]], [[ENTRY:%.*]] ], [ [[ADD:%.*]], [[IF_END:%.*]] ]
36+
; CHECK-NEXT: [[I_TR:%.*]] = phi i32 [ [[I]], [[ENTRY:%.*]] ], [ [[ADD:%.*]], [[IF_END:%.*]] ]
3637
; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[I_TR]], 10
3738
; CHECK-NEXT: br i1 [[CMP]], label [[RETURN:%.*]], label [[IF_END]]
3839
; CHECK: if.end:
39-
; CHECK-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [[STRUCT_A]], ptr [[A:%.*]], i64 0, i32 0, i64 5
40+
; CHECK-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [[STRUCT_A]], ptr [[A]], i64 0, i32 0, i64 5
4041
; CHECK-NEXT: [[TMP0:%.*]] = load i64, ptr [[ARRAYIDX]], align 8
4142
; CHECK-NEXT: [[INC:%.*]] = add nsw i64 [[TMP0]], 1
4243
; CHECK-NEXT: store i64 [[INC]], ptr [[ARRAYIDX]], align 8
43-
; CHECK-NEXT: [[ARRAYIDX4:%.*]] = getelementptr inbounds [[STRUCT_A]], ptr [[B:%.*]], i64 0, i32 0, i64 5
44+
; CHECK-NEXT: [[ARRAYIDX4:%.*]] = getelementptr inbounds [[STRUCT_A]], ptr [[B]], i64 0, i32 0, i64 5
4445
; CHECK-NEXT: [[TMP1:%.*]] = load i64, ptr [[ARRAYIDX4]], align 8
4546
; CHECK-NEXT: [[CALL:%.*]] = tail call i32 (ptr, ...) @printf(ptr nonnull dereferenceable(1) @.str, i64 [[INC]], i64 [[TMP1]])
4647
; CHECK-NEXT: call void @llvm.lifetime.start.p0(i64 80, ptr nonnull [[AGG_TMP]])
@@ -101,13 +102,13 @@ declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2
101102

102103
; Function Attrs: noinline norecurse nounwind optnone uwtable
103104
define dso_local i32 @main() local_unnamed_addr #3 {
104-
; CHECK-LABEL: @main(
105+
; CHECK-LABEL: define {{[^@]+}}@main() local_unnamed_addr {
105106
; CHECK-NEXT: entry:
106107
; CHECK-NEXT: [[AGG_TMP:%.*]] = alloca [[STRUCT_A:%.*]], align 8
107108
; CHECK-NEXT: [[AGG_TMP1:%.*]] = alloca [[STRUCT_A]], align 8
108109
; CHECK-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[AGG_TMP]], ptr align 8 @global, i64 80, i1 false)
109110
; CHECK-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[AGG_TMP1]], ptr align 8 @global, i64 80, i1 false)
110-
; CHECK-NEXT: tail call void @_Z7dostuff1AS_i(ptr byval(%struct.A) align 8 [[AGG_TMP]], ptr byval(%struct.A) align 8 [[AGG_TMP1]], i32 0)
111+
; CHECK-NEXT: tail call void @_Z7dostuff1AS_i(ptr byval([[STRUCT_A]]) align 8 [[AGG_TMP]], ptr byval([[STRUCT_A]]) align 8 [[AGG_TMP1]], i32 0)
111112
; CHECK-NEXT: ret i32 0
112113
;
113114
entry:

llvm/test/Transforms/TailCallElim/tre-byval-parameter.ll

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature
22
; RUN: opt < %s -passes=tailcallelim -verify-dom-info -S | FileCheck %s
33

44
; the test was generated from the following C++ source:
@@ -24,21 +24,22 @@
2424

2525
; Function Attrs: uwtable
2626
define dso_local i32 @_Z3fooi1S(i32 %count, ptr nocapture readonly byval(%struct.S) align 8 %p1) local_unnamed_addr #0 {
27-
; CHECK-LABEL: @_Z3fooi1S(
27+
; CHECK-LABEL: define {{[^@]+}}@_Z3fooi1S
28+
; CHECK-SAME: (i32 [[COUNT:%.*]], ptr nocapture readonly byval([[STRUCT_S:%.*]]) align 8 [[P1:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
2829
; CHECK-NEXT: entry:
29-
; CHECK-NEXT: [[AGG_TMP_I1:%.*]] = alloca [[STRUCT_S:%.*]], align 8
30+
; CHECK-NEXT: [[AGG_TMP_I1:%.*]] = alloca [[STRUCT_S]], align 8
3031
; CHECK-NEXT: [[AGG_TMP_I:%.*]] = alloca [[STRUCT_S]], align 8
3132
; CHECK-NEXT: [[AGG_TMP14:%.*]] = alloca [[STRUCT_S]], align 8
3233
; CHECK-NEXT: [[AGG_TMP:%.*]] = alloca [[STRUCT_S]], align 8
3334
; CHECK-NEXT: [[AGG_TMP1:%.*]] = alloca [[STRUCT_S]], align 8
3435
; CHECK-NEXT: br label [[TAILRECURSE:%.*]]
3536
; CHECK: tailrecurse:
36-
; CHECK-NEXT: [[COUNT_TR:%.*]] = phi i32 [ [[COUNT:%.*]], [[ENTRY:%.*]] ], [ [[ADD:%.*]], [[IF_END:%.*]] ]
37+
; CHECK-NEXT: [[COUNT_TR:%.*]] = phi i32 [ [[COUNT]], [[ENTRY:%.*]] ], [ [[ADD:%.*]], [[IF_END:%.*]] ]
3738
; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i32 [[COUNT_TR]], 10
3839
; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END]]
3940
; CHECK: if.then:
40-
; CHECK-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 dereferenceable(20) [[AGG_TMP]], ptr nonnull align 8 dereferenceable(20) [[P1:%.*]], i64 20, i1 false)
41-
; CHECK-NEXT: [[CALL:%.*]] = tail call i32 @_Z3zoo1S(ptr nonnull byval(%struct.S) align 8 [[AGG_TMP]])
41+
; CHECK-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 dereferenceable(20) [[AGG_TMP]], ptr nonnull align 8 dereferenceable(20) [[P1]], i64 20, i1 false)
42+
; CHECK-NEXT: [[CALL:%.*]] = tail call i32 @_Z3zoo1S(ptr nonnull byval([[STRUCT_S]]) align 8 [[AGG_TMP]])
4243
; CHECK-NEXT: br label [[RETURN:%.*]]
4344
; CHECK: if.end:
4445
; CHECK-NEXT: [[ADD]] = add nsw i32 [[COUNT_TR]], 1

0 commit comments

Comments
 (0)