280 changes: 140 additions & 140 deletions clang/test/CodeGen/64bit-swiftcall.c

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions clang/test/CodeGen/Atomics.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ unsigned long long ull;
__int128 s128;
unsigned __int128 u128;

void test_op_ignore (void) // CHECK-LABEL: 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
Expand Down Expand Up @@ -73,7 +73,7 @@ void test_op_ignore (void) // CHECK-LABEL: define void @test_op_ignore

}

void test_fetch_and_op (void) // CHECK-LABEL: 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
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CodeGen/PR32874.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// RUN: -w -fsanitize=signed-integer-overflow,unsigned-integer-overflow,integer-divide-by-zero,float-divide-by-zero \
// RUN: | FileCheck %s

// CHECK-LABEL: define void @foo
// CHECK-LABEL: define{{.*}} void @foo
// CHECK-NOT: !nosanitize
void foo(const int *p) {
// __builtin_prefetch expects its optional arguments to be constant integers.
Expand All @@ -23,7 +23,7 @@ void foo(const int *p) {
__builtin_prefetch(p, 3U % 2U, 3U % 1U);
}

// CHECK-LABEL: define void @ub_constant_arithmetic
// CHECK-LABEL: define{{.*}} void @ub_constant_arithmetic
void ub_constant_arithmetic() {
// Check that we still instrument unsafe arithmetic, even if it is known to
// be unsafe at compile time.
Expand Down
8 changes: 4 additions & 4 deletions clang/test/CodeGen/X86/avx512-reduceMinMaxIntrin.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ unsigned int test_mm512_reduce_max_epu32(__m512i __W){
}

float test_mm512_reduce_max_ps(__m512 __W){
// CHECK-LABEL: define float @test_mm512_reduce_max_ps(
// CHECK-LABEL: define{{.*}} float @test_mm512_reduce_max_ps(
// CHECK: shufflevector <8 x double> %{{.*}}, <8 x double> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
// CHECK: shufflevector <8 x double> %{{.*}}, <8 x double> poison, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
// CHECK: call <8 x float> @llvm.x86.avx.max.ps.256(<8 x float> %{{.*}}, <8 x float> %{{.*}})
Expand Down Expand Up @@ -159,7 +159,7 @@ unsigned int test_mm512_reduce_min_epu32(__m512i __W){
}

float test_mm512_reduce_min_ps(__m512 __W){
// CHECK-LABEL: define float @test_mm512_reduce_min_ps(
// CHECK-LABEL: define{{.*}} float @test_mm512_reduce_min_ps(
// CHECK: shufflevector <8 x double> %{{.*}}, <8 x double> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
// CHECK: shufflevector <8 x double> %{{.*}}, <8 x double> poison, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
// CHECK: call <8 x float> @llvm.x86.avx.min.ps.256(<8 x float> %{{.*}}, <8 x float> %{{.*}})
Expand Down Expand Up @@ -191,7 +191,7 @@ unsigned int test_mm512_mask_reduce_max_epu32(__mmask16 __M, __m512i __W){
}

float test_mm512_mask_reduce_max_ps(__mmask16 __M, __m512 __W){
// CHECK-LABEL: define float @test_mm512_mask_reduce_max_ps(
// CHECK-LABEL: define{{.*}} float @test_mm512_mask_reduce_max_ps(
// CHECK: bitcast i16 %{{.*}} to <16 x i1>
// CHECK: select <16 x i1> %{{.*}}, <16 x float> %{{.*}}, <16 x float> %{{.*}}
// CHECK: shufflevector <8 x double> %{{.*}}, <8 x double> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
Expand Down Expand Up @@ -225,7 +225,7 @@ unsigned int test_mm512_mask_reduce_min_epu32(__mmask16 __M, __m512i __W){
}

float test_mm512_mask_reduce_min_ps(__mmask16 __M, __m512 __W){
// CHECK-LABEL: define float @test_mm512_mask_reduce_min_ps(
// CHECK-LABEL: define{{.*}} float @test_mm512_mask_reduce_min_ps(
// CHECK: bitcast i16 %{{.*}} to <16 x i1>
// CHECK: select <16 x i1> %{{.*}}, <16 x float> %{{.*}}, <16 x float> %{{.*}}
// CHECK: shufflevector <8 x double> %{{.*}}, <8 x double> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
Expand Down
28 changes: 14 additions & 14 deletions clang/test/CodeGen/X86/x86-long-double.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,20 @@
long double x = 0;
int size = sizeof(x);

// FP80-ELF32: @x = global x86_fp80 {{.*}}, align 4
// FP80-ELF32: @size = global i32 12
// FP80-ELF64: @x = global x86_fp80 {{.*}}, align 16
// FP80-ELF64: @size = global i32 16
// FP80-DARWIN: @x = global x86_fp80 {{.*}}, align 16
// FP80-DARWIN: @size = global i32 16

// FP64-X32: @x = global double {{.*}}, align 4
// FP64-X32: @size = global i32 8
// FP64-X64: @x = global double {{.*}}, align 8
// FP64-X64: @size = global i32 8

// FP128: @x = global fp128 {{.*}}, align 16
// FP128: @size = global i32 16
// FP80-ELF32: @x ={{.*}} global x86_fp80 {{.*}}, align 4
// FP80-ELF32: @size ={{.*}} global i32 12
// FP80-ELF64: @x ={{.*}} global x86_fp80 {{.*}}, align 16
// FP80-ELF64: @size ={{.*}} global i32 16
// FP80-DARWIN: @x ={{.*}} global x86_fp80 {{.*}}, align 16
// FP80-DARWIN: @size ={{.*}} global i32 16

// FP64-X32: @x ={{.*}} global double {{.*}}, align 4
// FP64-X32: @size ={{.*}} global i32 8
// FP64-X64: @x ={{.*}} global double {{.*}}, align 8
// FP64-X64: @size ={{.*}} global i32 8

// FP128: @x ={{.*}} global fp128 {{.*}}, align 16
// FP128: @size ={{.*}} global i32 16

long double foo(long double d) { return d; }

Expand Down
22 changes: 11 additions & 11 deletions clang/test/CodeGen/X86/x86-vec-i128.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,30 @@ typedef unsigned long long v16u64 __attribute__((vector_size(16)));
typedef unsigned __int128 v16u128 __attribute__((vector_size(16)));

v16u64 test_v16u128(v16u64 a, v16u128 b) {
// CLANG10ABI128: define <2 x i64> @test_v16u128(<2 x i64> %{{.*}}, <2 x i64> %{{.*}})
// CLANG9ABI128: define <2 x i64> @test_v16u128(<2 x i64> %{{.*}}, <1 x i128> %{{.*}})
// CLANG10ABI128: define{{.*}} <2 x i64> @test_v16u128(<2 x i64> %{{.*}}, <2 x i64> %{{.*}})
// CLANG9ABI128: define{{.*}} <2 x i64> @test_v16u128(<2 x i64> %{{.*}}, <1 x i128> %{{.*}})
return a + (v16u64)b;
}

typedef unsigned long long v32u64 __attribute__((vector_size(32)));
typedef unsigned __int128 v32u128 __attribute__((vector_size(32)));

v32u64 test_v32u128(v32u64 a, v32u128 b) {
// MEM256ALIGN16: define <4 x i64> @test_v32u128(<4 x i64>* byval(<4 x i64>) align 16 %{{.*}}, <2 x i128>* byval(<2 x i128>) align 16 %{{.*}})
// MEM256ALIGN32: define <4 x i64> @test_v32u128(<4 x i64>* byval(<4 x i64>) align 32 %{{.*}}, <2 x i128>* byval(<2 x i128>) align 32 %{{.*}})
// CLANG10ABI256: define <4 x i64> @test_v32u128(<4 x i64> %{{.*}}, <2 x i128>* byval(<2 x i128>) align 32 %{{.*}})
// CLANG9ABI256: define <4 x i64> @test_v32u128(<4 x i64> %{{.*}}, <2 x i128> %{{.*}})
// MEM256ALIGN16: define{{.*}} <4 x i64> @test_v32u128(<4 x i64>* byval(<4 x i64>) align 16 %{{.*}}, <2 x i128>* byval(<2 x i128>) align 16 %{{.*}})
// MEM256ALIGN32: define{{.*}} <4 x i64> @test_v32u128(<4 x i64>* byval(<4 x i64>) align 32 %{{.*}}, <2 x i128>* byval(<2 x i128>) align 32 %{{.*}})
// CLANG10ABI256: define{{.*}} <4 x i64> @test_v32u128(<4 x i64> %{{.*}}, <2 x i128>* byval(<2 x i128>) align 32 %{{.*}})
// CLANG9ABI256: define{{.*}} <4 x i64> @test_v32u128(<4 x i64> %{{.*}}, <2 x i128> %{{.*}})
return a + (v32u64)b;
}

typedef unsigned long long v64u64 __attribute__((vector_size(64)));
typedef unsigned __int128 v64u128 __attribute__((vector_size(64)));

v64u64 test_v64u128(v64u64 a, v64u128 b) {
// MEM512ALIGN16: define <8 x i64> @test_v64u128(<8 x i64>* byval(<8 x i64>) align 16 %{{.*}}, <4 x i128>* byval(<4 x i128>) align 16 %{{.*}})
// MEM512ALIGN32: define <8 x i64> @test_v64u128(<8 x i64>* byval(<8 x i64>) align 32 %{{.*}}, <4 x i128>* byval(<4 x i128>) align 32 %{{.*}})
// MEM512ALIGN64: define <8 x i64> @test_v64u128(<8 x i64>* byval(<8 x i64>) align 64 %{{.*}}, <4 x i128>* byval(<4 x i128>) align 64 %{{.*}})
// CLANG10ABI512: define <8 x i64> @test_v64u128(<8 x i64> %{{.*}}, <4 x i128>* byval(<4 x i128>) align 64 %{{.*}})
// CLANG9ABI512: define <8 x i64> @test_v64u128(<8 x i64> %{{.*}}, <4 x i128> %{{.*}})
// MEM512ALIGN16: define{{.*}} <8 x i64> @test_v64u128(<8 x i64>* byval(<8 x i64>) align 16 %{{.*}}, <4 x i128>* byval(<4 x i128>) align 16 %{{.*}})
// MEM512ALIGN32: define{{.*}} <8 x i64> @test_v64u128(<8 x i64>* byval(<8 x i64>) align 32 %{{.*}}, <4 x i128>* byval(<4 x i128>) align 32 %{{.*}})
// MEM512ALIGN64: define{{.*}} <8 x i64> @test_v64u128(<8 x i64>* byval(<8 x i64>) align 64 %{{.*}}, <4 x i128>* byval(<4 x i128>) align 64 %{{.*}})
// CLANG10ABI512: define{{.*}} <8 x i64> @test_v64u128(<8 x i64> %{{.*}}, <4 x i128>* byval(<4 x i128>) align 64 %{{.*}})
// CLANG9ABI512: define{{.*}} <8 x i64> @test_v64u128(<8 x i64> %{{.*}}, <4 x i128> %{{.*}})
return a + (v64u64)b;
}
102 changes: 51 additions & 51 deletions clang/test/CodeGen/X86/x86_32-arguments-darwin.c
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
// RUN: %clang_cc1 -w -fblocks -triple i386-apple-darwin9 -target-cpu yonah -emit-llvm -o - %s | FileCheck %s

// CHECK-LABEL: define signext i8 @f0()
// CHECK-LABEL: define{{.*}} signext i8 @f0()
char f0(void) {
return 0;
}

// CHECK-LABEL: define signext i16 @f1()
// CHECK-LABEL: define{{.*}} signext i16 @f1()
short f1(void) {
return 0;
}

// CHECK-LABEL: define i32 @f2()
// CHECK-LABEL: define{{.*}} i32 @f2()
int f2(void) {
return 0;
}

// CHECK-LABEL: define float @f3()
// CHECK-LABEL: define{{.*}} float @f3()
float f3(void) {
return 0;
}

// CHECK-LABEL: define double @f4()
// CHECK-LABEL: define{{.*}} double @f4()
double f4(void) {
return 0;
}

// CHECK-LABEL: define x86_fp80 @f5()
// CHECK-LABEL: define{{.*}} x86_fp80 @f5()
long double f5(void) {
return 0;
}

// CHECK-LABEL: 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-LABEL: define void @f7(i32 %a0)
// CHECK-LABEL: define{{.*}} void @f7(i32 %a0)
typedef enum { A, B, C } e7;
void f7(e7 a0) {}

// CHECK-LABEL: define i64 @f8_1()
// CHECK-LABEL: 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;
Expand All @@ -48,11 +48,11 @@ void f8_2(struct s8 a0) {}

// This should be passed just as s8.

// CHECK-LABEL: 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-LABEL: define void @f9_2(%struct.s9* byval(%struct.s9) align 4 %a0)
// CHECK-LABEL: define{{.*}} void @f9_2(%struct.s9* byval(%struct.s9) align 4 %a0)
struct s9 {
int a : 17;
int b;
Expand Down Expand Up @@ -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(%struct.s28) align 4 %agg.result)
struct s28 { int a; int b[]; } f28(void) { while (1) {} }

// CHECK-LABEL: define i16 @f29()
// CHECK-LABEL: define{{.*}} i16 @f29()
struct s29 { struct { } a[1]; char b; char c; } f29(void) { while (1) {} }

// CHECK-LABEL: define i16 @f30()
// CHECK-LABEL: define{{.*}} i16 @f30()
struct s30 { char a; char b : 4; } f30(void) { while (1) {} }

// CHECK-LABEL: define float @f31()
// CHECK-LABEL: define{{.*}} float @f31()
struct s31 { char : 0; float b; char : 0; } f31(void) { while (1) {} }

// CHECK-LABEL: define i32 @f32()
// CHECK-LABEL: define{{.*}} i32 @f32()
struct s32 { char a; unsigned : 0; } f32(void) { while (1) {} }

// CHECK-LABEL: define float @f33()
// CHECK-LABEL: define{{.*}} float @f33()
struct s33 { float a; long long : 0; } f33(void) { while (1) {} }

// CHECK-LABEL: define float @f34()
// CHECK-LABEL: define{{.*}} float @f34()
struct s34 { struct { int : 0; } a; float b; } f34(void) { while (1) {} }

// CHECK-LABEL: define i16 @f35()
// CHECK-LABEL: define{{.*}} i16 @f35()
struct s35 { struct { int : 0; } a; char b; char c; } f35(void) { while (1) {} }

// CHECK-LABEL: 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-LABEL: define float @f37()
// CHECK-LABEL: define{{.*}} float @f37()
struct s37 { float c[1][1]; } f37(void) { while (1) {} }

// CHECK-LABEL: define void @f38(%struct.s38* noalias sret(%struct.s38) align 2 %agg.result)
// CHECK-LABEL: define{{.*}} void @f38(%struct.s38* noalias sret(%struct.s38) align 2 %agg.result)
struct s38 { char a[3]; short b; } f38(void) { while (1) {} }

// CHECK-LABEL: define void @f39(%struct.s39* byval(%struct.s39) align 16 %x)
// CHECK-LABEL: define{{.*}} void @f39(%struct.s39* byval(%struct.s39) align 16 %x)
typedef int v39 __attribute((vector_size(16)));
struct s39 { v39 x; };
void f39(struct s39 x) {}

// <rdar://problem/7247671>
// CHECK-LABEL: define i32 @f40()
// CHECK-LABEL: define{{.*}} i32 @f40()
enum e40 { ec0 = 0 };
enum e40 f40(void) { }

// CHECK-LABEL: define void ()* @f41()
// CHECK-LABEL: define{{.*}} void ()* @f41()
typedef void (^vvbp)(void);
vvbp f41(void) { }

// CHECK-LABEL: define i32 @f42()
// CHECK-LABEL: define{{.*}} i32 @f42()
struct s42 { enum e40 f0; } f42(void) { }

// CHECK-LABEL: define i64 @f43()
// CHECK-LABEL: define{{.*}} i64 @f43()
struct s43 { enum e40 f0; int f1; } f43(void) { }

// CHECK-LABEL: define void ()* @f44()
// CHECK-LABEL: define{{.*}} void ()* @f44()
struct s44 { vvbp f0; } f44(void) { }

// CHECK-LABEL: define i64 @f45()
// CHECK-LABEL: define{{.*}} i64 @f45()
struct s45 { vvbp f0; int f1; } f45(void) { }

// CHECK-LABEL: define void @f46(i32 %a0)
// CHECK-LABEL: define{{.*}} void @f46(i32 %a0)
void f46(enum e40 a0) { }

// CHECK-LABEL: define void @f47(void ()* %a1)
// CHECK-LABEL: define{{.*}} void @f47(void ()* %a1)
void f47(vvbp a1) { }

// CHECK-LABEL: 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-LABEL: 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-LABEL: define void @f50(void ()* %a0.0)
// CHECK-LABEL: define{{.*}} void @f50(void ()* %a0.0)
struct s50 { vvbp f0; };
void f50(struct s50 a0) { }

// CHECK-LABEL: 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-LABEL: define void @f52(%struct.s52* byval(%struct.s52) align 4 %0)
// CHECK-LABEL: define{{.*}} void @f52(%struct.s52* byval(%struct.s52) align 4 %0)
struct s52 {
long double a;
};
void f52(struct s52 x) {}

// CHECK-LABEL: define void @f53(%struct.s53* byval(%struct.s53) align 4 %0)
// CHECK-LABEL: define{{.*}} void @f53(%struct.s53* byval(%struct.s53) align 4 %0)
struct __attribute__((aligned(32))) s53 {
int x;
int y;
Expand All @@ -216,18 +216,18 @@ void f53(struct s53 x) {}

typedef unsigned short v2i16 __attribute__((__vector_size__(4)));

// CHECK-LABEL: 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-LABEL: 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-LABEL: define void @f56(
// CHECK-LABEL: define{{.*}} void @f56(
// CHECK: i8 signext %a0, %struct.s56_0* byval(%struct.s56_0) align 4 %a1,
// CHECK: i64 %a2.coerce, %struct.s56_1* byval(%struct.s56_1) align 4 %0,
// CHECK: i64 %a4.coerce, %struct.s56_2* byval(%struct.s56_2) align 4 %1,
Expand Down Expand Up @@ -276,34 +276,34 @@ void f56(char a0, struct s56_0 a1,
a10, a11, a12, a13);
}

// CHECK-LABEL: 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-LABEL: define void @f58()
// CHECK-LABEL: define{{.*}} void @f58()
union u58 {};
void f58(union u58 x) {}

// CHECK-LABEL: define i64 @f59()
// CHECK-LABEL: define{{.*}} i64 @f59()
struct s59 { float x __attribute((aligned(8))); };
struct s59 f59() { while (1) {} }

// CHECK-LABEL: define void @f60(%struct.s60* byval(%struct.s60) align 4 %0, i32 %y)
// CHECK-LABEL: define{{.*}} void @f60(%struct.s60* byval(%struct.s60) align 4 %0, i32 %y)
struct s60 { int x __attribute((aligned(8))); };
void f60(struct s60 x, int y) {}

// CHECK-LABEL: define void @f61(i32 %x, %struct.s61* byval(%struct.s61) align 16 %y)
// CHECK-LABEL: define{{.*}} void @f61(i32 %x, %struct.s61* byval(%struct.s61) align 16 %y)
typedef int T61 __attribute((vector_size(16)));
struct s61 { T61 x; int y; };
void f61(int x, struct s61 y) {}

// CHECK-LABEL: define void @f62(i32 %x, %struct.s62* byval(%struct.s62) align 4 %0)
// CHECK-LABEL: define{{.*}} void @f62(i32 %x, %struct.s62* byval(%struct.s62) align 4 %0)
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-LABEL: define i32 @f63
// CHECK-LABEL: define{{.*}} i32 @f63
// CHECK: ptrtoint
// CHECK: and {{.*}}, -16
// CHECK: inttoptr
Expand All @@ -317,15 +317,15 @@ int f63(int i, ...) {
return s.y;
}

// CHECK-LABEL: define void @f64(%struct.s64* byval(%struct.s64) align 4 %x)
// CHECK-LABEL: define{{.*}} void @f64(%struct.s64* byval(%struct.s64) align 4 %x)
struct s64 { signed char a[0]; signed char b[]; };
void f64(struct s64 x) {}

// CHECK-LABEL: define float @f65()
// CHECK-LABEL: define{{.*}} float @f65()
struct s65 { signed char a[0]; float b; };
struct s65 f65() { return (struct s65){{},2}; }

// CHECK-LABEL: define <2 x i64> @f66
// CHECK-LABEL: define{{.*}} <2 x i64> @f66
// CHECK: ptrtoint
// CHECK: and {{.*}}, -16
// CHECK: inttoptr
Expand All @@ -341,4 +341,4 @@ T66 f66(int i, ...) {
// PR14453
struct s67 { _Complex unsigned short int a; };
void f67(struct s67 x) {}
// CHECK-LABEL: define void @f67(%struct.s67* byval(%struct.s67) align 4 %x)
// CHECK-LABEL: define{{.*}} void @f67(%struct.s67* byval(%struct.s67) align 4 %x)
2 changes: 1 addition & 1 deletion clang/test/CodeGen/X86/x86_32-arguments-realign.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 -w -fblocks -triple i386-apple-darwin9 -emit-llvm -o %t %s
// RUN: FileCheck < %t %s

// CHECK-LABEL: define void @f0(%struct.s0* byval(%struct.s0) align 4 %0)
// CHECK-LABEL: define{{.*}} void @f0(%struct.s0* byval(%struct.s0) align 4 %0)
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 16 %{{.*}}, i8* align 4 %{{.*}}, i32 16, i1 false)
// CHECK: }
struct s0 { long double a; };
Expand Down
30 changes: 15 additions & 15 deletions clang/test/CodeGen/aarch64-args.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@

struct Empty {};

// CHECK: define i32 @empty_arg(i32 %a)
// CHECK-GNU-C: define i32 @empty_arg(i32 %a)
// CHECK-GNU-CXX: define i32 @empty_arg(i8 %e.coerce, i32 %a)
// CHECK: define{{.*}} i32 @empty_arg(i32 %a)
// CHECK-GNU-C: define{{.*}} i32 @empty_arg(i32 %a)
// CHECK-GNU-CXX: define{{.*}} i32 @empty_arg(i8 %e.coerce, i32 %a)
EXTERNC int empty_arg(struct Empty e, int a) {
return a;
}

// CHECK: define void @empty_ret()
// CHECK-GNU-C: define void @empty_ret()
// CHECK-GNU-CXX: define void @empty_ret()
// CHECK: define{{.*}} void @empty_ret()
// CHECK-GNU-C: define{{.*}} void @empty_ret()
// CHECK-GNU-CXX: define{{.*}} void @empty_ret()
EXTERNC struct Empty empty_ret() {
struct Empty e;
return e;
Expand All @@ -38,9 +38,9 @@ struct SuperEmpty {
int arr[0];
};

// CHECK: define i32 @super_empty_arg(i32 %a)
// CHECK-GNU-C: define i32 @super_empty_arg(i32 %a)
// CHECK-GNU-CXX: define i32 @super_empty_arg(i32 %a)
// CHECK: define{{.*}} i32 @super_empty_arg(i32 %a)
// CHECK-GNU-C: define{{.*}} i32 @super_empty_arg(i32 %a)
// CHECK-GNU-CXX: define{{.*}} i32 @super_empty_arg(i32 %a)
EXTERNC int super_empty_arg(struct SuperEmpty e, int a) {
return a;
}
Expand All @@ -51,16 +51,16 @@ struct SortOfEmpty {
struct SuperEmpty e;
};

// CHECK: define i32 @sort_of_empty_arg(i32 %a)
// CHECK-GNU-C: define i32 @sort_of_empty_arg(i32 %a)
// CHECK-GNU-CXX: define i32 @sort_of_empty_arg(i8 %e.coerce, i32 %a)
// CHECK: define{{.*}} i32 @sort_of_empty_arg(i32 %a)
// CHECK-GNU-C: define{{.*}} i32 @sort_of_empty_arg(i32 %a)
// CHECK-GNU-CXX: define{{.*}} i32 @sort_of_empty_arg(i8 %e.coerce, i32 %a)
EXTERNC int sort_of_empty_arg(struct Empty e, int a) {
return a;
}

// CHECK: define void @sort_of_empty_ret()
// CHECK-GNU-C: define void @sort_of_empty_ret()
// CHECK-GNU-CXX: define void @sort_of_empty_ret()
// CHECK: define{{.*}} void @sort_of_empty_ret()
// CHECK-GNU-C: define{{.*}} void @sort_of_empty_ret()
// CHECK-GNU-CXX: define{{.*}} void @sort_of_empty_ret()
EXTERNC struct SortOfEmpty sort_of_empty_ret() {
struct SortOfEmpty e;
return e;
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CodeGen/aarch64-arguments-hfa-v3.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ typedef struct { float32x3_t arr[4]; } HFAv3;
// CHECK: %struct.MixedHFAv3 = type { [3 x <3 x float>], <16 x i8> }
typedef struct { float32x3_t arr[3]; int8x16_t b; } MixedHFAv3;

// CHECK: define %struct.HFAv3 @test([4 x <4 x float>] %{{.*}}, [4 x <4 x float>] %{{.*}}, [4 x <4 x float>] %{{.*}})
// CHECK: define{{.*}} %struct.HFAv3 @test([4 x <4 x float>] %{{.*}}, [4 x <4 x float>] %{{.*}}, [4 x <4 x float>] %{{.*}})
HFAv3 test(HFAv3 a0, HFAv3 a1, HFAv3 a2) {
return a2;
}

// CHECK: define %struct.MixedHFAv3 @test_mixed([4 x <4 x float>] %{{.*}}, [4 x <4 x float>] %{{.*}}, [4 x <4 x float>] %{{.*}})
// CHECK: define{{.*}} %struct.MixedHFAv3 @test_mixed([4 x <4 x float>] %{{.*}}, [4 x <4 x float>] %{{.*}}, [4 x <4 x float>] %{{.*}})
MixedHFAv3 test_mixed(MixedHFAv3 a0, MixedHFAv3 a1, MixedHFAv3 a2) {
return a2;
}
96 changes: 48 additions & 48 deletions clang/test/CodeGen/aarch64-neon-vget.c

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clang/test/CodeGen/address-space-field1.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -emit-llvm -triple x86_64-apple-darwin10 < %s -o - | FileCheck %s
// CHECK:%struct.S = type { i32, i32 }
// CHECK:define void @test_addrspace(%struct.S addrspace(1)* %p1, %struct.S addrspace(2)* %p2) [[NUW:#[0-9]+]]
// CHECK:define{{.*}} void @test_addrspace(%struct.S addrspace(1)* %p1, %struct.S addrspace(2)* %p2) [[NUW:#[0-9]+]]
// CHECK: [[p1addr:%.*]] = alloca %struct.S addrspace(1)*
// CHECK: [[p2addr:%.*]] = alloca %struct.S addrspace(2)*
// CHECK: store %struct.S addrspace(1)* %p1, %struct.S addrspace(1)** [[p1addr]]
Expand Down
16 changes: 8 additions & 8 deletions clang/test/CodeGen/address-space.c
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm < %s | FileCheck -enable-var-scope -check-prefixes=CHECK,X86 %s
// RUN: %clang_cc1 -triple amdgcn -emit-llvm < %s | FileCheck -enable-var-scope -check-prefixes=CHECK,AMDGCN %s

// CHECK: @foo = addrspace(1) global
// CHECK: @foo ={{.*}} addrspace(1) global
int foo __attribute__((address_space(1)));

// CHECK: @ban = addrspace(1) global
// CHECK: @ban ={{.*}} addrspace(1) global
int ban[10] __attribute__((address_space(1)));

// CHECK: @a = global
// CHECK: @a ={{.*}} global
int a __attribute__((address_space(0)));

// CHECK-LABEL: define i32 @test1()
// CHECK-LABEL: define{{.*}} i32 @test1()
// CHECK: load i32, i32 addrspace(1)* @foo
int test1() { return foo; }

// CHECK-LABEL: define i32 @test2(i32 %i)
// CHECK-LABEL: define{{.*}} i32 @test2(i32 %i)
// CHECK: load i32, i32 addrspace(1)*
// CHECK-NEXT: ret i32
int test2(int i) { return ban[i]; }

// Both A and B point into addrspace(2).
__attribute__((address_space(2))) int *A, *B;

// CHECK-LABEL: define void @test3()
// CHECK-LABEL: define{{.*}} void @test3()
// X86: load i32 addrspace(2)*, i32 addrspace(2)** @B
// AMDGCN: load i32 addrspace(2)*, i32 addrspace(2)** addrspacecast (i32 addrspace(2)* addrspace(1)* @B to i32 addrspace(2)**)
// CHECK: load i32, i32 addrspace(2)*
Expand All @@ -38,7 +38,7 @@ typedef struct {
float aData[1];
} MyStruct;

// CHECK-LABEL: 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) {
Expand All @@ -60,7 +60,7 @@ void_ptr_arithmetic_test(void __attribute__((address_space(1))) *arg) {
return arg + 4;
}

// CHECK-LABEL: define i32* @test5(
// CHECK-LABEL: define{{.*}} i32* @test5(
const unsigned *test5() {
// Intentionally leave a part of an array uninitialized. This triggers a
// different code path contrary to a fully initialized array.
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CodeGen/align-param.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
int test (long long x) {
return (int)x;
}
// CHECK-LABEL: define i32 @test
// CHECK-LABEL: define{{.*}} i32 @test
// CHECK: alloca i64, align 8


Expand All @@ -14,5 +14,5 @@ struct X { int x,y,z,a; };
int test2(struct X x __attribute((aligned(16)))) {
return x.z;
}
// CHECK-LABEL: define i32 @test2
// CHECK-LABEL: define{{.*}} i32 @test2
// CHECK: alloca %struct.X, align 16
2 changes: 1 addition & 1 deletion clang/test/CodeGen/aligned-sret.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ typedef __attribute__((__ext_vector_type__(4),__aligned__(16))) double simd_doub
typedef struct { simd_double4 columns[4]; } simd_double4x4;
typedef simd_double4x4 matrix_double4x4;

// CHECK: define void @ident(%struct.simd_double4x4* noalias sret(%struct.simd_double4x4) align 16 %agg.result
// CHECK: define{{.*}} void @ident(%struct.simd_double4x4* noalias sret(%struct.simd_double4x4) align 16 %agg.result
matrix_double4x4 ident(matrix_double4x4 x) {
return x;
}
6 changes: 3 additions & 3 deletions clang/test/CodeGen/annotations-var.c
Original file line number Diff line number Diff line change
Expand Up @@ -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-LABEL: 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], [15 x i8]* @{{.*}}), i8* getelementptr inbounds ({{.*}}), i32 33, i8* null)
Expand All @@ -43,14 +43,14 @@ void local_after_return(void) {
return;
int localvar __attribute__((annotate("localvar_after_return"))) = 3;
// Test we are not emitting instructions like bitcast or call outside of a basic block.
// LOCAL-LABEL: define void @local_after_return()
// LOCAL-LABEL: define{{.*}} void @local_after_return()
// LOCAL: [[LOCALVAR:%.*]] = alloca i32,
// LOCAL-NEXT: ret void
}

void undef(void) {
int undefvar __attribute__((annotate("undefvar_ann_0")));
// UNDEF-LABEL: 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], [15 x i8]* @{{.*}}), i8* getelementptr inbounds ({{.*}}), i32 52, i8* null)
Expand Down
48 changes: 24 additions & 24 deletions clang/test/CodeGen/arm-aapcs-vfp.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,38 +24,38 @@ struct homogeneous_struct {
float f3;
float f4;
};
// CHECK: define arm_aapcs_vfpcc %struct.homogeneous_struct @test_struct(%struct.homogeneous_struct %{{.*}})
// CHECK64: define %struct.homogeneous_struct @test_struct([4 x float] %{{.*}})
// CHECK: define{{.*}} arm_aapcs_vfpcc %struct.homogeneous_struct @test_struct(%struct.homogeneous_struct %{{.*}})
// CHECK64: define{{.*}} %struct.homogeneous_struct @test_struct([4 x float] %{{.*}})
extern struct homogeneous_struct struct_callee(struct homogeneous_struct);
struct homogeneous_struct test_struct(struct homogeneous_struct arg) {
return struct_callee(arg);
}

// CHECK: define arm_aapcs_vfpcc void @test_struct_variadic(%struct.homogeneous_struct* {{.*}}, ...)
// CHECK: define{{.*}} arm_aapcs_vfpcc void @test_struct_variadic(%struct.homogeneous_struct* {{.*}}, ...)
struct homogeneous_struct test_struct_variadic(struct homogeneous_struct arg, ...) {
return struct_callee(arg);
}

struct nested_array {
double d[4];
};
// CHECK: define arm_aapcs_vfpcc void @test_array(%struct.nested_array %{{.*}})
// CHECK64: define void @test_array([4 x double] %{{.*}})
// CHECK: define{{.*}} arm_aapcs_vfpcc void @test_array(%struct.nested_array %{{.*}})
// CHECK64: define{{.*}} void @test_array([4 x double] %{{.*}})
extern void array_callee(struct nested_array);
void test_array(struct nested_array arg) {
array_callee(arg);
}

extern void complex_callee(__complex__ double);
// CHECK: define arm_aapcs_vfpcc void @test_complex({ double, double } %{{.*}})
// CHECK64: define void @test_complex([2 x double] %cd.coerce)
// CHECK: define{{.*}} arm_aapcs_vfpcc void @test_complex({ double, double } %{{.*}})
// CHECK64: define{{.*}} void @test_complex([2 x double] %cd.coerce)
void test_complex(__complex__ double cd) {
complex_callee(cd);
}

// Long double is the same as double on AAPCS, it should be homogeneous.
extern void complex_long_callee(__complex__ long double);
// CHECK: define arm_aapcs_vfpcc void @test_complex_long({ double, double } %{{.*}})
// CHECK: define{{.*}} arm_aapcs_vfpcc void @test_complex_long({ double, double } %{{.*}})
void test_complex_long(__complex__ long double cd) {
complex_callee(cd);
}
Expand All @@ -69,8 +69,8 @@ struct big_struct {
float f3;
float f4;
};
// CHECK: define arm_aapcs_vfpcc void @test_big([5 x i32] %{{.*}})
// CHECK64: define void @test_big(%struct.big_struct* %{{.*}})
// CHECK: define{{.*}} arm_aapcs_vfpcc void @test_big([5 x i32] %{{.*}})
// CHECK64: define{{.*}} void @test_big(%struct.big_struct* %{{.*}})
// CHECK64: call void @llvm.memcpy
// CHECK64: call void @big_callee(%struct.big_struct*
extern void big_callee(struct big_struct);
Expand All @@ -85,16 +85,16 @@ struct heterogeneous_struct {
float f1;
int i2;
};
// CHECK: define arm_aapcs_vfpcc void @test_hetero([2 x i32] %{{.*}})
// CHECK64: define void @test_hetero(i64 %{{.*}})
// CHECK: define{{.*}} arm_aapcs_vfpcc void @test_hetero([2 x i32] %{{.*}})
// CHECK64: define{{.*}} void @test_hetero(i64 %{{.*}})
extern void hetero_callee(struct heterogeneous_struct);
void test_hetero(struct heterogeneous_struct arg) {
hetero_callee(arg);
}

// Neon multi-vector types are homogeneous aggregates.
// CHECK: define arm_aapcs_vfpcc <16 x i8> @f0(%struct.int8x16x4_t %{{.*}})
// CHECK64: define <16 x i8> @f0([4 x <16 x i8>] %{{.*}})
// CHECK: define{{.*}} arm_aapcs_vfpcc <16 x i8> @f0(%struct.int8x16x4_t %{{.*}})
// CHECK64: define{{.*}} <16 x i8> @f0([4 x <16 x i8>] %{{.*}})
int8x16_t f0(int8x16x4_t v4) {
return vaddq_s8(v4.val[0], v4.val[3]);
}
Expand All @@ -107,43 +107,43 @@ struct neon_struct {
int32x2_t v3;
int16x4_t v4;
};
// CHECK: define arm_aapcs_vfpcc void @test_neon(%struct.neon_struct %{{.*}})
// CHECK64: define void @test_neon([4 x <8 x i8>] %{{.*}})
// CHECK: define{{.*}} arm_aapcs_vfpcc void @test_neon(%struct.neon_struct %{{.*}})
// CHECK64: define{{.*}} void @test_neon([4 x <8 x i8>] %{{.*}})
extern void neon_callee(struct neon_struct);
void test_neon(struct neon_struct arg) {
neon_callee(arg);
}

// CHECK-LABEL: define arm_aapcs_vfpcc void @f33(%struct.s33* byval(%struct.s33) align 4 %s)
// CHECK-LABEL: define{{.*}} arm_aapcs_vfpcc void @f33(%struct.s33* byval(%struct.s33) align 4 %s)
struct s33 { char buf[32*32]; };
void f33(struct s33 s) { }

typedef struct { long long x; int y; } struct_long_long_int;
// CHECK: define arm_aapcs_vfpcc void @test_vfp_stack_gpr_split_1(double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, double %i, i32 %j, i64 %k, i32 %l)
// CHECK: define{{.*}} arm_aapcs_vfpcc void @test_vfp_stack_gpr_split_1(double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, double %i, i32 %j, i64 %k, i32 %l)
void test_vfp_stack_gpr_split_1(double a, double b, double c, double d, double e, double f, double g, double h, double i, int j, long long k, int l) {}

// CHECK: define arm_aapcs_vfpcc void @test_vfp_stack_gpr_split_2(double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, double %i, i32 %j, [2 x i64] %k.coerce)
// CHECK: define{{.*}} arm_aapcs_vfpcc void @test_vfp_stack_gpr_split_2(double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, double %i, i32 %j, [2 x i64] %k.coerce)
void test_vfp_stack_gpr_split_2(double a, double b, double c, double d, double e, double f, double g, double h, double i, int j, struct_long_long_int k) {}

// CHECK: define arm_aapcs_vfpcc void @test_vfp_stack_gpr_split_3(%struct.struct_long_long_int* noalias sret(%struct.struct_long_long_int) align 8 %agg.result, double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, double %i, [2 x i64] %k.coerce)
// CHECK: define{{.*}} arm_aapcs_vfpcc void @test_vfp_stack_gpr_split_3(%struct.struct_long_long_int* noalias sret(%struct.struct_long_long_int) align 8 %agg.result, double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, double %i, [2 x i64] %k.coerce)
struct_long_long_int test_vfp_stack_gpr_split_3(double a, double b, double c, double d, double e, double f, double g, double h, double i, struct_long_long_int k) {}

typedef struct { int a; int b:4; int c; } struct_int_bitfield_int;
// CHECK: define arm_aapcs_vfpcc void @test_test_vfp_stack_gpr_split_bitfield(double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, double %i, i32 %j, i32 %k, [3 x i32] %l.coerce)
// CHECK: define{{.*}} arm_aapcs_vfpcc void @test_test_vfp_stack_gpr_split_bitfield(double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, double %i, i32 %j, i32 %k, [3 x i32] %l.coerce)
void test_test_vfp_stack_gpr_split_bitfield(double a, double b, double c, double d, double e, double f, double g, double h, double i, int j, int k, struct_int_bitfield_int l) {}

// Note: this struct requires internal padding
typedef struct { int x; long long y; } struct_int_long_long;
// CHECK: define arm_aapcs_vfpcc void @test_vfp_stack_gpr_split_4(double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, double %i, i32 %j, [2 x i64] %k.coerce)
// CHECK: define{{.*}} arm_aapcs_vfpcc void @test_vfp_stack_gpr_split_4(double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, double %i, i32 %j, [2 x i64] %k.coerce)
void test_vfp_stack_gpr_split_4(double a, double b, double c, double d, double e, double f, double g, double h, double i, int j, struct_int_long_long k) {}

// This very large struct (passed byval) uses up the GPRs, so no padding is needed
typedef struct { int x[17]; } struct_seventeen_ints;
typedef struct { int x[4]; } struct_four_ints;
// CHECK: define arm_aapcs_vfpcc void @test_vfp_stack_gpr_split_5(%struct.struct_seventeen_ints* byval(%struct.struct_seventeen_ints) align 4 %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, double %i, double %j, [4 x i32] %k.coerce)
// CHECK: define{{.*}} arm_aapcs_vfpcc void @test_vfp_stack_gpr_split_5(%struct.struct_seventeen_ints* byval(%struct.struct_seventeen_ints) align 4 %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, double %i, double %j, [4 x i32] %k.coerce)
void test_vfp_stack_gpr_split_5(struct_seventeen_ints a, double b, double c, double d, double e, double f, double g, double h, double i, double j, struct_four_ints k) {}

// Here, parameter k would need padding to prevent it from being split, but it
// is passed ByVal (due to being > 64 bytes), so the backend handles this instead.
void test_vfp_stack_gpr_split_6(double a, double b, double c, double d, double e, double f, double g, double h, double i, int j, struct_seventeen_ints k) {}
// CHECK: define arm_aapcs_vfpcc void @test_vfp_stack_gpr_split_6(double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, double %i, i32 %j, %struct.struct_seventeen_ints* byval(%struct.struct_seventeen_ints) align 4 %k)
// CHECK: define{{.*}} arm_aapcs_vfpcc void @test_vfp_stack_gpr_split_6(double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, double %i, i32 %j, %struct.struct_seventeen_ints* byval(%struct.struct_seventeen_ints) align 4 %k)
130 changes: 65 additions & 65 deletions clang/test/CodeGen/arm-arguments.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,156 +2,156 @@
// RUN: %clang_cc1 -triple armv7-apple-darwin9 -target-feature +neon -target-abi apcs-gnu -emit-llvm -w -o - %s | FileCheck -check-prefix=APCS-GNU %s
// RUN: %clang_cc1 -triple armv7-apple-darwin9 -target-feature +neon -target-abi aapcs -emit-llvm -w -o - %s | FileCheck -check-prefix=AAPCS %s

// APCS-GNU-LABEL: define signext i8 @f0()
// AAPCS-LABEL: 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-LABEL: define i8 @f1()
// AAPCS-LABEL: 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-LABEL: define i16 @f2()
// AAPCS-LABEL: 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-LABEL: define i32 @f3()
// AAPCS-LABEL: 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-LABEL: define i32 @f4()
// AAPCS-LABEL: 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-LABEL: define void @f5(
// APCS-GNU-LABEL: define{{.*}} void @f5(
// APCS-GNU: struct.s5* noalias sret
// AAPCS-LABEL: define arm_aapcscc i32 @f5()
// AAPCS-LABEL: define{{.*}} arm_aapcscc i32 @f5()
struct s5 { struct { } f0; int f1; };
struct s5 f5(void) {}

// APCS-GNU-LABEL: define void @f6(
// APCS-GNU-LABEL: define{{.*}} void @f6(
// APCS-GNU: struct.s6* noalias sret
// AAPCS-LABEL: define arm_aapcscc i32 @f6()
// AAPCS-LABEL: define{{.*}} arm_aapcscc i32 @f6()
struct s6 { int f0[1]; };
struct s6 f6(void) {}

// APCS-GNU-LABEL: define void @f7()
// AAPCS-LABEL: 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-LABEL: define void @f8(
// APCS-GNU-LABEL: define{{.*}} void @f8(
// APCS-GNU: struct.s8* noalias sret
// AAPCS-LABEL: 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-LABEL: define i32 @f9()
// AAPCS-LABEL: 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-LABEL: define i32 @f10()
// AAPCS-LABEL: 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-LABEL: define void @f11(
// APCS-GNU-LABEL: define{{.*}} void @f11(
// APCS-GNU: struct.s11* noalias sret
// AAPCS-LABEL: define arm_aapcscc i32 @f11()
// AAPCS-LABEL: define{{.*}} arm_aapcscc i32 @f11()
struct s11 { int : 0; int f0; };
struct s11 f11(void) {}

// APCS-GNU-LABEL: define i32 @f12()
// AAPCS-LABEL: 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-LABEL: define void @f13(
// APCS-GNU-LABEL: define{{.*}} void @f13(
// APCS-GNU: struct.s13* noalias sret

// FIXME: This should return a float.
// AAPCS-FIXME: darm_aapcscc efine float @f13()
struct s13 { float f0; };
struct s13 f13(void) {}

// APCS-GNU-LABEL: define void @f14(
// APCS-GNU-LABEL: define{{.*}} void @f14(
// APCS-GNU: union.u14* noalias sret
// AAPCS-LABEL: define arm_aapcscc i32 @f14()
// AAPCS-LABEL: define{{.*}} arm_aapcscc i32 @f14()
union u14 { float f0; };
union u14 f14(void) {}

// APCS-GNU-LABEL: define void @f15()
// AAPCS-LABEL: 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-LABEL: define void @f16()
// AAPCS-LABEL: 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-LABEL: define i32 @f17()
// AAPCS-LABEL: 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-LABEL: define i32 @f18()
// AAPCS-LABEL: 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-LABEL: define void @f19(
// APCS-GNU-LABEL: define{{.*}} void @f19(
// APCS-GNU: struct.s19* noalias sret
// AAPCS-LABEL: 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-LABEL: define void @f20(
// APCS-GNU-LABEL: define{{.*}} void @f20(
// APCS-GNU: struct.s20* noalias sret
// AAPCS-LABEL: 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-LABEL: define i8 @f21()
// AAPCS-LABEL: 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-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
// AAPCS: define arm_aapcscc void @f27({{.*}} noalias sret
// 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
// AAPCS: define{{.*}} arm_aapcscc void @f27({{.*}} noalias sret
_Complex char f22(void) {}
_Complex short f23(void) {}
_Complex int f24(void) {}
_Complex long long f25(void) {}
_Complex float f26(void) {}
_Complex double f27(void) {}

// APCS-GNU-LABEL: define i16 @f28()
// AAPCS-LABEL: 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-LABEL: define i32 @f29()
// AAPCS-LABEL: 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() {}

// APCS-GNU: define void @f30({{.*}} noalias sret
// AAPCS: define arm_aapcscc void @f30({{.*}} noalias sret
// APCS-GNU: define{{.*}} void @f30({{.*}} noalias sret
// AAPCS: define{{.*}} arm_aapcscc void @f30({{.*}} noalias sret
struct s30 { _Complex int f0; };
struct s30 f30() {}

Expand All @@ -176,8 +176,8 @@ void f32(struct s32 s) { }
// PR13350
struct s33 { char buf[32*32]; };
void f33(struct s33 s) { }
// APCS-GNU-LABEL: define void @f33(%struct.s33* byval(%struct.s33) align 4 %s)
// AAPCS-LABEL: define arm_aapcscc void @f33(%struct.s33* byval(%struct.s33) align 4 %s)
// APCS-GNU-LABEL: define{{.*}} void @f33(%struct.s33* byval(%struct.s33) align 4 %s)
// AAPCS-LABEL: define{{.*}} arm_aapcscc void @f33(%struct.s33* byval(%struct.s33) align 4 %s)

// PR14048
struct s34 { char c; };
Expand All @@ -204,15 +204,15 @@ float32x4_t f35(int i, s35_with_align s1, s35_with_align s2) {
*(float32x4_t *)&s2);
return v;
}
// APCS-GNU-LABEL: define <4 x float> @f35(i32 %i, %struct.s35* byval(%struct.s35) align 4 %0, %struct.s35* byval(%struct.s35) align 4 %1)
// APCS-GNU-LABEL: define{{.*}} <4 x float> @f35(i32 %i, %struct.s35* byval(%struct.s35) align 4 %0, %struct.s35* byval(%struct.s35) align 4 %1)
// 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* align {{[0-9]+}} %[[b]], i8* align {{[0-9]+}} %[[c]]
// APCS-GNU: %[[d:.*]] = bitcast %struct.s35* %[[a]] to <4 x float>*
// APCS-GNU: load <4 x float>, <4 x float>* %[[d]], align 16

// AAPCS-LABEL: define arm_aapcscc <4 x float> @f35(i32 %i, %struct.s35* byval(%struct.s35) align 4 %s1, %struct.s35* byval(%struct.s35) align 4 %s2)
// AAPCS-LABEL: define{{.*}} arm_aapcscc <4 x float> @f35(i32 %i, %struct.s35* byval(%struct.s35) align 4 %s1, %struct.s35* byval(%struct.s35) align 4 %s2)
// AAPCS: %[[a_addr:.*]] = alloca <4 x float>, align 16
// AAPCS: %[[b_addr:.*]] = alloca <4 x float>, align 16
// AAPCS: %[[p1:.*]] = bitcast %struct.s35* %s1 to <4 x float>*
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CodeGen/arm-cc.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
// RUN: %clang_cc1 -triple armv7-none-eabihf -target-abi aapcs-vfp -emit-llvm -w -o - %s | FileCheck -check-prefix=BAREMETAL-AAPCS_VFP %s


// DARWIN-APCS-LABEL: define void @f()
// DARWIN-APCS-LABEL: define{{.*}} void @f()
// DARWIN-APCS: call void @g
// DARWIN-AAPCS-LABEL: define arm_aapcscc void @f()
// DARWIN-AAPCS-LABEL: define{{.*}} arm_aapcscc void @f()
// DARWIN-AAPCS: call arm_aapcscc void @g
// LINUX-APCS-LABEL: define arm_apcscc void @f()
// LINUX-APCS: call arm_apcscc void @g
Expand Down
14 changes: 7 additions & 7 deletions clang/test/CodeGen/arm-interrupt-attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@
// RUN: %clang_cc1 -triple arm-apple-darwin -target-abi apcs-gnu -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-APCS

__attribute__((interrupt)) void test_generic_interrupt() {
// CHECK: define arm_aapcscc void @test_generic_interrupt() [[GENERIC_ATTR:#[0-9]+]]
// CHECK: define{{.*}} arm_aapcscc void @test_generic_interrupt() [[GENERIC_ATTR:#[0-9]+]]

// CHECK-APCS: define void @test_generic_interrupt() [[GENERIC_ATTR:#[0-9]+]]
// CHECK-APCS: define{{.*}} void @test_generic_interrupt() [[GENERIC_ATTR:#[0-9]+]]
}

__attribute__((interrupt("IRQ"))) void test_irq_interrupt() {
// CHECK: define arm_aapcscc void @test_irq_interrupt() [[IRQ_ATTR:#[0-9]+]]
// CHECK: define{{.*}} arm_aapcscc void @test_irq_interrupt() [[IRQ_ATTR:#[0-9]+]]
}

__attribute__((interrupt("FIQ"))) void test_fiq_interrupt() {
// CHECK: define arm_aapcscc void @test_fiq_interrupt() [[FIQ_ATTR:#[0-9]+]]
// CHECK: define{{.*}} arm_aapcscc void @test_fiq_interrupt() [[FIQ_ATTR:#[0-9]+]]
}

__attribute__((interrupt("SWI"))) void test_swi_interrupt() {
// CHECK: define arm_aapcscc void @test_swi_interrupt() [[SWI_ATTR:#[0-9]+]]
// CHECK: define{{.*}} arm_aapcscc void @test_swi_interrupt() [[SWI_ATTR:#[0-9]+]]
}

__attribute__((interrupt("ABORT"))) void test_abort_interrupt() {
// CHECK: define arm_aapcscc void @test_abort_interrupt() [[ABORT_ATTR:#[0-9]+]]
// CHECK: define{{.*}} arm_aapcscc void @test_abort_interrupt() [[ABORT_ATTR:#[0-9]+]]
}


__attribute__((interrupt("UNDEF"))) void test_undef_interrupt() {
// CHECK: define arm_aapcscc void @test_undef_interrupt() [[UNDEF_ATTR:#[0-9]+]]
// CHECK: define{{.*}} arm_aapcscc void @test_undef_interrupt() [[UNDEF_ATTR:#[0-9]+]]
}

// CHECK: attributes [[GENERIC_ATTR]] = { {{.*}} {{"interrupt"[^=]}}
Expand Down
302 changes: 151 additions & 151 deletions clang/test/CodeGen/arm-swiftcall.c

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions clang/test/CodeGen/arm-target-attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
// RUN: %clang_cc1 -triple arm-apple-darwin -emit-llvm -o - %s | FileCheck --check-prefix CHECKNEG %s

__attribute__((target("arm"))) void test_target_arm() {
// CHECKPOS: define void @test_target_arm() [[ARM_ATTRS:#[0-9]+]]
// CHECKNEG: define void @test_target_arm() [[ARM_ATTRS:#[0-9]+]]
// CHECKPOS: define{{.*}} void @test_target_arm() [[ARM_ATTRS:#[0-9]+]]
// CHECKNEG: define{{.*}} void @test_target_arm() [[ARM_ATTRS:#[0-9]+]]
}

__attribute__((target("thumb"))) void test_target_thumb() {
// CHECKPOS: define void @test_target_thumb() [[THUMB_ATTRS:#[0-9]+]]
// CHECKNEG: define void @test_target_thumb() [[THUMB_ATTRS:#[0-9]+]]
// CHECKPOS: define{{.*}} void @test_target_thumb() [[THUMB_ATTRS:#[0-9]+]]
// CHECKNEG: define{{.*}} void @test_target_thumb() [[THUMB_ATTRS:#[0-9]+]]
}

// CHECKPOS: attributes [[ARM_ATTRS]] = { {{.*}} "target-features"="{{.*}}-thumb-mode{{.*}}"
Expand Down
10 changes: 5 additions & 5 deletions clang/test/CodeGen/arm-vector-arguments.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include <arm_neon.h>

// CHECK: define void @f0(%struct.int8x16x2_t* noalias sret(%struct.int8x16x2_t) align 16 %agg.result, <16 x i8> %{{.*}}, <16 x i8> %{{.*}})
// CHECK: define{{.*}} void @f0(%struct.int8x16x2_t* noalias sret(%struct.int8x16x2_t) align 16 %agg.result, <16 x i8> %{{.*}}, <16 x i8> %{{.*}})
int8x16x2_t f0(int8x16_t a0, int8x16_t a1) {
return vzipq_s8(a0, a1);
}
Expand All @@ -21,11 +21,11 @@ typedef float T_float32x4 __attribute__ ((__vector_size__ (16)));
typedef float T_float32x8 __attribute__ ((__vector_size__ (32)));
typedef float T_float32x16 __attribute__ ((__vector_size__ (64)));

// CHECK: define <2 x float> @f1_0(<2 x float> %{{.*}})
// CHECK: define{{.*}} <2 x float> @f1_0(<2 x float> %{{.*}})
T_float32x2 f1_0(T_float32x2 a0) { return a0; }
// CHECK: define <4 x float> @f1_1(<4 x float> %{{.*}})
// CHECK: define{{.*}} <4 x float> @f1_1(<4 x float> %{{.*}})
T_float32x4 f1_1(T_float32x4 a0) { return a0; }
// CHECK: define void @f1_2(<8 x float>* noalias sret(<8 x float>) align 32 %{{.*}}, <8 x float> %{{.*}})
// CHECK: define{{.*}} void @f1_2(<8 x float>* noalias sret(<8 x float>) align 32 %{{.*}}, <8 x float> %{{.*}})
T_float32x8 f1_2(T_float32x8 a0) { return a0; }
// CHECK: define void @f1_3(<16 x float>* noalias sret(<16 x float>) align 64 %{{.*}}, <16 x float> %{{.*}})
// CHECK: define{{.*}} void @f1_3(<16 x float>* noalias sret(<16 x float>) align 64 %{{.*}}, <16 x float> %{{.*}})
T_float32x16 f1_3(T_float32x16 a0) { return a0; }
152 changes: 76 additions & 76 deletions clang/test/CodeGen/arm64-arguments.c

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions clang/test/CodeGen/arm64_32-vaarg.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ typedef struct {

// No realignment should be needed here: slot size is 4 bytes.
int test_int(OneInt input, va_list *mylist) {
// CHECK-LABEL: define i32 @test_int(i32 %input
// CHECK-LABEL: define{{.*}} i32 @test_int(i32 %input
// CHECK: [[START:%.*]] = load i8*, i8** %mylist
// CHECK: [[NEXT:%.*]] = getelementptr inbounds i8, i8* [[START]], i32 4
// CHECK: store i8* [[NEXT]], i8** %mylist
Expand All @@ -27,7 +27,7 @@ typedef struct {

// Minimum slot size is 4 bytes, so address needs rounding up to multiple of 8.
long long test_longlong(OneLongLong input, va_list *mylist) {
// CHECK-LABEL: define i64 @test_longlong(i64 %input
// CHECK-LABEL: define{{.*}} i64 @test_longlong(i64 %input
// CHECK: [[STARTPTR:%.*]] = load i8*, i8** %mylist
// CHECK: [[START:%.*]] = ptrtoint i8* [[STARTPTR]] to i32

Expand All @@ -52,7 +52,7 @@ typedef struct {

// HFAs take priority over passing large structs indirectly.
float test_hfa(va_list *mylist) {
// CHECK-LABEL: define float @test_hfa
// CHECK-LABEL: define{{.*}} float @test_hfa
// CHECK: [[START:%.*]] = load i8*, i8** %mylist

// CHECK: [[NEXT:%.*]] = getelementptr inbounds i8, i8* [[START]], i32 16
Expand All @@ -68,7 +68,7 @@ float test_hfa(va_list *mylist) {
// armv7k does not return HFAs normally for variadic functions, so we must match
// that.
HFA test_hfa_return(int n, ...) {
// CHECK-LABEL: define [2 x i64] @test_hfa_return
// CHECK-LABEL: define{{.*}} [2 x i64] @test_hfa_return
HFA h = {0};
return h;
}
Expand All @@ -81,7 +81,7 @@ typedef struct {
// Structs bigger than 16 bytes are passed indirectly: a pointer is placed on
// the stack.
long long test_bigstruct(BigStruct input, va_list *mylist) {
// CHECK-LABEL: define i64 @test_bigstruct(%struct.BigStruct*
// CHECK-LABEL: define{{.*}} i64 @test_bigstruct(%struct.BigStruct*
// CHECK: [[START:%.*]] = load i8*, i8** %mylist
// CHECK: [[NEXT:%.*]] = getelementptr inbounds i8, i8* [[START]], i32 4
// CHECK: store i8* [[NEXT]], i8** %mylist
Expand All @@ -103,7 +103,7 @@ typedef struct {
// alignment must be passed via "[N x i32]" to be correctly allocated in the
// backend.
short test_threeshorts(ThreeShorts input, va_list *mylist) {
// CHECK-LABEL: define signext i16 @test_threeshorts([2 x i32] %input
// CHECK-LABEL: define{{.*}} signext i16 @test_threeshorts([2 x i32] %input

// CHECK: [[START:%.*]] = load i8*, i8** %mylist
// CHECK: [[NEXT:%.*]] = getelementptr inbounds i8, i8* [[START]], i32 8
Expand Down
14 changes: 7 additions & 7 deletions clang/test/CodeGen/arm64_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@ struct Foo {
};

int BitfieldOffset = sizeof(struct Foo);
// CHECK: @BitfieldOffset = global i32 2
// CHECK: @BitfieldOffset ={{.*}} global i32 2

int PointerSize = sizeof(void *);
// CHECK: @PointerSize = global i32 4
// CHECK: @PointerSize ={{.*}} global i32 4

int PointerAlign = __alignof(void *);
// CHECK: @PointerAlign = global i32 4
// CHECK: @PointerAlign ={{.*}} global i32 4

int LongSize = sizeof(long);
// CHECK: @LongSize = global i32 4
// CHECK: @LongSize ={{.*}} global i32 4

int LongAlign = __alignof(long);
// CHECK: @LongAlign = global i32 4
// CHECK: @LongAlign ={{.*}} global i32 4

// Not expected to change, but it's a difference between AAPCS and DarwinPCS
// that we need to be preserved for compatibility with ARMv7k.
long double LongDoubleVar = 0.0;
// CHECK: @LongDoubleVar = global double
// CHECK: @LongDoubleVar ={{.*}} global double

typedef float __attribute__((ext_vector_type(16))) v16f32;
v16f32 func(v16f32 in) { return in; }
// CHECK: define void @func(<16 x float>* noalias sret(<16 x float>) align 16 {{%.*}}, <16 x float> {{%.*}})
// CHECK: define{{.*}} void @func(<16 x float>* noalias sret(<16 x float>) align 16 {{%.*}}, <16 x float> {{%.*}})
20 changes: 10 additions & 10 deletions clang/test/CodeGen/arm64_vcopy.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

#include <arm_neon.h>

// CHECK-LABEL: define <16 x i8> @test_vcopyq_laneq_s8(<16 x i8> %a1, <16 x i8> %a2) #0 {
// CHECK-LABEL: define{{.*}} <16 x i8> @test_vcopyq_laneq_s8(<16 x i8> %a1, <16 x i8> %a2) #0 {
// CHECK: [[VGETQ_LANE:%.*]] = extractelement <16 x i8> %a2, i32 13
// CHECK: [[VSET_LANE:%.*]] = insertelement <16 x i8> %a1, i8 [[VGETQ_LANE]], i32 3
// CHECK: ret <16 x i8> [[VSET_LANE]]
int8x16_t test_vcopyq_laneq_s8(int8x16_t a1, int8x16_t a2) {
return vcopyq_laneq_s8(a1, (int64_t) 3, a2, (int64_t) 13);
}

// CHECK-LABEL: define <16 x i8> @test_vcopyq_laneq_u8(<16 x i8> %a1, <16 x i8> %a2) #0 {
// CHECK-LABEL: define{{.*}} <16 x i8> @test_vcopyq_laneq_u8(<16 x i8> %a1, <16 x i8> %a2) #0 {
// CHECK: [[VGETQ_LANE:%.*]] = extractelement <16 x i8> %a2, i32 13
// CHECK: [[VSET_LANE:%.*]] = insertelement <16 x i8> %a1, i8 [[VGETQ_LANE]], i32 3
// CHECK: ret <16 x i8> [[VSET_LANE]]
Expand All @@ -21,7 +21,7 @@ uint8x16_t test_vcopyq_laneq_u8(uint8x16_t a1, uint8x16_t a2) {

}

// CHECK-LABEL: define <8 x i16> @test_vcopyq_laneq_s16(<8 x i16> %a1, <8 x i16> %a2) #0 {
// CHECK-LABEL: define{{.*}} <8 x i16> @test_vcopyq_laneq_s16(<8 x i16> %a1, <8 x i16> %a2) #0 {
// CHECK: [[VGETQ_LANE:%.*]] = extractelement <8 x i16> %a2, i32 7
// CHECK: [[VSET_LANE:%.*]] = insertelement <8 x i16> %a1, i16 [[VGETQ_LANE]], i32 3
// CHECK: ret <8 x i16> [[VSET_LANE]]
Expand All @@ -30,7 +30,7 @@ int16x8_t test_vcopyq_laneq_s16(int16x8_t a1, int16x8_t a2) {

}

// CHECK-LABEL: define <8 x i16> @test_vcopyq_laneq_u16(<8 x i16> %a1, <8 x i16> %a2) #0 {
// CHECK-LABEL: define{{.*}} <8 x i16> @test_vcopyq_laneq_u16(<8 x i16> %a1, <8 x i16> %a2) #0 {
// CHECK: [[VGETQ_LANE:%.*]] = extractelement <8 x i16> %a2, i32 7
// CHECK: [[VSET_LANE:%.*]] = insertelement <8 x i16> %a1, i16 [[VGETQ_LANE]], i32 3
// CHECK: ret <8 x i16> [[VSET_LANE]]
Expand All @@ -39,47 +39,47 @@ uint16x8_t test_vcopyq_laneq_u16(uint16x8_t a1, uint16x8_t a2) {

}

// CHECK-LABEL: define <4 x i32> @test_vcopyq_laneq_s32(<4 x i32> %a1, <4 x i32> %a2) #0 {
// CHECK-LABEL: define{{.*}} <4 x i32> @test_vcopyq_laneq_s32(<4 x i32> %a1, <4 x i32> %a2) #0 {
// CHECK: [[VGETQ_LANE:%.*]] = extractelement <4 x i32> %a2, i32 3
// CHECK: [[VSET_LANE:%.*]] = insertelement <4 x i32> %a1, i32 [[VGETQ_LANE]], i32 3
// CHECK: ret <4 x i32> [[VSET_LANE]]
int32x4_t test_vcopyq_laneq_s32(int32x4_t a1, int32x4_t a2) {
return vcopyq_laneq_s32(a1, (int64_t) 3, a2, (int64_t) 3);
}

// CHECK-LABEL: define <4 x i32> @test_vcopyq_laneq_u32(<4 x i32> %a1, <4 x i32> %a2) #0 {
// CHECK-LABEL: define{{.*}} <4 x i32> @test_vcopyq_laneq_u32(<4 x i32> %a1, <4 x i32> %a2) #0 {
// CHECK: [[VGETQ_LANE:%.*]] = extractelement <4 x i32> %a2, i32 3
// CHECK: [[VSET_LANE:%.*]] = insertelement <4 x i32> %a1, i32 [[VGETQ_LANE]], i32 3
// CHECK: ret <4 x i32> [[VSET_LANE]]
uint32x4_t test_vcopyq_laneq_u32(uint32x4_t a1, uint32x4_t a2) {
return vcopyq_laneq_u32(a1, (int64_t) 3, a2, (int64_t) 3);
}

// CHECK-LABEL: define <2 x i64> @test_vcopyq_laneq_s64(<2 x i64> %a1, <2 x i64> %a2) #0 {
// CHECK-LABEL: define{{.*}} <2 x i64> @test_vcopyq_laneq_s64(<2 x i64> %a1, <2 x i64> %a2) #0 {
// CHECK: [[VGETQ_LANE:%.*]] = extractelement <2 x i64> %a2, i32 1
// CHECK: [[VSET_LANE:%.*]] = insertelement <2 x i64> %a1, i64 [[VGETQ_LANE]], i32 0
// CHECK: ret <2 x i64> [[VSET_LANE]]
int64x2_t test_vcopyq_laneq_s64(int64x2_t a1, int64x2_t a2) {
return vcopyq_laneq_s64(a1, (int64_t) 0, a2, (int64_t) 1);
}

// CHECK-LABEL: define <2 x i64> @test_vcopyq_laneq_u64(<2 x i64> %a1, <2 x i64> %a2) #0 {
// CHECK-LABEL: define{{.*}} <2 x i64> @test_vcopyq_laneq_u64(<2 x i64> %a1, <2 x i64> %a2) #0 {
// CHECK: [[VGETQ_LANE:%.*]] = extractelement <2 x i64> %a2, i32 1
// CHECK: [[VSET_LANE:%.*]] = insertelement <2 x i64> %a1, i64 [[VGETQ_LANE]], i32 0
// CHECK: ret <2 x i64> [[VSET_LANE]]
uint64x2_t test_vcopyq_laneq_u64(uint64x2_t a1, uint64x2_t a2) {
return vcopyq_laneq_u64(a1, (int64_t) 0, a2, (int64_t) 1);
}

// CHECK-LABEL: define <4 x float> @test_vcopyq_laneq_f32(<4 x float> %a1, <4 x float> %a2) #0 {
// CHECK-LABEL: define{{.*}} <4 x float> @test_vcopyq_laneq_f32(<4 x float> %a1, <4 x float> %a2) #0 {
// CHECK: [[VGETQ_LANE:%.*]] = extractelement <4 x float> %a2, i32 3
// CHECK: [[VSET_LANE:%.*]] = insertelement <4 x float> %a1, float [[VGETQ_LANE]], i32 0
// CHECK: ret <4 x float> [[VSET_LANE]]
float32x4_t test_vcopyq_laneq_f32(float32x4_t a1, float32x4_t a2) {
return vcopyq_laneq_f32(a1, 0, a2, 3);
}

// CHECK-LABEL: define <2 x double> @test_vcopyq_laneq_f64(<2 x double> %a1, <2 x double> %a2) #0 {
// CHECK-LABEL: define{{.*}} <2 x double> @test_vcopyq_laneq_f64(<2 x double> %a1, <2 x double> %a2) #0 {
// CHECK: [[VGETQ_LANE:%.*]] = extractelement <2 x double> %a2, i32 1
// CHECK: [[VSET_LANE:%.*]] = insertelement <2 x double> %a1, double [[VGETQ_LANE]], i32 0
// CHECK: ret <2 x double> [[VSET_LANE]]
Expand Down
12 changes: 6 additions & 6 deletions clang/test/CodeGen/arm64_vdupq_n_f64.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// vdupq_n_f64 -> dup.2d v0, v0[0]
//
// CHECK-LABEL: define <2 x double> @test_vdupq_n_f64(double %w) #0 {
// CHECK-LABEL: define{{.*}} <2 x double> @test_vdupq_n_f64(double %w) #0 {
// CHECK: [[VECINIT_I:%.*]] = insertelement <2 x double> undef, double %w, i32 0
// CHECK: [[VECINIT1_I:%.*]] = insertelement <2 x double> [[VECINIT_I]], double %w, i32 1
// CHECK: ret <2 x double> [[VECINIT1_I]]
Expand All @@ -14,7 +14,7 @@ float64x2_t test_vdupq_n_f64(float64_t w) {

// might as well test this while we're here
// vdupq_n_f32 -> dup.4s v0, v0[0]
// CHECK-LABEL: define <4 x float> @test_vdupq_n_f32(float %w) #0 {
// CHECK-LABEL: define{{.*}} <4 x float> @test_vdupq_n_f32(float %w) #0 {
// CHECK: [[VECINIT_I:%.*]] = insertelement <4 x float> undef, float %w, i32 0
// CHECK: [[VECINIT1_I:%.*]] = insertelement <4 x float> [[VECINIT_I]], float %w, i32 1
// CHECK: [[VECINIT2_I:%.*]] = insertelement <4 x float> [[VECINIT1_I]], float %w, i32 2
Expand All @@ -27,7 +27,7 @@ float32x4_t test_vdupq_n_f32(float32_t w) {
// vdupq_lane_f64 -> dup.2d v0, v0[0]
// this was in <rdar://problem/11778405>, but had already been implemented,
// test anyway
// CHECK-LABEL: define <2 x double> @test_vdupq_lane_f64(<1 x double> %V) #0 {
// CHECK-LABEL: define{{.*}} <2 x double> @test_vdupq_lane_f64(<1 x double> %V) #0 {
// CHECK: [[TMP0:%.*]] = bitcast <1 x double> %V to <8 x i8>
// CHECK: [[TMP1:%.*]] = bitcast <8 x i8> [[TMP0]] to <1 x double>
// CHECK: [[SHUFFLE:%.*]] = shufflevector <1 x double> [[TMP1]], <1 x double> [[TMP1]], <2 x i32> zeroinitializer
Expand All @@ -38,15 +38,15 @@ float64x2_t test_vdupq_lane_f64(float64x1_t V) {

// vmovq_n_f64 -> dup Vd.2d,X0
// this wasn't in <rdar://problem/11778405>, but it was between the vdups
// CHECK-LABEL: define <2 x double> @test_vmovq_n_f64(double %w) #0 {
// CHECK-LABEL: define{{.*}} <2 x double> @test_vmovq_n_f64(double %w) #0 {
// CHECK: [[VECINIT_I:%.*]] = insertelement <2 x double> undef, double %w, i32 0
// CHECK: [[VECINIT1_I:%.*]] = insertelement <2 x double> [[VECINIT_I]], double %w, i32 1
// CHECK: ret <2 x double> [[VECINIT1_I]]
float64x2_t test_vmovq_n_f64(float64_t w) {
return vmovq_n_f64(w);
}

// CHECK-LABEL: define <4 x half> @test_vmov_n_f16(half* %a1) #1 {
// CHECK-LABEL: define{{.*}} <4 x half> @test_vmov_n_f16(half* %a1) #1 {
// CHECK: [[TMP0:%.*]] = load half, half* %a1, align 2
// CHECK: [[VECINIT:%.*]] = insertelement <4 x half> undef, half [[TMP0]], i32 0
// CHECK: [[VECINIT1:%.*]] = insertelement <4 x half> [[VECINIT]], half [[TMP0]], i32 1
Expand All @@ -63,7 +63,7 @@ float64x1_t test_vmov_n_f64(float64_t a1) {
}
*/

// CHECK-LABEL: define <8 x half> @test_vmovq_n_f16(half* %a1) #0 {
// CHECK-LABEL: define{{.*}} <8 x half> @test_vmovq_n_f16(half* %a1) #0 {
// CHECK: [[TMP0:%.*]] = load half, half* %a1, align 2
// CHECK: [[VECINIT:%.*]] = insertelement <8 x half> undef, half [[TMP0]], i32 0
// CHECK: [[VECINIT1:%.*]] = insertelement <8 x half> [[VECINIT]], half [[TMP0]], i32 1
Expand Down
20 changes: 10 additions & 10 deletions clang/test/CodeGen/armv7k-abi.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ typedef struct {
float arr[4];
} HFA;

// CHECK: define void @simple_hfa([4 x float] %h.coerce)
// CHECK: define{{.*}} void @simple_hfa([4 x float] %h.coerce)
void simple_hfa(HFA h) {}

// CHECK: define %struct.HFA @return_simple_hfa
// CHECK: define{{.*}} %struct.HFA @return_simple_hfa
HFA return_simple_hfa() {}

typedef struct {
Expand All @@ -37,10 +37,10 @@ typedef struct {
double z;
} BigStruct;

// CHECK: define void @big_struct_indirect(%struct.BigStruct* %b)
// CHECK: define{{.*}} void @big_struct_indirect(%struct.BigStruct* %b)
void big_struct_indirect(BigStruct b) {}

// CHECK: define void @return_big_struct_indirect(%struct.BigStruct* noalias sret
// CHECK: define{{.*}} void @return_big_struct_indirect(%struct.BigStruct* noalias sret
BigStruct return_big_struct_indirect() {}

// Structs smaller than 16 bytes should be passed directly, and coerced to
Expand All @@ -52,10 +52,10 @@ typedef struct {
double z;
} SmallStruct;

// CHECK: define void @small_struct_direct([2 x i64] %s.coerce)
// CHECK: define{{.*}} void @small_struct_direct([2 x i64] %s.coerce)
void small_struct_direct(SmallStruct s) {}

// CHECK: define [4 x i32] @return_small_struct_direct()
// CHECK: define{{.*}} [4 x i32] @return_small_struct_direct()
SmallStruct return_small_struct_direct() {}

typedef struct {
Expand All @@ -64,25 +64,25 @@ typedef struct {
int z;
} SmallStructSmallAlign;

// CHECK: define void @small_struct_align_direct([3 x i32] %s.coerce)
// CHECK: define{{.*}} void @small_struct_align_direct([3 x i32] %s.coerce)
void small_struct_align_direct(SmallStructSmallAlign s) {}

typedef struct {
char x;
short y;
} PaddedSmallStruct;

// CHECK: define i32 @return_padded_small_struct()
// CHECK: define{{.*}} i32 @return_padded_small_struct()
PaddedSmallStruct return_padded_small_struct() {}

typedef struct {
char arr[7];
} OddlySizedStruct;

// CHECK: define [2 x i32] @return_oddly_sized_struct()
// CHECK: define{{.*}} [2 x i32] @return_oddly_sized_struct()
OddlySizedStruct return_oddly_sized_struct() {}

// CHECK: define <4 x float> @test_va_arg_vec(i8* %l)
// CHECK: define{{.*}} <4 x float> @test_va_arg_vec(i8* %l)
// CHECK: [[ALIGN_TMP:%.*]] = add i32 {{%.*}}, 15
// CHECK: [[ALIGNED:%.*]] = and i32 [[ALIGN_TMP]], -16
// CHECK: [[ALIGNED_I8:%.*]] = inttoptr i32 [[ALIGNED]] to i8*
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CodeGen/asm-label.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ int *test(void) {
}

// LINUX: @bar = internal global i32 0
// LINUX: @foo = global i32 0
// LINUX: @foo ={{.*}} global i32 0
// LINUX: declare i8* @alias(i32)

// DARWIN: @"\01bar" = internal global i32 0
// DARWIN: @"\01foo" = global i32 0
// DARWIN: @"\01foo" ={{.*}} global i32 0
// DARWIN: declare i8* @"\01alias"(i32)

extern void *memcpy(void *__restrict, const void *__restrict, unsigned long);
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CodeGen/asm-reg-var-local.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Exercise various use cases for local asm "register variables".

int foo() {
// CHECK-LABEL: define i32 @foo()
// CHECK-LABEL: define{{.*}} i32 @foo()
// CHECK: [[A:%[a-zA-Z0-9]+]] = alloca i32

register int a asm("rsi")=5;
Expand All @@ -25,7 +25,7 @@ int foo() {
}

int earlyclobber() {
// CHECK-LABEL: define i32 @earlyclobber()
// CHECK-LABEL: define{{.*}} i32 @earlyclobber()
// CHECK: [[A:%[a-zA-Z0-9]+]] = alloca i32

register int a asm("rsi")=5;
Expand Down
10 changes: 5 additions & 5 deletions clang/test/CodeGen/atomic-arm64.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ extern _Atomic(void*) a_pointer;
extern _Atomic(pointer_pair_t) a_pointer_pair;
extern _Atomic(pointer_quad_t) a_pointer_quad;

// CHECK-LABEL:define void @test0()
// CHECK-LABEL:define{{.*}} void @test0()
// CHECK: [[TEMP:%.*]] = alloca i8, align 1
// CHECK-NEXT: store i8 1, i8* [[TEMP]]
// CHECK-NEXT: [[T0:%.*]] = load i8, i8* [[TEMP]], align 1
Expand All @@ -30,7 +30,7 @@ void test0() {
__c11_atomic_store(&a_bool, 1, memory_order_seq_cst);
}

// CHECK-LABEL:define void @test1()
// CHECK-LABEL:define{{.*}} void @test1()
// CHECK: [[TEMP:%.*]] = alloca float, align 4
// CHECK-NEXT: store float 3.000000e+00, float* [[TEMP]]
// CHECK-NEXT: [[T0:%.*]] = bitcast float* [[TEMP]] to i32*
Expand All @@ -40,7 +40,7 @@ void test1() {
__c11_atomic_store(&a_float, 3, memory_order_seq_cst);
}

// CHECK-LABEL:define void @test2()
// CHECK-LABEL:define{{.*}} void @test2()
// CHECK: [[TEMP:%.*]] = alloca i8*, align 8
// CHECK-NEXT: store i8* @a_bool, i8** [[TEMP]]
// CHECK-NEXT: [[T0:%.*]] = bitcast i8** [[TEMP]] to i64*
Expand All @@ -50,7 +50,7 @@ void test2() {
__c11_atomic_store(&a_pointer, &a_bool, memory_order_seq_cst);
}

// CHECK-LABEL:define void @test3(
// CHECK-LABEL:define{{.*}} void @test3(
// CHECK: [[PAIR:%.*]] = alloca [[PAIR_T:%.*]], align 8
// CHECK-NEXT: [[TEMP:%.*]] = alloca [[PAIR_T]], align 8
// CHECK: llvm.memcpy
Expand All @@ -61,7 +61,7 @@ void test3(pointer_pair_t pair) {
__c11_atomic_store(&a_pointer_pair, pair, memory_order_seq_cst);
}

// CHECK-LABEL:define void @test4(
// CHECK-LABEL:define{{.*}} void @test4(
// CHECK: [[TEMP:%.*]] = alloca [[QUAD_T:%.*]], align 8
// CHECK-NEXT: [[T0:%.*]] = bitcast [[QUAD_T]]* [[TEMP]] to i8*
// CHECK-NEXT: [[T1:%.*]] = bitcast [[QUAD_T]]* {{%.*}} to i8*
Expand Down
8 changes: 4 additions & 4 deletions clang/test/CodeGen/attr-arm-sve-vector-bits-types.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ void f() {
//===----------------------------------------------------------------------===//
// ILP32 ABI
//===----------------------------------------------------------------------===//
// CHECK-ILP32: @global_i32 = global <16 x i32> zeroinitializer, align 16
// CHECK-ILP32: @global_i64 = global <8 x i64> zeroinitializer, align 16
// CHECK-ILP32: @global_u32 = global <16 x i32> zeroinitializer, align 16
// CHECK-ILP32: @global_u64 = global <8 x i64> zeroinitializer, align 16
// CHECK-ILP32: @global_i32 ={{.*}} global <16 x i32> zeroinitializer, align 16
// CHECK-ILP32: @global_i64 ={{.*}} global <8 x i64> zeroinitializer, align 16
// CHECK-ILP32: @global_u32 ={{.*}} global <16 x i32> zeroinitializer, align 16
// CHECK-ILP32: @global_u64 ={{.*}} global <8 x i64> zeroinitializer, align 16
8 changes: 4 additions & 4 deletions clang/test/CodeGen/attr-disable-tail-calls.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// RUN: %clang_cc1 -triple x86_64-apple-macosx10.7.0 %s -emit-llvm -mdisable-tail-calls -o - | FileCheck %s -check-prefix=DISABLE
// RUN: %clang_cc1 -triple x86_64-apple-macosx10.7.0 %s -emit-llvm -o - | FileCheck %s -check-prefix=ENABLE

// DISABLE: define i32 @f1() [[ATTRTRUE:#[0-9]+]] {
// DISABLE: define i32 @f2() [[ATTRTRUE]] {
// ENABLE: define i32 @f1() [[ATTRFALSE:#[0-9]+]] {
// ENABLE: define i32 @f2() [[ATTRTRUE:#[0-9]+]] {
// DISABLE: define{{.*}} i32 @f1() [[ATTRTRUE:#[0-9]+]] {
// DISABLE: define{{.*}} i32 @f2() [[ATTRTRUE]] {
// ENABLE: define{{.*}} i32 @f1() [[ATTRFALSE:#[0-9]+]] {
// ENABLE: define{{.*}} i32 @f2() [[ATTRTRUE:#[0-9]+]] {

int f1() {
return 0;
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CodeGen/attr-func-def.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 -triple x86_64-apple-macosx10.10.0 -emit-llvm -Oz -o - %s | FileCheck %s

// CHECK: define i32 @foo2(i32 %a) local_unnamed_addr [[ATTRS2:#[0-9]+]] {
// CHECK: define i32 @foo1(i32 %a) local_unnamed_addr [[ATTRS1:#[0-9]+]] {
// CHECK: define{{.*}} i32 @foo2(i32 %a) local_unnamed_addr [[ATTRS2:#[0-9]+]] {
// CHECK: define{{.*}} i32 @foo1(i32 %a) local_unnamed_addr [[ATTRS1:#[0-9]+]] {

int foo1(int);

Expand Down
6 changes: 3 additions & 3 deletions clang/test/CodeGen/attr-naked.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ void t1() __attribute__((naked));

// Basic functionality check
// (Note that naked needs to imply noinline to work properly.)
// CHECK: define void @t1() [[NAKED_OPTNONE:#[0-9]+]] {
// CHECK: define{{.*}} void @t1() [[NAKED_OPTNONE:#[0-9]+]] {
void t1()
{
}

// Make sure this doesn't explode in the verifier.
// (It doesn't really make sense, but it isn't invalid.)
// CHECK: define void @t2() [[NAKED:#[0-9]+]] {
// CHECK: define{{.*}} void @t2() [[NAKED:#[0-9]+]] {
__attribute((naked, always_inline)) void t2() {
}

// Make sure not to generate prolog or epilog for naked functions.
__attribute((naked)) void t3(int x) {
// CHECK: define void @t3(i32 %0)
// CHECK: define{{.*}} void @t3(i32 %0)
// CHECK-NOT: alloca
// CHECK-NOT: store
// CHECK: unreachable
Expand Down
8 changes: 4 additions & 4 deletions clang/test/CodeGen/attr-weak-import.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ extern int E __attribute__((weak_import));
int E;
extern int E __attribute__((weak_import));

// CHECK: @A = global i32
// CHECK: @A ={{.*}} global i32
// CHECK-NOT: @B =
// CHECK: @C = global i32
// CHECK: @D = global i32
// CHECK: @E = global i32
// CHECK: @C ={{.*}} global i32
// CHECK: @D ={{.*}} global i32
// CHECK: @E ={{.*}} global i32

4 changes: 2 additions & 2 deletions clang/test/CodeGen/available-externally-suppress.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ int x;

inline void f0(int y) { x = y; }

// CHECK-LABEL: define void @test()
// CHECK-LABEL: define{{.*}} void @test()
// CHECK: declare void @f0(i32)
// LTO-LABEL: define void @test()
// LTO-LABEL: define{{.*}} void @test()
// LTO: define available_externally void @f0
void test() {
f0(17);
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CodeGen/block-byref-aggr.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ void test0() {

a = makeAgg();
}
// CHECK-LABEL: define void @test0()
// CHECK-LABEL: define{{.*}} void @test0()
// CHECK: [[A:%.*]] = alloca [[BYREF:%.*]], align 8
// CHECK-NEXT: alloca <{ i8*, i32, i32, i8*, %{{.*}}*, i8* }>, align 8
// CHECK-NEXT: [[TEMP:%.*]] = alloca [[AGG]], align 4
Expand All @@ -40,7 +40,7 @@ void test1() {
^{ (void)a; (void)b; };
a = b = makeAgg();
}
// CHECK-LABEL: 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: alloca <{ i8*, i32, i32, i8*, %{{.*}}*, i8*, i8* }>, align 8
Expand Down
34 changes: 17 additions & 17 deletions clang/test/CodeGen/builtins.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void foo() {
__builtin_strcat(0, 0);
}

// CHECK-LABEL: define void @bar(
// CHECK-LABEL: define{{.*}} void @bar(
void bar() {
float f;
double d;
Expand Down Expand Up @@ -178,7 +178,7 @@ void bar() {
}
// CHECK: }

// CHECK-LABEL: define void @test_conditional_bzero
// CHECK-LABEL: define{{.*}} void @test_conditional_bzero
void test_conditional_bzero() {
char dst[20];
int _sz = 20, len = 20;
Expand All @@ -192,7 +192,7 @@ void test_conditional_bzero() {
// CHECK-NOT: phi
}

// CHECK-LABEL: define void @test_float_builtins
// CHECK-LABEL: define{{.*}} void @test_float_builtins
void test_float_builtins(__fp16 *H, float F, double D, long double LD) {
volatile int res;
res = __builtin_isinf(*H);
Expand Down Expand Up @@ -275,7 +275,7 @@ void test_float_builtins(__fp16 *H, float F, double D, long double LD) {
// CHECK: call i32 @llvm.flt.rounds(
}

// CHECK-LABEL: define void @test_float_builtin_ops
// CHECK-LABEL: define{{.*}} void @test_float_builtin_ops
void test_float_builtin_ops(float F, double D, long double LD) {
volatile float resf;
volatile double resd;
Expand Down Expand Up @@ -428,7 +428,7 @@ void test_float_builtin_ops(float F, double D, long double LD) {
// __builtin_longjmp isn't supported on all platforms, so only test it on X86.
#ifdef __x86_64__

// CHECK-LABEL: 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]])
Expand All @@ -438,14 +438,14 @@ void test_builtin_longjmp(void **buffer) {

#endif

// CHECK-LABEL: 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();
}

/// __builtin_launder should be a NOP in C since there are no vtables.
// CHECK-LABEL: define void @test_builtin_launder
// CHECK-LABEL: define{{.*}} void @test_builtin_launder
void test_builtin_launder(int *p) {
// CHECK: [[TMP:%.*]] = load i32*,
// CHECK-NOT: @llvm.launder
Expand All @@ -454,7 +454,7 @@ void test_builtin_launder(int *p) {
}

// __warn_memset_zero_len should be NOP, see https://sourceware.org/bugzilla/show_bug.cgi?id=25399
// CHECK-LABEL: define void @test___warn_memset_zero_len
// CHECK-LABEL: define{{.*}} void @test___warn_memset_zero_len
void test___warn_memset_zero_len() {
// CHECK-NOT: @__warn_memset_zero_len
__warn_memset_zero_len();
Expand All @@ -463,7 +463,7 @@ void test___warn_memset_zero_len() {
// Behavior of __builtin_os_log differs between platforms, so only test on X86
#ifdef __x86_64__

// CHECK-LABEL: define void @test_builtin_os_log
// CHECK-LABEL: define{{.*}} void @test_builtin_os_log
// CHECK: (i8* %[[BUF:.*]], i32 %[[I:.*]], i8* %[[DATA:.*]])
void test_builtin_os_log(void *buf, int i, const char *data) {
volatile int len;
Expand Down Expand Up @@ -587,7 +587,7 @@ void test_builtin_os_log(void *buf, int i, const char *data) {
// CHECK: %[[V3:.*]] = load i64, i64* %[[ARG3_ADDR]], align 8
// CHECK: store i64 %[[V3]], i64* %[[ARGDATACAST12]], align 1

// CHECK-LABEL: define void @test_builtin_os_log_wide
// CHECK-LABEL: define{{.*}} void @test_builtin_os_log_wide
// CHECK: (i8* %[[BUF:.*]], i8* %[[DATA:.*]], i32* %[[STR:.*]])
typedef int wchar_t;
void test_builtin_os_log_wide(void *buf, const char *data, wchar_t *str) {
Expand Down Expand Up @@ -633,7 +633,7 @@ void test_builtin_os_log_wide(void *buf, const char *data, wchar_t *str) {
// CHECK: %[[V0:.*]] = load i64, i64* %[[ARG0_ADDR]], align 8
// CHECK: store i64 %[[V0]], i64* %[[ARGDATACAST]], align 1

// CHECK-LABEL: define void @test_builtin_os_log_precision_width
// CHECK-LABEL: define{{.*}} void @test_builtin_os_log_precision_width
// CHECK: (i8* %[[BUF:.*]], i8* %[[DATA:.*]], i32 %[[PRECISION:.*]], i32 %[[WIDTH:.*]])
void test_builtin_os_log_precision_width(void *buf, const char *data,
int precision, int width) {
Expand Down Expand Up @@ -701,7 +701,7 @@ void test_builtin_os_log_precision_width(void *buf, const char *data,
// CHECK: %[[V2:.*]] = load i64, i64* %[[ARG2_ADDR]], align 8
// CHECK: store i64 %[[V2]], i64* %[[ARGDATACAST8]], align 1

// CHECK-LABEL: define void @test_builtin_os_log_invalid
// CHECK-LABEL: define{{.*}} void @test_builtin_os_log_invalid
// CHECK: (i8* %[[BUF:.*]], i32 %[[DATA:.*]])
void test_builtin_os_log_invalid(void *buf, int data) {
volatile int len;
Expand Down Expand Up @@ -742,7 +742,7 @@ void test_builtin_os_log_invalid(void *buf, int data) {
// CHECK: %[[V0:.*]] = load i32, i32* %[[ARG0_ADDR]], align 4
// CHECK: store i32 %[[V0]], i32* %[[ARGDATACAST]], align 1

// CHECK-LABEL: define void @test_builtin_os_log_percent
// CHECK-LABEL: define{{.*}} void @test_builtin_os_log_percent
// CHECK: (i8* %[[BUF:.*]], i8* %[[DATA1:.*]], i8* %[[DATA2:.*]])
// Check that the %% which does not consume any argument is correctly handled
void test_builtin_os_log_percent(void *buf, const char *data1, const char *data2) {
Expand Down Expand Up @@ -801,23 +801,23 @@ void test_builtin_os_log_percent(void *buf, const char *data1, const char *data2

// Check that the following two functions call the same helper function.

// CHECK-LABEL: define void @test_builtin_os_log_merge_helper0
// CHECK-LABEL: define{{.*}} void @test_builtin_os_log_merge_helper0
// CHECK: call void @__os_log_helper_1_0_2_4_0_8_0(
void test_builtin_os_log_merge_helper0(void *buf, int i, double d) {
__builtin_os_log_format(buf, "%d %f", i, d);
}

// CHECK-LABEL: define linkonce_odr hidden void @__os_log_helper_1_0_2_4_0_8_0(

// CHECK-LABEL: define void @test_builtin_os_log_merge_helper1
// CHECK-LABEL: define{{.*}} void @test_builtin_os_log_merge_helper1
// CHECK: call void @__os_log_helper_1_0_2_4_0_8_0(
void test_builtin_os_log_merge_helper1(void *buf, unsigned u, long long ll) {
__builtin_os_log_format(buf, "%u %lld", u, ll);
}

// Check that this function doesn't write past the end of array 'buf'.

// CHECK-LABEL: define void @test_builtin_os_log_errno
// CHECK-LABEL: define{{.*}} void @test_builtin_os_log_errno
void test_builtin_os_log_errno() {
// CHECK-NOT: @stacksave
// CHECK: %[[BUF:.*]] = alloca [4 x i8], align 1
Expand Down Expand Up @@ -845,7 +845,7 @@ void test_builtin_os_log_errno() {
// CHECK: store i8 0, i8* %[[ARGSIZE]], align 1
// CHECK-NEXT: ret void

// CHECK-LABEL: define void @test_builtin_os_log_long_double
// CHECK-LABEL: define{{.*}} void @test_builtin_os_log_long_double
// CHECK: (i8* %[[BUF:.*]], x86_fp80 %[[LD:.*]])
void test_builtin_os_log_long_double(void *buf, long double ld) {
// CHECK: %[[BUF_ADDR:.*]] = alloca i8*, align 8
Expand Down
6 changes: 3 additions & 3 deletions clang/test/CodeGen/byval-memcpy-elim.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ struct Test2S {

// Make sure we don't generate extra memcpy for lvalues
void test1a(struct Test1S, struct Test2S);
// CHECK-LABEL: define void @test1(
// CHECK-LABEL: define{{.*}} void @test1(
// CHECK-NOT: memcpy
// CHECK: call void @test1a
void test1(struct Test1S *A, struct Test2S *B) {
Expand All @@ -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-LABEL: define void @test2(
// CHECK-LABEL: define{{.*}} void @test2(
// CHECK: alloca %struct.Test3S, align 8
// CHECK: memcpy
// CHECK: call void @test2a
Expand All @@ -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-LABEL: define void @test3(
// CHECK-LABEL: define{{.*}} void @test3(
// CHECK: alloca %struct.Test3S, align 8
// CHECK: call void @fooey
// CHECK-NOT: memcpy
Expand Down
10 changes: 5 additions & 5 deletions clang/test/CodeGen/c11atomics-ios.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

// This work was done in pursuit of <rdar://13338582>.

// CHECK-LABEL: define void @testFloat(float*
// CHECK-LABEL: define{{.*}} void @testFloat(float*
void testFloat(_Atomic(float) *fp) {
// CHECK: [[FP:%.*]] = alloca float*
// CHECK-NEXT: [[X:%.*]] = alloca float
Expand Down Expand Up @@ -37,7 +37,7 @@ void testFloat(_Atomic(float) *fp) {
// CHECK-NEXT: ret void
}

// CHECK: define void @testComplexFloat([[CF:{ float, float }]]*
// CHECK: define{{.*}} void @testComplexFloat([[CF:{ float, float }]]*
void testComplexFloat(_Atomic(_Complex float) *fp) {
// CHECK: [[FP:%.*]] = alloca [[CF]]*, align 4
// CHECK-NEXT: [[X:%.*]] = alloca [[CF]], align 8
Expand Down Expand Up @@ -93,7 +93,7 @@ void testComplexFloat(_Atomic(_Complex float) *fp) {
}

typedef struct { short x, y, z, w; } S;
// CHECK: define void @testStruct([[S:.*]]*
// CHECK: define{{.*}} void @testStruct([[S:.*]]*
void testStruct(_Atomic(S) *fp) {
// CHECK: [[FP:%.*]] = alloca [[S]]*, align 4
// CHECK-NEXT: [[X:%.*]] = alloca [[S]], align 8
Expand Down Expand Up @@ -143,7 +143,7 @@ void testStruct(_Atomic(S) *fp) {
}

typedef struct { short x, y, z; } PS;
// CHECK: define void @testPromotedStruct([[APS:.*]]*
// CHECK: define{{.*}} void @testPromotedStruct([[APS:.*]]*
void testPromotedStruct(_Atomic(PS) *fp) {
// CHECK: [[FP:%.*]] = alloca [[APS]]*, align 4
// CHECK-NEXT: [[X:%.*]] = alloca [[APS]], align 8
Expand Down Expand Up @@ -275,7 +275,7 @@ PS test_promoted_exchange(_Atomic(PS) *addr, PS *val) {
}

_Bool test_promoted_cmpxchg(_Atomic(PS) *addr, PS *desired, PS *new) {
// CHECK: define zeroext i1 @test_promoted_cmpxchg({ %struct.PS, [2 x i8] }* %addr, %struct.PS* %desired, %struct.PS* %new) #0 {
// CHECK: define{{.*}} zeroext i1 @test_promoted_cmpxchg({ %struct.PS, [2 x i8] }* %addr, %struct.PS* %desired, %struct.PS* %new) #0 {
// CHECK: [[ADDR_ARG:%.*]] = alloca { %struct.PS, [2 x i8] }*, align 4
// CHECK: [[DESIRED_ARG:%.*]] = alloca %struct.PS*, align 4
// CHECK: [[NEW_ARG:%.*]] = alloca %struct.PS*, align 4
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGen/complex-indirect.c
Original file line number Diff line number Diff line change
Expand Up @@ -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-LABEL: 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 {{.*}})
6 changes: 3 additions & 3 deletions clang/test/CodeGen/complex-init-list.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
// extensive description and test in test/Sema/complex-init-list.c.)

_Complex float x = { 1.0f, 1.0f/0.0f };
// CHECK: @x = global { float, float } { float 1.000000e+00, float 0x7FF0000000000000 }, align 4
// 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-LABEL: 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-LABEL: define <2 x float> @f2
// CHECK-LABEL: define{{.*}} <2 x float> @f2
// CHECK: alloca { float, float }
// CHECK: alloca { float, float }
12 changes: 6 additions & 6 deletions clang/test/CodeGen/compound-literal.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// Capture the type and name so matching later is cleaner.
struct CompoundTy { int a; };
// CHECK: @MyCLH = constant [[MY_CLH:[^,]+]]
// CHECK: @MyCLH ={{.*}} constant [[MY_CLH:[^,]+]]
const struct CompoundTy *const MyCLH = &(struct CompoundTy){3};

int* a = &(int){1};
Expand All @@ -13,7 +13,7 @@ v4i32 *y = &(v4i32){1,2,3,4};

// Check generated code for GNU constant array init from compound literal,
// for a global variable.
// CHECK: @compound_array = global [8 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8]
// CHECK: @compound_array ={{.*}} global [8 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8]
int compound_array[] = __extension__(__builtin_choose_expr(0, 0, _Generic(1, int: (int[]){1, 2, 3, 4, 5, 6, 7, 8})));

void xxx() {
Expand All @@ -22,7 +22,7 @@ struct s {int a, b, c;} * b = &(struct s) {1, 2, 3};
_Complex double * x = &(_Complex double){1.0f};
}

// CHECK-LABEL: 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.]+]],
Expand All @@ -43,7 +43,7 @@ void f() {
// CHECK-NEXT: ret void
}

// CHECK-LABEL: 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
Expand Down Expand Up @@ -79,7 +79,7 @@ struct G g(int x, int y, int z) {

// We had a bug where we'd emit a new GlobalVariable for each time we used a
// const pointer to a variable initialized by a compound literal.
// CHECK-LABEL: define i32 @compareMyCLH() #0
// CHECK-LABEL: define{{.*}} i32 @compareMyCLH() #0
int compareMyCLH() {
// CHECK: store i8* bitcast ([[MY_CLH]] to i8*)
const void *a = MyCLH;
Expand All @@ -90,7 +90,7 @@ int compareMyCLH() {

// Check generated code for GNU constant array init from compound literal,
// for a local variable.
// CHECK-LABEL: define i32 @compound_array_fn()
// CHECK-LABEL: define{{.*}} i32 @compound_array_fn()
// CHECK: [[COMPOUND_ARRAY:%.*]] = alloca [8 x i32]
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}, i64 32, i1 false)
int compound_array_fn() {
Expand Down
8 changes: 4 additions & 4 deletions clang/test/CodeGen/constructor-attribute.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
// WITHATEXIT: @llvm.global_ctors = appending global [5 x { i32, void ()*, i8* }]{{.*}}i32 65535, void ()* @A,{{.*}}i32 65535, void ()* @C,{{.*}}i32 123, void ()* @__GLOBAL_init_123,{{.*}}i32 789, void ()* @[[GLOBAL_INIT_789:__GLOBAL_init_789.[0-9]+]],{{.*}}i32 65535, void ()* @__GLOBAL_init_65535,
// WITHATEXIT-NOT: global_dtors

// CHECK: define void @A()
// CHECK: define void @B()
// CHECK: define{{.*}} void @A()
// CHECK: define{{.*}} void @B()
// CHECK: define internal void @E()
// CHECK: define internal void @F()
// CHECK: define internal void @G()
// CHECK: define i32 @__GLOBAL_init_789(i32 %{{.*}})
// CHECK: define{{.*}} i32 @__GLOBAL_init_789(i32 %{{.*}})
// CHECK: define internal void @C()
// CHECK: define internal void @D()
// CHECK: define i32 @main()
// CHECK: define{{.*}} i32 @main()
// CHECK: define internal i32 @foo()
// WITHOUTATEXIT-NOT: define

Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGen/darwin-thread-specifier.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// RUN: %clang_cc1 -triple x86_64-apple-macosx10.7.0 -emit-llvm -o - %s | FileCheck %s
// CHECK: @b = thread_local global i32 5, align 4
// CHECK: @b ={{.*}} thread_local global i32 5, align 4
__thread int b = 5;
2 changes: 1 addition & 1 deletion clang/test/CodeGen/disable-tail-calls.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ typedef struct List {
int data;
} List;

// CHECK-LABEL: define %struct.List* @find
// CHECK-LABEL: define{{.*}} %struct.List* @find
List *find(List *head, int data) {
if (!head)
return 0;
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CodeGen/exceptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
void test1() {
extern void test1_helper(void (^)(int));

// CHECK-LABEL: define void @test1() {{.*}} personality i8* bitcast (i32 (...)* @__gcc_personality_v0 to i8*)
// CHECK-ARM-LABEL: define arm_aapcscc void @test1() {{.*}} personality i8* bitcast (i32 (...)* @__gcc_personality_sj0 to i8*)
// CHECK-LABEL: define{{.*}} void @test1() {{.*}} personality i8* bitcast (i32 (...)* @__gcc_personality_v0 to i8*)
// CHECK-ARM-LABEL: define{{.*}} arm_aapcscc void @test1() {{.*}} personality i8* bitcast (i32 (...)* @__gcc_personality_sj0 to i8*)

__block int x = 10;

Expand Down
372 changes: 186 additions & 186 deletions clang/test/CodeGen/ext-int-cc.c

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions clang/test/CodeGen/fixed-point-tbaa.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

void sfract(unsigned short _Fract *p, short _Fract *q,
unsigned _Sat short _Fract *r, _Sat short _Fract *s) {
// CHECK-LABEL: define void @sfract
// CHECK-LABEL: define{{.*}} void @sfract
// CHECK: store i8 -128, i8* %p, align 1, !tbaa [[TAG_sf:!.*]]
// CHECK: store i8 -64, i8* %q, align 1, !tbaa [[TAG_sf]]
// CHECK: store i8 -128, i8* %r, align 1, !tbaa [[TAG_sat_sf:!.*]]
Expand All @@ -17,7 +17,7 @@ void sfract(unsigned short _Fract *p, short _Fract *q,

void fract(unsigned _Fract *p, _Fract *q,
unsigned _Sat _Fract *r, _Sat _Fract *s) {
// CHECK-LABEL: define void @fract
// CHECK-LABEL: define{{.*}} void @fract
// CHECK: store i16 -32768, i16* %p, align 2, !tbaa [[TAG_f:!.*]]
// CHECK: store i16 -16384, i16* %q, align 2, !tbaa [[TAG_f]]
// CHECK: store i16 -32768, i16* %r, align 2, !tbaa [[TAG_sat_f:!.*]]
Expand All @@ -30,7 +30,7 @@ void fract(unsigned _Fract *p, _Fract *q,

void lfract(unsigned long _Fract *p, long _Fract *q,
unsigned _Sat long _Fract *r, _Sat long _Fract *s) {
// CHECK-LABEL: define void @lfract
// CHECK-LABEL: define{{.*}} void @lfract
// CHECK: store i32 -2147483648, i32* %p, align 4, !tbaa [[TAG_lf:!.*]]
// CHECK: store i32 -1073741824, i32* %q, align 4, !tbaa [[TAG_lf]]
// CHECK: store i32 -2147483648, i32* %r, align 4, !tbaa [[TAG_sat_lf:!.*]]
Expand All @@ -43,7 +43,7 @@ void lfract(unsigned long _Fract *p, long _Fract *q,

void saccum(unsigned short _Accum *p, short _Accum *q,
unsigned _Sat short _Accum *r, _Sat short _Accum *s) {
// CHECK-LABEL: define void @saccum
// CHECK-LABEL: define{{.*}} void @saccum
// CHECK: store i16 128, i16* %p, align 2, !tbaa [[TAG_sk:!.*]]
// CHECK: store i16 -64, i16* %q, align 2, !tbaa [[TAG_sk]]
// CHECK: store i16 128, i16* %r, align 2, !tbaa [[TAG_sat_sk:!.*]]
Expand All @@ -56,7 +56,7 @@ void saccum(unsigned short _Accum *p, short _Accum *q,

void accum(unsigned _Accum *p, _Accum *q,
unsigned _Sat _Accum *r, _Sat _Accum *s) {
// CHECK-LABEL: define void @accum
// CHECK-LABEL: define{{.*}} void @accum
// CHECK: store i32 32768, i32* %p, align 4, !tbaa [[TAG_k:!.*]]
// CHECK: store i32 -16384, i32* %q, align 4, !tbaa [[TAG_k]]
// CHECK: store i32 32768, i32* %r, align 4, !tbaa [[TAG_sat_k:!.*]]
Expand All @@ -69,7 +69,7 @@ void accum(unsigned _Accum *p, _Accum *q,

void laccum(unsigned long _Accum *p, long _Accum *q,
unsigned _Sat long _Accum *r, _Sat long _Accum *s) {
// CHECK-LABEL: define void @laccum
// CHECK-LABEL: define{{.*}} void @laccum
// CHECK: store i64 2147483648, i64* %p, align 8, !tbaa [[TAG_lk:!.*]]
// CHECK: store i64 -1073741824, i64* %q, align 8, !tbaa [[TAG_lk]]
// CHECK: store i64 2147483648, i64* %r, align 8, !tbaa [[TAG_sat_lk:!.*]]
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGen/func-aligned.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
// rdar://7270273
void foo() __attribute__((aligned (64)));
void foo() {
// CHECK: define void @foo() {{.*}} align 64
// CHECK: define{{.*}} void @foo() {{.*}} align 64
}
6 changes: 3 additions & 3 deletions clang/test/CodeGen/func-return-member.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ int X;
struct frk F;
float _Complex C;

// CHECK-LABEL: define void @bar
// CHECK-LABEL: define{{.*}} void @bar
void bar(void) {
X = foo().f.f.x;
}

// CHECK-LABEL: define void @bun
// CHECK-LABEL: define{{.*}} void @bun
void bun(void) {
F = foo().f.f;
}

// CHECK-LABEL: define void @ban
// CHECK-LABEL: define{{.*}} void @ban
void ban(void) {
C = foo().f.f.c;
}
2 changes: 1 addition & 1 deletion clang/test/CodeGen/incomplete-function-type-2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// PR14355: don't crash
// Keep this test in its own file because CodeGenTypes has global state.
// CHECK: define void @test10_foo({}* %p1.coerce) [[NUW:#[0-9]+]] {
// CHECK: define{{.*}} void @test10_foo({}* %p1.coerce) [[NUW:#[0-9]+]] {
struct test10_B;
typedef struct test10_B test10_F3(double);
void test10_foo(test10_F3 p1);
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGen/incomplete-function-type.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s | FileCheck %s
// CHECK: ModuleID
// CHECK-NOT: opaque
// CHECK-LABEL: define void @f0
// CHECK-LABEL: define{{.*}} void @f0

enum teste1 test1f(void), (*test1)(void) = test1f;
struct tests2 test2f(), (*test2)() = test2f;
Expand Down
40 changes: 20 additions & 20 deletions clang/test/CodeGen/inline2.c
Original file line number Diff line number Diff line change
@@ -1,65 +1,65 @@
// RUN: %clang_cc1 -O1 -fno-experimental-new-pass-manager -std=gnu89 -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix CHECK-GNU89 %s
// RUN: %clang_cc1 -O1 -fno-experimental-new-pass-manager -std=c99 -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix CHECK-C99 %s

// CHECK-GNU89-LABEL: define i32 @f0()
// CHECK-C99-LABEL: 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-LABEL: define i32 @f1()
// CHECK-C99-LABEL: 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-LABEL: define i32 @f2()
// CHECK-C99-LABEL: 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-LABEL: define i32 @f3()
// CHECK-C99-LABEL: 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-LABEL: define i32 @f5()
// CHECK-C99-LABEL: 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-LABEL: define i32 @f6()
// CHECK-C99-LABEL: 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-LABEL: define i32 @f7()
// CHECK-C99-LABEL: 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-LABEL: define i32 @fA()
// CHECK-GNU89-LABEL: define{{.*}} i32 @fA()
inline int fA(void) { return 0; }

// CHECK-GNU89-LABEL: define i32 @fB()
// CHECK-GNU89-LABEL: define{{.*}} i32 @fB()
inline int fB() { return 0; }

// CHECK-GNU89-LABEL: define available_externally i32 @f4()
// CHECK-C99-LABEL: define i32 @f4()
// CHECK-C99-LABEL: define{{.*}} i32 @f4()
int f4(void);
extern inline int f4(void) { return 0; }

// CHECK-GNU89-LABEL: define available_externally i32 @f8()
// CHECK-C99-LABEL: define i32 @f8()
// CHECK-C99-LABEL: define{{.*}} i32 @f8()
extern int f8(void);
extern inline int f8(void) { return 0; }

// CHECK-GNU89-LABEL: define available_externally i32 @f9()
// CHECK-C99-LABEL: define i32 @f9()
// CHECK-C99-LABEL: define{{.*}} i32 @f9()
extern inline int f9(void);
extern inline int f9(void) { return 0; }

// CHECK-C99-LABEL: define available_externally i32 @fA()

// CHECK-C99-LABEL: define i32 @fB()
// CHECK-C99-LABEL: define{{.*}} i32 @fB()

int test_all() {
return f0() + f1() + f2() + f3() + f4() + f5() + f6() + f7() + f8() + f9()
Expand Down
6 changes: 3 additions & 3 deletions clang/test/CodeGen/integer-overflow.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
// Tests for signed integer overflow stuff.
// rdar://7432000 rdar://7221421
void test1() {
// DEFAULT-LABEL: define void @test1
// WRAPV-LABEL: define void @test1
// TRAPV-LABEL: 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
Expand Down
Loading