diff options
author | Stephen Lin <stephenwlin@gmail.com> | 2013-08-15 06:47:53 +0000 |
---|---|---|
committer | Stephen Lin <stephenwlin@gmail.com> | 2013-08-15 06:47:53 +0000 |
commit | 4362261b0093730e46ffcad910e8b465cf0bb1cb (patch) | |
tree | b05fa6d247505d0ab46b16619f702532e189f698 /clang/test/CodeGen | |
parent | 83e042a21b5392882ccc020baa9ade52851b5903 (diff) | |
download | bcm5719-llvm-4362261b0093730e46ffcad910e8b465cf0bb1cb.tar.gz bcm5719-llvm-4362261b0093730e46ffcad910e8b465cf0bb1cb.zip |
CHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail.
llvm-svn: 188447
Diffstat (limited to 'clang/test/CodeGen')
101 files changed, 639 insertions, 639 deletions
diff --git a/clang/test/CodeGen/2004-11-27-StaticFunctionRedeclare.c b/clang/test/CodeGen/2004-11-27-StaticFunctionRedeclare.c index da811c4a65d..9ceee4c9912 100644 --- a/clang/test/CodeGen/2004-11-27-StaticFunctionRedeclare.c +++ b/clang/test/CodeGen/2004-11-27-StaticFunctionRedeclare.c @@ -6,7 +6,7 @@ // This is PR244 -// CHECK: define void @bar( +// CHECK-LABEL: define void @bar( // CHECK: call {{.*}} @func // CHECK: define internal {{.*}}i32 @func( static int func(); diff --git a/clang/test/CodeGen/2008-03-05-syncPtr.c b/clang/test/CodeGen/2008-03-05-syncPtr.c index 93f328a5794..4df94829f57 100644 --- a/clang/test/CodeGen/2008-03-05-syncPtr.c +++ b/clang/test/CodeGen/2008-03-05-syncPtr.c @@ -3,38 +3,38 @@ int* foo(int** a, int* b, int* c) { return __sync_val_compare_and_swap (a, b, c); } -// CHECK: define i32* @foo +// CHECK-LABEL: define i32* @foo // CHECK: cmpxchg int foo2(int** a, int* b, int* c) { return __sync_bool_compare_and_swap (a, b, c); } -// CHECK: define i32 @foo2 +// CHECK-LABEL: define i32 @foo2 // CHECK: cmpxchg int* foo3(int** a, int b) { return __sync_fetch_and_add (a, b); } -// CHECK: define i32* @foo3 +// CHECK-LABEL: define i32* @foo3 // CHECK: atomicrmw add int* foo4(int** a, int b) { return __sync_fetch_and_sub (a, b); } -// CHECK: define i32* @foo4 +// CHECK-LABEL: define i32* @foo4 // CHECK: atomicrmw sub int* foo5(int** a, int* b) { return __sync_lock_test_and_set (a, b); } -// CHECK: define i32* @foo5 +// CHECK-LABEL: define i32* @foo5 // CHECK: atomicrmw xchg int* foo6(int** a, int*** b) { return __sync_lock_test_and_set (a, b); } -// CHECK: define i32* @foo6 +// CHECK-LABEL: define i32* @foo6 // CHECK: atomicrmw xchg diff --git a/clang/test/CodeGen/2008-07-30-implicit-initialization.c b/clang/test/CodeGen/2008-07-30-implicit-initialization.c index e5162596d71..e77c70a140f 100644 --- a/clang/test/CodeGen/2008-07-30-implicit-initialization.c +++ b/clang/test/CodeGen/2008-07-30-implicit-initialization.c @@ -1,9 +1,9 @@ // RUN: %clang_cc1 -triple i386-unknown-unknown -O1 -emit-llvm -o - %s | FileCheck %s -// CHECK: define i32 @f0() +// CHECK-LABEL: define i32 @f0() // CHECK: ret i32 0 -// CHECK: define i32 @f1() +// CHECK-LABEL: define i32 @f1() // CHECK: ret i32 0 -// CHECK: define i32 @f2() +// CHECK-LABEL: define i32 @f2() // CHECK: ret i32 0 // <rdar://problem/6113085> diff --git a/clang/test/CodeGen/2008-07-31-promotion-of-compound-pointer-arithmetic.c b/clang/test/CodeGen/2008-07-31-promotion-of-compound-pointer-arithmetic.c index 429fb1fcc27..f348b2b6fda 100644 --- a/clang/test/CodeGen/2008-07-31-promotion-of-compound-pointer-arithmetic.c +++ b/clang/test/CodeGen/2008-07-31-promotion-of-compound-pointer-arithmetic.c @@ -1,9 +1,9 @@ // RUN: %clang_cc1 -triple i386-unknown-unknown -O1 -emit-llvm -o - %s | FileCheck %s -// CHECK: define i32 @f0 +// CHECK-LABEL: define i32 @f0 // CHECK: ret i32 1 -// CHECK: define i32 @f1 +// CHECK-LABEL: define i32 @f1 // CHECK: ret i32 1 -// CHECK: define i32 @f2 +// CHECK-LABEL: define i32 @f2 // CHECK: ret i32 1 // <rdr://6115726> diff --git a/clang/test/CodeGen/3dnow-builtins.c b/clang/test/CodeGen/3dnow-builtins.c index 294fbc0579e..f53b85c931d 100644 --- a/clang/test/CodeGen/3dnow-builtins.c +++ b/clang/test/CodeGen/3dnow-builtins.c @@ -6,151 +6,151 @@ #include <x86intrin.h> __m64 test_m_pavgusb(__m64 m1, __m64 m2) { - // CHECK: define i64 @test_m_pavgusb + // CHECK-LABEL: define i64 @test_m_pavgusb // CHECK: @llvm.x86.3dnow.pavgusb return _m_pavgusb(m1, m2); } __m64 test_m_pf2id(__m64 m) { - // CHECK: define i64 @test_m_pf2id + // CHECK-LABEL: define i64 @test_m_pf2id // CHECK: @llvm.x86.3dnow.pf2id return _m_pf2id(m); } __m64 test_m_pfacc(__m64 m1, __m64 m2) { - // CHECK: define i64 @test_m_pfacc + // CHECK-LABEL: define i64 @test_m_pfacc // CHECK: @llvm.x86.3dnow.pfacc return _m_pfacc(m1, m2); } __m64 test_m_pfadd(__m64 m1, __m64 m2) { - // CHECK: define i64 @test_m_pfadd + // CHECK-LABEL: define i64 @test_m_pfadd // CHECK: @llvm.x86.3dnow.pfadd return _m_pfadd(m1, m2); } __m64 test_m_pfcmpeq(__m64 m1, __m64 m2) { - // CHECK: define i64 @test_m_pfcmpeq + // CHECK-LABEL: define i64 @test_m_pfcmpeq // CHECK: @llvm.x86.3dnow.pfcmpeq return _m_pfcmpeq(m1, m2); } __m64 test_m_pfcmpge(__m64 m1, __m64 m2) { - // CHECK: define i64 @test_m_pfcmpge + // CHECK-LABEL: define i64 @test_m_pfcmpge // CHECK: @llvm.x86.3dnow.pfcmpge return _m_pfcmpge(m1, m2); } __m64 test_m_pfcmpgt(__m64 m1, __m64 m2) { - // CHECK: define i64 @test_m_pfcmpgt + // CHECK-LABEL: define i64 @test_m_pfcmpgt // CHECK: @llvm.x86.3dnow.pfcmpgt return _m_pfcmpgt(m1, m2); } __m64 test_m_pfmax(__m64 m1, __m64 m2) { - // CHECK: define i64 @test_m_pfmax + // CHECK-LABEL: define i64 @test_m_pfmax // CHECK: @llvm.x86.3dnow.pfmax return _m_pfmax(m1, m2); } __m64 test_m_pfmin(__m64 m1, __m64 m2) { - // CHECK: define i64 @test_m_pfmin + // CHECK-LABEL: define i64 @test_m_pfmin // CHECK: @llvm.x86.3dnow.pfmin return _m_pfmin(m1, m2); } __m64 test_m_pfmul(__m64 m1, __m64 m2) { - // CHECK: define i64 @test_m_pfmul + // CHECK-LABEL: define i64 @test_m_pfmul // CHECK: @llvm.x86.3dnow.pfmul return _m_pfmul(m1, m2); } __m64 test_m_pfrcp(__m64 m) { - // CHECK: define i64 @test_m_pfrcp + // CHECK-LABEL: define i64 @test_m_pfrcp // CHECK: @llvm.x86.3dnow.pfrcp return _m_pfrcp(m); } __m64 test_m_pfrcpit1(__m64 m1, __m64 m2) { - // CHECK: define i64 @test_m_pfrcpit1 + // CHECK-LABEL: define i64 @test_m_pfrcpit1 // CHECK: @llvm.x86.3dnow.pfrcpit1 return _m_pfrcpit1(m1, m2); } __m64 test_m_pfrcpit2(__m64 m1, __m64 m2) { - // CHECK: define i64 @test_m_pfrcpit2 + // CHECK-LABEL: define i64 @test_m_pfrcpit2 // CHECK: @llvm.x86.3dnow.pfrcpit2 return _m_pfrcpit2(m1, m2); } __m64 test_m_pfrsqrt(__m64 m) { - // CHECK: define i64 @test_m_pfrsqrt + // CHECK-LABEL: define i64 @test_m_pfrsqrt // CHECK: @llvm.x86.3dnow.pfrsqrt return _m_pfrsqrt(m); } __m64 test_m_pfrsqrtit1(__m64 m1, __m64 m2) { - // CHECK: define i64 @test_m_pfrsqrtit1 + // CHECK-LABEL: define i64 @test_m_pfrsqrtit1 // CHECK: @llvm.x86.3dnow.pfrsqit1 return _m_pfrsqrtit1(m1, m2); } __m64 test_m_pfsub(__m64 m1, __m64 m2) { - // CHECK: define i64 @test_m_pfsub + // CHECK-LABEL: define i64 @test_m_pfsub // CHECK: @llvm.x86.3dnow.pfsub return _m_pfsub(m1, m2); } __m64 test_m_pfsubr(__m64 m1, __m64 m2) { - // CHECK: define i64 @test_m_pfsubr + // CHECK-LABEL: define i64 @test_m_pfsubr // CHECK: @llvm.x86.3dnow.pfsubr return _m_pfsubr(m1, m2); } __m64 test_m_pi2fd(__m64 m) { - // CHECK: define i64 @test_m_pi2fd + // CHECK-LABEL: define i64 @test_m_pi2fd // CHECK: @llvm.x86.3dnow.pi2fd return _m_pi2fd(m); } __m64 test_m_pmulhrw(__m64 m1, __m64 m2) { - // CHECK: define i64 @test_m_pmulhrw + // CHECK-LABEL: define i64 @test_m_pmulhrw // CHECK: @llvm.x86.3dnow.pmulhrw return _m_pmulhrw(m1, m2); } __m64 test_m_pf2iw(__m64 m) { - // CHECK: define i64 @test_m_pf2iw + // CHECK-LABEL: define i64 @test_m_pf2iw // CHECK: @llvm.x86.3dnowa.pf2iw return _m_pf2iw(m); } __m64 test_m_pfnacc(__m64 m1, __m64 m2) { - // CHECK: define i64 @test_m_pfnacc + // CHECK-LABEL: define i64 @test_m_pfnacc // CHECK: @llvm.x86.3dnowa.pfnacc return _m_pfnacc(m1, m2); } __m64 test_m_pfpnacc(__m64 m1, __m64 m2) { - // CHECK: define i64 @test_m_pfpnacc + // CHECK-LABEL: define i64 @test_m_pfpnacc // CHECK: @llvm.x86.3dnowa.pfpnacc return _m_pfpnacc(m1, m2); } __m64 test_m_pi2fw(__m64 m) { - // CHECK: define i64 @test_m_pi2fw + // CHECK-LABEL: define i64 @test_m_pi2fw // CHECK: @llvm.x86.3dnowa.pi2fw return _m_pi2fw(m); } __m64 test_m_pswapdsf(__m64 m) { - // CHECK: define i64 @test_m_pswapdsf + // CHECK-LABEL: define i64 @test_m_pswapdsf // CHECK: @llvm.x86.3dnowa.pswapd return _m_pswapdsf(m); } __m64 test_m_pswapdsi(__m64 m) { - // CHECK: define i64 @test_m_pswapdsi + // CHECK-LABEL: define i64 @test_m_pswapdsi // CHECK: @llvm.x86.3dnowa.pswapd return _m_pswapdsi(m); } diff --git a/clang/test/CodeGen/Atomics.c b/clang/test/CodeGen/Atomics.c index 2bb38fd749c..5798dfff46b 100644 --- a/clang/test/CodeGen/Atomics.c +++ b/clang/test/CodeGen/Atomics.c @@ -11,7 +11,7 @@ unsigned int ui; signed long long sll; unsigned long long ull; -void test_op_ignore (void) // CHECK: define void @test_op_ignore +void test_op_ignore (void) // CHECK-LABEL: define void @test_op_ignore { (void) __sync_fetch_and_add (&sc, 1); // CHECK: atomicrmw add i8 (void) __sync_fetch_and_add (&uc, 1); // CHECK: atomicrmw add i8 @@ -60,7 +60,7 @@ void test_op_ignore (void) // CHECK: define void @test_op_ignore } -void test_fetch_and_op (void) // CHECK: define void @test_fetch_and_op +void test_fetch_and_op (void) // CHECK-LABEL: define void @test_fetch_and_op { sc = __sync_fetch_and_add (&sc, 11); // CHECK: atomicrmw add uc = __sync_fetch_and_add (&uc, 11); // CHECK: atomicrmw add diff --git a/clang/test/CodeGen/_Bool-conversion.c b/clang/test/CodeGen/_Bool-conversion.c index 9e5e8945031..a51cd8ecf53 100644 --- a/clang/test/CodeGen/_Bool-conversion.c +++ b/clang/test/CodeGen/_Bool-conversion.c @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -triple i386 -emit-llvm -O2 -o - %s | FileCheck %s -// CHECK: define i32 @f0() +// CHECK-LABEL: define i32 @f0() // CHECK: ret i32 1 // CHECK: } diff --git a/clang/test/CodeGen/aarch64-arguments.c b/clang/test/CodeGen/aarch64-arguments.c index 901e7342dda..a70dfb1e3d4 100644 --- a/clang/test/CodeGen/aarch64-arguments.c +++ b/clang/test/CodeGen/aarch64-arguments.c @@ -3,7 +3,7 @@ // Sign extension is performed by the callee on AArch64, which means // that we *shouldn't* tag arguments and returns with their extension. -// PCS: define i8 @f0(i16 %a) +// PCS-LABEL: define i8 @f0(i16 %a) char f0(short a) { return a; } @@ -32,11 +32,11 @@ struct s5 f5(void) {} struct s6 { int f0[1]; }; struct s6 f6(void) {} -// PCS: define void @f7() +// PCS-LABEL: define void @f7() struct s7 { struct { int : 0; } f0; }; struct s7 f7(void) {} -// PCS: define void @f8() +// PCS-LABEL: define void @f8() struct s8 { struct { int : 0; } f0[1]; }; struct s8 f8(void) {} @@ -56,18 +56,18 @@ struct s11 f11(void) {} union u12 { char f0; short f1; int f2; long f3; }; union u12 f12(void) {} -// PCS: define %struct.s13 @f13() +// PCS-LABEL: define %struct.s13 @f13() struct s13 { float f0; }; struct s13 f13(void) {} -// PCS: define %union.u14 @f14() +// PCS-LABEL: define %union.u14 @f14() union u14 { float f0; }; union u14 f14(void) {} -// PCS: define void @f15() +// PCS-LABEL: define void @f15() void f15(struct s7 a0) {} -// PCS: define void @f16() +// PCS-LABEL: define void @f16() void f16(struct s8 a0) {} // PCS: define [1 x i64] @f17() @@ -111,14 +111,14 @@ struct s26 f26() {} struct s27 { _Complex long f0; }; struct s27 f27() {} -// PCS: define void @f28(i8 %a, i16 %b, i32 %c, i64 %d, float %e, double %f) +// PCS-LABEL: define void @f28(i8 %a, i16 %b, i32 %c, i64 %d, float %e, double %f) void f28(char a, short b, int c, long d, float e, double f) {} // PCS: define void @f29([2 x i64] %a struct s29 { int arr[4]; }; void f29(struct s29 a) {} -// PCS: define void @f30(%struct.s30* %a) +// PCS-LABEL: define void @f30(%struct.s30* %a) struct s30 { int arr[4]; char c;}; void f30(struct s30 a) {} @@ -126,7 +126,7 @@ void f30(struct s30 a) {} struct s31 { double arr[4]; }; void f31(struct s31 a) {} -// PCS: define void @f32(%struct.s32* %a) +// PCS-LABEL: define void @f32(%struct.s32* %a) struct s32 { float arr[5]; }; void f32(struct s32 a) {} @@ -135,11 +135,11 @@ void f32(struct s32 a) {} struct s33 { float arr[3]; float a; }; void f33(struct s33 a) {} -// PCS: define void @f34(%struct.s34* noalias sret +// PCS-LABEL: define void @f34(%struct.s34* noalias sret struct s34 { int a[4]; char b }; struct s34 f34(void) {} -// PCS: define void @f35() +// PCS-LABEL: define void @f35() struct s35 {}; void f35(struct s35 a) {} diff --git a/clang/test/CodeGen/aarch64-varargs.c b/clang/test/CodeGen/aarch64-varargs.c index 324a0708271..3d9cd866e87 100644 --- a/clang/test/CodeGen/aarch64-varargs.c +++ b/clang/test/CodeGen/aarch64-varargs.c @@ -7,7 +7,7 @@ va_list the_list; int simple_int(void) { -// CHECK: define i32 @simple_int +// CHECK-LABEL: define i32 @simple_int return va_arg(the_list, int); // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32* getelementptr inbounds (%struct.__va_list* @the_list, i32 0, i32 3) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0 @@ -39,7 +39,7 @@ int simple_int(void) { } __int128 aligned_int(void) { -// CHECK: define i128 @aligned_int +// CHECK-LABEL: define i128 @aligned_int return va_arg(the_list, __int128); // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32* getelementptr inbounds (%struct.__va_list* @the_list, i32 0, i32 3) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0 @@ -81,7 +81,7 @@ struct bigstruct { }; struct bigstruct simple_indirect(void) { -// CHECK: define void @simple_indirect +// CHECK-LABEL: define void @simple_indirect return va_arg(the_list, struct bigstruct); // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32* getelementptr inbounds (%struct.__va_list* @the_list, i32 0, i32 3) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0 @@ -119,7 +119,7 @@ struct aligned_bigstruct { }; struct aligned_bigstruct simple_aligned_indirect(void) { -// CHECK: define void @simple_aligned_indirect +// CHECK-LABEL: define void @simple_aligned_indirect return va_arg(the_list, struct aligned_bigstruct); // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32* getelementptr inbounds (%struct.__va_list* @the_list, i32 0, i32 3) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0 @@ -150,7 +150,7 @@ struct aligned_bigstruct simple_aligned_indirect(void) { } double simple_double(void) { -// CHECK: define double @simple_double +// CHECK-LABEL: define double @simple_double return va_arg(the_list, double); // CHECK: [[VR_OFFS:%[a-z_0-9]+]] = load i32* getelementptr inbounds (%struct.__va_list* @the_list, i32 0, i32 4) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[VR_OFFS]], 0 @@ -186,7 +186,7 @@ struct hfa { }; struct hfa simple_hfa(void) { -// CHECK: define %struct.hfa @simple_hfa +// CHECK-LABEL: define %struct.hfa @simple_hfa return va_arg(the_list, struct hfa); // CHECK: [[VR_OFFS:%[a-z_0-9]+]] = load i32* getelementptr inbounds (%struct.__va_list* @the_list, i32 0, i32 4) // CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[VR_OFFS]], 0 @@ -226,7 +226,7 @@ struct hfa simple_hfa(void) { } void check_start(int n, ...) { -// CHECK: define void @check_start(i32 %n, ...) +// CHECK-LABEL: define void @check_start(i32 %n, ...) va_list the_list; va_start(the_list, n); diff --git a/clang/test/CodeGen/address-space.c b/clang/test/CodeGen/address-space.c index 9de0670b102..3e865fd3b77 100644 --- a/clang/test/CodeGen/address-space.c +++ b/clang/test/CodeGen/address-space.c @@ -9,11 +9,11 @@ int foo __attribute__((address_space(1))); // CHECK: @ban = common addrspace(1) global int ban[10] __attribute__((address_space(1))); -// CHECK: define i32 @test1() +// CHECK-LABEL: define i32 @test1() // CHECK: load i32 addrspace(1)* @foo int test1() { return foo; } -// CHECK: define i32 @test2(i32 %i) +// CHECK-LABEL: define i32 @test2(i32 %i) // CHECK: load i32 addrspace(1)* // CHECK-NEXT: ret i32 int test2(int i) { return ban[i]; } @@ -21,7 +21,7 @@ int test2(int i) { return ban[i]; } // Both A and B point into addrspace(2). __attribute__((address_space(2))) int *A, *B; -// CHECK: define void @test3() +// CHECK-LABEL: define void @test3() // CHECK: load i32 addrspace(2)** @B // CHECK: load i32 addrspace(2)* // CHECK: load i32 addrspace(2)** @A @@ -35,7 +35,7 @@ typedef struct { float aData[1]; } MyStruct; -// CHECK: define void @test4( +// CHECK-LABEL: define void @test4( // CHECK: call void @llvm.memcpy.p0i8.p2i8 // CHECK: call void @llvm.memcpy.p2i8.p0i8 void test4(MyStruct __attribute__((address_space(2))) *pPtr) { diff --git a/clang/test/CodeGen/alias.c b/clang/test/CodeGen/alias.c index a8380a37c58..68f930e7f10 100644 --- a/clang/test/CodeGen/alias.c +++ b/clang/test/CodeGen/alias.c @@ -19,7 +19,7 @@ extern void f1(void) __attribute((alias("f0"))); // Make sure that aliases cause referenced values to be emitted. // PR3200 static inline int foo1() { return 0; } -// CHECKBASIC: define internal i32 @foo1() +// CHECKBASIC-LABEL: define internal i32 @foo1() int foo() __attribute__((alias("foo1"))); int bar() __attribute__((alias("bar1"))); diff --git a/clang/test/CodeGen/align-param.c b/clang/test/CodeGen/align-param.c index 8907f66409a..78e57b5b1f8 100644 --- a/clang/test/CodeGen/align-param.c +++ b/clang/test/CodeGen/align-param.c @@ -5,7 +5,7 @@ int test (long long x) { return (int)x; } -// CHECK: define i32 @test +// CHECK-LABEL: define i32 @test // CHECK: alloca i64, align 8 @@ -14,5 +14,5 @@ struct X { int x,y,z,a; }; int test2(struct X x __attribute((aligned(16)))) { return x.z; } -// CHECK: define i32 @test2 +// CHECK-LABEL: define i32 @test2 // CHECK: alloca %struct.X, align 16 diff --git a/clang/test/CodeGen/annotations-var.c b/clang/test/CodeGen/annotations-var.c index b8ada9fc0f3..da9e0b63eca 100644 --- a/clang/test/CodeGen/annotations-var.c +++ b/clang/test/CodeGen/annotations-var.c @@ -31,7 +31,7 @@ int foo(int v __attribute__((annotate("param_ann_0"))) __attribute__((annotate(" void local(void) { int localvar __attribute__((annotate("localvar_ann_0"))) __attribute__((annotate("localvar_ann_1"))) = 3; -// LOCAL: define void @local() +// LOCAL-LABEL: define void @local() // LOCAL: [[LOCALVAR:%.*]] = alloca i32, // LOCAL-NEXT: [[T0:%.*]] = bitcast i32* [[LOCALVAR]] to i8* // LOCAL-NEXT: call void @llvm.var.annotation(i8* [[T0]], i8* getelementptr inbounds ([15 x i8]* @{{.*}}), i8* getelementptr inbounds ({{.*}}), i32 33) @@ -41,7 +41,7 @@ void local(void) { void undef(void) { int undefvar __attribute__((annotate("undefvar_ann_0"))); -// UNDEF: define void @undef() +// UNDEF-LABEL: define void @undef() // UNDEF: [[UNDEFVAR:%.*]] = alloca i32, // UNDEF-NEXT: [[T0:%.*]] = bitcast i32* [[UNDEFVAR]] to i8* // UNDEF-NEXT: call void @llvm.var.annotation(i8* [[T0]], i8* getelementptr inbounds ([15 x i8]* @{{.*}}), i8* getelementptr inbounds ({{.*}}), i32 43) diff --git a/clang/test/CodeGen/arm-aapcs-vfp.c b/clang/test/CodeGen/arm-aapcs-vfp.c index 7210229f377..0e102f35ed0 100644 --- a/clang/test/CodeGen/arm-aapcs-vfp.c +++ b/clang/test/CodeGen/arm-aapcs-vfp.c @@ -95,6 +95,6 @@ void test_neon(struct neon_struct arg) { neon_callee(arg); } -// CHECK: define arm_aapcs_vfpcc void @f33(%struct.s33* byval %s) +// CHECK-LABEL: define arm_aapcs_vfpcc void @f33(%struct.s33* byval %s) struct s33 { char buf[32*32]; }; void f33(struct s33 s) { } diff --git a/clang/test/CodeGen/arm-arguments.c b/clang/test/CodeGen/arm-arguments.c index 63ecd4c5990..d02a217de4f 100644 --- a/clang/test/CodeGen/arm-arguments.c +++ b/clang/test/CodeGen/arm-arguments.c @@ -2,77 +2,77 @@ // RUN: %clang_cc1 -triple armv7-apple-darwin9 -target-abi apcs-gnu -emit-llvm -w -o - %s | FileCheck -check-prefix=APCS-GNU %s // RUN: %clang_cc1 -triple armv7-apple-darwin9 -target-abi aapcs -emit-llvm -w -o - %s | FileCheck -check-prefix=AAPCS %s -// APCS-GNU: define signext i8 @f0() -// AAPCS: define arm_aapcscc signext i8 @f0() +// APCS-GNU-LABEL: define signext i8 @f0() +// AAPCS-LABEL: define arm_aapcscc signext i8 @f0() char f0(void) { return 0; } -// APCS-GNU: define i8 @f1() -// AAPCS: define arm_aapcscc i8 @f1() +// APCS-GNU-LABEL: define i8 @f1() +// AAPCS-LABEL: define arm_aapcscc i8 @f1() struct s1 { char f0; }; struct s1 f1(void) {} -// APCS-GNU: define i16 @f2() -// AAPCS: define arm_aapcscc i16 @f2() +// APCS-GNU-LABEL: define i16 @f2() +// AAPCS-LABEL: define arm_aapcscc i16 @f2() struct s2 { short f0; }; struct s2 f2(void) {} -// APCS-GNU: define i32 @f3() -// AAPCS: define arm_aapcscc i32 @f3() +// APCS-GNU-LABEL: define i32 @f3() +// AAPCS-LABEL: define arm_aapcscc i32 @f3() struct s3 { int f0; }; struct s3 f3(void) {} -// APCS-GNU: define i32 @f4() -// AAPCS: define arm_aapcscc i32 @f4() +// APCS-GNU-LABEL: define i32 @f4() +// AAPCS-LABEL: define arm_aapcscc i32 @f4() struct s4 { struct s4_0 { int f0; } f0; }; struct s4 f4(void) {} -// APCS-GNU: define void @f5( +// APCS-GNU-LABEL: define void @f5( // APCS-GNU: struct.s5* noalias sret -// AAPCS: define arm_aapcscc i32 @f5() +// AAPCS-LABEL: define arm_aapcscc i32 @f5() struct s5 { struct { } f0; int f1; }; struct s5 f5(void) {} -// APCS-GNU: define void @f6( +// APCS-GNU-LABEL: define void @f6( // APCS-GNU: struct.s6* noalias sret -// AAPCS: define arm_aapcscc i32 @f6() +// AAPCS-LABEL: define arm_aapcscc i32 @f6() struct s6 { int f0[1]; }; struct s6 f6(void) {} -// APCS-GNU: define void @f7() -// AAPCS: define arm_aapcscc void @f7() +// APCS-GNU-LABEL: define void @f7() +// AAPCS-LABEL: define arm_aapcscc void @f7() struct s7 { struct { int : 0; } f0; }; struct s7 f7(void) {} -// APCS-GNU: define void @f8( +// APCS-GNU-LABEL: define void @f8( // APCS-GNU: struct.s8* noalias sret -// AAPCS: define arm_aapcscc void @f8() +// AAPCS-LABEL: define arm_aapcscc void @f8() struct s8 { struct { int : 0; } f0[1]; }; struct s8 f8(void) {} -// APCS-GNU: define i32 @f9() -// AAPCS: define arm_aapcscc i32 @f9() +// APCS-GNU-LABEL: define i32 @f9() +// AAPCS-LABEL: define arm_aapcscc i32 @f9() struct s9 { int f0; int : 0; }; struct s9 f9(void) {} -// APCS-GNU: define i32 @f10() -// AAPCS: define arm_aapcscc i32 @f10() +// APCS-GNU-LABEL: define i32 @f10() +// AAPCS-LABEL: define arm_aapcscc i32 @f10() struct s10 { int f0; int : 0; int : 0; }; struct s10 f10(void) {} -// APCS-GNU: define void @f11( +// APCS-GNU-LABEL: define void @f11( // APCS-GNU: struct.s11* noalias sret -// AAPCS: define arm_aapcscc i32 @f11() +// AAPCS-LABEL: define arm_aapcscc i32 @f11() struct s11 { int : 0; int f0; }; struct s11 f11(void) {} -// APCS-GNU: define i32 @f12() -// AAPCS: define arm_aapcscc i32 @f12() +// APCS-GNU-LABEL: define i32 @f12() +// AAPCS-LABEL: define arm_aapcscc i32 @f12() union u12 { char f0; short f1; int f2; }; union u12 f12(void) {} -// APCS-GNU: define void @f13( +// APCS-GNU-LABEL: define void @f13( // APCS-GNU: struct.s13* noalias sret // FIXME: This should return a float. @@ -80,55 +80,55 @@ union u12 f12(void) {} struct s13 { float f0; }; struct s13 f13(void) {} -// APCS-GNU: define void @f14( +// APCS-GNU-LABEL: define void @f14( // APCS-GNU: union.u14* noalias sret -// AAPCS: define arm_aapcscc i32 @f14() +// AAPCS-LABEL: define arm_aapcscc i32 @f14() union u14 { float f0; }; union u14 f14(void) {} -// APCS-GNU: define void @f15() -// AAPCS: define arm_aapcscc void @f15() +// APCS-GNU-LABEL: define void @f15() +// AAPCS-LABEL: define arm_aapcscc void @f15() void f15(struct s7 a0) {} -// APCS-GNU: define void @f16() -// AAPCS: define arm_aapcscc void @f16() +// APCS-GNU-LABEL: define void @f16() +// AAPCS-LABEL: define arm_aapcscc void @f16() void f16(struct s8 a0) {} -// APCS-GNU: define i32 @f17() -// AAPCS: define arm_aapcscc i32 @f17() +// APCS-GNU-LABEL: define i32 @f17() +// AAPCS-LABEL: define arm_aapcscc i32 @f17() struct s17 { short f0 : 13; char f1 : 4; }; struct s17 f17(void) {} -// APCS-GNU: define i32 @f18() -// AAPCS: define arm_aapcscc i32 @f18() +// APCS-GNU-LABEL: define i32 @f18() +// AAPCS-LABEL: define arm_aapcscc i32 @f18() struct s18 { short f0; char f1 : 4; }; struct s18 f18(void) {} -// APCS-GNU: define void @f19( +// APCS-GNU-LABEL: define void @f19( // APCS-GNU: struct.s19* noalias sret -// AAPCS: define arm_aapcscc i32 @f19() +// AAPCS-LABEL: define arm_aapcscc i32 @f19() struct s19 { int f0; struct s8 f1; }; struct s19 f19(void) {} -// APCS-GNU: define void @f20( +// APCS-GNU-LABEL: define void @f20( // APCS-GNU: struct.s20* noalias sret -// AAPCS: define arm_aapcscc i32 @f20() +// AAPCS-LABEL: define arm_aapcscc i32 @f20() struct s20 { struct s8 f1; int f0; }; struct s20 f20(void) {} -// APCS-GNU: define i8 @f21() -// AAPCS: define arm_aapcscc i32 @f21() +// APCS-GNU-LABEL: define i8 @f21() +// AAPCS-LABEL: define arm_aapcscc i32 @f21() struct s21 { struct {} f1; int f0 : 4; }; struct s21 f21(void) {} -// APCS-GNU: define i16 @f22() -// APCS-GNU: define i32 @f23() -// APCS-GNU: define i64 @f24() -// APCS-GNU: define i128 @f25() -// APCS-GNU: define i64 @f26() -// APCS-GNU: define i128 @f27() -// AAPCS: define arm_aapcscc i16 @f22() -// AAPCS: define arm_aapcscc i32 @f23() +// APCS-GNU-LABEL: define i16 @f22() +// APCS-GNU-LABEL: define i32 @f23() +// APCS-GNU-LABEL: define i64 @f24() +// APCS-GNU-LABEL: define i128 @f25() +// APCS-GNU-LABEL: define i64 @f26() +// APCS-GNU-LABEL: define i128 @f27() +// AAPCS-LABEL: define arm_aapcscc i16 @f22() +// AAPCS-LABEL: define arm_aapcscc i32 @f23() // AAPCS: define arm_aapcscc void @f24({{.*}} noalias sret // AAPCS: define arm_aapcscc void @f25({{.*}} noalias sret // AAPCS: define arm_aapcscc void @f26({{.*}} noalias sret @@ -140,13 +140,13 @@ _Complex long long f25(void) {} _Complex float f26(void) {} _Complex double f27(void) {} -// APCS-GNU: define i16 @f28() -// AAPCS: define arm_aapcscc i16 @f28() +// APCS-GNU-LABEL: define i16 @f28() +// AAPCS-LABEL: define arm_aapcscc i16 @f28() struct s28 { _Complex char f0; }; struct s28 f28() {} -// APCS-GNU: define i32 @f29() -// AAPCS: define arm_aapcscc i32 @f29() +// APCS-GNU-LABEL: define i32 @f29() +// AAPCS-LABEL: define arm_aapcscc i32 @f29() struct s29 { _Complex short f0; }; struct s29 f29() {} @@ -176,8 +176,8 @@ void f32(struct s32 s) { } // PR13350 struct s33 { char buf[32*32]; }; void f33(struct s33 s) { } -// APCS-GNU: define void @f33(%struct.s33* byval %s) -// AAPCS: define arm_aapcscc void @f33(%struct.s33* byval %s) +// APCS-GNU-LABEL: define void @f33(%struct.s33* byval %s) +// AAPCS-LABEL: define arm_aapcscc void @f33(%struct.s33* byval %s) // PR14048 struct s34 { char c; }; @@ -209,14 +209,14 @@ float32x4_t f35(int i, s35_with_align s1, s35_with_align s2) { *(float32x4_t *)&s2); return v; } -// APCS-GNU: define <4 x float> @f35(i32 %i, %struct.s35* byval, %struct.s35* byval) +// APCS-GNU-LABEL: define <4 x float> @f35(i32 %i, %struct.s35* byval, %struct.s35* byval) // APCS-GNU: %[[a:.*]] = alloca %struct.s35, align 16 // APCS-GNU: %[[b:.*]] = bitcast %struct.s35* %[[a]] to i8* // APCS-GNU: %[[c:.*]] = bitcast %struct.s35* %0 to i8* // APCS-GNU: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[b]], i8* %[[c]] // APCS-GNU: %[[d:.*]] = bitcast %struct.s35* %[[a]] to <4 x float>* // APCS-GNU: load <4 x float>* %[[d]], align 16 -// AAPCS: define arm_aapcscc <4 x float> @f35(i32 %i, %struct.s35* byval, %struct.s35* byval) +// AAPCS-LABEL: define arm_aapcscc <4 x float> @f35(i32 %i, %struct.s35* byval, %struct.s35* byval) // AAPCS: %[[a:.*]] = alloca %struct.s35, align 16 // AAPCS: %[[b:.*]] = bitcast %struct.s35* %[[a]] to i8* // AAPCS: %[[c:.*]] = bitcast %struct.s35* %0 to i8* diff --git a/clang/test/CodeGen/arm-cc.c b/clang/test/CodeGen/arm-cc.c index 80ebe687c11..8e6aae78b66 100644 --- a/clang/test/CodeGen/arm-cc.c +++ b/clang/test/CodeGen/arm-cc.c @@ -5,13 +5,13 @@ // RUN: %clang_cc1 -triple arm-none-linux-gnueabi -target-abi aapcs -emit-llvm -w -o - %s | FileCheck -check-prefix=LINUX-AAPCS %s -// DARWIN-APCS: define void @f() +// DARWIN-APCS-LABEL: define void @f() // DARWIN-APCS: call void @g -// DARWIN-AAPCS: define arm_aapcscc void @f() +// DARWIN-AAPCS-LABEL: define arm_aapcscc void @f() // DARWIN-AAPCS: call arm_aapcscc void @g -// LINUX-APCS: define arm_apcscc void @f() +// LINUX-APCS-LABEL: define arm_apcscc void @f() // LINUX-APCS: call arm_apcscc void @g -// LINUX-AAPCS: define void @f() +// LINUX-AAPCS-LABEL: define void @f() // LINUX-AAPCS: call void @g void g(void); void f(void) { diff --git a/clang/test/CodeGen/arm-pcs.c b/clang/test/CodeGen/arm-pcs.c index fc658c3bef6..269f01e77de 100644 --- a/clang/test/CodeGen/arm-pcs.c +++ b/clang/test/CodeGen/arm-pcs.c @@ -6,7 +6,7 @@ typedef int __attribute__((pcs("aapcs-vfp"))) (*aapcs_vfp_fn)(void); aapcs_fn bar; int foo(aapcs_vfp_fn baz) { -// CHECK: define i32 @foo +// CHECK-LABEL: define i32 @foo // CHECK: call arm_aapcscc // CHECK: call arm_aapcs_vfpcc return bar() + baz(); diff --git a/clang/test/CodeGen/arm-pnaclcall.c b/clang/test/CodeGen/arm-pnaclcall.c index 50259957eb1..2faac1c676b 100644 --- a/clang/test/CodeGen/arm-pnaclcall.c +++ b/clang/test/CodeGen/arm-pnaclcall.c @@ -9,10 +9,10 @@ typedef struct { int a; int b; } s1; -// CHECK: define i32 @f48(%struct.s1* byval %s) +// CHECK-LABEL: define i32 @f48(%struct.s1* byval %s) int __attribute__((pnaclcall)) f48(s1 s) { return s.a; } -// CHECK: define void @f49(%struct.s1* noalias sret %agg.result) +// CHECK-LABEL: define void @f49(%struct.s1* noalias sret %agg.result) s1 __attribute__((pnaclcall)) f49() { s1 s; s.a = s.b = 1; return s; } union simple_union { @@ -20,7 +20,7 @@ union simple_union { char b; }; // Unions should be passed as byval structs -// CHECK: define void @f50(%union.simple_union* byval %s) +// CHECK-LABEL: define void @f50(%union.simple_union* byval %s) void __attribute__((pnaclcall)) f50(union simple_union s) {} typedef struct { @@ -29,5 +29,5 @@ typedef struct { int b8 : 8; } bitfield1; // Bitfields should be passed as byval structs -// CHECK: define void @f51(%struct.bitfield1* byval %bf1) +// CHECK-LABEL: define void @f51(%struct.bitfield1* byval %bf1) void __attribute__((pnaclcall)) f51(bitfield1 bf1) {} diff --git a/clang/test/CodeGen/assign.c b/clang/test/CodeGen/assign.c index fc008963c31..b2702f09660 100644 --- a/clang/test/CodeGen/assign.c +++ b/clang/test/CodeGen/assign.c @@ -2,7 +2,7 @@ // Check that we don't generate unnecessary reloads. // -// CHECK: define void @f0() +// CHECK-LABEL: define void @f0() // CHECK: [[x_0:%.*]] = alloca i32, align 4 // CHECK-NEXT: [[y_0:%.*]] = alloca i32, align 4 // CHECK-NEXT: store i32 1, i32* [[x_0]] @@ -18,7 +18,7 @@ void f0() { // This used to test that we generate reloads for volatile access, // but that does not appear to be correct behavior for C. // -// CHECK: define void @f1() +// CHECK-LABEL: define void @f1() // CHECK: [[x_1:%.*]] = alloca i32, align 4 // CHECK-NEXT: [[y_1:%.*]] = alloca i32, align 4 // CHECK-NEXT: store volatile i32 1, i32* [[x_1]] diff --git a/clang/test/CodeGen/atomics-inlining.c b/clang/test/CodeGen/atomics-inlining.c index c69702f35fa..6456e74a94e 100644 --- a/clang/test/CodeGen/atomics-inlining.c +++ b/clang/test/CodeGen/atomics-inlining.c @@ -31,7 +31,7 @@ void test1(void) { (void)__atomic_load(&a1, &a2, memory_order_seq_cst); (void)__atomic_store(&a1, &a2, memory_order_seq_cst); -// ARM: define arm_aapcscc void @test1 +// ARM-LABEL: define arm_aapcscc void @test1 // ARM: = call arm_aapcscc zeroext i8 @__atomic_load_1(i8* @c1 // ARM: call arm_aapcscc void @__atomic_store_1(i8* @c1, i8 zeroext // ARM: = call arm_aapcscc zeroext i16 @__atomic_load_2(i8* bitcast (i16* @s1 to i8*) @@ -43,7 +43,7 @@ void test1(void) { // ARM: call arm_aapcscc void @__atomic_load(i32 100, i8* getelementptr inbounds ([100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8]* @a2, i32 0, i32 0) // ARM: call arm_aapcscc void @__atomic_store(i32 100, i8* getelementptr inbounds ([100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8]* @a2, i32 0, i32 0) -// PPC32: define void @test1 +// PPC32-LABEL: define void @test1 // PPC32: = load atomic i8* @c1 seq_cst // PPC32: store atomic i8 {{.*}}, i8* @c1 seq_cst // PPC32: = load atomic i16* @s1 seq_cst @@ -55,7 +55,7 @@ void test1(void) { // PPC32: call void @__atomic_load(i32 100, i8* getelementptr inbounds ([100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8]* @a2, i32 0, i32 0) // PPC32: call void @__atomic_store(i32 100, i8* getelementptr inbounds ([100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8]* @a2, i32 0, i32 0) -// PPC64: define void @test1 +// PPC64-LABEL: define void @test1 // PPC64: = load atomic i8* @c1 seq_cst // PPC64: store atomic i8 {{.*}}, i8* @c1 seq_cst // PPC64: = load atomic i16* @s1 seq_cst @@ -67,7 +67,7 @@ void test1(void) { // PPC64: call void @__atomic_load(i64 100, i8* getelementptr inbounds ([100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8]* @a2, i32 0, i32 0) // PPC64: call void @__atomic_store(i64 100, i8* getelementptr inbounds ([100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8]* @a2, i32 0, i32 0) -// MIPS32: define void @test1 +// MIPS32-LABEL: define void @test1 // MIPS32: = load atomic i8* @c1 seq_cst // MIPS32: store atomic i8 {{.*}}, i8* @c1 seq_cst // MIPS32: = load atomic i16* @s1 seq_cst @@ -79,7 +79,7 @@ void test1(void) { // MIPS32: call void @__atomic_load(i32 100, i8* getelementptr inbounds ([100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8]* @a2, i32 0, i32 0) // MIPS32: call void @__atomic_store(i32 100, i8* getelementptr inbounds ([100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8]* @a2, i32 0, i32 0) -// MIPS64: define void @test1 +// MIPS64-LABEL: define void @test1 // MIPS64: = load atomic i8* @c1 seq_cst // MIPS64: store atomic i8 {{.*}}, i8* @c1 seq_cst // MIPS64: = load atomic i16* @s1 seq_cst diff --git a/clang/test/CodeGen/attr-availability.c b/clang/test/CodeGen/attr-availability.c index 6f9c045a3f1..ccbbb62f8c1 100644 --- a/clang/test/CodeGen/attr-availability.c +++ b/clang/test/CodeGen/attr-availability.c @@ -2,15 +2,15 @@ // RUN: %clang_cc1 -fvisibility hidden "-triple" "x86_64-apple-darwin9.0.0" -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-10_5 %s // RUN: %clang_cc1 -fvisibility hidden "-triple" "x86_64-apple-darwin10.0.0" -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-10_6 %s -// CHECK-10_4: define hidden void @f2 -// CHECK-10_5: define hidden void @f2 -// CHECK-10_6: define hidden void @f2 +// CHECK-10_4-LABEL: define hidden void @f2 +// CHECK-10_5-LABEL: define hidden void @f2 +// CHECK-10_6-LABEL: define hidden void @f2 void f2(); void f2() { } -// CHECK-10_4: define void @f3 -// CHECK-10_5: define void @f3 -// CHECK-10_6: define void @f3 +// CHECK-10_4-LABEL: define void @f3 +// CHECK-10_5-LABEL: define void @f3 +// CHECK-10_6-LABEL: define void @f3 void f3() __attribute__((availability(macosx,introduced=10.5))); void f3() { } diff --git a/clang/test/CodeGen/attr-weakref.c b/clang/test/CodeGen/attr-weakref.c index 560d39141ca..248860d5bcd 100644 --- a/clang/test/CodeGen/attr-weakref.c +++ b/clang/test/CodeGen/attr-weakref.c @@ -8,7 +8,7 @@ void test1_h(void) { test1_g(); } -// CHECK: define void @test2_f() +// CHECK-LABEL: define void @test2_f() void test2_f(void) {} static void test2_g(void) __attribute__((weakref("test2_f"))); void test2_h(void) { @@ -25,7 +25,7 @@ void test3_h(void) { test3_g(); } -// CHECK: define void @test4_f() +// CHECK-LABEL: define void @test4_f() void test4_f(void); static void test4_g(void) __attribute__((weakref("test4_f"))); void test4_h(void) { diff --git a/clang/test/CodeGen/available-externally-suppress.c b/clang/test/CodeGen/available-externally-suppress.c index 46b6e742f35..b6c8ff89fe8 100644 --- a/clang/test/CodeGen/available-externally-suppress.c +++ b/clang/test/CodeGen/available-externally-suppress.c @@ -5,7 +5,7 @@ int x; inline void f0(int y) { x = y; } -// CHECK: define void @test() +// CHECK-LABEL: define void @test() // CHECK: declare void @f0(i32) void test() { f0(17); diff --git a/clang/test/CodeGen/bitfield-2.c b/clang/test/CodeGen/bitfield-2.c index 64808155cc5..58b17f17f02 100644 --- a/clang/test/CodeGen/bitfield-2.c +++ b/clang/test/CodeGen/bitfield-2.c @@ -32,7 +32,7 @@ int f0_reload(struct s0 *a0) { return (a0->f0 += 1); } -// CHECK-OPT: define i64 @test_0() +// CHECK-OPT-LABEL: define i64 @test_0() // CHECK-OPT: ret i64 1 // CHECK-OPT: } unsigned long long test_0() { @@ -78,7 +78,7 @@ int f1_reload(struct s1 *a0) { return (a0->f1 += 1234); } -// CHECK-OPT: define i64 @test_1() +// CHECK-OPT-LABEL: define i64 @test_1() // CHECK-OPT: ret i64 210 // CHECK-OPT: } unsigned long long test_1() { @@ -120,7 +120,7 @@ int f2_reload(union u2 *a0) { return (a0->f0 += 1234); } -// CHECK-OPT: define i64 @test_2() +// CHECK-OPT-LABEL: define i64 @test_2() // CHECK-OPT: ret i64 2 // CHECK-OPT: } unsigned long long test_2() { @@ -156,7 +156,7 @@ int f3_reload(struct s3 *a0) { return (a0->f0 += 1234); } -// CHECK-OPT: define i64 @test_3() +// CHECK-OPT-LABEL: define i64 @test_3() // CHECK-OPT: ret i64 -559039940 // CHECK-OPT: } unsigned long long test_3() { @@ -190,7 +190,7 @@ int f4_reload(struct s4 *a0) { return (a0->f0 += 1234) ^ (a0->f1 += 5678); } -// CHECK-OPT: define i64 @test_4() +// CHECK-OPT-LABEL: define i64 @test_4() // CHECK-OPT: ret i64 4860 // CHECK-OPT: } unsigned long long test_4() { @@ -222,7 +222,7 @@ int f5_reload(struct s5 *a0) { return (a0->f0 += 0xF) ^ (a0->f1 += 0xF) ^ (a0->f2 += 0xF); } -// CHECK-OPT: define i64 @test_5() +// CHECK-OPT-LABEL: define i64 @test_5() // CHECK-OPT: ret i64 2 // CHECK-OPT: } unsigned long long test_5() { @@ -252,7 +252,7 @@ int f6_reload(struct s6 *a0) { return (a0->f0 += 0xF); } -// CHECK-OPT: define zeroext i1 @test_6() +// CHECK-OPT-LABEL: define zeroext i1 @test_6() // CHECK-OPT: ret i1 true // CHECK-OPT: } _Bool test_6() { @@ -310,7 +310,7 @@ int f8_reload(struct s8 *a0) { return (a0->f0 += 0xFD) ^ (a0->f2 += 0xFD) ^ (a0->f3 += 0xFD); } -// CHECK-OPT: define i32 @test_8() +// CHECK-OPT-LABEL: define i32 @test_8() // CHECK-OPT: ret i32 -3 // CHECK-OPT: } unsigned test_8() { diff --git a/clang/test/CodeGen/block-byref-aggr.c b/clang/test/CodeGen/block-byref-aggr.c index eb342b856e4..eed023956cd 100644 --- a/clang/test/CodeGen/block-byref-aggr.c +++ b/clang/test/CodeGen/block-byref-aggr.c @@ -12,7 +12,7 @@ void test0() { a = makeAgg(); } -// CHECK: define void @test0() +// CHECK-LABEL: define void @test0() // CHECK: [[A:%.*]] = alloca [[BYREF:%.*]], align 8 // CHECK-NEXT: [[TEMP:%.*]] = alloca [[AGG]], align 4 // CHECK: [[RESULT:%.*]] = call i32 @makeAgg() @@ -37,7 +37,7 @@ void test1() { __block Agg a, b; a = b = makeAgg(); } -// CHECK: define void @test1() +// CHECK-LABEL: define void @test1() // CHECK: [[A:%.*]] = alloca [[A_BYREF:%.*]], align 8 // CHECK-NEXT: [[B:%.*]] = alloca [[B_BYREF:%.*]], align 8 // CHECK-NEXT: [[TEMP:%.*]] = alloca [[AGG]], align 4 diff --git a/clang/test/CodeGen/blocks.c b/clang/test/CodeGen/blocks.c index 47708e7481f..5871e8c2429 100644 --- a/clang/test/CodeGen/blocks.c +++ b/clang/test/CodeGen/blocks.c @@ -45,7 +45,7 @@ void f3() { // The bool can fill in between the header and the long long. // Add the appropriate amount of padding between them. void f4_helper(long long (^)(void)); -// CHECK: define void @f4() +// CHECK-LABEL: define void @f4() void f4(void) { _Bool b = 0; long long ll = 0; @@ -60,7 +60,7 @@ struct F5 { char buffer[32] __attribute((aligned)); }; void f5_helper(void (^)(struct F5 *)); -// CHECK: define void @f5() +// CHECK-LABEL: define void @f5() void f5(void) { struct F5 value; // CHECK: alloca <{ i8*, i32, i32, i8*, {{%.*}}*, [12 x i8], [[F5:%.*]] }>, align 16 diff --git a/clang/test/CodeGen/bool_test.c b/clang/test/CodeGen/bool_test.c index 83d83307715..a4aa669f16c 100644 --- a/clang/test/CodeGen/bool_test.c +++ b/clang/test/CodeGen/bool_test.c @@ -8,7 +8,7 @@ void f(_Bool *x, _Bool *y) { *x = *y; } -// CHECK: define void @f( +// CHECK-LABEL: define void @f( // CHECK: [[FROMMEM:%.*]] = load i32* % // CHECK: [[BOOLVAL:%.*]] = trunc i32 [[FROMMEM]] to i1 // CHECK: [[TOMEM:%.*]] = zext i1 [[BOOLVAL]] to i32 diff --git a/clang/test/CodeGen/builtins-ppc-altivec.c b/clang/test/CodeGen/builtins-ppc-altivec.c index 9427a8a57cd..47a198f2aed 100644 --- a/clang/test/CodeGen/builtins-ppc-altivec.c +++ b/clang/test/CodeGen/builtins-ppc-altivec.c @@ -41,7 +41,7 @@ int res_i; int res_ui; int res_f; -// CHECK: define void @test1 +// CHECK-LABEL: define void @test1 void test1() { /* vec_abs */ @@ -333,7 +333,7 @@ void test1() { } -// CHECK: define void @test2 +// CHECK-LABEL: define void @test2 void test2() { /* vec_avg */ res_vsc = vec_avg(vsc, vsc); // CHECK: @llvm.ppc.altivec.vavgsb @@ -371,7 +371,7 @@ void test2() { res_vbi = vec_vcmpgefp(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgefp } -// CHECK: define void @test5 +// CHECK-LABEL: define void @test5 void test5() { /* vec_cmpgt */ @@ -394,7 +394,7 @@ void test5() { res_vbi = vec_cmple(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgefp } -// CHECK: define void @test6 +// CHECK-LABEL: define void @test6 void test6() { /* vec_cmplt */ res_vbc = vec_cmplt(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtsb @@ -3055,7 +3055,7 @@ void test6() { } /* ------------------------------ Relational Operators ------------------------------ */ -// CHECK: define void @test7 +// CHECK-LABEL: define void @test7 void test7() { vector signed char vsc1 = (vector signed char)(-1); vector signed char vsc2 = (vector signed char)(-2); diff --git a/clang/test/CodeGen/builtins.c b/clang/test/CodeGen/builtins.c index 9ba12bbf2fe..39bd84c5a5a 100644 --- a/clang/test/CodeGen/builtins.c +++ b/clang/test/CodeGen/builtins.c @@ -131,7 +131,7 @@ void foo() { __builtin_strcat(0, 0); } -// CHECK: define void @bar( +// CHECK-LABEL: define void @bar( void bar() { float f; double d; @@ -167,7 +167,7 @@ void bar() { // CHECK: } -// CHECK: define void @test_float_builtins +// CHECK-LABEL: define void @test_float_builtins void test_float_builtins(float F, double D, long double LD) { volatile int res; res = __builtin_isinf(F); @@ -197,7 +197,7 @@ void test_float_builtins(float F, double D, long double LD) { // CHECK: and i1 } -// CHECK: define void @test_builtin_longjmp +// CHECK-LABEL: define void @test_builtin_longjmp void test_builtin_longjmp(void **buffer) { // CHECK: [[BITCAST:%.*]] = bitcast // CHECK-NEXT: call void @llvm.eh.sjlj.longjmp(i8* [[BITCAST]]) @@ -205,7 +205,7 @@ void test_builtin_longjmp(void **buffer) { // CHECK-NEXT: unreachable } -// CHECK: define i64 @test_builtin_readcyclecounter +// CHECK-LABEL: define i64 @test_builtin_readcyclecounter long long test_builtin_readcyclecounter() { // CHECK: call i64 @llvm.readcyclecounter() return __builtin_readcyclecounter(); diff --git a/clang/test/CodeGen/builtinshufflevector2.c b/clang/test/CodeGen/builtinshufflevector2.c index 4a7fc6261a0..04405b5cd15 100644 --- a/clang/test/CodeGen/builtinshufflevector2.c +++ b/clang/test/CodeGen/builtinshufflevector2.c @@ -3,7 +3,7 @@ typedef float float4 __attribute__((ext_vector_type(4))); typedef unsigned int uint4 __attribute__((ext_vector_type(4))); -// CHECK: define void @clang_shufflevector_v_v( +// CHECK-LABEL: define void @clang_shufflevector_v_v( void clang_shufflevector_v_v( float4* A, float4 x, uint4 mask ) { // CHECK: [[MASK:%.*]] = and <4 x i32> {{%.*}}, <i32 3, i32 3, i32 3, i32 3> // CHECK: [[I:%.*]] = extractelement <4 x i32> [[MASK]], i32 0 @@ -27,14 +27,14 @@ void clang_shufflevector_v_v( float4* A, float4 x, uint4 mask ) { *A = __builtin_shufflevector( x, mask ); } -// CHECK: define void @clang_shufflevector_v_v_c( +// CHECK-LABEL: define void @clang_shufflevector_v_v_c( void clang_shufflevector_v_v_c( float4* A, float4 x, float4 y) { // CHECK: [[V:%.*]] = shufflevector <4 x float> {{%.*}}, <4 x float> {{%.*}}, <4 x i32> <i32 0, i32 4, i32 1, i32 5> // CHECK: store <4 x float> [[V]], <4 x float>* {{%.*}} *A = __builtin_shufflevector( x, y, 0, 4, 1, 5 ); } -// CHECK: define void @clang_shufflevector_v_v_undef( +// CHECK-LABEL: define void @clang_shufflevector_v_v_undef( void clang_shufflevector_v_v_undef( float4* A, float4 x, float4 y) { // CHECK: [[V:%.*]] = shufflevector <4 x float> {{%.*}}, <4 x float> {{%.*}}, <4 x i32> <i32 0, i32 4, i32 undef, i32 5> // CHECK: store <4 x float> [[V]], <4 x float>* {{%.*}} diff --git a/clang/test/CodeGen/byval-memcpy-elim.c b/clang/test/CodeGen/byval-memcpy-elim.c index 76cdafb5e8c..d4b751a48bd 100644 --- a/clang/test/CodeGen/byval-memcpy-elim.c +++ b/clang/test/CodeGen/byval-memcpy-elim.c @@ -12,7 +12,7 @@ struct Test2S { // Make sure we don't generate extra memcpy for lvalues void test1a(struct Test1S, struct Test2S); -// CHECK: define void @test1( +// CHECK-LABEL: define void @test1( // CHECK-NOT: memcpy // CHECK: call void @test1a void test1(struct Test1S *A, struct Test2S *B) { @@ -28,7 +28,7 @@ struct Test3S { int a,b,c,d,e,f,g,h,i,j,k,l; }; void test2a(struct Test3S q); -// CHECK: define void @test2( +// CHECK-LABEL: define void @test2( // CHECK: alloca %struct.Test3S, align 8 // CHECK: memcpy // CHECK: call void @test2a @@ -38,7 +38,7 @@ void test2(struct Test3S *q) { // But make sure we don't generate a memcpy when we can guarantee alignment. void fooey(void); -// CHECK: define void @test3( +// CHECK-LABEL: define void @test3( // CHECK: alloca %struct.Test3S, align 8 // CHECK: call void @fooey // CHECK-NOT: memcpy diff --git a/clang/test/CodeGen/c-strings.c b/clang/test/CodeGen/c-strings.c index 60a6b019129..ff86619117a 100644 --- a/clang/test/CodeGen/c-strings.c +++ b/clang/test/CodeGen/c-strings.c @@ -19,13 +19,13 @@ unsigned char align = 1; void bar(const char *); -// CHECK: define void @f0() +// CHECK-LABEL: define void @f0() void f0() { bar("hello"); // CHECK: call void @bar({{.*}} @.str } -// CHECK: define void @f1() +// CHECK-LABEL: define void @f1() void f1() { static char *x = "hello"; bar(x); @@ -33,14 +33,14 @@ void f1() { // CHECK: call void @bar(i8* [[T1:%.*]]) } -// CHECK: define void @f2() +// CHECK-LABEL: define void @f2() void f2() { static char x[] = "hello"; bar(x); // CHECK: call void @bar({{.*}} @f2.x } -// CHECK: define void @f3() +// CHECK-LABEL: define void @f3() void f3() { static char x[8] = "hello"; bar(x); @@ -49,7 +49,7 @@ void f3() { void gaz(void *); -// CHECK: define void @f4() +// CHECK-LABEL: define void @f4() void f4() { static struct s { char *name; diff --git a/clang/test/CodeGen/c11atomics-ios.c b/clang/test/CodeGen/c11atomics-ios.c index 7992948bb63..ad004fa4b2f 100644 --- a/clang/test/CodeGen/c11atomics-ios.c +++ b/clang/test/CodeGen/c11atomics-ios.c @@ -6,7 +6,7 @@ // This work was done in pursuit of <rdar://13338582>. -// CHECK: define arm_aapcscc void @testFloat(float* +// CHECK-LABEL: define arm_aapcscc void @testFloat(float* void testFloat(_Atomic(float) *fp) { // CHECK: [[FP:%.*]] = alloca float* // CHECK-NEXT: [[X:%.*]] = alloca float diff --git a/clang/test/CodeGen/c11atomics.c b/clang/test/CodeGen/c11atomics.c index 46d207c12e8..5c761b13749 100644 --- a/clang/test/CodeGen/c11atomics.c +++ b/clang/test/CodeGen/c11atomics.c @@ -135,7 +135,7 @@ void testandeq(void) s &= 42; } -// CHECK: define arm_aapcscc void @testFloat(float* +// CHECK-LABEL: define arm_aapcscc void @testFloat(float* void testFloat(_Atomic(float) *fp) { // CHECK: [[FP:%.*]] = alloca float* // CHECK-NEXT: [[X:%.*]] = alloca float diff --git a/clang/test/CodeGen/capture-complex-expr-in-block.c b/clang/test/CodeGen/capture-complex-expr-in-block.c index 86c93d0252b..83695a8b734 100644 --- a/clang/test/CodeGen/capture-complex-expr-in-block.c +++ b/clang/test/CodeGen/capture-complex-expr-in-block.c @@ -12,7 +12,7 @@ int main () b(); } -// CHECK: define internal void @__main_block_invoke +// CHECK-LABEL: define internal void @__main_block_invoke // CHECK: [[C1:%.*]] = alloca { double, double }, align 8 // CHECK: [[RP:%.*]] = getelementptr inbounds { double, double }* [[C1]], i32 0, i32 0 // CHECK-NEXT: [[R:%.*]] = load double* [[RP]] diff --git a/clang/test/CodeGen/complex-convert.c b/clang/test/CodeGen/complex-convert.c index aaa57a023a2..e35be9c1491 100644 --- a/clang/test/CodeGen/complex-convert.c +++ b/clang/test/CodeGen/complex-convert.c @@ -21,7 +21,7 @@ void foo(signed char sc, unsigned char uc, signed long long sll, _Complex unsigned char cuc1; _Complex signed long long csll1; _Complex unsigned long long cull1; - // CHECK: define void @foo( + // CHECK-LABEL: define void @foo( // CHECK: alloca i[[CHSIZE:[0-9]+]], align [[CHALIGN:[0-9]+]] // CHECK-NEXT: alloca i[[CHSIZE]], align [[CHALIGN]] // CHECK-NEXT: alloca i[[LLSIZE:[0-9]+]], align [[LLALIGN:[0-9]+]] diff --git a/clang/test/CodeGen/complex-indirect.c b/clang/test/CodeGen/complex-indirect.c index 0daa970e760..cb84f7f4972 100644 --- a/clang/test/CodeGen/complex-indirect.c +++ b/clang/test/CodeGen/complex-indirect.c @@ -7,6 +7,6 @@ void a(int,int,int,int,int,int,__complex__ char); void b(__complex__ char *y) { a(0,0,0,0,0,0,*y); } -// CHECK: define void @b +// CHECK-LABEL: define void @b // CHECK: alloca { i8, i8 }*, align 8 // CHECK: call void @a(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i16 {{.*}}) diff --git a/clang/test/CodeGen/complex-init-list.c b/clang/test/CodeGen/complex-init-list.c index 99c1c62b588..bc38e2caf21 100644 --- a/clang/test/CodeGen/complex-init-list.c +++ b/clang/test/CodeGen/complex-init-list.c @@ -8,11 +8,11 @@ _Complex float x = { 1.0f, 1.0f/0.0f }; // CHECK: @x = global { float, float } { float 1.000000e+00, float 0x7FF0000000000000 }, align 4 _Complex float f(float x, float y) { _Complex float z = { x, y }; return z; } -// CHECK: define <2 x float> @f +// CHECK-LABEL: define <2 x float> @f // CHECK: alloca { float, float } // CHECK: alloca { float, float } _Complex float f2(float x, float y) { return (_Complex float){ x, y }; } -// CHECK: define <2 x float> @f2 +// CHECK-LABEL: define <2 x float> @f2 // CHECK: alloca { float, float } // CHECK: alloca { float, float } diff --git a/clang/test/CodeGen/compound-literal.c b/clang/test/CodeGen/compound-literal.c index e4bf962e12a..458a78e1984 100644 --- a/clang/test/CodeGen/compound-literal.c +++ b/clang/test/CodeGen/compound-literal.c @@ -12,7 +12,7 @@ struct s {int a, b, c;} * b = &(struct s) {1, 2, 3}; _Complex double * x = &(_Complex double){1.0f}; } -// CHECK: define void @f() +// CHECK-LABEL: define void @f() void f() { typedef struct S { int x,y; } S; // CHECK: [[S:%[a-zA-Z0-9.]+]] = alloca [[STRUCT:%[a-zA-Z0-9.]+]], @@ -33,7 +33,7 @@ void f() { // CHECK-NEXT: ret void } -// CHECK: define i48 @g( +// CHECK-LABEL: define i48 @g( struct G { short x, y, z; }; struct G g(int x, int y, int z) { // CHECK: [[RESULT:%.*]] = alloca [[G:%.*]], align 2 diff --git a/clang/test/CodeGen/cxx-default-arg.cpp b/clang/test/CodeGen/cxx-default-arg.cpp index 25b7c10ad10..12e26664081 100644 --- a/clang/test/CodeGen/cxx-default-arg.cpp +++ b/clang/test/CodeGen/cxx-default-arg.cpp @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -emit-llvm %s -o %t -// Note: define CLANG_GENERATE_KNOWN_GOOD and compile to generate code +// Note-LABEL: define CLANG_GENERATE_KNOWN_GOOD and compile to generate code // that makes all of the defaulted arguments explicit. The resulting // byte code should be identical to the compilation without // CLANG_GENERATE_KNOWN_GOOD. diff --git a/clang/test/CodeGen/decl-in-prototype.c b/clang/test/CodeGen/decl-in-prototype.c index 2c0fc4fc3b1..15efa6551bc 100644 --- a/clang/test/CodeGen/decl-in-prototype.c +++ b/clang/test/CodeGen/decl-in-prototype.c @@ -2,13 +2,13 @@ const int AA = 5; -// CHECK: define i32 @f1 +// CHECK-LABEL: define i32 @f1 int f1(enum {AA,BB} E) { // CHECK: ret i32 1 return BB; } -// CHECK: define i32 @f2 +// CHECK-LABEL: define i32 @f2 int f2(enum {AA=7,BB} E) { // CHECK: ret i32 7 return AA; diff --git a/clang/test/CodeGen/dllimport-dllexport.c b/clang/test/CodeGen/dllimport-dllexport.c index c187503c5cf..e70ac03f04c 100644 --- a/clang/test/CodeGen/dllimport-dllexport.c +++ b/clang/test/CodeGen/dllimport-dllexport.c @@ -2,11 +2,11 @@ void __attribute__((dllimport)) foo1(); void __attribute__((dllexport)) foo1(){} -// CHECK: define dllexport void @foo1 +// CHECK-LABEL: define dllexport void @foo1 void __attribute__((dllexport)) foo2(); // PR6269 __declspec(dllimport) void foo3(); __declspec(dllexport) void foo3(){} -// CHECK: define dllexport void @foo3 +// CHECK-LABEL: define dllexport void @foo3 __declspec(dllexport) void foo4(); diff --git a/clang/test/CodeGen/exceptions.c b/clang/test/CodeGen/exceptions.c index 311bc84e6a1..ae0af4dd9d8 100644 --- a/clang/test/CodeGen/exceptions.c +++ b/clang/test/CodeGen/exceptions.c @@ -5,8 +5,8 @@ void test1() { extern void test1_helper(void (^)(int)); - // CHECK: define void @test1() - // CHECK-ARM: define arm_aapcscc void @test1() + // CHECK-LABEL: define void @test1() + // CHECK-ARM-LABEL: define arm_aapcscc void @test1() __block int x = 10; diff --git a/clang/test/CodeGen/exprs.c b/clang/test/CodeGen/exprs.c index f8f28330ab7..2a2216946b2 100644 --- a/clang/test/CodeGen/exprs.c +++ b/clang/test/CodeGen/exprs.c @@ -121,7 +121,7 @@ void f10() { } // rdar://7530813 -// CHECK: define i32 @f11 +// CHECK-LABEL: define i32 @f11 int f11(long X) { int A[100]; return A[X]; @@ -134,14 +134,14 @@ int f11(long X) { int f12() { // PR3150 - // CHECK: define i32 @f12 + // CHECK-LABEL: define i32 @f12 // CHECK: ret i32 1 return 1||1; } // Make sure negate of fp uses -0.0 for proper -0 handling. double f13(double X) { - // CHECK: define double @f13 + // CHECK-LABEL: define double @f13 // CHECK: fsub double -0.0 return -X; } @@ -151,7 +151,7 @@ void f14(struct s14 *a) { (void) &*a; } -// CHECK: define void @f15 +// CHECK-LABEL: define void @f15 void f15() { extern void f15_start(void); f15_start(); @@ -168,7 +168,7 @@ void f15() { } // PR8967: this was crashing -// CHECK: define void @f16() +// CHECK-LABEL: define void @f16() void f16() { __extension__({ goto lbl; }); lbl: @@ -176,7 +176,7 @@ void f16() { } // PR13704: negative increment in i128 is not preserved. -// CHECK: define void @f17() +// CHECK-LABEL: define void @f17() void f17() { extern void extfunc(__int128); __int128 x = 2; diff --git a/clang/test/CodeGen/fast-math.c b/clang/test/CodeGen/fast-math.c index 76cfbbd3654..4a513589ef4 100644 --- a/clang/test/CodeGen/fast-math.c +++ b/clang/test/CodeGen/fast-math.c @@ -2,7 +2,7 @@ float f0, f1, f2; void foo(void) { - // CHECK: define void @foo() + // CHECK-LABEL: define void @foo() // CHECK: fadd fast f0 = f1 + f2; diff --git a/clang/test/CodeGen/finite-math.c b/clang/test/CodeGen/finite-math.c index bf39cea42ce..b0ee15759a5 100644 --- a/clang/test/CodeGen/finite-math.c +++ b/clang/test/CodeGen/finite-math.c @@ -2,7 +2,7 @@ float f0, f1, f2; void foo(void) { - // CHECK: define void @foo() + // CHECK-LABEL: define void @foo() // CHECK: fadd nnan ninf f0 = f1 + f2; diff --git a/clang/test/CodeGen/fp16-ops.c b/clang/test/CodeGen/fp16-ops.c index e5065133067..a848ed16bd8 100644 --- a/clang/test/CodeGen/fp16-ops.c +++ b/clang/test/CodeGen/fp16-ops.c @@ -7,7 +7,7 @@ volatile __fp16 h0 = 0.0, h1 = 1.0, h2; volatile float f0, f1, f2; void foo(void) { - // CHECK: define void @foo() + // CHECK-LABEL: define void @foo() // Check unary ops diff --git a/clang/test/CodeGen/func-return-member.c b/clang/test/CodeGen/func-return-member.c index 14ecac5d6bb..efc30034e00 100644 --- a/clang/test/CodeGen/func-return-member.c +++ b/clang/test/CodeGen/func-return-member.c @@ -10,17 +10,17 @@ int X; struct frk F; float _Complex C; -// CHECK: define void @bar +// CHECK-LABEL: define void @bar void bar(void) { X = foo().f.f.x; } -// CHECK: define void @bun +// CHECK-LABEL: define void @bun void bun(void) { F = foo().f.f; } -// CHECK: define void @ban +// CHECK-LABEL: define void @ban void ban(void) { C = foo().f.f.c; } diff --git a/clang/test/CodeGen/function-attributes.c b/clang/test/CodeGen/function-attributes.c index 25ca9163a19..47a05683557 100644 --- a/clang/test/CodeGen/function-attributes.c +++ b/clang/test/CodeGen/function-attributes.c @@ -24,7 +24,7 @@ void f6(signed short x) { } void f7(unsigned short x) { } -// CHECK: define void @f8() +// CHECK-LABEL: define void @f8() // CHECK: [[AI:#[0-9]+]] // CHECK: { void __attribute__((always_inline)) f8(void) { } @@ -61,7 +61,7 @@ void f13(void){} // Ensure that these get inlined: rdar://6853279 -// CHECK: define void @f14 +// CHECK-LABEL: define void @f14 // CHECK-NOT: @ai_ // CHECK: call void @f14_end static __inline__ __attribute__((always_inline)) @@ -81,21 +81,21 @@ void f14(int a) { } // <rdar://problem/7102668> [irgen] clang isn't setting the optsize bit on functions -// CHECK: define void @f15 +// CHECK-LABEL: define void @f15 // CHECK: [[NUW]] // CHECK: { void f15(void) { } // PR5254 -// CHECK: define void @f16 +// CHECK-LABEL: define void @f16 // CHECK: [[ALIGN:#[0-9]+]] // CHECK: { void __attribute__((force_align_arg_pointer)) f16(void) { } // PR11038 -// CHECK: define void @f18() +// CHECK-LABEL: define void @f18() // CHECK: [[RT:#[0-9]+]] // CHECK: { // CHECK: call void @f17() @@ -106,7 +106,7 @@ __attribute__ ((returns_twice)) void f18(void) { f17(); } -// CHECK: define void @f19() +// CHECK-LABEL: define void @f19() // CHECK: { // CHECK: call i32 @setjmp(i32* null) // CHECK: [[RT_CALL]] diff --git a/clang/test/CodeGen/functions.c b/clang/test/CodeGen/functions.c index 8241a3d1674..55f2d5f35ce 100644 --- a/clang/test/CodeGen/functions.c +++ b/clang/test/CodeGen/functions.c @@ -20,14 +20,14 @@ int a(int); int a() {return 1;} void f0() {} -// CHECK: define void @f0() +// CHECK-LABEL: define void @f0() void f1(); void f2(void) { // CHECK: call void @f1() f1(1, 2, 3); } -// CHECK: define void @f1() +// CHECK-LABEL: define void @f1() void f1() {} // CHECK: define {{.*}} @f3{{\(\)|\(.*sret.*\)}} @@ -54,7 +54,7 @@ void f8_callback(struct Incomplete); void f8_user(void (*callback)(struct Incomplete)); void f8_test() { f8_user(&f8_callback); -// CHECK: define void @f8_test() +// CHECK-LABEL: define void @f8_test() // CHECK: call void @f8_user({{.*}}* bitcast (void ()* @f8_callback to {{.*}}*)) // CHECK: declare void @f8_user({{.*}}*) // CHECK: declare void @f8_callback() diff --git a/clang/test/CodeGen/incomplete-function-type.c b/clang/test/CodeGen/incomplete-function-type.c index b6309472a5b..fc216dae4a7 100644 --- a/clang/test/CodeGen/incomplete-function-type.c +++ b/clang/test/CodeGen/incomplete-function-type.c @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s | FileCheck %s // CHECK: ModuleID // CHECK-NOT: opaque -// CHECK: define void @f0 +// CHECK-LABEL: define void @f0 enum teste1 test1f(void), (*test1)(void) = test1f; struct tests2 test2f(), (*test2)() = test2f; diff --git a/clang/test/CodeGen/inline.c b/clang/test/CodeGen/inline.c index c1a7f0fbae2..b6957359eb7 100644 --- a/clang/test/CodeGen/inline.c +++ b/clang/test/CodeGen/inline.c @@ -1,64 +1,64 @@ // RUN: echo "GNU89 tests:" // RUN: %clang %s -target i386-unknown-unknown -O1 -emit-llvm -S -o - -std=gnu89 | FileCheck %s --check-prefix=CHECK1 -// CHECK1: define i32 @foo() -// CHECK1: define i32 @bar() -// CHECK1: define void @unreferenced1() +// CHECK1-LABEL: define i32 @foo() +// CHECK1-LABEL: define i32 @bar() +// CHECK1-LABEL: define void @unreferenced1() // CHECK1-NOT: unreferenced2 -// CHECK1: define void @gnu_inline() -// CHECK1: define i32 @test1 -// CHECK1: define i32 @test2 -// CHECK1: define void @test3() -// CHECK1: define available_externally i32 @test4 -// CHECK1: define available_externally i32 @test5 -// CHECK1: define i32 @test6 -// CHECK1: define void @test7 +// CHECK1-LABEL: define void @gnu_inline() +// CHECK1-LABEL: define i32 @test1 +// CHECK1-LABEL: define i32 @test2 +// CHECK1-LABEL: define void @test3() +// CHECK1-LABEL: define available_externally i32 @test4 +// CHECK1-LABEL: define available_externally i32 @test5 +// CHECK1-LABEL: define i32 @test6 +// CHECK1-LABEL: define void @test7 // CHECK1: define i{{..}} @strlcpy // CHECK1-NOT: test9 -// CHECK1: define void @testA -// CHECK1: define void @testB -// CHECK1: define void @testC -// CHECK1: define available_externally void @gnu_ei_inline() -// CHECK1: define available_externally i32 @ei() +// CHECK1-LABEL: define void @testA +// CHECK1-LABEL: define void @testB +// CHECK1-LABEL: define void @testC +// CHECK1-LABEL: define available_externally void @gnu_ei_inline() +// CHECK1-LABEL: define available_externally i32 @ei() // RUN: echo "C99 tests:" // RUN: %clang %s -target i386-unknown-unknown -O1 -emit-llvm -S -o - -std=gnu99 | FileCheck %s --check-prefix=CHECK2 -// CHECK2: define i32 @ei() -// CHECK2: define i32 @bar() +// CHECK2-LABEL: define i32 @ei() +// CHECK2-LABEL: define i32 @bar() // CHECK2-NOT: unreferenced1 -// CHECK2: define void @unreferenced2() -// CHECK2: define void @gnu_inline() -// CHECK2: define i32 @test1 -// CHECK2: define i32 @test2 -// CHECK2: define void @test3 -// CHECK2: define available_externally i32 @test4 -// CHECK2: define available_externally i32 @test5 -// CHECK2: define i32 @test6 -// CHECK2: define void @test7 +// CHECK2-LABEL: define void @unreferenced2() +// CHECK2-LABEL: define void @gnu_inline() +// CHECK2-LABEL: define i32 @test1 +// CHECK2-LABEL: define i32 @test2 +// CHECK2-LABEL: define void @test3 +// CHECK2-LABEL: define available_externally i32 @test4 +// CHECK2-LABEL: define available_externally i32 @test5 +// CHECK2-LABEL: define i32 @test6 +// CHECK2-LABEL: define void @test7 // CHECK2: define available_externally i{{..}} @strlcpy -// CHECK2: define void @test9 -// CHECK2: define void @testA -// CHECK2: define void @testB -// CHECK2: define void @testC -// CHECK2: define available_externally void @gnu_ei_inline() -// CHECK2: define available_externally i32 @foo() +// CHECK2-LABEL: define void @test9 +// CHECK2-LABEL: define void @testA +// CHECK2-LABEL: define void @testB +// CHECK2-LABEL: define void @testC +// CHECK2-LABEL: define available_externally void @gnu_ei_inline() +// CHECK2-LABEL: define available_externally i32 @foo() // RUN: echo "C++ tests:" // RUN: %clang -x c++ %s -target i386-unknown-unknown -O1 -emit-llvm -S -o - -std=c++98 | FileCheck %s --check-prefix=CHECK3 -// CHECK3: define i32 @_Z3barv() -// CHECK3: define linkonce_odr i32 @_Z3foov() +// CHECK3-LABEL: define i32 @_Z3barv() +// CHECK3-LABEL: define linkonce_odr i32 @_Z3foov() // CHECK3-NOT: unreferenced -// CHECK3: define void @_Z10gnu_inlinev() -// CHECK3: define available_externally void @_Z13gnu_ei_inlinev() -// CHECK3: define linkonce_odr i32 @_Z2eiv() +// CHECK3-LABEL: define void @_Z10gnu_inlinev() +// CHECK3-LABEL: define available_externally void @_Z13gnu_ei_inlinev() +// CHECK3-LABEL: define linkonce_odr i32 @_Z2eiv() // RUN: echo "MS C Mode tests:" // RUN: %clang %s -target i386-unknown-unknown -O1 -emit-llvm -S -o - -std=c99 -fms-compatibility | FileCheck %s --check-prefix=CHECK4 -// CHECK4: define i32 @bar() -// CHECK4: define void @gnu_inline() -// CHECK4: define available_externally void @gnu_ei_inline() -// CHECK4: define linkonce_odr i32 @foo() +// CHECK4-LABEL: define i32 @bar() +// CHECK4-LABEL: define void @gnu_inline() +// CHECK4-LABEL: define available_externally void @gnu_ei_inline() +// CHECK4-LABEL: define linkonce_odr i32 @foo() // CHECK4-NOT: unreferenced -// CHECK4: define linkonce_odr i32 @ei() +// CHECK4-LABEL: define linkonce_odr i32 @ei() extern __inline int ei() { return 123; } diff --git a/clang/test/CodeGen/inline2.c b/clang/test/CodeGen/inline2.c index 067258a301b..670ae201f9b 100644 --- a/clang/test/CodeGen/inline2.c +++ b/clang/test/CodeGen/inline2.c @@ -1,60 +1,60 @@ // RUN: %clang_cc1 -O1 -std=gnu89 -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix CHECK-GNU89 %s // RUN: %clang_cc1 -O1 -std=c99 -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix CHECK-C99 %s -// CHECK-GNU89: define i32 @f0() -// CHECK-C99: define i32 @f0() +// CHECK-GNU89-LABEL: define i32 @f0() +// CHECK-C99-LABEL: define i32 @f0() int f0(void); int f0(void) { return 0; } -// CHECK-GNU89: define i32 @f1() -// CHECK-C99: define i32 @f1() +// CHECK-GNU89-LABEL: define i32 @f1() +// CHECK-C99-LABEL: define i32 @f1() inline int f1(void); int f1(void) { return 0; } -// CHECK-GNU89: define i32 @f2() -// CHECK-C99: define i32 @f2() +// CHECK-GNU89-LABEL: define i32 @f2() +// CHECK-C99-LABEL: define i32 @f2() int f2(void); inline int f2(void) { return 0; } -// CHECK-GNU89: define i32 @f3() -// CHECK-C99: define i32 @f3() +// CHECK-GNU89-LABEL: define i32 @f3() +// CHECK-C99-LABEL: define i32 @f3() extern inline int f3(void); int f3(void) { return 0; } -// CHECK-GNU89: define i32 @f5() -// CHECK-C99: define i32 @f5() +// CHECK-GNU89-LABEL: define i32 @f5() +// CHECK-C99-LABEL: define i32 @f5() extern inline int f5(void); inline int f5(void) { return 0; } -// CHECK-GNU89: define i32 @f6() -// CHECK-C99: define i32 @f6() +// CHECK-GNU89-LABEL: define i32 @f6() +// CHECK-C99-LABEL: define i32 @f6() inline int f6(void); extern inline int f6(void) { return 0; } -// CHECK-GNU89: define i32 @f7() -// CHECK-C99: define i32 @f7() +// CHECK-GNU89-LABEL: define i32 @f7() +// CHECK-C99-LABEL: define i32 @f7() extern inline int f7(void); extern int f7(void) { return 0; } -// CHECK-GNU89: define i32 @fA() +// CHECK-GNU89-LABEL: define i32 @fA() inline int fA(void) { return 0; } -// CHECK-GNU89: define available_externally i32 @f4() -// CHECK-C99: define i32 @f4() +// CHECK-GNU89-LABEL: define available_externally i32 @f4() +// CHECK-C99-LABEL: define i32 @f4() int f4(void); extern inline int f4(void) { return 0; } -// CHECK-GNU89: define available_externally i32 @f8() -// CHECK-C99: define i32 @f8() +// CHECK-GNU89-LABEL: define available_externally i32 @f8() +// CHECK-C99-LABEL: define i32 @f8() extern int f8(void); extern inline int f8(void) { return 0; } -// CHECK-GNU89: define available_externally i32 @f9() -// CHECK-C99: define i32 @f9() +// CHECK-GNU89-LABEL: define available_externally i32 @f9() +// CHECK-C99-LABEL: define i32 @f9() extern inline int f9(void); extern inline int f9(void) { return 0; } -// CHECK-C99: define available_externally i32 @fA() +// CHECK-C99-LABEL: define available_externally i32 @fA() int test_all() { return f0() + f1() + f2() + f3() + f4() + f5() + f6() + f7() + f8() + f9() diff --git a/clang/test/CodeGen/integer-overflow.c b/clang/test/CodeGen/integer-overflow.c index ed2dede7814..a007960dec8 100644 --- a/clang/test/CodeGen/integer-overflow.c +++ b/clang/test/CodeGen/integer-overflow.c @@ -8,9 +8,9 @@ // Tests for signed integer overflow stuff. // rdar://7432000 rdar://7221421 void test1() { - // DEFAULT: define void @test1 - // WRAPV: define void @test1 - // TRAPV: define void @test1 + // DEFAULT-LABEL: define void @test1 + // WRAPV-LABEL: define void @test1 + // TRAPV-LABEL: define void @test1 extern volatile int f11G, a, b; // DEFAULT: add nsw i32 diff --git a/clang/test/CodeGen/le32-arguments.c b/clang/test/CodeGen/le32-arguments.c index 2cbbc0fbea4..d26640e6927 100644 --- a/clang/test/CodeGen/le32-arguments.c +++ b/clang/test/CodeGen/le32-arguments.c @@ -2,7 +2,7 @@ // Basic argument/attribute tests for le32/PNaCl -// CHECK: define void @f0(i32 %i, i32 %j, double %k) +// CHECK-LABEL: define void @f0(i32 %i, i32 %j, double %k) void f0(int i, long j, double k) {} typedef struct { @@ -10,27 +10,27 @@ typedef struct { int bb; } s1; // Structs should be passed byval and not split up -// CHECK: define void @f1(%struct.s1* byval %i) +// CHECK-LABEL: define void @f1(%struct.s1* byval %i) void f1(s1 i) {} typedef struct { int cc; } s2; // Structs should be returned sret and not simplified by the frontend -// CHECK: define void @f2(%struct.s2* noalias sret %agg.result) +// CHECK-LABEL: define void @f2(%struct.s2* noalias sret %agg.result) s2 f2() { s2 foo; return foo; } -// CHECK: define void @f3(i64 %i) +// CHECK-LABEL: define void @f3(i64 %i) void f3(long long i) {} // i8/i16 should be signext, i32 and higher should not -// CHECK: define void @f4(i8 signext %a, i16 signext %b) +// CHECK-LABEL: define void @f4(i8 signext %a, i16 signext %b) void f4(char a, short b) {} -// CHECK: define void @f5(i8 zeroext %a, i16 zeroext %b) +// CHECK-LABEL: define void @f5(i8 zeroext %a, i16 zeroext %b) void f5(unsigned char a, unsigned short b) {} @@ -40,7 +40,7 @@ enum my_enum { ENUM3, }; // Enums should be treated as the underlying i32 -// CHECK: define void @f6(i32 %a) +// CHECK-LABEL: define void @f6(i32 %a) void f6(enum my_enum a) {} union simple_union { @@ -48,7 +48,7 @@ union simple_union { char b; }; // Unions should be passed as byval structs -// CHECK: define void @f7(%union.simple_union* byval %s) +// CHECK-LABEL: define void @f7(%union.simple_union* byval %s) void f7(union simple_union s) {} typedef struct { @@ -57,5 +57,5 @@ typedef struct { int b8 : 8; } bitfield1; // Bitfields should be passed as byval structs -// CHECK: define void @f8(%struct.bitfield1* byval %bf1) +// CHECK-LABEL: define void @f8(%struct.bitfield1* byval %bf1) void f8(bitfield1 bf1) {} diff --git a/clang/test/CodeGen/le32-libcall-pow.c b/clang/test/CodeGen/le32-libcall-pow.c index 24a1bbc38c4..1b8a7a33a56 100644 --- a/clang/test/CodeGen/le32-libcall-pow.c +++ b/clang/test/CodeGen/le32-libcall-pow.c @@ -9,7 +9,7 @@ float powf(float, float); double pow(double, double); long double powl(long double, long double); -// CHECK: define void @test_pow +// CHECK-LABEL: define void @test_pow void test_pow(float a0, double a1, long double a2) { // CHECK: call float @powf float l0 = powf(a0, a0); diff --git a/clang/test/CodeGen/libcalls.c b/clang/test/CodeGen/libcalls.c index 29d82db65a9..520b79b146a 100644 --- a/clang/test/CodeGen/libcalls.c +++ b/clang/test/CodeGen/libcalls.c @@ -1,8 +1,8 @@ // RUN: %clang_cc1 -fmath-errno -emit-llvm -o - %s -triple i386-unknown-unknown | FileCheck -check-prefix CHECK-YES %s // RUN: %clang_cc1 -emit-llvm -o - %s -triple i386-unknown-unknown | FileCheck -check-prefix CHECK-NO %s -// CHECK-YES: define void @test_sqrt -// CHECK-NO: define void @test_sqrt +// CHECK-YES-LABEL: define void @test_sqrt +// CHECK-NO-LABEL: define void @test_sqrt void test_sqrt(float a0, double a1, long double a2) { // Following llvm-gcc's lead, we never emit these as intrinsics; // no-math-errno isn't good enough. We could probably use intrinsics @@ -28,8 +28,8 @@ void test_sqrt(float a0, double a1, long double a2) { // CHECK-NO: declare double @sqrt(double) [[NUW_RN]] // CHECK-NO: declare x86_fp80 @sqrtl(x86_fp80) [[NUW_RN]] -// CHECK-YES: define void @test_pow -// CHECK-NO: define void @test_pow +// CHECK-YES-LABEL: define void @test_pow +// CHECK-NO-LABEL: define void @test_pow void test_pow(float a0, double a1, long double a2) { // CHECK-YES: call float @powf // CHECK-NO: call float @llvm.pow.f32 @@ -51,8 +51,8 @@ void test_pow(float a0, double a1, long double a2) { // CHECK-NO: declare double @llvm.pow.f64(double, double) [[NUW_RO]] // CHECK-NO: declare x86_fp80 @llvm.pow.f80(x86_fp80, x86_fp80) [[NUW_RO]] -// CHECK-YES: define void @test_fma -// CHECK-NO: define void @test_fma +// CHECK-YES-LABEL: define void @test_fma +// CHECK-NO-LABEL: define void @test_fma void test_fma(float a0, double a1, long double a2) { // CHECK-YES: call float @llvm.fma.f32 // CHECK-NO: call float @llvm.fma.f32 diff --git a/clang/test/CodeGen/link-bitcode-file.c b/clang/test/CodeGen/link-bitcode-file.c index 7b2bfd6e664..cf9493f988a 100644 --- a/clang/test/CodeGen/link-bitcode-file.c +++ b/clang/test/CodeGen/link-bitcode-file.c @@ -13,12 +13,12 @@ int f(void) { #else -// CHECK-NO-BC: define i32 @g +// CHECK-NO-BC-LABEL: define i32 @g // CHECK-NO-BC: ret i32 42 int g(void) { return f(); } -// CHECK-NO-BC: define i32 @f +// CHECK-NO-BC-LABEL: define i32 @f #endif diff --git a/clang/test/CodeGen/linkage-redecl.c b/clang/test/CodeGen/linkage-redecl.c index 14112fe3a0a..58993f349f8 100644 --- a/clang/test/CodeGen/linkage-redecl.c +++ b/clang/test/CodeGen/linkage-redecl.c @@ -16,4 +16,4 @@ void g0() { } extern void f(int x) { } // still has internal linkage -// CHECK: define internal void @f +// CHECK-LABEL: define internal void @f diff --git a/clang/test/CodeGen/long-double-x86-nacl.c b/clang/test/CodeGen/long-double-x86-nacl.c index 175129cb6a2..cec381a06b9 100644 --- a/clang/test/CodeGen/long-double-x86-nacl.c +++ b/clang/test/CodeGen/long-double-x86-nacl.c @@ -3,5 +3,5 @@ long double x = 0; int checksize[sizeof(x) == 8 ? 1 : -1]; -// CHECK: define void @s1(double %a) +// CHECK-LABEL: define void @s1(double %a) void s1(long double a) {} diff --git a/clang/test/CodeGen/microsoft-call-conv-x64.c b/clang/test/CodeGen/microsoft-call-conv-x64.c index 97a1d99d6b6..6475dfa2936 100644 --- a/clang/test/CodeGen/microsoft-call-conv-x64.c +++ b/clang/test/CodeGen/microsoft-call-conv-x64.c @@ -3,12 +3,12 @@ void __fastcall f1(void); void __stdcall f2(void); void __fastcall f4(void) { -// CHECK: define void @f4() +// CHECK-LABEL: define void @f4() f1(); // CHECK: call void @f1() } void __stdcall f5(void) { -// CHECK: define void @f5() +// CHECK-LABEL: define void @f5() f2(); // CHECK: call void @f2() } diff --git a/clang/test/CodeGen/microsoft-call-conv.c b/clang/test/CodeGen/microsoft-call-conv.c index 64d10fb4f4f..1f8bd7318eb 100644 --- a/clang/test/CodeGen/microsoft-call-conv.c +++ b/clang/test/CodeGen/microsoft-call-conv.c @@ -4,17 +4,17 @@ void __fastcall f1(void); void __stdcall f2(void); void __thiscall f3(void); void __fastcall f4(void) { -// CHECK: define x86_fastcallcc void @f4() +// CHECK-LABEL: define x86_fastcallcc void @f4() f1(); // CHECK: call x86_fastcallcc void @f1() } void __stdcall f5(void) { -// CHECK: define x86_stdcallcc void @f5() +// CHECK-LABEL: define x86_stdcallcc void @f5() f2(); // CHECK: call x86_stdcallcc void @f2() } void __thiscall f6(void) { -// CHECK: define x86_thiscallcc void @f6() +// CHECK-LABEL: define x86_thiscallcc void @f6() f3(); // CHECK: call x86_thiscallcc void @f3() } diff --git a/clang/test/CodeGen/mips-byval-arg.c b/clang/test/CodeGen/mips-byval-arg.c index 41ccd60e8f3..589e85ef9dd 100644 --- a/clang/test/CodeGen/mips-byval-arg.c +++ b/clang/test/CodeGen/mips-byval-arg.c @@ -7,8 +7,8 @@ typedef struct { extern void foo2(S0); -// O32: define void @foo1(i32 %a0.coerce0, i32 %a0.coerce1, i32 %a0.coerce2) -// N64: define void @foo1(i64 %a0.coerce0, i32 %a0.coerce1) +// O32-LABEL: define void @foo1(i32 %a0.coerce0, i32 %a0.coerce1, i32 %a0.coerce2) +// N64-LABEL: define void @foo1(i64 %a0.coerce0, i32 %a0.coerce1) void foo1(S0 a0) { foo2(a0); diff --git a/clang/test/CodeGen/mips-vector-return.c b/clang/test/CodeGen/mips-vector-return.c index 0bff9696900..a7c8ce157c8 100644 --- a/clang/test/CodeGen/mips-vector-return.c +++ b/clang/test/CodeGen/mips-vector-return.c @@ -8,14 +8,14 @@ typedef float v4sf __attribute__ ((__vector_size__ (16))); typedef double v4df __attribute__ ((__vector_size__ (32))); typedef int v4i32 __attribute__ ((__vector_size__ (16))); -// O32: define void @test_v4sf(<4 x float>* noalias nocapture sret +// O32-LABEL: define void @test_v4sf(<4 x float>* noalias nocapture sret // N64: define { i64, i64 } @test_v4sf v4sf test_v4sf(float a) { return (v4sf){0.0f, a, 0.0f, 0.0f}; } -// O32: define void @test_v4df(<4 x double>* noalias nocapture sret -// N64: define void @test_v4df(<4 x double>* noalias nocapture sret +// O32-LABEL: define void @test_v4df(<4 x double>* noalias nocapture sret +// N64-LABEL: define void @test_v4df(<4 x double>* noalias nocapture sret v4df test_v4df(double a) { return (v4df){0.0, a, 0.0, 0.0}; } diff --git a/clang/test/CodeGen/mips64-class-return.cpp b/clang/test/CodeGen/mips64-class-return.cpp index 2a786df3eff..a473c131955 100644 --- a/clang/test/CodeGen/mips64-class-return.cpp +++ b/clang/test/CodeGen/mips64-class-return.cpp @@ -34,12 +34,12 @@ D1 foo2(void) { return gd1; } -// CHECK: define void @_Z4foo32D2(i64 %a0.coerce0, double %a0.coerce1) +// CHECK-LABEL: define void @_Z4foo32D2(i64 %a0.coerce0, double %a0.coerce1) void foo3(D2 a0) { gd2 = a0; } -// CHECK: define void @_Z4foo42D0(i64 %a0.coerce0, i64 %a0.coerce1) +// CHECK-LABEL: define void @_Z4foo42D0(i64 %a0.coerce0, i64 %a0.coerce1) void foo4(D0 a0) { gd0 = a0; } diff --git a/clang/test/CodeGen/mips64-padding-arg.c b/clang/test/CodeGen/mips64-padding-arg.c index 85dc00c9059..b2403b2b778 100644 --- a/clang/test/CodeGen/mips64-padding-arg.c +++ b/clang/test/CodeGen/mips64-padding-arg.c @@ -8,7 +8,7 @@ typedef struct { // Insert padding to ensure arguments of type S0 are aligned to 16-byte boundaries. -// N64: define void @foo1(i32 %a0, i64, double %a1.coerce0, i64 %a1.coerce1, i64 %a1.coerce2, i64 %a1.coerce3, double %a2.coerce0, i64 %a2.coerce1, i64 %a2.coerce2, i64 %a2.coerce3, i32 %b, i64, double %a3.coerce0, i64 %a3.coerce1, i64 %a3.coerce2, i64 %a3.coerce3) +// N64-LABEL: define void @foo1(i32 %a0, i64, double %a1.coerce0, i64 %a1.coerce1, i64 %a1.coerce2, i64 %a1.coerce3, double %a2.coerce0, i64 %a2.coerce1, i64 %a2.coerce2, i64 %a2.coerce3, i32 %b, i64, double %a3.coerce0, i64 %a3.coerce1, i64 %a3.coerce2, i64 %a3.coerce3) // N64: tail call void @foo2(i32 1, i32 2, i32 %a0, i64 undef, double %a1.coerce0, i64 %a1.coerce1, i64 %a1.coerce2, i64 %a1.coerce3, double %a2.coerce0, i64 %a2.coerce1, i64 %a2.coerce2, i64 %a2.coerce3, i32 3, i64 undef, double %a3.coerce0, i64 %a3.coerce1, i64 %a3.coerce2, i64 %a3.coerce3) // N64: declare void @foo2(i32, i32, i32, i64, double, i64, i64, i64, double, i64, i64, i64, i32, i64, double, i64, i64, i64) @@ -20,7 +20,7 @@ void foo1(int a0, S0 a1, S0 a2, int b, S0 a3) { // Insert padding before long double argument. // -// N64: define void @foo3(i32 %a0, i64, fp128 %a1) +// N64-LABEL: define void @foo3(i32 %a0, i64, fp128 %a1) // N64: tail call void @foo4(i32 1, i32 2, i32 %a0, i64 undef, fp128 %a1) // N64: declare void @foo4(i32, i32, i32, i64, fp128) @@ -32,7 +32,7 @@ void foo3(int a0, long double a1) { // Insert padding after hidden argument. // -// N64: define void @foo5(%struct.S0* noalias sret %agg.result, i64, fp128 %a0) +// N64-LABEL: define void @foo5(%struct.S0* noalias sret %agg.result, i64, fp128 %a0) // N64: call void @foo6(%struct.S0* sret %agg.result, i32 1, i32 2, i64 undef, fp128 %a0) // N64: declare void @foo6(%struct.S0* sret, i32, i32, i64, fp128) @@ -44,7 +44,7 @@ S0 foo5(long double a0) { // Do not insert padding if ABI is O32. // -// O32: define void @foo7(float %a0, double %a1) +// O32-LABEL: define void @foo7(float %a0, double %a1) // O32: declare void @foo8(float, double) extern void foo8(float, double); diff --git a/clang/test/CodeGen/ms-inline-asm.cpp b/clang/test/CodeGen/ms-inline-asm.cpp index 8b9109d0194..cd182a1d557 100644 --- a/clang/test/CodeGen/ms-inline-asm.cpp +++ b/clang/test/CodeGen/ms-inline-asm.cpp @@ -39,7 +39,7 @@ void t2() { // CHECK: call void asm sideeffect inteldialect "mov eax, $0", "r,~{eax},~{dirflag},~{fpsr},~{flags}"(i32** @_ZN3Foo3Bar3ptrE) } -// CHECK: define void @_Z2t3v() +// CHECK-LABEL: define void @_Z2t3v() void t3() { __asm mov eax, LENGTH Foo::ptr // CHECK: call void asm sideeffect inteldialect "mov eax, $$1", "~{eax},~{dirflag},~{fpsr},~{flags}"() @@ -76,7 +76,7 @@ struct T4 { void test(); }; -// CHECK: define void @_ZN2T44testEv( +// CHECK-LABEL: define void @_ZN2T44testEv( void T4::test() { // CHECK: [[T0:%.*]] = alloca [[T4:%.*]]*, // CHECK: [[THIS:%.*]] = load [[T4]]** [[T0]] @@ -91,7 +91,7 @@ template <class T> struct T5 { template <class U> static T create(U); void run(); }; -// CHECK: define void @_Z5test5v() +// CHECK-LABEL: define void @_Z5test5v() void test5() { // CHECK: [[X:%.*]] = alloca i32 // CHECK: [[Y:%.*]] = alloca i32 diff --git a/clang/test/CodeGen/no-opt-volatile-memcpy.c b/clang/test/CodeGen/no-opt-volatile-memcpy.c index 0fab3632805..c78fcd82993 100644 --- a/clang/test/CodeGen/no-opt-volatile-memcpy.c +++ b/clang/test/CodeGen/no-opt-volatile-memcpy.c @@ -14,7 +14,7 @@ void foo (void) { gs = gs; ls = gs; } -// CHECK: define void @foo() +// CHECK-LABEL: define void @foo() // CHECK: %[[LS:.*]] = alloca %struct.s, align 4 // CHECK-NEXT: %[[ZERO:.*]] = bitcast %struct.s* %[[LS]] to i8* // CHECK-NEXT: %[[ONE:.*]] = bitcast %struct.s* %[[LS]] to i8* @@ -34,7 +34,7 @@ void fee (void) { s = s; s.y = gs; } -// CHECK: define void @fee() +// CHECK-LABEL: define void @fee() // CHECK: call void @llvm.memcpy.{{.*}}(i8* getelementptr inbounds (%struct.s1* @s, i32 0, i32 0, i32 0, i32 0), i8* getelementptr inbounds (%struct.s1* @s, i32 0, i32 0, i32 0, i32 0), i64 132, i32 4, i1 true) // CHECK-NEXT: call void @llvm.memcpy.{{.*}}(i8* getelementptr inbounds (%struct.s1* @s, i32 0, i32 0, i32 0, i32 0), i8* getelementptr inbounds (%struct.s* @gs, i32 0, i32 0, i32 0), i64 132, i32 4, i1 true) diff --git a/clang/test/CodeGen/object-size.c b/clang/test/CodeGen/object-size.c index f6c7db835bf..9a1d8c99819 100644 --- a/clang/test/CodeGen/object-size.c +++ b/clang/test/CodeGen/object-size.c @@ -13,38 +13,38 @@ char gbuf[63]; char *gp; int gi, gj; -// CHECK: define void @test1 +// CHECK-LABEL: define void @test1 void test1() { // CHECK: = call i8* @__strcpy_chk(i8* getelementptr inbounds ([63 x i8]* @gbuf, i32 0, i64 4), i8* getelementptr inbounds ([9 x i8]* @.str, i32 0, i32 0), i64 59) strcpy(&gbuf[4], "Hi there"); } -// CHECK: define void @test2 +// CHECK-LABEL: define void @test2 void test2() { // CHECK: = call i8* @__strcpy_chk(i8* getelementptr inbounds ([63 x i8]* @gbuf, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8]* @.str, i32 0, i32 0), i64 63) strcpy(gbuf, "Hi there"); } -// CHECK: define void @test3 +// CHECK-LABEL: define void @test3 void test3() { // CHECK: = call i8* @__strcpy_chk(i8* getelementptr inbounds ([63 x i8]* @gbuf, i64 1, i64 37), i8* getelementptr inbounds ([9 x i8]* @.str, i32 0, i32 0), i64 0) strcpy(&gbuf[100], "Hi there"); } -// CHECK: define void @test4 +// CHECK-LABEL: define void @test4 void test4() { // CHECK: = call i8* @__strcpy_chk(i8* getelementptr inbounds ([63 x i8]* @gbuf, i32 0, i64 -1), i8* getelementptr inbounds ([9 x i8]* @.str, i32 0, i32 0), i64 0) strcpy((char*)(void*)&gbuf[-1], "Hi there"); } -// CHECK: define void @test5 +// CHECK-LABEL: define void @test5 void test5() { // CHECK: = load i8** @gp // CHECK-NEXT:= call i64 @llvm.objectsize.i64(i8* %{{.*}}, i1 false) strcpy(gp, "Hi there"); } -// CHECK: define void @test6 +// CHECK-LABEL: define void @test6 void test6() { char buf[57]; @@ -52,7 +52,7 @@ void test6() { strcpy(&buf[4], "Hi there"); } -// CHECK: define void @test7 +// CHECK-LABEL: define void @test7 void test7() { int i; // Ensure we only evaluate the side-effect once. @@ -62,7 +62,7 @@ void test7() { strcpy((++i, gbuf), "Hi there"); } -// CHECK: define void @test8 +// CHECK-LABEL: define void @test8 void test8() { char *buf[50]; // CHECK-NOT: __strcpy_chk @@ -70,14 +70,14 @@ void test8() { strcpy(buf[++gi], "Hi there"); } -// CHECK: define void @test9 +// CHECK-LABEL: define void @test9 void test9() { // CHECK-NOT: __strcpy_chk // CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8]* @.str, i32 0, i32 0)) strcpy((char *)((++gi) + gj), "Hi there"); } -// CHECK: define void @test10 +// CHECK-LABEL: define void @test10 char **p; void test10() { // CHECK-NOT: __strcpy_chk @@ -85,42 +85,42 @@ void test10() { strcpy(*(++p), "Hi there"); } -// CHECK: define void @test11 +// CHECK-LABEL: define void @test11 void test11() { // CHECK-NOT: __strcpy_chk // CHECK: = call i8* @__inline_strcpy_chk(i8* getelementptr inbounds ([63 x i8]* @gbuf, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8]* @.str, i32 0, i32 0)) strcpy(gp = gbuf, "Hi there"); } -// CHECK: define void @test12 +// CHECK-LABEL: define void @test12 void test12() { // CHECK-NOT: __strcpy_chk // CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8]* @.str, i32 0, i32 0)) strcpy(++gp, "Hi there"); } -// CHECK: define void @test13 +// CHECK-LABEL: define void @test13 void test13() { // CHECK-NOT: __strcpy_chk // CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8]* @.str, i32 0, i32 0)) strcpy(gp++, "Hi there"); } -// CHECK: define void @test14 +// CHECK-LABEL: define void @test14 void test14() { // CHECK-NOT: __strcpy_chk // CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8]* @.str, i32 0, i32 0)) strcpy(--gp, "Hi there"); } -// CHECK: define void @test15 +// CHECK-LABEL: define void @test15 void test15() { // CHECK-NOT: __strcpy_chk // CHECK: = call i8* @__inline_strcpy_chk(i8* %{{..*}}, i8* getelementptr inbounds ([9 x i8]* @.str, i32 0, i32 0)) strcpy(gp--, "Hi there"); } -// CHECK: define void @test16 +// CHECK-LABEL: define void @test16 void test16() { // CHECK-NOT: __strcpy_chk // CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8]* @.str, i32 0, i32 0)) diff --git a/clang/test/CodeGen/packed-arrays.c b/clang/test/CodeGen/packed-arrays.c index 0c8bb6c7bd4..8e748dfcfce 100644 --- a/clang/test/CodeGen/packed-arrays.c +++ b/clang/test/CodeGen/packed-arrays.c @@ -51,10 +51,10 @@ int align2_x0 = __alignof(((struct s2*) 0)->x[0]); // CHECK: @align3_x0 = global i32 4 int align3_x0 = __alignof(((struct s3*) 0)->x[0]); -// CHECK: define i32 @f0_a +// CHECK-LABEL: define i32 @f0_a // CHECK: load i32* %{{.*}}, align 1 // CHECK: } -// CHECK: define i32 @f0_b +// CHECK-LABEL: define i32 @f0_b // CHECK: load i32* %{{.*}}, align 4 // CHECK: } int f0_a(struct s0 *a) { @@ -66,19 +66,19 @@ int f0_b(struct s0 *a) { // Note that we are incompatible with GCC on this example. // -// CHECK: define i32 @f1_a +// CHECK-LABEL: define i32 @f1_a // CHECK: load i32* %{{.*}}, align 1 // CHECK: } -// CHECK: define i32 @f1_b +// CHECK-LABEL: define i32 @f1_b // CHECK: load i32* %{{.*}}, align 4 // CHECK: } // Note that we are incompatible with GCC on this example. // -// CHECK: define i32 @f1_c +// CHECK-LABEL: define i32 @f1_c // CHECK: load i32* %{{.*}}, align 4 // CHECK: } -// CHECK: define i32 @f1_d +// CHECK-LABEL: define i32 @f1_d // CHECK: load i32* %{{.*}}, align 1 // CHECK: } int f1_a(struct s1 *a) { @@ -94,16 +94,16 @@ int f1_d(struct s1 *a) { return a->z; } -// CHECK: define i32 @f2_a +// CHECK-LABEL: define i32 @f2_a // CHECK: load i32* %{{.*}}, align 1 // CHECK: } -// CHECK: define i32 @f2_b +// CHECK-LABEL: define i32 @f2_b // CHECK: load i32* %{{.*}}, align 4 // CHECK: } -// CHECK: define i32 @f2_c +// CHECK-LABEL: define i32 @f2_c // CHECK: load i32* %{{.*}}, align 1 // CHECK: } -// CHECK: define i32 @f2_d +// CHECK-LABEL: define i32 @f2_d // CHECK: load i32* %{{.*}}, align 1 // CHECK: } int f2_a(struct s2 *a) { @@ -119,16 +119,16 @@ int f2_d(struct s2 *a) { return a->z; } -// CHECK: define i32 @f3_a +// CHECK-LABEL: define i32 @f3_a // CHECK: load i32* %{{.*}}, align 1 // CHECK: } -// CHECK: define i32 @f3_b +// CHECK-LABEL: define i32 @f3_b // CHECK: load i32* %{{.*}}, align 4 // CHECK: } -// CHECK: define i32 @f3_c +// CHECK-LABEL: define i32 @f3_c // CHECK: load i32* %{{.*}}, align 1 // CHECK: } -// CHECK: define i32 @f3_d +// CHECK-LABEL: define i32 @f3_d // CHECK: load i32* %{{.*}}, align 1 // CHECK: } int f3_a(struct s3 *a) { @@ -146,7 +146,7 @@ int f3_d(struct s3 *a) { // Verify we don't claim things are overaligned. // -// CHECK: define double @f4 +// CHECK-LABEL: define double @f4 // CHECK: load double* {{.*}}, align 8 // CHECK: } extern double g4[5] __attribute__((aligned(16))); diff --git a/clang/test/CodeGen/packed-structure.c b/clang/test/CodeGen/packed-structure.c index ffd98dbfcf3..a915a544b9e 100644 --- a/clang/test/CodeGen/packed-structure.c +++ b/clang/test/CodeGen/packed-structure.c @@ -16,7 +16,7 @@ int s0_align_x = __alignof(((struct s0*)0)->x); int s0_align_y = __alignof(((struct s0*)0)->y); int s0_align = __alignof(struct s0); -// CHECK-FUNCTIONS: define i32 @s0_load_x +// CHECK-FUNCTIONS-LABEL: define i32 @s0_load_x // CHECK-FUNCTIONS: [[s0_load_x:%.*]] = load i32* {{.*}}, align 4 // CHECK-FUNCTIONS: ret i32 [[s0_load_x]] int s0_load_x(struct s0 *a) { return a->x; } @@ -24,11 +24,11 @@ int s0_load_x(struct s0 *a) { return a->x; } // has changed in llvm-gcc recently, previously both x and y would be loaded // with align 1 (in 2363.1 at least). // -// CHECK-FUNCTIONS: define i32 @s0_load_y +// CHECK-FUNCTIONS-LABEL: define i32 @s0_load_y // CHECK-FUNCTIONS: [[s0_load_y:%.*]] = load i32* {{.*}}, align 1 // CHECK-FUNCTIONS: ret i32 [[s0_load_y]] int s0_load_y(struct s0 *a) { return a->y; } -// CHECK-FUNCTIONS: define void @s0_copy +// CHECK-FUNCTIONS-LABEL: define void @s0_copy // CHECK-FUNCTIONS: call void @llvm.memcpy.p0i8.p0i8.i64(i8* {{.*}}, i8* {{.*}}, i64 8, i32 4, i1 false) void s0_copy(struct s0 *a, struct s0 *b) { *b = *a; } @@ -46,15 +46,15 @@ int s1_align_x = __alignof(((struct s1*)0)->x); int s1_align_y = __alignof(((struct s1*)0)->y); int s1_align = __alignof(struct s1); -// CHECK-FUNCTIONS: define i32 @s1_load_x +// CHECK-FUNCTIONS-LABEL: define i32 @s1_load_x // CHECK-FUNCTIONS: [[s1_load_x:%.*]] = load i32* {{.*}}, align 1 // CHECK-FUNCTIONS: ret i32 [[s1_load_x]] int s1_load_x(struct s1 *a) { return a->x; } -// CHECK-FUNCTIONS: define i32 @s1_load_y +// CHECK-FUNCTIONS-LABEL: define i32 @s1_load_y // CHECK-FUNCTIONS: [[s1_load_y:%.*]] = load i32* {{.*}}, align 1 // CHECK-FUNCTIONS: ret i32 [[s1_load_y]] int s1_load_y(struct s1 *a) { return a->y; } -// CHECK-FUNCTIONS: define void @s1_copy +// CHECK-FUNCTIONS-LABEL: define void @s1_copy // CHECK-FUNCTIONS: call void @llvm.memcpy.p0i8.p0i8.i64(i8* {{.*}}, i8* {{.*}}, i64 8, i32 1, i1 false) void s1_copy(struct s1 *a, struct s1 *b) { *b = *a; } @@ -74,15 +74,15 @@ int s2_align_x = __alignof(((struct s2*)0)->x); int s2_align_y = __alignof(((struct s2*)0)->y); int s2_align = __alignof(struct s2); -// CHECK-FUNCTIONS: define i32 @s2_load_x +// CHECK-FUNCTIONS-LABEL: define i32 @s2_load_x // CHECK-FUNCTIONS: [[s2_load_y:%.*]] = load i32* {{.*}}, align 2 // CHECK-FUNCTIONS: ret i32 [[s2_load_y]] int s2_load_x(struct s2 *a) { return a->x; } -// CHECK-FUNCTIONS: define i32 @s2_load_y +// CHECK-FUNCTIONS-LABEL: define i32 @s2_load_y // CHECK-FUNCTIONS: [[s2_load_y:%.*]] = load i32* {{.*}}, align 2 // CHECK-FUNCTIONS: ret i32 [[s2_load_y]] int s2_load_y(struct s2 *a) { return a->y; } -// CHECK-FUNCTIONS: define void @s2_copy +// CHECK-FUNCTIONS-LABEL: define void @s2_copy // CHECK-FUNCTIONS: call void @llvm.memcpy.p0i8.p0i8.i64(i8* {{.*}}, i8* {{.*}}, i64 8, i32 2, i1 false) void s2_copy(struct s2 *a, struct s2 *b) { *b = *a; } @@ -92,7 +92,7 @@ struct __attribute__((packed, aligned)) s3 { }; // CHECK-GLOBAL: @s3_1 = global i32 1 int s3_1 = __alignof(((struct s3*) 0)->anInt); -// CHECK-FUNCTIONS: define i32 @test3( +// CHECK-FUNCTIONS-LABEL: define i32 @test3( int test3(struct s3 *ptr) { // CHECK-FUNCTIONS: [[PTR:%.*]] = getelementptr inbounds {{%.*}}* {{%.*}}, i32 0, i32 1 // CHECK-FUNCTIONS-NEXT: load i32* [[PTR]], align 1 diff --git a/clang/test/CodeGen/ppc64-struct-onefloat.c b/clang/test/CodeGen/ppc64-struct-onefloat.c index 4f9e1949cea..73aaefab375 100644 --- a/clang/test/CodeGen/ppc64-struct-onefloat.c +++ b/clang/test/CodeGen/ppc64-struct-onefloat.c @@ -8,7 +8,7 @@ typedef struct s5 { Sd ds; } SSd; void bar(Sf a, Sd b, SSf d, SSd e) {} -// CHECK: define void @bar +// CHECK-LABEL: define void @bar // CHECK: %a = alloca %struct.s1, align 4 // CHECK: %b = alloca %struct.s2, align 8 // CHECK: %d = alloca %struct.s4, align 4 @@ -34,7 +34,7 @@ void foo(void) bar(p1, p2, p4, p5); } -// CHECK: define void @foo +// CHECK-LABEL: define void @foo // CHECK: %{{[a-zA-Z0-9.]+}} = getelementptr %struct.s1* %p1, i32 0, i32 0 // CHECK: %{{[0-9]+}} = load float* %{{[a-zA-Z0-9.]+}}, align 1 // CHECK: %{{[a-zA-Z0-9.]+}} = getelementptr %struct.s2* %p2, i32 0, i32 0 diff --git a/clang/test/CodeGen/ppc64-struct-onevect.c b/clang/test/CodeGen/ppc64-struct-onevect.c index 6d1c3374c33..a5a1232ffa8 100644 --- a/clang/test/CodeGen/ppc64-struct-onevect.c +++ b/clang/test/CodeGen/ppc64-struct-onevect.c @@ -9,5 +9,5 @@ v4sf foo (struct s a) { return a.v; } -// CHECK: define <4 x float> @foo(<4 x float> inreg %a.coerce) +// CHECK-LABEL: define <4 x float> @foo(<4 x float> inreg %a.coerce) // CHECK: ret <4 x float> %a.coerce diff --git a/clang/test/CodeGen/pr12251.c b/clang/test/CodeGen/pr12251.c index b0171312214..ea74cc6a594 100644 --- a/clang/test/CodeGen/pr12251.c +++ b/clang/test/CodeGen/pr12251.c @@ -5,7 +5,7 @@ enum e1 g1(enum e1 *x) { return *x; } -// CHECK: define i32 @g1 +// CHECK-LABEL: define i32 @g1 // CHECK: load i32* %x, align 4 // CHECK-NOT: range // CHECK: ret diff --git a/clang/test/CodeGen/pr9614.c b/clang/test/CodeGen/pr9614.c index 8fdb2f299ce..53abef1801d 100644 --- a/clang/test/CodeGen/pr9614.c +++ b/clang/test/CodeGen/pr9614.c @@ -18,7 +18,7 @@ void f(void) { strrchr_foo("", '.'); } -// CHECK: define void @f() +// CHECK-LABEL: define void @f() // CHECK: call void @foo() // CHECK-NEXT: call void @bar() // CHECK-NEXT: call i8* @strrchr( diff --git a/clang/test/CodeGen/pragma-visibility.c b/clang/test/CodeGen/pragma-visibility.c index a7fceb3d1ac..56e73f301ae 100644 --- a/clang/test/CodeGen/pragma-visibility.c +++ b/clang/test/CodeGen/pragma-visibility.c @@ -17,8 +17,8 @@ int z = 0; #pragma GCC visibility push(hidden) void f() {} -// CHECK: define hidden void @f +// CHECK-LABEL: define hidden void @f __attribute((visibility("default"))) void g(); void g() {} -// CHECK: define void @g +// CHECK-LABEL: define void @g diff --git a/clang/test/CodeGen/pragma-weak.c b/clang/test/CodeGen/pragma-weak.c index a6a6d6137f3..9bfb9ea4ef5 100644 --- a/clang/test/CodeGen/pragma-weak.c +++ b/clang/test/CodeGen/pragma-weak.c @@ -22,7 +22,7 @@ -// CHECK: define weak void @weakdef() +// CHECK-LABEL: define weak void @weakdef() #pragma weak weakvar @@ -42,12 +42,12 @@ int __weakvar_alias; #pragma weak foo = __foo void __foo(void) {} -// CHECK: define void @__foo() +// CHECK-LABEL: define void @__foo() void __foo2(void) {} #pragma weak foo2 = __foo2 -// CHECK: define void @__foo2() +// CHECK-LABEL: define void @__foo2() ///// test errors @@ -69,12 +69,12 @@ typedef int __td2; #pragma weak stutter = __stutter #pragma weak stutter = __stutter void __stutter(void) {} -// CHECK: define void @__stutter() +// CHECK-LABEL: define void @__stutter() void __stutter2(void) {} #pragma weak stutter2 = __stutter2 #pragma weak stutter2 = __stutter2 -// CHECK: define void @__stutter2() +// CHECK-LABEL: define void @__stutter2() // test decl/pragma weak order @@ -82,12 +82,12 @@ void __stutter2(void) {} void __declfirst(void); #pragma weak declfirst = __declfirst void __declfirst(void) {} -// CHECK: define void @__declfirst() +// CHECK-LABEL: define void @__declfirst() void __declfirstattr(void) __attribute((noinline)); #pragma weak declfirstattr = __declfirstattr void __declfirstattr(void) {} -// CHECK: define void @__declfirstattr() +// CHECK-LABEL: define void @__declfirstattr() //// test that other attributes are preserved @@ -96,7 +96,7 @@ void __declfirstattr(void) {} void mix(void); #pragma weak mix __attribute((weak)) void mix(void) { } -// CHECK: define weak void @mix() +// CHECK-LABEL: define weak void @mix() // ensure following __attributes are preserved and that only a single // alias is generated @@ -104,7 +104,7 @@ __attribute((weak)) void mix(void) { } void __mix2(void) __attribute((noinline)); void __mix2(void) __attribute((noinline)); void __mix2(void) {} -// CHECK: define void @__mix2() +// CHECK-LABEL: define void @__mix2() ////////////// test #pragma weak/__attribute combinations @@ -113,7 +113,7 @@ void __mix2(void) {} void both(void) __attribute((alias("__both"))); #pragma weak both = __both void __both(void) {} -// CHECK: define void @__both() +// CHECK-LABEL: define void @__both() // if the TARGET is previously declared then whichever aliasing method // comes first applies and subsequent aliases are discarded. @@ -123,13 +123,13 @@ void __both2(void); void both2(void) __attribute((alias("__both2"))); // first, wins #pragma weak both2 = __both2 void __both2(void) {} -// CHECK: define void @__both2() +// CHECK-LABEL: define void @__both2() void __both3(void); #pragma weak both3 = __both3 // first, wins void both3(void) __attribute((alias("__both3"))); void __both3(void) {} -// CHECK: define void @__both3() +// CHECK-LABEL: define void @__both3() ///////////// ensure that #pragma weak does not alter existing __attributes() @@ -176,7 +176,7 @@ void yyy(void){} void zzz(void){} #pragma weak yyy // NOTE: weak doesn't apply, not before or in same TopLevelDec(!) -// CHECK: define void @yyy() +// CHECK-LABEL: define void @yyy() int correct_linkage; diff --git a/clang/test/CodeGen/regparm.c b/clang/test/CodeGen/regparm.c index 4c3752c56a1..151c58f958b 100644 --- a/clang/test/CodeGen/regparm.c +++ b/clang/test/CodeGen/regparm.c @@ -15,7 +15,7 @@ extern void FASTCALL reduced(char b, double c, foo* d, double e, int f); // PR7025 void FASTCALL f1(int i, int j, int k); -// CHECK: define void @f1(i32 inreg %i, i32 inreg %j, i32 %k) +// CHECK-LABEL: define void @f1(i32 inreg %i, i32 inreg %j, i32 %k) void f1(int i, int j, int k) { } int diff --git a/clang/test/CodeGen/sparcv9-abi.c b/clang/test/CodeGen/sparcv9-abi.c index 22803a6d4c4..4ba4be852fe 100644 --- a/clang/test/CodeGen/sparcv9-abi.c +++ b/clang/test/CodeGen/sparcv9-abi.c @@ -1,21 +1,21 @@ // RUN: %clang_cc1 -triple sparcv9-unknown-unknown -emit-llvm %s -o - | FileCheck %s #include <stdarg.h> -// CHECK: define void @f_void() +// CHECK-LABEL: define void @f_void() void f_void(void) {} // Arguments and return values smaller than the word size are extended. -// CHECK: define signext i32 @f_int_1(i32 signext %x) +// CHECK-LABEL: define signext i32 @f_int_1(i32 signext %x) int f_int_1(int x) { return x; } -// CHECK: define zeroext i32 @f_int_2(i32 zeroext %x) +// CHECK-LABEL: define zeroext i32 @f_int_2(i32 zeroext %x) unsigned f_int_2(unsigned x) { return x; } -// CHECK: define i64 @f_int_3(i64 %x) +// CHECK-LABEL: define i64 @f_int_3(i64 %x) long long f_int_3(long long x) { return x; } -// CHECK: define signext i8 @f_int_4(i8 signext %x) +// CHECK-LABEL: define signext i8 @f_int_4(i8 signext %x) char f_int_4(char x) { return x; } // Small structs are passed in registers. @@ -23,7 +23,7 @@ struct small { int *a, *b; }; -// CHECK: define %struct.small @f_small(i32* %x.coerce0, i32* %x.coerce1) +// CHECK-LABEL: define %struct.small @f_small(i32* %x.coerce0, i32* %x.coerce1) struct small f_small(struct small x) { x.a += *x.b; x.b = 0; @@ -36,7 +36,7 @@ struct medium { int *c, *d; }; -// CHECK: define %struct.medium @f_medium(%struct.medium* %x) +// CHECK-LABEL: define %struct.medium @f_medium(%struct.medium* %x) struct medium f_medium(struct medium x) { x.a += *x.b; x.b = 0; @@ -50,7 +50,7 @@ struct large { int x; }; -// CHECK: define void @f_large(%struct.large* noalias sret %agg.result, %struct.large* %x) +// CHECK-LABEL: define void @f_large(%struct.large* noalias sret %agg.result, %struct.large* %x) struct large f_large(struct large x) { x.a += *x.b; x.b = 0; @@ -62,7 +62,7 @@ struct reg { int a, b; }; -// CHECK: define i64 @f_reg(i64 %x.coerce) +// CHECK-LABEL: define i64 @f_reg(i64 %x.coerce) struct reg f_reg(struct reg x) { x.a += x.b; return x; @@ -74,7 +74,7 @@ struct mixed { float b; }; -// CHECK: define inreg %struct.mixed @f_mixed(i32 inreg %x.coerce0, float inreg %x.coerce1) +// CHECK-LABEL: define inreg %struct.mixed @f_mixed(i32 inreg %x.coerce0, float inreg %x.coerce1) struct mixed f_mixed(struct mixed x) { x.a += 1; return x; @@ -100,7 +100,7 @@ struct tiny { char a; }; -// CHECK: define i64 @f_tiny(i64 %x.coerce) +// CHECK-LABEL: define i64 @f_tiny(i64 %x.coerce) // CHECK: %[[HB:[^ ]+]] = lshr i64 %x.coerce, 56 // CHECK: = trunc i64 %[[HB]] to i8 struct tiny f_tiny(struct tiny x) { @@ -108,7 +108,7 @@ struct tiny f_tiny(struct tiny x) { return x; } -// CHECK: define void @call_tiny() +// CHECK-LABEL: define void @call_tiny() // CHECK: %[[XV:[^ ]+]] = zext i8 %{{[^ ]+}} to i64 // CHECK: %[[HB:[^ ]+]] = shl i64 %[[XV]], 56 // CHECK: = call i64 @f_tiny(i64 %[[HB]]) @@ -117,7 +117,7 @@ void call_tiny() { f_tiny(x); } -// CHECK: define signext i32 @f_variable(i8* %f, ...) +// CHECK-LABEL: define signext i32 @f_variable(i8* %f, ...) // CHECK: %ap = alloca i8* // CHECK: call void @llvm.va_start // diff --git a/clang/test/CodeGen/sse-builtins.c b/clang/test/CodeGen/sse-builtins.c index 400209fca29..2a4ca179673 100644 --- a/clang/test/CodeGen/sse-builtins.c +++ b/clang/test/CodeGen/sse-builtins.c @@ -63,7 +63,7 @@ __m128 test_load1_ps(void* y) { } void test_store_ss(__m128 x, void* y) { - // CHECK: define void @test_store_ss + // CHECK-LABEL: define void @test_store_ss // CHECK: store {{.*}} float* {{.*}}, align 1, _mm_store_ss(y, x); } @@ -99,32 +99,32 @@ __m128d test_loadl_pd(__m128d x, void* y) { } void test_store_sd(__m128d x, void* y) { - // CHECK: define void @test_store_sd + // CHECK-LABEL: define void @test_store_sd // CHECK: store {{.*}} double* {{.*}}, align 1{{$}} _mm_store_sd(y, x); } void test_store1_pd(__m128d x, void* y) { - // CHECK: define void @test_store1_pd + // CHECK-LABEL: define void @test_store1_pd // CHECK: store {{.*}} double* {{.*}}, align 1{{$}} // CHECK: store {{.*}} double* {{.*}}, align 1{{$}} _mm_store1_pd(y, x); } void test_storer_pd(__m128d x, void* y) { - // CHECK: define void @test_storer_pd + // CHECK-LABEL: define void @test_storer_pd // CHECK: store {{.*}} <2 x double>* {{.*}}, align 16{{$}} _mm_storer_pd(y, x); } void test_storeh_pd(__m128d x, void* y) { - // CHECK: define void @test_storeh_pd + // CHECK-LABEL: define void @test_storeh_pd // CHECK: store {{.*}} double* {{.*}}, align 1{{$}} _mm_storeh_pd(y, x); } void test_storel_pd(__m128d x, void* y) { - // CHECK: define void @test_storel_pd + // CHECK-LABEL: define void @test_storel_pd // CHECK: store {{.*}} double* {{.*}}, align 1{{$}} _mm_storel_pd(y, x); } @@ -184,7 +184,7 @@ __m128d test_mm_round_sd(__m128d x, __m128d y) { } void test_storel_epi64(__m128i x, void* y) { - // CHECK: define void @test_storel_epi64 + // CHECK-LABEL: define void @test_storel_epi64 // CHECK: store {{.*}} i64* {{.*}}, align 1{{$}} _mm_storel_epi64(y, x); } diff --git a/clang/test/CodeGen/static-order.c b/clang/test/CodeGen/static-order.c index e7f9814261c..58aabbebd57 100644 --- a/clang/test/CodeGen/static-order.c +++ b/clang/test/CodeGen/static-order.c @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s // CHECK: ModuleID // CHECK-NOT: zeroinitializer -// CHECK: define i8* @f +// CHECK-LABEL: define i8* @f struct s { int a; diff --git a/clang/test/CodeGen/stdcall-fastcall.c b/clang/test/CodeGen/stdcall-fastcall.c index d5181788228..b6217ac1cf3 100644 --- a/clang/test/CodeGen/stdcall-fastcall.c +++ b/clang/test/CodeGen/stdcall-fastcall.c @@ -4,17 +4,17 @@ void __attribute__((fastcall)) f1(void); void __attribute__((stdcall)) f2(void); void __attribute__((thiscall)) f3(void); void __attribute__((fastcall)) f4(void) { -// CHECK: define x86_fastcallcc void @f4() +// CHECK-LABEL: define x86_fastcallcc void @f4() f1(); // CHECK: call x86_fastcallcc void @f1() } void __attribute__((stdcall)) f5(void) { -// CHECK: define x86_stdcallcc void @f5() +// CHECK-LABEL: define x86_stdcallcc void @f5() f2(); // CHECK: call x86_stdcallcc void @f2() } void __attribute__((thiscall)) f6(void) { -// CHECK: define x86_thiscallcc void @f6() +// CHECK-LABEL: define x86_thiscallcc void @f6() f3(); // CHECK: call x86_thiscallcc void @f3() } @@ -51,7 +51,7 @@ void f8(void) { void __attribute__((fastcall)) foo1(int y); void bar1(int y) { - // CHECK: define void @bar1 + // CHECK-LABEL: define void @bar1 // CHECK: call x86_fastcallcc void @foo1(i32 inreg % foo1(y); } @@ -61,14 +61,14 @@ struct S1 { }; void __attribute__((fastcall)) foo2(struct S1 y); void bar2(struct S1 y) { - // CHECK: define void @bar2 + // CHECK-LABEL: define void @bar2 // CHECK: call x86_fastcallcc void @foo2(i32 inreg undef, i32 % foo2(y); } void __attribute__((fastcall)) foo3(int *y); void bar3(int *y) { - // CHECK: define void @bar3 + // CHECK-LABEL: define void @bar3 // CHECK: call x86_fastcallcc void @foo3(i32* inreg % foo3(y); } @@ -76,7 +76,7 @@ void bar3(int *y) { enum Enum {Eval}; void __attribute__((fastcall)) foo4(enum Enum y); void bar4(enum Enum y) { - // CHECK: define void @bar4 + // CHECK-LABEL: define void @bar4 // CHECK: call x86_fastcallcc void @foo4(i32 inreg % foo4(y); } @@ -88,49 +88,49 @@ struct S2 { }; void __attribute__((fastcall)) foo5(struct S2 y); void bar5(struct S2 y) { - // CHECK: define void @bar5 + // CHECK-LABEL: define void @bar5 // CHECK: call x86_fastcallcc void @foo5(%struct.S2* byval align 4 % foo5(y); } void __attribute__((fastcall)) foo6(long long y); void bar6(long long y) { - // CHECK: define void @bar6 + // CHECK-LABEL: define void @bar6 // CHECK: call x86_fastcallcc void @foo6(i64 % foo6(y); } void __attribute__((fastcall)) foo7(int a, struct S1 b, int c); void bar7(int a, struct S1 b, int c) { - // CHECK: define void @bar7 + // CHECK-LABEL: define void @bar7 // CHECK: call x86_fastcallcc void @foo7(i32 inreg %{{.*}}, i32 %{{.*}}, i32 %{{.*}} foo7(a, b, c); } void __attribute__((fastcall)) foo8(struct S1 a, int b); void bar8(struct S1 a, int b) { - // CHECK: define void @bar8 + // CHECK-LABEL: define void @bar8 // CHECK: call x86_fastcallcc void @foo8(i32 inreg undef, i32 %{{.*}}, i32 inreg % foo8(a, b); } void __attribute__((fastcall)) foo9(struct S2 a, int b); void bar9(struct S2 a, int b) { - // CHECK: define void @bar9 + // CHECK-LABEL: define void @bar9 // CHECK: call x86_fastcallcc void @foo9(%struct.S2* byval align 4 %{{.*}}, i32 % foo9(a, b); } void __attribute__((fastcall)) foo10(float y, int x); void bar10(float y, int x) { - // CHECK: define void @bar10 + // CHECK-LABEL: define void @bar10 // CHECK: call x86_fastcallcc void @foo10(float %{{.*}}, i32 inreg % foo10(y, x); } void __attribute__((fastcall)) foo11(double y, int x); void bar11(double y, int x) { - // CHECK: define void @bar11 + // CHECK-LABEL: define void @bar11 // CHECK: call x86_fastcallcc void @foo11(double %{{.*}}, i32 inreg % foo11(y, x); } @@ -140,7 +140,7 @@ struct S3 { }; void __attribute__((fastcall)) foo12(struct S3 y, int x); void bar12(struct S3 y, int x) { - // CHECK: define void @bar12 + // CHECK-LABEL: define void @bar12 // CHECK: call x86_fastcallcc void @foo12(float %{{.*}}, i32 inreg % foo12(y, x); } diff --git a/clang/test/CodeGen/switch.c b/clang/test/CodeGen/switch.c index 8b94a0976e6..2417a870f16 100644 --- a/clang/test/CodeGen/switch.c +++ b/clang/test/CodeGen/switch.c @@ -63,7 +63,7 @@ static int foo4(int i) { return j; } -// CHECK: define i32 @foo4t() +// CHECK-LABEL: define i32 @foo4t() // CHECK: ret i32 376 // CHECK: } int foo4t() { @@ -71,7 +71,7 @@ int foo4t() { return foo4(111) + foo4(99) + foo4(222) + foo4(601); } -// CHECK: define void @foo5() +// CHECK-LABEL: define void @foo5() // CHECK-NOT: switch // CHECK: } void foo5(){ @@ -83,7 +83,7 @@ void foo5(){ } } -// CHECK: define void @foo6() +// CHECK-LABEL: define void @foo6() // CHECK-NOT: switch // CHECK: } void foo6(){ @@ -91,7 +91,7 @@ void foo6(){ } } -// CHECK: define void @foo7() +// CHECK-LABEL: define void @foo7() // CHECK-NOT: switch // CHECK: } void foo7(){ @@ -101,7 +101,7 @@ void foo7(){ } -// CHECK: define i32 @f8( +// CHECK-LABEL: define i32 @f8( // CHECK: ret i32 3 // CHECK: } int f8(unsigned x) { @@ -115,7 +115,7 @@ int f8(unsigned x) { // Ensure that default after a case range is not ignored. // -// CHECK: define i32 @f9() +// CHECK-LABEL: define i32 @f9() // CHECK: ret i32 10 // CHECK: } static int f9_0(unsigned x) { @@ -134,7 +134,7 @@ int f9() { // miscompilation of fallthrough from default to a (tested) case // range. // -// CHECK: define i32 @f10() +// CHECK-LABEL: define i32 @f10() // CHECK: ret i32 10 // CHECK: } static int f10_0(unsigned x) { @@ -153,7 +153,7 @@ int f10() { // This generated incorrect code because of poor switch chaining. // -// CHECK: define i32 @f11( +// CHECK-LABEL: define i32 @f11( // CHECK: ret i32 3 // CHECK: } int f11(int x) { @@ -167,7 +167,7 @@ int f11(int x) { // This just asserted because of the way case ranges were calculated. // -// CHECK: define i32 @f12( +// CHECK-LABEL: define i32 @f12( // CHECK: ret i32 3 // CHECK: } int f12(int x) { @@ -181,7 +181,7 @@ int f12(int x) { // Make sure return is not constant (if empty range is skipped or miscompiled) // -// CHECK: define i32 @f13( +// CHECK-LABEL: define i32 @f13( // CHECK: ret i32 % // CHECK: } int f13(unsigned x) { diff --git a/clang/test/CodeGen/systemz-inline-asm.c b/clang/test/CodeGen/systemz-inline-asm.c index 9c22caba7b4..eb0f9128fc4 100644 --- a/clang/test/CodeGen/systemz-inline-asm.c +++ b/clang/test/CodeGen/systemz-inline-asm.c @@ -5,31 +5,31 @@ unsigned long gl; void test_store_m(unsigned int i) { asm("st %1, %0" : "=m" (gi) : "r" (i)); -// CHECK: define void @test_store_m(i32 zeroext %i) +// CHECK-LABEL: define void @test_store_m(i32 zeroext %i) // CHECK: call void asm "st $1, $0", "=*m,r"(i32* @gi, i32 %i) } void test_store_Q(unsigned int i) { asm("st %1, %0" : "=Q" (gi) : "r" (i)); -// CHECK: define void @test_store_Q(i32 zeroext %i) +// CHECK-LABEL: define void @test_store_Q(i32 zeroext %i) // CHECK: call void asm "st $1, $0", "=*Q,r"(i32* @gi, i32 %i) } void test_store_R(unsigned int i) { asm("st %1, %0" : "=R" (gi) : "r" (i)); -// CHECK: define void @test_store_R(i32 zeroext %i) +// CHECK-LABEL: define void @test_store_R(i32 zeroext %i) // CHECK: call void asm "st $1, $0", "=*R,r"(i32* @gi, i32 %i) } void test_store_S(unsigned int i) { asm("st %1, %0" : "=S" (gi) : "r" (i)); -// CHECK: define void @test_store_S(i32 zeroext %i) +// CHECK-LABEL: define void @test_store_S(i32 zeroext %i) // CHECK: call void asm "st $1, $0", "=*S,r"(i32* @gi, i32 %i) } void test_store_T(unsigned int i) { asm("st %1, %0" : "=T" (gi) : "r" (i)); -// CHECK: define void @test_store_T(i32 zeroext %i) +// CHECK-LABEL: define void @test_store_T(i32 zeroext %i) // CHECK: call void asm "st $1, $0", "=*T,r"(i32* @gi, i32 %i) } @@ -37,7 +37,7 @@ int test_load_m() { unsigned int i; asm("l %0, %1" : "=r" (i) : "m" (gi)); return i; -// CHECK: define signext i32 @test_load_m() +// CHECK-LABEL: define signext i32 @test_load_m() // CHECK: call i32 asm "l $0, $1", "=r,*m"(i32* @gi) } @@ -45,7 +45,7 @@ int test_load_Q() { unsigned int i; asm("l %0, %1" : "=r" (i) : "Q" (gi)); return i; -// CHECK: define signext i32 @test_load_Q() +// CHECK-LABEL: define signext i32 @test_load_Q() // CHECK: call i32 asm "l $0, $1", "=r,*Q"(i32* @gi) } @@ -53,7 +53,7 @@ int test_load_R() { unsigned int i; asm("l %0, %1" : "=r" (i) : "R" (gi)); return i; -// CHECK: define signext i32 @test_load_R() +// CHECK-LABEL: define signext i32 @test_load_R() // CHECK: call i32 asm "l $0, $1", "=r,*R"(i32* @gi) } @@ -61,7 +61,7 @@ int test_load_S() { unsigned int i; asm("l %0, %1" : "=r" (i) : "S" (gi)); return i; -// CHECK: define signext i32 @test_load_S() +// CHECK-LABEL: define signext i32 @test_load_S() // CHECK: call i32 asm "l $0, $1", "=r,*S"(i32* @gi) } @@ -69,54 +69,54 @@ int test_load_T() { unsigned int i; asm("l %0, %1" : "=r" (i) : "T" (gi)); return i; -// CHECK: define signext i32 @test_load_T() +// CHECK-LABEL: define signext i32 @test_load_T() // CHECK: call i32 asm "l $0, $1", "=r,*T"(i32* @gi) } void test_mI(unsigned char *c) { asm volatile("cli %0, %1" :: "Q" (*c), "I" (100)); -// CHECK: define void @test_mI(i8* %c) +// CHECK-LABEL: define void @test_mI(i8* %c) // CHECK: call void asm sideeffect "cli $0, $1", "*Q,I"(i8* %c, i32 100) } unsigned int test_dJa(unsigned int i, unsigned int j) { asm("sll %0, %2(%3)" : "=d" (i) : "0" (i), "J" (1000), "a" (j)); return i; -// CHECK: define zeroext i32 @test_dJa(i32 zeroext %i, i32 zeroext %j) +// CHECK-LABEL: define zeroext i32 @test_dJa(i32 zeroext %i, i32 zeroext %j) // CHECK: call i32 asm "sll $0, $2($3)", "=d,0,J,a"(i32 %i, i32 1000, i32 %j) } unsigned long test_rK(unsigned long i) { asm("aghi %0, %2" : "=r" (i) : "0" (i), "K" (-30000)); return i; -// CHECK: define i64 @test_rK(i64 %i) +// CHECK-LABEL: define i64 @test_rK(i64 %i) // CHECK: call i64 asm "aghi $0, $2", "=r,0,K"(i64 %i, i32 -30000) } unsigned long test_rL(unsigned long i) { asm("sllg %0, %1, %2" : "=r" (i) : "r" (i), "L" (500000)); return i; -// CHECK: define i64 @test_rL(i64 %i) +// CHECK-LABEL: define i64 @test_rL(i64 %i) // CHECK: call i64 asm "sllg $0, $1, $2", "=r,r,L"(i64 %i, i32 500000) } void test_M() { asm volatile("#FOO %0" :: "M"(0x7fffffff)); -// CHECK: define void @test_M() +// CHECK-LABEL: define void @test_M() // CHECK: call void asm sideeffect "#FOO $0", "M"(i32 2147483647) } float test_f32(float f, float g) { asm("aebr %0, %2" : "=f" (f) : "0" (f), "f" (g)); return f; -// CHECK: define float @test_f32(float %f, float %g) +// CHECK-LABEL: define float @test_f32(float %f, float %g) // CHECK: call float asm "aebr $0, $2", "=f,0,f"(float %f, float %g) } double test_f64(double f, double g) { asm("adbr %0, %2" : "=f" (f) : "0" (f), "f" (g)); return f; -// CHECK: define double @test_f64(double %f, double %g) +// CHECK-LABEL: define double @test_f64(double %f, double %g) // CHECK: call double asm "adbr $0, $2", "=f,0,f"(double %f, double %g) } diff --git a/clang/test/CodeGen/transparent-union.c b/clang/test/CodeGen/transparent-union.c index afdb3d6090b..21040e4da05 100644 --- a/clang/test/CodeGen/transparent-union.c +++ b/clang/test/CodeGen/transparent-union.c @@ -10,7 +10,7 @@ typedef union { void f0(transp_t0 obj); -// CHECK: define void @f1_0(i32* %a0) +// CHECK-LABEL: define void @f1_0(i32* %a0) // CHECK: call void @f0(%union.transp_t0* byval align 4 %{{.*}}) // CHECK: call void %{{.*}}(i8* %{{[a-z0-9]*}}) // CHECK: } diff --git a/clang/test/CodeGen/trapv.c b/clang/test/CodeGen/trapv.c index bc8bc700636..51034108ee4 100644 --- a/clang/test/CodeGen/trapv.c +++ b/clang/test/CodeGen/trapv.c @@ -3,7 +3,7 @@ unsigned int ui, uj, uk; int i, j, k; -// CHECK: define void @test0() +// CHECK-LABEL: define void @test0() void test0() { // -ftrapv doesn't affect unsigned arithmetic. // CHECK: [[T1:%.*]] = load i32* @uj @@ -23,7 +23,7 @@ void test0() { i = j + k; } -// CHECK: define void @test1() +// CHECK-LABEL: define void @test1() void test1() { extern void opaque(int); opaque(i++); @@ -37,7 +37,7 @@ void test1() { // CHECK: call void @llvm.trap() } -// CHECK: define void @test2() +// CHECK-LABEL: define void @test2() void test2() { extern void opaque(int); opaque(++i); @@ -51,7 +51,7 @@ void test2() { // CHECK: call void @llvm.trap() } -// CHECK: define void @test3( +// CHECK-LABEL: define void @test3( void test3(int a, int b, float c, float d) { // CHECK-NOT: @llvm.trap (void)(a / b); diff --git a/clang/test/CodeGen/unsigned-overflow.c b/clang/test/CodeGen/unsigned-overflow.c index 341ea355636..01ed0bf8cb5 100644 --- a/clang/test/CodeGen/unsigned-overflow.c +++ b/clang/test/CodeGen/unsigned-overflow.c @@ -8,7 +8,7 @@ unsigned int ii, ij, ik; extern void opaquelong(unsigned long); extern void opaqueint(unsigned int); -// CHECK: define void @testlongadd() +// CHECK-LABEL: define void @testlongadd() void testlongadd() { // CHECK: [[T1:%.*]] = load i64* @lj @@ -20,7 +20,7 @@ void testlongadd() { li = lj + lk; } -// CHECK: define void @testlongsub() +// CHECK-LABEL: define void @testlongsub() void testlongsub() { // CHECK: [[T1:%.*]] = load i64* @lj @@ -32,7 +32,7 @@ void testlongsub() { li = lj - lk; } -// CHECK: define void @testlongmul() +// CHECK-LABEL: define void @testlongmul() void testlongmul() { // CHECK: [[T1:%.*]] = load i64* @lj @@ -44,7 +44,7 @@ void testlongmul() { li = lj * lk; } -// CHECK: define void @testlongpostinc() +// CHECK-LABEL: define void @testlongpostinc() void testlongpostinc() { opaquelong(li++); @@ -55,7 +55,7 @@ void testlongpostinc() { // CHECK: call void @__ubsan_handle_add_overflow } -// CHECK: define void @testlongpreinc() +// CHECK-LABEL: define void @testlongpreinc() void testlongpreinc() { opaquelong(++li); @@ -66,7 +66,7 @@ void testlongpreinc() { // CHECK: call void @__ubsan_handle_add_overflow } -// CHECK: define void @testintadd() +// CHECK-LABEL: define void @testintadd() void testintadd() { // CHECK: [[T1:%.*]] = load i32* @ij @@ -78,7 +78,7 @@ void testintadd() { ii = ij + ik; } -// CHECK: define void @testintsub() +// CHECK-LABEL: define void @testintsub() void testintsub() { // CHECK: [[T1:%.*]] = load i32* @ij @@ -90,7 +90,7 @@ void testintsub() { ii = ij - ik; } -// CHECK: define void @testintmul() +// CHECK-LABEL: define void @testintmul() void testintmul() { // CHECK: [[T1:%.*]] = load i32* @ij @@ -102,7 +102,7 @@ void testintmul() { ii = ij * ik; } -// CHECK: define void @testintpostinc() +// CHECK-LABEL: define void @testintpostinc() void testintpostinc() { opaqueint(ii++); @@ -113,7 +113,7 @@ void testintpostinc() { // CHECK: call void @__ubsan_handle_add_overflow } -// CHECK: define void @testintpreinc() +// CHECK-LABEL: define void @testintpreinc() void testintpreinc() { opaqueint(++ii); diff --git a/clang/test/CodeGen/unsigned-promotion.c b/clang/test/CodeGen/unsigned-promotion.c index c263c0c946b..2c3415201ce 100644 --- a/clang/test/CodeGen/unsigned-promotion.c +++ b/clang/test/CodeGen/unsigned-promotion.c @@ -12,8 +12,8 @@ unsigned char ci, cj, ck; extern void opaqueshort(unsigned short); extern void opaquechar(unsigned char); -// CHECKS: define void @testshortadd() -// CHECKU: define void @testshortadd() +// CHECKS-LABEL: define void @testshortadd() +// CHECKU-LABEL: define void @testshortadd() void testshortadd() { // CHECKS: load i16* @sj // CHECKS: load i16* @sk @@ -33,8 +33,8 @@ void testshortadd() { si = sj + sk; } -// CHECKS: define void @testshortsub() -// CHECKU: define void @testshortsub() +// CHECKS-LABEL: define void @testshortsub() +// CHECKU-LABEL: define void @testshortsub() void testshortsub() { // CHECKS: load i16* @sj @@ -55,8 +55,8 @@ void testshortsub() { si = sj - sk; } -// CHECKS: define void @testshortmul() -// CHECKU: define void @testshortmul() +// CHECKS-LABEL: define void @testshortmul() +// CHECKU-LABEL: define void @testshortmul() void testshortmul() { // CHECKS: load i16* @sj @@ -76,8 +76,8 @@ void testshortmul() { si = sj * sk; } -// CHECKS: define void @testcharadd() -// CHECKU: define void @testcharadd() +// CHECKS-LABEL: define void @testcharadd() +// CHECKU-LABEL: define void @testcharadd() void testcharadd() { // CHECKS: load i8* @cj @@ -98,8 +98,8 @@ void testcharadd() { ci = cj + ck; } -// CHECKS: define void @testcharsub() -// CHECKU: define void @testcharsub() +// CHECKS-LABEL: define void @testcharsub() +// CHECKU-LABEL: define void @testcharsub() void testcharsub() { // CHECKS: load i8* @cj @@ -120,8 +120,8 @@ void testcharsub() { ci = cj - ck; } -// CHECKS: define void @testcharmul() -// CHECKU: define void @testcharmul() +// CHECKS-LABEL: define void @testcharmul() +// CHECKU-LABEL: define void @testcharmul() void testcharmul() { // CHECKS: load i8* @cj diff --git a/clang/test/CodeGen/visibility.c b/clang/test/CodeGen/visibility.c index 3082b7b6ea6..8e153b893a3 100644 --- a/clang/test/CodeGen/visibility.c +++ b/clang/test/CodeGen/visibility.c @@ -23,15 +23,15 @@ static char g_deferred[] = "hello"; // CHECK-PROTECTED: @test4 = hidden global i32 10 // CHECK-HIDDEN: @test4 = hidden global i32 10 -// CHECK-DEFAULT: define i32 @f_def() +// CHECK-DEFAULT-LABEL: define i32 @f_def() // CHECK-DEFAULT: declare void @f_ext() -// CHECK-DEFAULT: define internal void @f_deferred() -// CHECK-PROTECTED: define protected i32 @f_def() +// CHECK-DEFAULT-LABEL: define internal void @f_deferred() +// CHECK-PROTECTED-LABEL: define protected i32 @f_def() // CHECK-PROTECTED: declare void @f_ext() -// CHECK-PROTECTED: define internal void @f_deferred() -// CHECK-HIDDEN: define hidden i32 @f_def() +// CHECK-PROTECTED-LABEL: define internal void @f_deferred() +// CHECK-HIDDEN-LABEL: define hidden i32 @f_def() // CHECK-HIDDEN: declare void @f_ext() -// CHECK-HIDDEN: define internal void @f_deferred() +// CHECK-HIDDEN-LABEL: define internal void @f_deferred() extern void f_ext(void); @@ -45,22 +45,22 @@ int f_def(void) { } // PR8457 -// CHECK-DEFAULT: define void @test1( -// CHECK-PROTECTED: define void @test1( -// CHECK-HIDDEN: define void @test1( +// CHECK-DEFAULT-LABEL: define void @test1( +// CHECK-PROTECTED-LABEL: define void @test1( +// CHECK-HIDDEN-LABEL: define void @test1( struct Test1 { int field; }; void __attribute__((visibility("default"))) test1(struct Test1 *v) { } // rdar://problem/8595231 -// CHECK-DEFAULT: define void @test2() -// CHECK-PROTECTED: define void @test2() -// CHECK-HIDDEN: define void @test2() +// CHECK-DEFAULT-LABEL: define void @test2() +// CHECK-PROTECTED-LABEL: define void @test2() +// CHECK-HIDDEN-LABEL: define void @test2() void test2(void); void __attribute__((visibility("default"))) test2(void) {} -// CHECK-DEFAULT: define hidden void @test3() -// CHECK-PROTECTED: define hidden void @test3() -// CHECK-HIDDEN: define hidden void @test3() +// CHECK-DEFAULT-LABEL: define hidden void @test3() +// CHECK-PROTECTED-LABEL: define hidden void @test3() +// CHECK-HIDDEN-LABEL: define hidden void @test3() extern void test3(void); __private_extern__ void test3(void) {} @@ -69,8 +69,8 @@ extern int test4; __private_extern__ int test4 = 10; // rdar://12399248 -// CHECK-DEFAULT: define hidden void @test5() -// CHECK-PROTECTED: define hidden void @test5() -// CHECK-HIDDEN: define hidden void @test5() +// CHECK-DEFAULT-LABEL: define hidden void @test5() +// CHECK-PROTECTED-LABEL: define hidden void @test5() +// CHECK-HIDDEN-LABEL: define hidden void @test5() __attribute__((availability(macosx,introduced=10.5,deprecated=10.6))) __private_extern__ void test5(void) {} diff --git a/clang/test/CodeGen/vla.c b/clang/test/CodeGen/vla.c index f63796b39dc..1757ef77879 100644 --- a/clang/test/CodeGen/vla.c +++ b/clang/test/CodeGen/vla.c @@ -37,7 +37,7 @@ void g(int count) { } // rdar://8403108 -// CHECK: define void @f_8403108 +// CHECK-LABEL: define void @f_8403108 void f_8403108(unsigned x) { // CHECK: call i8* @llvm.stacksave() char s1[x]; @@ -86,7 +86,7 @@ int test2(int n) } // http://llvm.org/PR8567 -// CHECK: define double @test_PR8567 +// CHECK-LABEL: define double @test_PR8567 double test_PR8567(int n, double (*p)[n][5]) { // CHECK: [[NV:%.*]] = alloca i32, align 4 // CHECK-NEXT: [[PV:%.*]] = alloca [5 x double]*, align 4 @@ -104,7 +104,7 @@ double test_PR8567(int n, double (*p)[n][5]) { } int test4(unsigned n, char (*p)[n][n+1][6]) { - // CHECK: define i32 @test4( + // CHECK-LABEL: define i32 @test4( // CHECK: [[N:%.*]] = alloca i32, align 4 // CHECK-NEXT: [[P:%.*]] = alloca [6 x i8]*, align 4 // CHECK-NEXT: [[P2:%.*]] = alloca [6 x i8]*, align 4 @@ -146,7 +146,7 @@ int test4(unsigned n, char (*p)[n][n+1][6]) { // rdar://11485774 void test5(void) { - // CHECK: define void @test5( + // CHECK-LABEL: define void @test5( int a[5], i = 0; // CHECK: [[A:%.*]] = alloca [5 x i32], align 4 // CHECK-NEXT: [[I:%.*]] = alloca i32, align 4 @@ -169,7 +169,7 @@ void test5(void) void test6(void) { - // CHECK: define void @test6( + // CHECK-LABEL: define void @test6( int n = 20, **a, i=0; // CHECK: [[N:%.*]] = alloca i32, align 4 // CHECK-NEXT: [[A:%.*]] = alloca i32**, align 4 @@ -192,6 +192,6 @@ void test6(void) // Follow gcc's behavior for VLAs in parameter lists. PR9559. void test7(int a[b(0)]) { - // CHECK: define void @test7( + // CHECK-LABEL: define void @test7( // CHECK: call i32 @b(i8* null) } diff --git a/clang/test/CodeGen/volatile-1.c b/clang/test/CodeGen/volatile-1.c index 01a69678d99..d1861d54589 100644 --- a/clang/test/CodeGen/volatile-1.c +++ b/clang/test/CodeGen/volatile-1.c @@ -22,7 +22,7 @@ int printf(const char *, ...); // that do implicit lvalue-to-rvalue conversion are substantially // reduced. -// CHECK: define void @test() +// CHECK-LABEL: define void @test() void test() { // CHECK: load volatile [[INT]]* @i i; @@ -303,7 +303,7 @@ void test() { } extern volatile enum X x; -// CHECK: define void @test1() +// CHECK-LABEL: define void @test1() void test1() { extern void test1_helper(void); test1_helper(); diff --git a/clang/test/CodeGen/volatile-2.c b/clang/test/CodeGen/volatile-2.c index 9233b2a1678..18d0d318ef8 100644 --- a/clang/test/CodeGen/volatile-2.c +++ b/clang/test/CodeGen/volatile-2.c @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s void test0() { - // CHECK: define void @test0() + // CHECK-LABEL: define void @test0() // CHECK: [[F:%.*]] = alloca float // CHECK-NEXT: [[REAL:%.*]] = load volatile float* getelementptr inbounds ({ float, float }* @test0_v, i32 0, i32 0), align 4 // CHECK-NEXT: load volatile float* getelementptr inbounds ({{.*}} @test0_v, i32 0, i32 1), align 4 @@ -12,7 +12,7 @@ void test0() { } void test1() { - // CHECK: define void @test1() + // CHECK-LABEL: define void @test1() // CHECK: [[REAL:%.*]] = load volatile float* getelementptr inbounds ({{.*}} @test1_v, i32 0, i32 0), align 4 // CHECK-NEXT: [[IMAG:%.*]] = load volatile float* getelementptr inbounds ({{.*}} @test1_v, i32 0, i32 1), align 4 // CHECK-NEXT: store volatile float [[REAL]], float* getelementptr inbounds ({{.*}} @test1_v, i32 0, i32 0), align 4 diff --git a/clang/test/CodeGen/volatile-complex.c b/clang/test/CodeGen/volatile-complex.c index 15001e03244..71e5db6f5cf 100644 --- a/clang/test/CodeGen/volatile-complex.c +++ b/clang/test/CodeGen/volatile-complex.c @@ -14,7 +14,7 @@ volatile _Complex double cd; volatile _Complex float cf32 __attribute__((aligned(32))); volatile _Complex double cd32 __attribute__((aligned(32))); -// CHECK-LABEL: define void @test_cf() +// CHECK-LABEL-LABEL: define void @test_cf() void test_cf() { // CHECK: load volatile float* getelementptr inbounds ({ float, float }* @cf, i32 0, i32 0), align 4 // CHECK-NEXT: load volatile float* getelementptr inbounds ({ float, float }* @cf, i32 0, i32 1), align 4 @@ -27,7 +27,7 @@ void test_cf() { // CHECK-NEXT: ret void } -// CHECK-LABEL: define void @test_cd() +// CHECK-LABEL-LABEL: define void @test_cd() void test_cd() { // CHECK: load volatile double* getelementptr inbounds ({ double, double }* @cd, i32 0, i32 0), align 8 // CHECK-NEXT: load volatile double* getelementptr inbounds ({ double, double }* @cd, i32 0, i32 1), align 8 @@ -40,7 +40,7 @@ void test_cd() { // CHECK-NEXT: ret void } -// CHECK-LABEL: define void @test_cf32() +// CHECK-LABEL-LABEL: define void @test_cf32() void test_cf32() { // CHECK: load volatile float* getelementptr inbounds ({ float, float }* @cf32, i32 0, i32 0), align 32 // CHECK-NEXT: load volatile float* getelementptr inbounds ({ float, float }* @cf32, i32 0, i32 1), align 4 @@ -53,7 +53,7 @@ void test_cf32() { // CHECK-NEXT: ret void } -// CHECK-LABEL: define void @test_cd32() +// CHECK-LABEL-LABEL: define void @test_cd32() void test_cd32() { // CHECK: load volatile double* getelementptr inbounds ({ double, double }* @cd32, i32 0, i32 0), align 32 // CHECK-NEXT: load volatile double* getelementptr inbounds ({ double, double }* @cd32, i32 0, i32 1), align 8 diff --git a/clang/test/CodeGen/x86_32-arguments-darwin.c b/clang/test/CodeGen/x86_32-arguments-darwin.c index 4aa4295ffda..422e030537e 100644 --- a/clang/test/CodeGen/x86_32-arguments-darwin.c +++ b/clang/test/CodeGen/x86_32-arguments-darwin.c @@ -1,44 +1,44 @@ // RUN: %clang_cc1 -w -fblocks -triple i386-apple-darwin9 -target-cpu yonah -emit-llvm -o - %s | FileCheck %s -// CHECK: define signext i8 @f0() +// CHECK-LABEL: define signext i8 @f0() char f0(void) { return 0; } -// CHECK: define signext i16 @f1() +// CHECK-LABEL: define signext i16 @f1() short f1(void) { return 0; } -// CHECK: define i32 @f2() +// CHECK-LABEL: define i32 @f2() int f2(void) { return 0; } -// CHECK: define float @f3() +// CHECK-LABEL: define float @f3() float f3(void) { return 0; } -// CHECK: define double @f4() +// CHECK-LABEL: define double @f4() double f4(void) { return 0; } -// CHECK: define x86_fp80 @f5() +// CHECK-LABEL: define x86_fp80 @f5() long double f5(void) { return 0; } -// CHECK: define void @f6(i8 signext %a0, i16 signext %a1, i32 %a2, i64 %a3, i8* %a4) +// CHECK-LABEL: define void @f6(i8 signext %a0, i16 signext %a1, i32 %a2, i64 %a3, i8* %a4) void f6(char a0, short a1, int a2, long long a3, void *a4) {} -// CHECK: define void @f7(i32 %a0) +// CHECK-LABEL: define void @f7(i32 %a0) typedef enum { A, B, C } e7; void f7(e7 a0) {} -// CHECK: define i64 @f8_1() -// CHECK: define void @f8_2(i32 %a0.0, i32 %a0.1) +// CHECK-LABEL: define i64 @f8_1() +// CHECK-LABEL: define void @f8_2(i32 %a0.0, i32 %a0.1) struct s8 { int a; int b; @@ -48,11 +48,11 @@ void f8_2(struct s8 a0) {} // This should be passed just as s8. -// CHECK: define i64 @f9_1() +// CHECK-LABEL: define i64 @f9_1() // FIXME: llvm-gcc expands this, this may have some value for the // backend in terms of optimization but doesn't change the ABI. -// CHECK: define void @f9_2(%struct.s9* byval align 4 %a0) +// CHECK-LABEL: define void @f9_2(%struct.s9* byval align 4 %a0) struct s9 { int a : 17; int b; @@ -123,91 +123,91 @@ struct s27 { struct { char a, b, c; } a; struct { char a; } b; } f27(void) { whi // CHECK: void @f28(%struct.s28* noalias sret %agg.result) struct s28 { int a; int b[]; } f28(void) { while (1) {} } -// CHECK: define i16 @f29() +// CHECK-LABEL: define i16 @f29() struct s29 { struct { } a[1]; char b; char c; } f29(void) { while (1) {} } -// CHECK: define i16 @f30() +// CHECK-LABEL: define i16 @f30() struct s30 { char a; char b : 4; } f30(void) { while (1) {} } -// CHECK: define float @f31() +// CHECK-LABEL: define float @f31() struct s31 { char : 0; float b; char : 0; } f31(void) { while (1) {} } -// CHECK: define i32 @f32() +// CHECK-LABEL: define i32 @f32() struct s32 { char a; unsigned : 0; } f32(void) { while (1) {} } -// CHECK: define float @f33() +// CHECK-LABEL: define float @f33() struct s33 { float a; long long : 0; } f33(void) { while (1) {} } -// CHECK: define float @f34() +// CHECK-LABEL: define float @f34() struct s34 { struct { int : 0; } a; float b; } f34(void) { while (1) {} } -// CHECK: define i16 @f35() +// CHECK-LABEL: define i16 @f35() struct s35 { struct { int : 0; } a; char b; char c; } f35(void) { while (1) {} } -// CHECK: define i16 @f36() +// CHECK-LABEL: define i16 @f36() struct s36 { struct { int : 0; } a[2][10]; char b; char c; } f36(void) { while (1) {} } -// CHECK: define float @f37() +// CHECK-LABEL: define float @f37() struct s37 { float c[1][1]; } f37(void) { while (1) {} } -// CHECK: define void @f38(%struct.s38* noalias sret %agg.result) +// CHECK-LABEL: define void @f38(%struct.s38* noalias sret %agg.result) struct s38 { char a[3]; short b; } f38(void) { while (1) {} } -// CHECK: define void @f39(%struct.s39* byval align 16 %x) +// CHECK-LABEL: define void @f39(%struct.s39* byval align 16 %x) typedef int v39 __attribute((vector_size(16))); struct s39 { v39 x; }; void f39(struct s39 x) {} // <rdar://problem/7247671> -// CHECK: define i32 @f40() +// CHECK-LABEL: define i32 @f40() enum e40 { ec0 = 0 }; enum e40 f40(void) { } -// CHECK: define void ()* @f41() +// CHECK-LABEL: define void ()* @f41() typedef void (^vvbp)(void); vvbp f41(void) { } -// CHECK: define i32 @f42() +// CHECK-LABEL: define i32 @f42() struct s42 { enum e40 f0; } f42(void) { } -// CHECK: define i64 @f43() +// CHECK-LABEL: define i64 @f43() struct s43 { enum e40 f0; int f1; } f43(void) { } -// CHECK: define void ()* @f44() +// CHECK-LABEL: define void ()* @f44() struct s44 { vvbp f0; } f44(void) { } -// CHECK: define i64 @f45() +// CHECK-LABEL: define i64 @f45() struct s45 { vvbp f0; int f1; } f45(void) { } -// CHECK: define void @f46(i32 %a0) +// CHECK-LABEL: define void @f46(i32 %a0) void f46(enum e40 a0) { } -// CHECK: define void @f47(void ()* %a1) +// CHECK-LABEL: define void @f47(void ()* %a1) void f47(vvbp a1) { } -// CHECK: define void @f48(i32 %a0.0) +// CHECK-LABEL: define void @f48(i32 %a0.0) struct s48 { enum e40 f0; }; void f48(struct s48 a0) { } -// CHECK: define void @f49(i32 %a0.0, i32 %a0.1) +// CHECK-LABEL: define void @f49(i32 %a0.0, i32 %a0.1) struct s49 { enum e40 f0; int f1; }; void f49(struct s49 a0) { } -// CHECK: define void @f50(void ()* %a0.0) +// CHECK-LABEL: define void @f50(void ()* %a0.0) struct s50 { vvbp f0; }; void f50(struct s50 a0) { } -// CHECK: define void @f51(void ()* %a0.0, i32 %a0.1) +// CHECK-LABEL: define void @f51(void ()* %a0.0, i32 %a0.1) struct s51 { vvbp f0; int f1; }; void f51(struct s51 a0) { } -// CHECK: define void @f52(%struct.s52* byval align 4) +// CHECK-LABEL: define void @f52(%struct.s52* byval align 4) struct s52 { long double a; }; void f52(struct s52 x) {} -// CHECK: define void @f53(%struct.s53* byval align 4) +// CHECK-LABEL: define void @f53(%struct.s53* byval align 4) struct __attribute__((aligned(32))) s53 { int x; int y; @@ -216,18 +216,18 @@ void f53(struct s53 x) {} typedef unsigned short v2i16 __attribute__((__vector_size__(4))); -// CHECK: define i32 @f54(i32 %arg.coerce) +// CHECK-LABEL: define i32 @f54(i32 %arg.coerce) // rdar://8359483 v2i16 f54(v2i16 arg) { return arg+arg; } typedef int v4i32 __attribute__((__vector_size__(16))); -// CHECK: define <2 x i64> @f55(<4 x i32> %arg) +// CHECK-LABEL: define <2 x i64> @f55(<4 x i32> %arg) // PR8029 v4i32 f55(v4i32 arg) { return arg+arg; } -// CHECK: define void @f56( +// CHECK-LABEL: define void @f56( // CHECK: i8 signext %a0, %struct.s56_0* byval align 4 %a1, // CHECK: i64 %a2.coerce, %struct.s56_1* byval align 4, // CHECK: i64 %a4.coerce, %struct.s56_2* byval align 4, @@ -276,34 +276,34 @@ void f56(char a0, struct s56_0 a1, a10, a11, a12, a13); } -// CHECK: define void @f57(i32 %x.0, i32 %x.1) +// CHECK-LABEL: define void @f57(i32 %x.0, i32 %x.1) // CHECK: call void @f57( struct s57 { _Complex int x; }; void f57(struct s57 x) {} void f57a(void) { f57((struct s57){1}); } -// CHECK: define void @f58() +// CHECK-LABEL: define void @f58() union u58 {}; void f58(union u58 x) {} -// CHECK: define i64 @f59() +// CHECK-LABEL: define i64 @f59() struct s59 { float x __attribute((aligned(8))); }; struct s59 f59() { while (1) {} } -// CHECK: define void @f60(%struct.s60* byval align 4, i32 %y) +// CHECK-LABEL: define void @f60(%struct.s60* byval align 4, i32 %y) struct s60 { int x __attribute((aligned(8))); }; void f60(struct s60 x, int y) {} -// CHECK: define void @f61(i32 %x, %struct.s61* byval align 16 %y) +// CHECK-LABEL: define void @f61(i32 %x, %struct.s61* byval align 16 %y) typedef int T61 __attribute((vector_size(16))); struct s61 { T61 x; int y; }; void f61(int x, struct s61 y) {} -// CHECK: define void @f62(i32 %x, %struct.s62* byval align 4) +// CHECK-LABEL: define void @f62(i32 %x, %struct.s62* byval align 4) typedef int T62 __attribute((vector_size(16))); struct s62 { T62 x; int y; } __attribute((packed, aligned(8))); void f62(int x, struct s62 y) {} -// CHECK: define i32 @f63 +// CHECK-LABEL: define i32 @f63 // CHECK: ptrtoint // CHECK: and {{.*}}, -16 // CHECK: inttoptr @@ -317,15 +317,15 @@ int f63(int i, ...) { return s.y; } -// CHECK: define void @f64(%struct.s64* byval align 4 %x) +// CHECK-LABEL: define void @f64(%struct.s64* byval align 4 %x) struct s64 { signed char a[0]; signed char b[]; }; void f64(struct s64 x) {} -// CHECK: define float @f65() +// CHECK-LABEL: define float @f65() struct s65 { signed char a[0]; float b; }; struct s65 f65() { return (struct s65){{},2}; } -// CHECK: define <2 x i64> @f66 +// CHECK-LABEL: define <2 x i64> @f66 // CHECK: ptrtoint // CHECK: and {{.*}}, -16 // CHECK: inttoptr @@ -341,4 +341,4 @@ T66 f66(int i, ...) { // PR14453 struct s67 { _Complex unsigned short int a; }; void f67(struct s67 x) {} -// CHECK: define void @f67(%struct.s67* byval align 4 %x) +// CHECK-LABEL: define void @f67(%struct.s67* byval align 4 %x) diff --git a/clang/test/CodeGen/x86_32-arguments-linux.c b/clang/test/CodeGen/x86_32-arguments-linux.c index e93f9dccbf0..1a8c6001292 100644 --- a/clang/test/CodeGen/x86_32-arguments-linux.c +++ b/clang/test/CodeGen/x86_32-arguments-linux.c @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -w -fblocks -triple i386-pc-linux-gnu -target-cpu pentium4 -emit-llvm -o %t %s // RUN: FileCheck < %t %s -// CHECK: define void @f56( +// CHECK-LABEL: define void @f56( // CHECK: i8 signext %a0, %struct.s56_0* byval align 4 %a1, // CHECK: i64 %a2.coerce, %struct.s56_1* byval align 4, // CHECK: <1 x double> %a4, %struct.s56_2* byval align 4, diff --git a/clang/test/CodeGen/x86_32-arguments-nommx.c b/clang/test/CodeGen/x86_32-arguments-nommx.c index 40362f796f6..ce68e3a8916 100644 --- a/clang/test/CodeGen/x86_32-arguments-nommx.c +++ b/clang/test/CodeGen/x86_32-arguments-nommx.c @@ -3,9 +3,9 @@ // no-mmx should put mmx into memory typedef int __attribute__((vector_size (8))) i32v2; int a(i32v2 x) { return x[0]; } -// CHECK: define i32 @a(i64 %x.coerce) +// CHECK-LABEL: define i32 @a(i64 %x.coerce) // but SSE2 vectors should still go into an SSE2 register typedef int __attribute__((vector_size (16))) i32v4; int b(i32v4 x) { return x[0]; } -// CHECK: define i32 @b(<4 x i32> %x) +// CHECK-LABEL: define i32 @b(<4 x i32> %x) diff --git a/clang/test/CodeGen/x86_32-arguments-realign.c b/clang/test/CodeGen/x86_32-arguments-realign.c index b08862ee43e..768e1cc4690 100644 --- a/clang/test/CodeGen/x86_32-arguments-realign.c +++ b/clang/test/CodeGen/x86_32-arguments-realign.c @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -w -fblocks -triple i386-apple-darwin9 -emit-llvm -o %t %s // RUN: FileCheck < %t %s -// CHECK: define void @f0(%struct.s0* byval align 4) +// CHECK-LABEL: define void @f0(%struct.s0* byval align 4) // CHECK: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %{{.*}}, i8* %{{.*}}, i32 16, i32 4, i1 false) // CHECK: } struct s0 { long double a; }; diff --git a/clang/test/CodeGen/x86_32-arguments-win32.c b/clang/test/CodeGen/x86_32-arguments-win32.c index 77ff9e2ff3d..f8b09957b36 100644 --- a/clang/test/CodeGen/x86_32-arguments-win32.c +++ b/clang/test/CodeGen/x86_32-arguments-win32.c @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -w -triple i386-pc-win32 -emit-llvm -o - %s | FileCheck %s -// CHECK: define i64 @f1_1() -// CHECK: define void @f1_2(%struct.s1* byval align 4 %a0) +// CHECK-LABEL: define i64 @f1_1() +// CHECK-LABEL: define void @f1_2(%struct.s1* byval align 4 %a0) struct s1 { int a; int b; @@ -9,37 +9,37 @@ struct s1 { struct s1 f1_1(void) { while (1) {} } void f1_2(struct s1 a0) {} -// CHECK: define i32 @f2_1() +// CHECK-LABEL: define i32 @f2_1() struct s2 { short a; short b; }; struct s2 f2_1(void) { while (1) {} } -// CHECK: define i16 @f3_1() +// CHECK-LABEL: define i16 @f3_1() struct s3 { char a; char b; }; struct s3 f3_1(void) { while (1) {} } -// CHECK: define i8 @f4_1() +// CHECK-LABEL: define i8 @f4_1() struct s4 { char a:4; char b:4; }; struct s4 f4_1(void) { while (1) {} } -// CHECK: define i64 @f5_1() -// CHECK: define void @f5_2(%struct.s5* byval align 4) +// CHECK-LABEL: define i64 @f5_1() +// CHECK-LABEL: define void @f5_2(%struct.s5* byval align 4) struct s5 { double a; }; struct s5 f5_1(void) { while (1) {} } void f5_2(struct s5 a0) {} -// CHECK: define i32 @f6_1() -// CHECK: define void @f6_2(%struct.s6* byval align 4 %a0) +// CHECK-LABEL: define i32 @f6_1() +// CHECK-LABEL: define void @f6_2(%struct.s6* byval align 4 %a0) struct s6 { float a; }; diff --git a/clang/test/CodeGen/x86_32-fpcc-struct-return.c b/clang/test/CodeGen/x86_32-fpcc-struct-return.c index 707c57f515b..9f61599fc69 100644 --- a/clang/test/CodeGen/x86_32-fpcc-struct-return.c +++ b/clang/test/CodeGen/x86_32-fpcc-struct-return.c @@ -13,22 +13,22 @@ typedef struct { int i; } Small; typedef struct { short s; } Short; typedef struct { } ZeroSized; -// CHECK: define void @returnBig +// CHECK-LABEL: define void @returnBig // CHECK: ret void Big returnBig(Big x) { return x; } -// CHECK-PCC: define void @returnSmall +// CHECK-PCC-LABEL: define void @returnSmall // CHECK-PCC: ret void -// CHECK-REG: define i32 @returnSmall +// CHECK-REG-LABEL: define i32 @returnSmall // CHECK-REG: ret i32 Small returnSmall(Small x) { return x; } -// CHECK-PCC: define void @returnShort +// CHECK-PCC-LABEL: define void @returnShort // CHECK-PCC: ret void -// CHECK-REG: define i16 @returnShort +// CHECK-REG-LABEL: define i16 @returnShort // CHECK-REG: ret i16 Short returnShort(Short x) { return x; } -// CHECK: define void @returnZero() +// CHECK-LABEL: define void @returnZero() // CHECK: ret void ZeroSized returnZero(ZeroSized x) { return x; } diff --git a/clang/test/CodeGen/x86_64-arguments-nacl.c b/clang/test/CodeGen/x86_64-arguments-nacl.c index 8f756caba75..1c3f5b0c4a2 100644 --- a/clang/test/CodeGen/x86_64-arguments-nacl.c +++ b/clang/test/CodeGen/x86_64-arguments-nacl.c @@ -21,21 +21,21 @@ struct PP_Var f0() { return result; } -// CHECK: define void @f1(i64 %p1.coerce0, i64 %p1.coerce1) +// CHECK-LABEL: define void @f1(i64 %p1.coerce0, i64 %p1.coerce1) void f1(struct PP_Var p1) { while(1) {} } // long doubles are 64 bits on NaCl -// CHECK: define double @f5() +// CHECK-LABEL: define double @f5() long double f5(void) { return 0; } -// CHECK: define void @f6(i8 signext %a0, i16 signext %a1, i32 %a2, i64 %a3, i8* %a4) +// CHECK-LABEL: define void @f6(i8 signext %a0, i16 signext %a1, i32 %a2, i64 %a3, i8* %a4) void f6(char a0, short a1, int a2, long long a3, void *a4) { } -// CHECK: define i64 @f8_1() -// CHECK: define void @f8_2(i64 %a0.coerce) +// CHECK-LABEL: define i64 @f8_1() +// CHECK-LABEL: define void @f8_2(i64 %a0.coerce) union u8 { long double a; int b; @@ -43,18 +43,18 @@ union u8 { union u8 f8_1() { while (1) {} } void f8_2(union u8 a0) {} -// CHECK: define i64 @f9() +// CHECK-LABEL: define i64 @f9() struct s9 { int a; int b; int : 0; } f9(void) { while (1) {} } -// CHECK: define void @f10(i64 %a0.coerce) +// CHECK-LABEL: define void @f10(i64 %a0.coerce) struct s10 { int a; int b; int : 0; }; void f10(struct s10 a0) {} -// CHECK: define double @f11() +// CHECK-LABEL: define double @f11() union { long double a; float b; } f11() { while (1) {} } -// CHECK: define i32 @f12_0() -// CHECK: define void @f12_1(i32 %a0.coerce) +// CHECK-LABEL: define i32 @f12_0() +// CHECK-LABEL: define void @f12_1(i32 %a0.coerce) struct s12 { int a __attribute__((aligned(16))); }; struct s12 f12_0(void) { while (1) {} } void f12_1(struct s12 a0) {} @@ -68,7 +68,7 @@ struct s13_1 { long long f0[2]; }; struct s13_0 f13(int a, int b, int c, int d, struct s13_1 e, int f) { while (1) {} } -// CHECK: define void @f20(%struct.s20* byval align 32 %x) +// CHECK-LABEL: define void @f20(%struct.s20* byval align 32 %x) struct __attribute__((aligned(32))) s20 { int x; int y; @@ -96,10 +96,10 @@ typedef struct { int a; int b; } s1; -// CHECK: define i32 @f48(%struct.s1* byval %s) +// CHECK-LABEL: define i32 @f48(%struct.s1* byval %s) int __attribute__((pnaclcall)) f48(s1 s) { return s.a; } -// CHECK: define void @f49(%struct.s1* noalias sret %agg.result) +// CHECK-LABEL: define void @f49(%struct.s1* noalias sret %agg.result) s1 __attribute__((pnaclcall)) f49() { s1 s; s.a = s.b = 1; return s; } union simple_union { @@ -107,7 +107,7 @@ union simple_union { char b; }; // Unions should be passed as byval structs -// CHECK: define void @f50(%union.simple_union* byval %s) +// CHECK-LABEL: define void @f50(%union.simple_union* byval %s) void __attribute__((pnaclcall)) f50(union simple_union s) {} typedef struct { @@ -116,5 +116,5 @@ typedef struct { int b8 : 8; } bitfield1; // Bitfields should be passed as byval structs -// CHECK: define void @f51(%struct.bitfield1* byval %bf1) +// CHECK-LABEL: define void @f51(%struct.bitfield1* byval %bf1) void __attribute__((pnaclcall)) f51(bitfield1 bf1) {} diff --git a/clang/test/CodeGen/x86_64-arguments.c b/clang/test/CodeGen/x86_64-arguments.c index 10e6d5bd652..5d01d3bf69e 100644 --- a/clang/test/CodeGen/x86_64-arguments.c +++ b/clang/test/CodeGen/x86_64-arguments.c @@ -2,49 +2,49 @@ // RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s -target-feature +avx | FileCheck %s -check-prefix=AVX #include <stdarg.h> -// CHECK: define signext i8 @f0() +// CHECK-LABEL: define signext i8 @f0() char f0(void) { return 0; } -// CHECK: define signext i16 @f1() +// CHECK-LABEL: define signext i16 @f1() short f1(void) { return 0; } -// CHECK: define i32 @f2() +// CHECK-LABEL: define i32 @f2() int f2(void) { return 0; } -// CHECK: define float @f3() +// CHECK-LABEL: define float @f3() float f3(void) { return 0; } -// CHECK: define double @f4() +// CHECK-LABEL: define double @f4() double f4(void) { return 0; } -// CHECK: define x86_fp80 @f5() +// CHECK-LABEL: define x86_fp80 @f5() long double f5(void) { return 0; } -// CHECK: define void @f6(i8 signext %a0, i16 signext %a1, i32 %a2, i64 %a3, i8* %a4) +// CHECK-LABEL: define void @f6(i8 signext %a0, i16 signext %a1, i32 %a2, i64 %a3, i8* %a4) void f6(char a0, short a1, int a2, long long a3, void *a4) { } -// CHECK: define void @f7(i32 %a0) +// CHECK-LABEL: define void @f7(i32 %a0) typedef enum { A, B, C } e7; void f7(e7 a0) { } // Test merging/passing of upper eightbyte with X87 class. // -// CHECK: define void @f8_1(%union.u8* noalias sret %agg.result) -// CHECK: define void @f8_2(%union.u8* byval align 16 %a0) +// CHECK-LABEL: define void @f8_1(%union.u8* noalias sret %agg.result) +// CHECK-LABEL: define void @f8_2(%union.u8* byval align 16 %a0) union u8 { long double a; int b; @@ -52,18 +52,18 @@ union u8 { union u8 f8_1() { while (1) {} } void f8_2(union u8 a0) {} -// CHECK: define i64 @f9() +// CHECK-LABEL: define i64 @f9() struct s9 { int a; int b; int : 0; } f9(void) { while (1) {} } -// CHECK: define void @f10(i64 %a0.coerce) +// CHECK-LABEL: define void @f10(i64 %a0.coerce) struct s10 { int a; int b; int : 0; }; void f10(struct s10 a0) {} -// CHECK: define void @f11(%union.anon* noalias sret %agg.result) +// CHECK-LABEL: define void @f11(%union.anon* noalias sret %agg.result) union { long double a; float b; } f11() { while (1) {} } -// CHECK: define i32 @f12_0() -// CHECK: define void @f12_1(i32 %a0.coerce) +// CHECK-LABEL: define i32 @f12_0() +// CHECK-LABEL: define void @f12_1(i32 %a0.coerce) struct s12 { int a __attribute__((aligned(16))); }; struct s12 f12_0(void) { while (1) {} } void f12_1(struct s12 a0) {} @@ -94,19 +94,19 @@ void f17(float a, float b, float c, float d, float e, float f, float g, float h, // Check for valid coercion. The struct should be passed/returned as i32, not // as i64 for better code quality. // rdar://8135035 -// CHECK: define void @f18(i32 %a, i32 %f18_arg1.coerce) +// CHECK-LABEL: define void @f18(i32 %a, i32 %f18_arg1.coerce) struct f18_s0 { int f0; }; void f18(int a, struct f18_s0 f18_arg1) { while (1) {} } // Check byval alignment. -// CHECK: define void @f19(%struct.s19* byval align 16 %x) +// CHECK-LABEL: define void @f19(%struct.s19* byval align 16 %x) struct s19 { long double a; }; void f19(struct s19 x) {} -// CHECK: define void @f20(%struct.s20* byval align 32 %x) +// CHECK-LABEL: define void @f20(%struct.s20* byval align 32 %x) struct __attribute__((aligned(32))) s20 { int x; int y; @@ -119,7 +119,7 @@ struct StringRef { }; // rdar://7375902 -// CHECK: define i8* @f21(i64 %S.coerce0, i8* %S.coerce1) +// CHECK-LABEL: define i8* @f21(i64 %S.coerce0, i8* %S.coerce1) const char *f21(struct StringRef S) { return S.x+S.Ptr; } // PR7567 @@ -140,7 +140,7 @@ struct f23S { void f23(int A, struct f23S B) { - // CHECK: define void @f23(i32 %A, i64 %B.coerce0, i32 %B.coerce1) + // CHECK-LABEL: define void @f23(i32 %A, i64 %B.coerce0, i32 %B.coerce1) } struct f24s { long a; int b; }; @@ -154,7 +154,7 @@ struct f23S f24(struct f23S *X, struct f24s *P2) { // rdar://8248065 typedef float v4f32 __attribute__((__vector_size__(16))); v4f32 f25(v4f32 X) { - // CHECK: define <4 x float> @f25(<4 x float> %X) + // CHECK-LABEL: define <4 x float> @f25(<4 x float> %X) // CHECK-NOT: alloca // CHECK: alloca <4 x float> // CHECK-NOT: alloca @@ -180,7 +180,7 @@ struct v4f32wrapper { }; struct v4f32wrapper f27(struct v4f32wrapper X) { - // CHECK: define <4 x float> @f27(<4 x float> %X.coerce) + // CHECK-LABEL: define <4 x float> @f27(<4 x float> %X.coerce) return X; } @@ -190,7 +190,7 @@ struct f28c { int y; }; void f28(struct f28c C) { - // CHECK: define void @f28(double %C.coerce0, i32 %C.coerce1) + // CHECK-LABEL: define void @f28(double %C.coerce0, i32 %C.coerce1) } struct f29a { @@ -201,26 +201,26 @@ struct f29a { }; void f29a(struct f29a A) { - // CHECK: define void @f29a(double %A.coerce0, i32 %A.coerce1) + // CHECK-LABEL: define void @f29a(double %A.coerce0, i32 %A.coerce1) } // rdar://8249586 struct S0 { char f0[8]; char f2; char f3; char f4; }; void f30(struct S0 p_4) { - // CHECK: define void @f30(i64 %p_4.coerce0, i24 %p_4.coerce1) + // CHECK-LABEL: define void @f30(i64 %p_4.coerce0, i24 %p_4.coerce1) } // Pass the third element as a float when followed by tail padding. // rdar://8251384 struct f31foo { float a, b, c; }; float f31(struct f31foo X) { - // CHECK: define float @f31(<2 x float> %X.coerce0, float %X.coerce1) + // CHECK-LABEL: define float @f31(<2 x float> %X.coerce0, float %X.coerce1) return X.c; } _Complex float f32(_Complex float A, _Complex float B) { // rdar://6379669 - // CHECK: define <2 x float> @f32(<2 x float> %A.coerce, <2 x float> %B.coerce) + // CHECK-LABEL: define <2 x float> @f32(<2 x float> %A.coerce, <2 x float> %B.coerce) return A+B; } @@ -235,12 +235,12 @@ void f33(va_list X) { typedef unsigned long long v1i64 __attribute__((__vector_size__(8))); // rdar://8359248 -// CHECK: define i64 @f34(i64 %arg.coerce) +// CHECK-LABEL: define i64 @f34(i64 %arg.coerce) v1i64 f34(v1i64 arg) { return arg; } // rdar://8358475 -// CHECK: define i64 @f35(i64 %arg.coerce) +// CHECK-LABEL: define i64 @f35(i64 %arg.coerce) typedef unsigned long v1i64_2 __attribute__((__vector_size__(8))); v1i64_2 f35(v1i64_2 arg) { return arg+arg; } @@ -260,7 +260,7 @@ void f9122143() func(ss); } -// CHECK: define double @f36(double %arg.coerce) +// CHECK-LABEL: define double @f36(double %arg.coerce) typedef unsigned v2i32 __attribute((__vector_size__(8))); v2i32 f36(v2i32 arg) { return arg; } @@ -308,7 +308,7 @@ void func43(SA s) { func42(s); } -// CHECK: define i32 @f44 +// CHECK-LABEL: define i32 @f44 // CHECK: ptrtoint // CHECK-NEXT: and {{.*}}, -32 // CHECK-NEXT: inttoptr @@ -323,7 +323,7 @@ int f44(int i, ...) { } // Text that vec3 returns the correct LLVM IR type. -// AVX: define i32 @foo(<3 x i64> %X) +// AVX-LABEL: define i32 @foo(<3 x i64> %X) typedef long long3 __attribute((ext_vector_type(3))); int foo(long3 X) { @@ -379,7 +379,7 @@ void test49_helper(double, ...); void test49(double d, double e) { test49_helper(d, e); } -// CHECK: define void @test49( +// CHECK-LABEL: define void @test49( // CHECK: [[T0:%.*]] = load double* // CHECK-NEXT: [[T1:%.*]] = load double* // CHECK-NEXT: call void (double, ...)* @test49_helper(double [[T0]], double [[T1]]) @@ -388,7 +388,7 @@ void test50_helper(); void test50(double d, double e) { test50_helper(d, e); } -// CHECK: define void @test50( +// CHECK-LABEL: define void @test50( // CHECK: [[T0:%.*]] = load double* // CHECK-NEXT: [[T1:%.*]] = load double* // CHECK-NEXT: call void (double, double, ...)* bitcast (void (...)* @test50_helper to void (double, double, ...)*)(double [[T0]], double [[T1]]) @@ -398,7 +398,7 @@ void test51(struct test51_s *s, __builtin_va_list argList) { *s = __builtin_va_arg(argList, struct test51_s); } -// CHECK: define void @test51 +// CHECK-LABEL: define void @test51 // CHECK: [[TMP_ADDR:%.*]] = alloca [[STRUCT_TEST51:%.*]], align 16 // CHECK: br i1 // CHECK: [[REG_SAVE_AREA_PTR:%.*]] = getelementptr inbounds {{.*}}, i32 0, i32 3 @@ -422,7 +422,7 @@ void test52() { void test53(__m256 *m, __builtin_va_list argList) { *m = __builtin_va_arg(argList, __m256); } -// AVX: define void @test53 +// AVX-LABEL: define void @test53 // AVX-NOT: br i1 // AVX: ret void |