Skip to content

Commit 38cb0d0

Browse files
committed
[Clang] Generate test checks (NFC)
This test was already using generated test checks, but with minor manual adjustments. Make it fully generated, as check lines for metadata are supported nowadays.
1 parent abfc239 commit 38cb0d0

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

clang/test/CodeGen/union-tbaa1.c

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5
12
// RUN: %clang_cc1 %s -triple hexagon-unknown-elf -O2 -emit-llvm -o - | FileCheck %s
23

34
typedef union __attribute__((aligned(4))) {
@@ -7,9 +8,9 @@ typedef union __attribute__((aligned(4))) {
78

89
void bar(vect32 p[][2]);
910

10-
// CHECK-LABEL: define dso_local void @fred
11-
// CHECK-SAME: (i32 noundef [[NUM:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[VEC:%.*]], ptr noundef readonly captures(none) [[INDEX:%.*]], ptr noundef readonly captures(none) [[ARR:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
12-
// CHECK-NEXT: entry:
11+
// CHECK-LABEL: define dso_local void @fred(
12+
// CHECK-SAME: i32 noundef [[NUM:%.*]], ptr noundef writeonly captures(none) initializes((0, 8)) [[VEC:%.*]], ptr noundef readonly captures(none) [[INDEX:%.*]], ptr noundef readonly captures(none) [[ARR:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
13+
// CHECK-NEXT: [[ENTRY:.*:]]
1314
// CHECK-NEXT: [[TMP:%.*]] = alloca [4 x [2 x %union.vect32]], align 8
1415
// CHECK-NEXT: call void @llvm.lifetime.start.p0(ptr nonnull [[TMP]]) #[[ATTR3:[0-9]+]]
1516
// CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr [[INDEX]], align 4, !tbaa [[TBAA2:![0-9]+]]
@@ -45,5 +46,10 @@ void fred(unsigned Num, int Vec[2], int *Index, int Arr[4][2]) {
4546
bar(Tmp);
4647
}
4748

48-
// CHECK-DAG: [[CHAR:![0-9]+]] = !{!"omnipotent char"
49-
// CHECK-DAG: [[TBAA6]] = !{[[CHAR]], [[CHAR]], i64 0}
49+
//.
50+
// CHECK: [[TBAA2]] = !{[[META3:![0-9]+]], [[META3]], i64 0}
51+
// CHECK: [[META3]] = !{!"int", [[META4:![0-9]+]], i64 0}
52+
// CHECK: [[META4]] = !{!"omnipotent char", [[META5:![0-9]+]], i64 0}
53+
// CHECK: [[META5]] = !{!"Simple C/C++ TBAA"}
54+
// CHECK: [[TBAA6]] = !{[[META4]], [[META4]], i64 0}
55+
//.

0 commit comments

Comments
 (0)