[test] Add {{.*}} to make tests immune to dso_local/dso_preemptable/(none) differences

For a definition (of most linkage types), dso_local is set for ELF -fno-pic/-fpie
and COFF, but not for Mach-O.  This nuance causes unneeded binary format differences.

This patch replaces (function) `define ` with `define{{.*}} `,
(variable/constant/alias) `= ` with `={{.*}} `, or inserts appropriate `{{.*}} `
if there is an explicit linkage.

* Clang will set dso_local for Mach-O, which is currently implied by TargetMachine.cpp. This will make COFF/Mach-O and executable ELF similar.
* Eventually I hope we can make dso_local the textual LLVM IR default (write explicit "dso_preemptable" when applicable) and -fpic ELF will be similar to everything else. This patch helps move toward that goal.
This commit is contained in:
Fangrui Song 2020-12-30 20:45:56 -08:00
parent 1d04cbeb43
commit 6b3351792c
381 changed files with 2726 additions and 2726 deletions

View File

@ -1,7 +1,7 @@
// RUN: %clang_cc1 -std=c++11 -fblocks -emit-llvm -o - -triple x86_64-apple-darwin11.3 %s | FileCheck %s
namespace PR12746 {
// CHECK: define zeroext i1 @_ZN7PR127462f1EPi
// CHECK: define{{.*}} zeroext i1 @_ZN7PR127462f1EPi
bool f1(int *x) {
// CHECK: store i8* bitcast (i1 (i8*)* @___ZN7PR127462f1EPi_block_invoke to i8*)
bool (^outer)() = ^ {

View File

@ -13,7 +13,7 @@ void f(X<int>) { }
struct Y : X<int> { };
struct Z : X<float> { };
// CHECK: define i32 @main()
// CHECK: define{{.*}} i32 @main()
int main() {
// CHECK: call void @_ZN1YC1Ev
// CHECK: call void @_ZN1XIiEC1ERKS0_

View File

@ -3,7 +3,7 @@
template<class T> void f(T) { /* ... */ }
template<class T> inline void g(T) { /* ... */ }
// CHECK: define void @_Z1gIiEvT_
// CHECK: define{{.*}} void @_Z1gIiEvT_
template<> void g<>(int) { /* ... */ }
template<class T>
@ -21,10 +21,10 @@ template<class T>
inline void X<T>::h() {
}
// CHECK: define void @_ZN1XIiE1fEv
// CHECK: define{{.*}} void @_ZN1XIiE1fEv
template<> void X<int>::f() { }
// CHECK: define void @_ZN1XIiE1hEv
// CHECK: define{{.*}} void @_ZN1XIiE1hEv
template<> void X<int>::h() { }
// CHECK: define linkonce_odr void @_Z1fIiEvT_

View File

@ -3,38 +3,38 @@
int* foo(int** a, int* b, int* c) {
return __sync_val_compare_and_swap (a, b, c);
}
// CHECK-LABEL: define i32* @foo
// CHECK-LABEL: define{{.*}} i32* @foo
// CHECK: cmpxchg
int foo2(int** a, int* b, int* c) {
return __sync_bool_compare_and_swap (a, b, c);
}
// CHECK-LABEL: define i32 @foo2
// CHECK-LABEL: define{{.*}} i32 @foo2
// CHECK: cmpxchg
int* foo3(int** a, int b) {
return __sync_fetch_and_add (a, b);
}
// CHECK-LABEL: define i32* @foo3
// CHECK-LABEL: define{{.*}} i32* @foo3
// CHECK: atomicrmw add
int* foo4(int** a, int b) {
return __sync_fetch_and_sub (a, b);
}
// CHECK-LABEL: define i32* @foo4
// CHECK-LABEL: define{{.*}} i32* @foo4
// CHECK: atomicrmw sub
int* foo5(int** a, int* b) {
return __sync_lock_test_and_set (a, b);
}
// CHECK-LABEL: define i32* @foo5
// CHECK-LABEL: define{{.*}} i32* @foo5
// CHECK: atomicrmw xchg
int* foo6(int** a, int*** b) {
return __sync_lock_test_and_set (a, b);
}
// CHECK-LABEL: define i32* @foo6
// CHECK-LABEL: define{{.*}} i32* @foo6
// CHECK: atomicrmw xchg

View File

@ -2,7 +2,7 @@
void f(void);
void g(void) {
// CHECK: define void @g() [[NUW:#[0-9]+]]
// CHECK: define{{.*}} void @g() [[NUW:#[0-9]+]]
// CHECK-NOT: call void @f() nounwind
f();
}

View File

@ -8,4 +8,4 @@ struct et7 {
52,
};
// CHECK: @yv7 = global %struct.et7 { [0 x float] zeroinitializer, i8 52 }
// CHECK: @yv7 ={{.*}} global %struct.et7 { [0 x float] zeroinitializer, i8 52 }

View File

@ -22,7 +22,7 @@ struct gc_generation {
// The idea is that there are 6 undefs in this structure initializer to cover
// the padding between elements.
// CHECK: @generations = global [3 x %struct.gc_generation] [%struct.gc_generation { %union._gc_head { %struct.anon { %union._gc_head* getelementptr inbounds ([3 x %struct.gc_generation], [3 x %struct.gc_generation]* @generations, i32 0, i32 0, i32 0), %union._gc_head* getelementptr inbounds ([3 x %struct.gc_generation], [3 x %struct.gc_generation]* @generations, i32 0, i32 0, i32 0), i64 0 }, [8 x i8] undef }, i32 700, i32 0, [8 x i8] undef }, %struct.gc_generation { %union._gc_head { %struct.anon { %union._gc_head* bitcast (i8* getelementptr (i8, i8* bitcast ([3 x %struct.gc_generation]* @generations to i8*), i64 48) to %union._gc_head*), %union._gc_head* bitcast (i8* getelementptr (i8, i8* bitcast ([3 x %struct.gc_generation]* @generations to i8*), i64 48) to %union._gc_head*), i64 0 }, [8 x i8] undef }, i32 10, i32 0, [8 x i8] undef }, %struct.gc_generation { %union._gc_head { %struct.anon { %union._gc_head* bitcast (i8* getelementptr (i8, i8* bitcast ([3 x %struct.gc_generation]* @generations to i8*), i64 96) to %union._gc_head*), %union._gc_head* bitcast (i8* getelementptr (i8, i8* bitcast ([3 x %struct.gc_generation]* @generations to i8*), i64 96) to %union._gc_head*), i64 0 }, [8 x i8] undef }, i32 10, i32 0, [8 x i8] undef }]
// CHECK: @generations ={{.*}} global [3 x %struct.gc_generation] [%struct.gc_generation { %union._gc_head { %struct.anon { %union._gc_head* getelementptr inbounds ([3 x %struct.gc_generation], [3 x %struct.gc_generation]* @generations, i32 0, i32 0, i32 0), %union._gc_head* getelementptr inbounds ([3 x %struct.gc_generation], [3 x %struct.gc_generation]* @generations, i32 0, i32 0, i32 0), i64 0 }, [8 x i8] undef }, i32 700, i32 0, [8 x i8] undef }, %struct.gc_generation { %union._gc_head { %struct.anon { %union._gc_head* bitcast (i8* getelementptr (i8, i8* bitcast ([3 x %struct.gc_generation]* @generations to i8*), i64 48) to %union._gc_head*), %union._gc_head* bitcast (i8* getelementptr (i8, i8* bitcast ([3 x %struct.gc_generation]* @generations to i8*), i64 48) to %union._gc_head*), i64 0 }, [8 x i8] undef }, i32 10, i32 0, [8 x i8] undef }, %struct.gc_generation { %union._gc_head { %struct.anon { %union._gc_head* bitcast (i8* getelementptr (i8, i8* bitcast ([3 x %struct.gc_generation]* @generations to i8*), i64 96) to %union._gc_head*), %union._gc_head* bitcast (i8* getelementptr (i8, i8* bitcast ([3 x %struct.gc_generation]* @generations to i8*), i64 96) to %union._gc_head*), i64 0 }, [8 x i8] undef }, i32 10, i32 0, [8 x i8] undef }]
/* linked lists of container objects */
struct gc_generation generations[3] = {
/* PyGC_Head, threshold, count */

View File

@ -2,7 +2,7 @@
// RUN: %clang -target i386-apple-darwin10 -flto -S -g %s -o - | FileCheck %s
// CHECK: @main.localstatic = internal global i32 0, align 4, !dbg [[L:![0-9]+]]
// CHECK: @global = global i32 0, align 4, !dbg [[G:![0-9]+]]
// CHECK: @global ={{.*}} global i32 0, align 4, !dbg [[G:![0-9]+]]
int global;
int main() {

View File

@ -48,7 +48,7 @@ void test_context_error_1() {
float *error;
context_error_1(&x, &error);
}
// CHECK-LABEL: define void @test_context_error_1()
// CHECK-LABEL: define{{.*}} void @test_context_error_1()
// CHECK: [[X:%.*]] = alloca i32, align 4
// CHECK: [[ERROR:%.*]] = alloca float*, align 8
// CHECK: [[TEMP:%.*]] = alloca swifterror float*, align 8
@ -109,7 +109,7 @@ typedef struct {
int f1;
} struct_1;
TEST(struct_1);
// CHECK-LABEL: define swiftcc { i64, i64 } @return_struct_1() {{.*}}{
// CHECK-LABEL: define{{.*}} swiftcc { i64, i64 } @return_struct_1() {{.*}}{
// CHECK: [[RET:%.*]] = alloca [[STRUCT1:%.*]], align 4
// CHECK: call void @llvm.memset
// CHECK: [[CAST:%.*]] = bitcast [[STRUCT1]]* %retval to { i64, i64 }*
@ -121,7 +121,7 @@ TEST(struct_1);
// CHECK: [[R1:%.*]] = insertvalue { i64, i64 } [[R0]], i64 [[T1]], 1
// CHECK: ret { i64, i64 } [[R1]]
// CHECK: }
// CHECK-LABEL: define swiftcc void @take_struct_1(i64 %0, i64 %1) {{.*}}{
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_1(i64 %0, i64 %1) {{.*}}{
// CHECK: [[V:%.*]] = alloca [[STRUCT1:%.*]], align 4
// CHECK: [[CAST:%.*]] = bitcast [[STRUCT1]]* [[V]] to { i64, i64 }*
// CHECK: [[GEP0:%.*]] = getelementptr inbounds { i64, i64 }, { i64, i64 }* [[CAST]], i32 0, i32 0
@ -130,7 +130,7 @@ TEST(struct_1);
// CHECK: store i64 %1, i64* [[GEP1]], align 4
// CHECK: ret void
// CHECK: }
// CHECK-LABEL: define void @test_struct_1() {{.*}}{
// CHECK-LABEL: define{{.*}} void @test_struct_1() {{.*}}{
// CHECK: [[AGG:%.*]] = alloca [[STRUCT1:%.*]], align 4
// CHECK: [[RET:%.*]] = call swiftcc { i64, i64 } @return_struct_1()
// CHECK: [[CAST:%.*]] = bitcast [[STRUCT1]]* [[AGG]] to { i64, i64 }*
@ -157,7 +157,7 @@ typedef struct {
int f1;
} struct_2;
TEST(struct_2);
// CHECK-LABEL: define swiftcc { i64, i64 } @return_struct_2() {{.*}}{
// CHECK-LABEL: define{{.*}} swiftcc { i64, i64 } @return_struct_2() {{.*}}{
// CHECK: [[RET:%.*]] = alloca [[STRUCT2_TYPE]], align 4
// CHECK: [[CASTVAR:%.*]] = bitcast {{.*}} [[RET]]
// CHECK: call void @llvm.memcpy{{.*}}({{.*}}[[CASTVAR]], {{.*}}[[STRUCT2_RESULT]]
@ -170,7 +170,7 @@ TEST(struct_2);
// CHECK: [[R1:%.*]] = insertvalue { i64, i64 } [[R0]], i64 [[T1]], 1
// CHECK: ret { i64, i64 } [[R1]]
// CHECK: }
// CHECK-LABEL: define swiftcc void @take_struct_2(i64 %0, i64 %1) {{.*}}{
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_2(i64 %0, i64 %1) {{.*}}{
// CHECK: [[V:%.*]] = alloca [[STRUCT:%.*]], align 4
// CHECK: [[CAST:%.*]] = bitcast [[STRUCT]]* [[V]] to { i64, i64 }*
// CHECK: [[GEP0:%.*]] = getelementptr inbounds { i64, i64 }, { i64, i64 }* [[CAST]], i32 0, i32 0
@ -179,7 +179,7 @@ TEST(struct_2);
// CHECK: store i64 %1, i64* [[GEP1]], align 4
// CHECK: ret void
// CHECK: }
// CHECK-LABEL: define void @test_struct_2() {{.*}} {
// CHECK-LABEL: define{{.*}} void @test_struct_2() {{.*}} {
// CHECK: [[TMP:%.*]] = alloca [[STRUCT2_TYPE]], align 4
// CHECK: [[CALL:%.*]] = call swiftcc { i64, i64 } @return_struct_2()
// CHECK: [[CAST_TMP:%.*]] = bitcast [[STRUCT2_TYPE]]* [[TMP]] to { i64, i64 }*
@ -209,7 +209,7 @@ typedef struct {
__attribute__((packed)) float f;
} struct_misaligned_1;
TEST(struct_misaligned_1)
// CHECK-LABEL: define swiftcc i64 @return_struct_misaligned_1()
// CHECK-LABEL: define{{.*}} swiftcc i64 @return_struct_misaligned_1()
// CHECK: [[RET:%.*]] = alloca [[STRUCT:%.*]], align 1
// CHECK: [[CAST:%.*]] = bitcast [[STRUCT]]* [[RET]] to i8*
// CHECK: call void @llvm.memset{{.*}}(i8* align 1 [[CAST]], i8 0, i64 5
@ -218,14 +218,14 @@ TEST(struct_misaligned_1)
// CHECK: [[R0:%.*]] = load i64, i64* [[GEP]], align 1
// CHECK: ret i64 [[R0]]
// CHECK:}
// CHECK-LABEL: define swiftcc void @take_struct_misaligned_1(i64 %0) {{.*}}{
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_misaligned_1(i64 %0) {{.*}}{
// CHECK: [[V:%.*]] = alloca [[STRUCT:%.*]], align 1
// CHECK: [[CAST:%.*]] = bitcast [[STRUCT]]* [[V]] to { i64 }*
// CHECK: [[GEP:%.*]] = getelementptr inbounds { i64 }, { i64 }* [[CAST]], i32 0, i32 0
// CHECK: store i64 %0, i64* [[GEP]], align 1
// CHECK: ret void
// CHECK: }
// CHECK: define void @test_struct_misaligned_1() {{.*}}{
// CHECK: define{{.*}} void @test_struct_misaligned_1() {{.*}}{
// CHECK: [[AGG:%.*]] = alloca [[STRUCT:%.*]], align 1
// CHECK: [[CALL:%.*]] = call swiftcc i64 @return_struct_misaligned_1()
// CHECK: [[T0:%.*]] = bitcast [[STRUCT]]* [[AGG]] to { i64 }*
@ -258,7 +258,7 @@ typedef union {
double d;
} union_het_fp;
TEST(union_het_fp)
// CHECK-LABEL: define swiftcc i64 @return_union_het_fp()
// CHECK-LABEL: define{{.*}} swiftcc i64 @return_union_het_fp()
// CHECK: [[RET:%.*]] = alloca [[UNION:%.*]], align 8
// CHECK: [[CAST:%.*]] = bitcast [[UNION]]* [[RET]] to i8*
// CHECK: call void @llvm.memcpy{{.*}}(i8* align 8 [[CAST]]
@ -266,14 +266,14 @@ TEST(union_het_fp)
// CHECK: [[GEP:%.*]] = getelementptr inbounds { i64 }, { i64 }* [[CAST]], i32 0, i32 0
// CHECK: [[R0:%.*]] = load i64, i64* [[GEP]], align 8
// CHECK: ret i64 [[R0]]
// CHECK-LABEL: define swiftcc void @take_union_het_fp(i64 %0) {{.*}}{
// CHECK-LABEL: define{{.*}} swiftcc void @take_union_het_fp(i64 %0) {{.*}}{
// CHECK: [[V:%.*]] = alloca [[UNION:%.*]], align 8
// CHECK: [[CAST:%.*]] = bitcast [[UNION]]* [[V]] to { i64 }*
// CHECK: [[GEP:%.*]] = getelementptr inbounds { i64 }, { i64 }* [[CAST]], i32 0, i32 0
// CHECK: store i64 %0, i64* [[GEP]], align 8
// CHECK: ret void
// CHECK: }
// CHECK-LABEL: define void @test_union_het_fp() {{.*}}{
// CHECK-LABEL: define{{.*}} void @test_union_het_fp() {{.*}}{
// CHECK: [[AGG:%.*]] = alloca [[UNION:%.*]], align 8
// CHECK: [[CALL:%.*]] = call swiftcc i64 @return_union_het_fp()
// CHECK: [[T0:%.*]] = bitcast [[UNION]]* [[AGG]] to { i64 }*
@ -292,7 +292,7 @@ typedef union {
float f2;
} union_hom_fp;
TEST(union_hom_fp)
// CHECK-LABEL: define void @test_union_hom_fp()
// CHECK-LABEL: define{{.*}} void @test_union_hom_fp()
// CHECK: [[TMP:%.*]] = alloca [[REC:%.*]], align 4
// CHECK: [[CALL:%.*]] = call [[SWIFTCC]] float @return_union_hom_fp()
// CHECK: [[CAST_TMP:%.*]] = bitcast [[REC]]* [[TMP]] to [[AGG:{ float }]]*
@ -309,7 +309,7 @@ typedef union {
float4 fv2;
} union_hom_fp_partial;
TEST(union_hom_fp_partial)
// CHECK: define void @test_union_hom_fp_partial()
// CHECK: define{{.*}} void @test_union_hom_fp_partial()
// CHECK: [[AGG:%.*]] = alloca [[UNION:%.*]], align 16
// CHECK: [[CALL:%.*]] = call swiftcc { float, float, float, float } @return_union_hom_fp_partial()
// CHECK: [[CAST:%.*]] = bitcast [[UNION]]* [[AGG]] to { float, float, float, float }*
@ -343,7 +343,7 @@ typedef union {
float4 fv2;
} union_het_fpv_partial;
TEST(union_het_fpv_partial)
// CHECK-LABEL: define void @test_union_het_fpv_partial()
// CHECK-LABEL: define{{.*}} void @test_union_het_fpv_partial()
// CHECK: [[AGG:%.*]] = alloca [[UNION:%.*]], align 16
// CHECK: [[CALL:%.*]] = call swiftcc { i64, float, float } @return_union_het_fpv_partial()
// CHECK: [[CAST:%.*]] = bitcast [[UNION]]* [[AGG]] to { i64, float, float }*
@ -398,7 +398,7 @@ TEST(int8)
// CHECK: [[T0:%.*]] = getelementptr inbounds [[AGG]], [[AGG]]* [[CAST_TMP]], i32 0, i32 1
// CHECK: store <4 x i32> %1, <4 x i32>* [[T0]], align
// CHECK: ret void
// CHECK-LABEL: define void @test_int8()
// CHECK-LABEL: define{{.*}} void @test_int8()
// CHECK: [[TMP1:%.*]] = alloca [[REC]], align
// CHECK: [[TMP2:%.*]] = alloca [[REC]], align
// CHECK: [[CALL:%.*]] = call [[SWIFTCC]] [[UAGG]] @return_int8()
@ -442,7 +442,7 @@ TEST(int5)
// CHECK: [[T0:%.*]] = getelementptr inbounds [[AGG]], [[AGG]]* [[CAST_TMP]], i32 0, i32 1
// CHECK: store i32 %1, i32* [[T0]], align
// CHECK: ret void
// CHECK-LABEL: define void @test_int5()
// CHECK-LABEL: define{{.*}} void @test_int5()
// CHECK: [[TMP1:%.*]] = alloca [[REC]], align
// CHECK: [[TMP2:%.*]] = alloca [[REC]], align
// CHECK: [[CALL:%.*]] = call [[SWIFTCC]] [[UAGG]] @return_int5()
@ -468,22 +468,22 @@ typedef struct {
int3 v __attribute__((packed));
} misaligned_int3;
TEST(misaligned_int3)
// CHECK-LABEL: define swiftcc void @take_misaligned_int3(i64 %0, i64 %1)
// CHECK-LABEL: define{{.*}} swiftcc void @take_misaligned_int3(i64 %0, i64 %1)
typedef struct {
float f0;
} struct_f1;
TEST(struct_f1)
// CHECK-LABEL: define swiftcc float @return_struct_f1()
// CHECK-LABEL: define swiftcc void @take_struct_f1(float %0)
// CHECK-LABEL: define{{.*}} swiftcc float @return_struct_f1()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_f1(float %0)
typedef struct {
float f0;
float f1;
} struct_f2;
TEST(struct_f2)
// CHECK-LABEL: define swiftcc { float, float } @return_struct_f2()
// CHECK-LABEL: define swiftcc void @take_struct_f2(float %0, float %1)
// CHECK-LABEL: define{{.*}} swiftcc { float, float } @return_struct_f2()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_f2(float %0, float %1)
typedef struct {
float f0;
@ -491,8 +491,8 @@ typedef struct {
float f2;
} struct_f3;
TEST(struct_f3)
// CHECK-LABEL: define swiftcc { float, float, float } @return_struct_f3()
// CHECK-LABEL: define swiftcc void @take_struct_f3(float %0, float %1, float %2)
// CHECK-LABEL: define{{.*}} swiftcc { float, float, float } @return_struct_f3()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_f3(float %0, float %1, float %2)
typedef struct {
float f0;
@ -501,16 +501,16 @@ typedef struct {
float f3;
} struct_f4;
TEST(struct_f4)
// CHECK-LABEL: define swiftcc { float, float, float, float } @return_struct_f4()
// CHECK-LABEL: define swiftcc void @take_struct_f4(float %0, float %1, float %2, float %3)
// CHECK-LABEL: define{{.*}} swiftcc { float, float, float, float } @return_struct_f4()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_f4(float %0, float %1, float %2, float %3)
typedef struct {
double d0;
} struct_d1;
TEST(struct_d1)
// CHECK-LABEL: define swiftcc double @return_struct_d1()
// CHECK-LABEL: define swiftcc void @take_struct_d1(double %0)
// CHECK-LABEL: define{{.*}} swiftcc double @return_struct_d1()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_d1(double %0)
typedef struct {
double d0;
@ -518,16 +518,16 @@ typedef struct {
} struct_d2;
TEST(struct_d2)
// CHECK-LABEL: define swiftcc { double, double } @return_struct_d2()
// CHECK-LABEL: define swiftcc void @take_struct_d2(double %0, double %1)
// CHECK-LABEL: define{{.*}} swiftcc { double, double } @return_struct_d2()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_d2(double %0, double %1)
typedef struct {
double d0;
double d1;
double d2;
} struct_d3;
TEST(struct_d3)
// CHECK-LABEL: define swiftcc { double, double, double } @return_struct_d3()
// CHECK-LABEL: define swiftcc void @take_struct_d3(double %0, double %1, double %2)
// CHECK-LABEL: define{{.*}} swiftcc { double, double, double } @return_struct_d3()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_d3(double %0, double %1, double %2)
typedef struct {
double d0;
@ -536,8 +536,8 @@ typedef struct {
double d3;
} struct_d4;
TEST(struct_d4)
// CHECK-LABEL: define swiftcc { double, double, double, double } @return_struct_d4()
// CHECK-LABEL: define swiftcc void @take_struct_d4(double %0, double %1, double %2, double %3)
// CHECK-LABEL: define{{.*}} swiftcc { double, double, double, double } @return_struct_d4()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_d4(double %0, double %1, double %2, double %3)
typedef struct {
double d0;
@ -547,23 +547,23 @@ typedef struct {
double d4;
} struct_d5;
TEST(struct_d5)
// CHECK: define swiftcc void @return_struct_d5([[STRUCT5:%.*]]* noalias sret([[STRUCT5]])
// CHECK: define swiftcc void @take_struct_d5([[STRUCT5]]
// CHECK: define{{.*}} swiftcc void @return_struct_d5([[STRUCT5:%.*]]* noalias sret([[STRUCT5]])
// CHECK: define{{.*}} swiftcc void @take_struct_d5([[STRUCT5]]
typedef struct {
char c0;
} struct_c1;
TEST(struct_c1)
// CHECK-LABEL: define swiftcc i8 @return_struct_c1()
// CHECK-LABEL: define swiftcc void @take_struct_c1(i8 %0)
// CHECK-LABEL: define{{.*}} swiftcc i8 @return_struct_c1()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_c1(i8 %0)
typedef struct {
char c0;
char c1;
} struct_c2;
TEST(struct_c2)
// CHECK-LABEL: define swiftcc i16 @return_struct_c2()
// CHECK-LABEL: define swiftcc void @take_struct_c2(i16 %0)
// CHECK-LABEL: define{{.*}} swiftcc i16 @return_struct_c2()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_c2(i16 %0)
//
typedef struct {
@ -572,8 +572,8 @@ typedef struct {
char c2;
} struct_c3;
TEST(struct_c3)
// CHECK-LABEL: define swiftcc i32 @return_struct_c3()
// CHECK-LABEL: define swiftcc void @take_struct_c3(i32 %0)
// CHECK-LABEL: define{{.*}} swiftcc i32 @return_struct_c3()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_c3(i32 %0)
typedef struct {
char c0;
@ -582,8 +582,8 @@ typedef struct {
char c3;
} struct_c4;
TEST(struct_c4)
// CHECK-LABEL: define swiftcc i32 @return_struct_c4()
// CHECK-LABEL: define swiftcc void @take_struct_c4(i32 %0)
// CHECK-LABEL: define{{.*}} swiftcc i32 @return_struct_c4()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_c4(i32 %0)
typedef struct {
char c0;
@ -593,8 +593,8 @@ typedef struct {
char c4;
} struct_c5;
TEST(struct_c5)
// CHECK-LABEL: define swiftcc i64 @return_struct_c5()
// CHECK-LABEL: define swiftcc void @take_struct_c5(i64 %0)
// CHECK-LABEL: define{{.*}} swiftcc i64 @return_struct_c5()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_c5(i64 %0)
//
typedef struct {
char c0;
@ -608,23 +608,23 @@ typedef struct {
char c8;
} struct_c9;
TEST(struct_c9)
// CHECK-LABEL: define swiftcc { i64, i8 } @return_struct_c9()
// CHECK-LABEL: define swiftcc void @take_struct_c9(i64 %0, i8 %1)
// CHECK-LABEL: define{{.*}} swiftcc { i64, i8 } @return_struct_c9()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_c9(i64 %0, i8 %1)
typedef struct {
short s0;
} struct_s1;
TEST(struct_s1)
// CHECK-LABEL: define swiftcc i16 @return_struct_s1()
// CHECK-LABEL: define swiftcc void @take_struct_s1(i16 %0)
// CHECK-LABEL: define{{.*}} swiftcc i16 @return_struct_s1()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_s1(i16 %0)
typedef struct {
short s0;
short s1;
} struct_s2;
TEST(struct_s2)
// CHECK-LABEL: define swiftcc i32 @return_struct_s2()
// CHECK-LABEL: define swiftcc void @take_struct_s2(i32 %0)
// CHECK-LABEL: define{{.*}} swiftcc i32 @return_struct_s2()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_s2(i32 %0)
//
typedef struct {
@ -633,8 +633,8 @@ typedef struct {
short s2;
} struct_s3;
TEST(struct_s3)
// CHECK-LABEL: define swiftcc i64 @return_struct_s3()
// CHECK-LABEL: define swiftcc void @take_struct_s3(i64 %0)
// CHECK-LABEL: define{{.*}} swiftcc i64 @return_struct_s3()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_s3(i64 %0)
typedef struct {
short s0;
@ -643,8 +643,8 @@ typedef struct {
short s3;
} struct_s4;
TEST(struct_s4)
// CHECK-LABEL: define swiftcc i64 @return_struct_s4()
// CHECK-LABEL: define swiftcc void @take_struct_s4(i64 %0)
// CHECK-LABEL: define{{.*}} swiftcc i64 @return_struct_s4()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_s4(i64 %0)
typedef struct {
short s0;
@ -654,24 +654,24 @@ typedef struct {
short s4;
} struct_s5;
TEST(struct_s5)
// CHECK-LABEL: define swiftcc { i64, i16 } @return_struct_s5()
// CHECK-LABEL: define swiftcc void @take_struct_s5(i64 %0, i16 %1)
// CHECK-LABEL: define{{.*}} swiftcc { i64, i16 } @return_struct_s5()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_s5(i64 %0, i16 %1)
typedef struct {
int i0;
} struct_i1;
TEST(struct_i1)
// CHECK-LABEL: define swiftcc i32 @return_struct_i1()
// CHECK-LABEL: define swiftcc void @take_struct_i1(i32 %0)
// CHECK-LABEL: define{{.*}} swiftcc i32 @return_struct_i1()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_i1(i32 %0)
typedef struct {
int i0;
int i1;
} struct_i2;
TEST(struct_i2)
// CHECK-LABEL: define swiftcc i64 @return_struct_i2()
// CHECK-LABEL: define swiftcc void @take_struct_i2(i64 %0)
// CHECK-LABEL: define{{.*}} swiftcc i64 @return_struct_i2()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_i2(i64 %0)
typedef struct {
int i0;
@ -679,8 +679,8 @@ typedef struct {
int i2;
} struct_i3;
TEST(struct_i3)
// CHECK-LABEL: define swiftcc { i64, i32 } @return_struct_i3()
// CHECK-LABEL: define swiftcc void @take_struct_i3(i64 %0, i32 %1)
// CHECK-LABEL: define{{.*}} swiftcc { i64, i32 } @return_struct_i3()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_i3(i64 %0, i32 %1)
typedef struct {
int i0;
@ -689,23 +689,23 @@ typedef struct {
int i3;
} struct_i4;
TEST(struct_i4)
// CHECK-LABEL: define swiftcc { i64, i64 } @return_struct_i4()
// CHECK-LABEL: define swiftcc void @take_struct_i4(i64 %0, i64 %1)
// CHECK-LABEL: define{{.*}} swiftcc { i64, i64 } @return_struct_i4()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_i4(i64 %0, i64 %1)
typedef struct {
long long l0;
} struct_l1;
TEST(struct_l1)
// CHECK-LABEL: define swiftcc i64 @return_struct_l1()
// CHECK-LABEL: define swiftcc void @take_struct_l1(i64 %0)
// CHECK-LABEL: define{{.*}} swiftcc i64 @return_struct_l1()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_l1(i64 %0)
typedef struct {
long long l0;
long long l1;
} struct_l2;
TEST(struct_l2)
// CHECK-LABEL: define swiftcc { i64, i64 } @return_struct_l2()
// CHECK-LABEL: define swiftcc void @take_struct_l2(i64 %0, i64 %1)
// CHECK-LABEL: define{{.*}} swiftcc { i64, i64 } @return_struct_l2()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_l2(i64 %0, i64 %1)
typedef struct {
long long l0;
@ -713,8 +713,8 @@ typedef struct {
long long l2;
} struct_l3;
TEST(struct_l3)
// CHECK-LABEL: define swiftcc { i64, i64, i64 } @return_struct_l3()
// CHECK-LABEL: define swiftcc void @take_struct_l3(i64 %0, i64 %1, i64 %2)
// CHECK-LABEL: define{{.*}} swiftcc { i64, i64, i64 } @return_struct_l3()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_l3(i64 %0, i64 %1, i64 %2)
typedef struct {
long long l0;
@ -723,8 +723,8 @@ typedef struct {
long long l3;
} struct_l4;
TEST(struct_l4)
// CHECK-LABEL: define swiftcc { i64, i64, i64, i64 } @return_struct_l4()
// CHECK-LABEL: define swiftcc void @take_struct_l4(i64 %0, i64 %1, i64 %2, i64 %3)
// CHECK-LABEL: define{{.*}} swiftcc { i64, i64, i64, i64 } @return_struct_l4()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_l4(i64 %0, i64 %1, i64 %2, i64 %3)
typedef struct {
long long l0;
@ -734,23 +734,23 @@ typedef struct {
long long l4;
} struct_l5;
TEST(struct_l5)
// CHECK: define swiftcc void @return_struct_l5([[STRUCT5:%.*]]* noalias sret([[STRUCT5]])
// CHECK: define swiftcc void @take_struct_l5([[STRUCT5]]*
// CHECK: define{{.*}} swiftcc void @return_struct_l5([[STRUCT5:%.*]]* noalias sret([[STRUCT5]])
// CHECK: define{{.*}} swiftcc void @take_struct_l5([[STRUCT5]]*
typedef struct {
char16 c0;
} struct_vc1;
TEST(struct_vc1)
// CHECK-LABEL: define swiftcc <16 x i8> @return_struct_vc1()
// CHECK-LABEL: define swiftcc void @take_struct_vc1(<16 x i8> %0)
// CHECK-LABEL: define{{.*}} swiftcc <16 x i8> @return_struct_vc1()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vc1(<16 x i8> %0)
typedef struct {
char16 c0;
char16 c1;
} struct_vc2;
TEST(struct_vc2)
// CHECK-LABEL: define swiftcc { <16 x i8>, <16 x i8> } @return_struct_vc2()
// CHECK-LABEL: define swiftcc void @take_struct_vc2(<16 x i8> %0, <16 x i8> %1)
// CHECK-LABEL: define{{.*}} swiftcc { <16 x i8>, <16 x i8> } @return_struct_vc2()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vc2(<16 x i8> %0, <16 x i8> %1)
typedef struct {
char16 c0;
@ -758,8 +758,8 @@ typedef struct {
char16 c2;
} struct_vc3;
TEST(struct_vc3)
// CHECK-LABEL: define swiftcc { <16 x i8>, <16 x i8>, <16 x i8> } @return_struct_vc3()
// CHECK-LABEL: define swiftcc void @take_struct_vc3(<16 x i8> %0, <16 x i8> %1, <16 x i8> %2)
// CHECK-LABEL: define{{.*}} swiftcc { <16 x i8>, <16 x i8>, <16 x i8> } @return_struct_vc3()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vc3(<16 x i8> %0, <16 x i8> %1, <16 x i8> %2)
typedef struct {
char16 c0;
@ -768,8 +768,8 @@ typedef struct {
char16 c3;
} struct_vc4;
TEST(struct_vc4)
// CHECK-LABEL: define swiftcc { <16 x i8>, <16 x i8>, <16 x i8>, <16 x i8> } @return_struct_vc4()
// CHECK-LABEL: define swiftcc void @take_struct_vc4(<16 x i8> %0, <16 x i8> %1, <16 x i8> %2, <16 x i8> %3)
// CHECK-LABEL: define{{.*}} swiftcc { <16 x i8>, <16 x i8>, <16 x i8>, <16 x i8> } @return_struct_vc4()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vc4(<16 x i8> %0, <16 x i8> %1, <16 x i8> %2, <16 x i8> %3)
typedef struct {
char16 c0;
@ -779,23 +779,23 @@ typedef struct {
char16 c4;
} struct_vc5;
TEST(struct_vc5)
// CHECK: define swiftcc void @return_struct_vc5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define swiftcc void @take_struct_vc5([[STRUCT]]
// CHECK: define{{.*}} swiftcc void @return_struct_vc5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define{{.*}} swiftcc void @take_struct_vc5([[STRUCT]]
typedef struct {
short8 c0;
} struct_vs1;
TEST(struct_vs1)
// CHECK-LABEL: define swiftcc <8 x i16> @return_struct_vs1()
// CHECK-LABEL: define swiftcc void @take_struct_vs1(<8 x i16> %0)
// CHECK-LABEL: define{{.*}} swiftcc <8 x i16> @return_struct_vs1()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vs1(<8 x i16> %0)
typedef struct {
short8 c0;
short8 c1;
} struct_vs2;
TEST(struct_vs2)
// CHECK-LABEL: define swiftcc { <8 x i16>, <8 x i16> } @return_struct_vs2()
// CHECK-LABEL: define swiftcc void @take_struct_vs2(<8 x i16> %0, <8 x i16> %1)
// CHECK-LABEL: define{{.*}} swiftcc { <8 x i16>, <8 x i16> } @return_struct_vs2()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vs2(<8 x i16> %0, <8 x i16> %1)
typedef struct {
short8 c0;
@ -803,8 +803,8 @@ typedef struct {
short8 c2;
} struct_vs3;
TEST(struct_vs3)
// CHECK-LABEL: define swiftcc { <8 x i16>, <8 x i16>, <8 x i16> } @return_struct_vs3()
// CHECK-LABEL: define swiftcc void @take_struct_vs3(<8 x i16> %0, <8 x i16> %1, <8 x i16> %2)
// CHECK-LABEL: define{{.*}} swiftcc { <8 x i16>, <8 x i16>, <8 x i16> } @return_struct_vs3()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vs3(<8 x i16> %0, <8 x i16> %1, <8 x i16> %2)
typedef struct {
short8 c0;
@ -813,8 +813,8 @@ typedef struct {
short8 c3;
} struct_vs4;
TEST(struct_vs4)
// CHECK-LABEL: define swiftcc { <8 x i16>, <8 x i16>, <8 x i16>, <8 x i16> } @return_struct_vs4()
// CHECK-LABEL: define swiftcc void @take_struct_vs4(<8 x i16> %0, <8 x i16> %1, <8 x i16> %2, <8 x i16> %3)
// CHECK-LABEL: define{{.*}} swiftcc { <8 x i16>, <8 x i16>, <8 x i16>, <8 x i16> } @return_struct_vs4()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vs4(<8 x i16> %0, <8 x i16> %1, <8 x i16> %2, <8 x i16> %3)
typedef struct {
short8 c0;
@ -824,23 +824,23 @@ typedef struct {
short8 c4;
} struct_vs5;
TEST(struct_vs5)
// CHECK: define swiftcc void @return_struct_vs5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define swiftcc void @take_struct_vs5([[STRUCT]]
// CHECK: define{{.*}} swiftcc void @return_struct_vs5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define{{.*}} swiftcc void @take_struct_vs5([[STRUCT]]
typedef struct {
int4 c0;
} struct_vi1;
TEST(struct_vi1)
// CHECK-LABEL: define swiftcc <4 x i32> @return_struct_vi1()
// CHECK-LABEL: define swiftcc void @take_struct_vi1(<4 x i32> %0)
// CHECK-LABEL: define{{.*}} swiftcc <4 x i32> @return_struct_vi1()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vi1(<4 x i32> %0)
typedef struct {
int4 c0;
int4 c1;
} struct_vi2;
TEST(struct_vi2)
// CHECK-LABEL: define swiftcc { <4 x i32>, <4 x i32> } @return_struct_vi2()
// CHECK-LABEL: define swiftcc void @take_struct_vi2(<4 x i32> %0, <4 x i32> %1)
// CHECK-LABEL: define{{.*}} swiftcc { <4 x i32>, <4 x i32> } @return_struct_vi2()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vi2(<4 x i32> %0, <4 x i32> %1)
typedef struct {
int4 c0;
@ -848,8 +848,8 @@ typedef struct {
int4 c2;
} struct_vi3;
TEST(struct_vi3)
// CHECK-LABEL: define swiftcc { <4 x i32>, <4 x i32>, <4 x i32> } @return_struct_vi3()
// CHECK-LABEL: define swiftcc void @take_struct_vi3(<4 x i32> %0, <4 x i32> %1, <4 x i32> %2)
// CHECK-LABEL: define{{.*}} swiftcc { <4 x i32>, <4 x i32>, <4 x i32> } @return_struct_vi3()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vi3(<4 x i32> %0, <4 x i32> %1, <4 x i32> %2)
typedef struct {
int4 c0;
@ -858,8 +858,8 @@ typedef struct {
int4 c3;
} struct_vi4;
TEST(struct_vi4)
// CHECK-LABEL: define swiftcc { <4 x i32>, <4 x i32>, <4 x i32>, <4 x i32> } @return_struct_vi4()
// CHECK-LABEL: define swiftcc void @take_struct_vi4(<4 x i32> %0, <4 x i32> %1, <4 x i32> %2, <4 x i32> %3)
// CHECK-LABEL: define{{.*}} swiftcc { <4 x i32>, <4 x i32>, <4 x i32>, <4 x i32> } @return_struct_vi4()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vi4(<4 x i32> %0, <4 x i32> %1, <4 x i32> %2, <4 x i32> %3)
typedef struct {
int4 c0;
@ -869,15 +869,15 @@ typedef struct {
int4 c4;
} struct_vi5;
TEST(struct_vi5)
// CHECK: define swiftcc void @return_struct_vi5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define swiftcc void @take_struct_vi5([[STRUCT]]
// CHECK: define{{.*}} swiftcc void @return_struct_vi5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define{{.*}} swiftcc void @take_struct_vi5([[STRUCT]]
typedef struct {
long2 c0;
} struct_vl1;
TEST(struct_vl1)
// CHECK-LABEL: define swiftcc <2 x i64> @return_struct_vl1()
// CHECK-LABEL: define swiftcc void @take_struct_vl1(<2 x i64> %0)
// CHECK-LABEL: define{{.*}} swiftcc <2 x i64> @return_struct_vl1()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vl1(<2 x i64> %0)
typedef struct {
long2 c0;
@ -886,8 +886,8 @@ typedef struct {
long2 c3;
} struct_vl4;
TEST(struct_vl4)
// CHECK-LABEL: define swiftcc { <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } @return_struct_vl4()
// CHECK-LABEL: define swiftcc void @take_struct_vl4(<2 x i64> %0, <2 x i64> %1, <2 x i64> %2, <2 x i64> %3)
// CHECK-LABEL: define{{.*}} swiftcc { <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } @return_struct_vl4()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vl4(<2 x i64> %0, <2 x i64> %1, <2 x i64> %2, <2 x i64> %3)
typedef struct {
long2 c0;
@ -897,15 +897,15 @@ typedef struct {
long2 c4;
} struct_vl5;
TEST(struct_vl5)
// CHECK: define swiftcc void @return_struct_vl5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define swiftcc void @take_struct_vl5([[STRUCT]]
// CHECK: define{{.*}} swiftcc void @return_struct_vl5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define{{.*}} swiftcc void @take_struct_vl5([[STRUCT]]
typedef struct {
double2 c0;
} struct_vd1;
TEST(struct_vd1)
// CHECK-LABEL: define swiftcc <2 x double> @return_struct_vd1()
// CHECK-LABEL: define swiftcc void @take_struct_vd1(<2 x double> %0)
// CHECK-LABEL: define{{.*}} swiftcc <2 x double> @return_struct_vd1()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vd1(<2 x double> %0)
typedef struct {
double2 c0;
@ -914,8 +914,8 @@ typedef struct {
double2 c3;
} struct_vd4;
TEST(struct_vd4)
// CHECK-LABEL: define swiftcc { <2 x double>, <2 x double>, <2 x double>, <2 x double> } @return_struct_vd4()
// CHECK-LABEL: define swiftcc void @take_struct_vd4(<2 x double> %0, <2 x double> %1, <2 x double> %2, <2 x double> %3)
// CHECK-LABEL: define{{.*}} swiftcc { <2 x double>, <2 x double>, <2 x double>, <2 x double> } @return_struct_vd4()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vd4(<2 x double> %0, <2 x double> %1, <2 x double> %2, <2 x double> %3)
typedef struct {
double2 c0;
@ -925,23 +925,23 @@ typedef struct {
double2 c4;
} struct_vd5;
TEST(struct_vd5)
// CHECK: define swiftcc void @return_struct_vd5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define swiftcc void @take_struct_vd5([[STRUCT]]
// CHECK: define{{.*}} swiftcc void @return_struct_vd5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define{{.*}} swiftcc void @take_struct_vd5([[STRUCT]]
typedef struct {
double4 c0;
} struct_vd41;
TEST(struct_vd41)
// CHECK-LABEL: define swiftcc { <2 x double>, <2 x double> } @return_struct_vd41()
// CHECK-LABEL: define swiftcc void @take_struct_vd41(<2 x double> %0, <2 x double> %1)
// CHECK-LABEL: define{{.*}} swiftcc { <2 x double>, <2 x double> } @return_struct_vd41()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vd41(<2 x double> %0, <2 x double> %1)
typedef struct {
double4 c0;
double4 c1;
} struct_vd42;
TEST(struct_vd42)
// CHECK-LABEL: define swiftcc { <2 x double>, <2 x double>, <2 x double>, <2 x double> } @return_struct_vd42()
// CHECK-LABEL: define swiftcc void @take_struct_vd42(<2 x double> %0, <2 x double> %1, <2 x double> %2, <2 x double> %3)
// CHECK-LABEL: define{{.*}} swiftcc { <2 x double>, <2 x double>, <2 x double>, <2 x double> } @return_struct_vd42()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vd42(<2 x double> %0, <2 x double> %1, <2 x double> %2, <2 x double> %3)
typedef struct {
double4 c0;
@ -949,23 +949,23 @@ typedef struct {
double4 c2;
} struct_vd43;
TEST(struct_vd43)
// CHECK: define swiftcc void @return_struct_vd43([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define swiftcc void @take_struct_vd43([[STRUCT]]
// CHECK: define{{.*}} swiftcc void @return_struct_vd43([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define{{.*}} swiftcc void @take_struct_vd43([[STRUCT]]
typedef struct {
float4 c0;
} struct_vf1;
TEST(struct_vf1)
// CHECK-LABEL: define swiftcc <4 x float> @return_struct_vf1()
// CHECK-LABEL: define swiftcc void @take_struct_vf1(<4 x float> %0)
// CHECK-LABEL: define{{.*}} swiftcc <4 x float> @return_struct_vf1()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vf1(<4 x float> %0)
typedef struct {
float4 c0;
float4 c1;
} struct_vf2;
TEST(struct_vf2)
// CHECK-LABEL: define swiftcc { <4 x float>, <4 x float> } @return_struct_vf2()
// CHECK-LABEL: define swiftcc void @take_struct_vf2(<4 x float> %0, <4 x float> %1)
// CHECK-LABEL: define{{.*}} swiftcc { <4 x float>, <4 x float> } @return_struct_vf2()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vf2(<4 x float> %0, <4 x float> %1)
typedef struct {
float4 c0;
@ -974,8 +974,8 @@ typedef struct {
float4 c3;
} struct_vf4;
TEST(struct_vf4)
// CHECK-LABEL: define swiftcc { <4 x float>, <4 x float>, <4 x float>, <4 x float> } @return_struct_vf4()
// CHECK-LABEL: define swiftcc void @take_struct_vf4(<4 x float> %0, <4 x float> %1, <4 x float> %2, <4 x float> %3)
// CHECK-LABEL: define{{.*}} swiftcc { <4 x float>, <4 x float>, <4 x float>, <4 x float> } @return_struct_vf4()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vf4(<4 x float> %0, <4 x float> %1, <4 x float> %2, <4 x float> %3)
typedef struct {
float4 c0;
@ -985,15 +985,15 @@ typedef struct {
float4 c4;
} struct_vf5;
TEST(struct_vf5)
// CHECK: define swiftcc void @return_struct_vf5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define swiftcc void @take_struct_vf5([[STRUCT]]
// CHECK: define{{.*}} swiftcc void @return_struct_vf5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define{{.*}} swiftcc void @take_struct_vf5([[STRUCT]]
typedef struct {
float8 c0;
} struct_vf81;
TEST(struct_vf81)
// CHECK-LABEL: define swiftcc { <4 x float>, <4 x float> } @return_struct_vf81()
// CHECK-LABEL: define swiftcc void @take_struct_vf81(<4 x float> %0, <4 x float> %1)
// CHECK-LABEL: define{{.*}} swiftcc { <4 x float>, <4 x float> } @return_struct_vf81()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vf81(<4 x float> %0, <4 x float> %1)
// Don't crash.
typedef union {
@ -1010,15 +1010,15 @@ struct {
} s;
} union_het_vecint;
TEST(union_het_vecint)
// CHECK: define swiftcc void @return_union_het_vecint([[UNION:%.*]]* noalias sret([[UNION]])
// CHECK: define swiftcc void @take_union_het_vecint([[UNION]]*
// CHECK: define{{.*}} swiftcc void @return_union_het_vecint([[UNION:%.*]]* noalias sret([[UNION]])
// CHECK: define{{.*}} swiftcc void @take_union_het_vecint([[UNION]]*
typedef struct {
float3 f3;
} struct_v1f3;
TEST(struct_v1f3)
// ARM64-LABEL: define swiftcc { <2 x float>, float } @return_struct_v1f3()
// ARM64-LABEL: define swiftcc void @take_struct_v1f3(<2 x float> %0, float %1)
// ARM64-LABEL: define{{.*}} swiftcc { <2 x float>, float } @return_struct_v1f3()
// ARM64-LABEL: define{{.*}} swiftcc void @take_struct_v1f3(<2 x float> %0, float %1)
typedef struct {
int3 vect;
@ -1040,7 +1040,7 @@ TEST(union_hom_fp_partial2)
// At one point, we emitted lifetime.ends without a matching lifetime.start for
// CoerceAndExpanded args. Since we're not performing optimizations, neither
// intrinsic should be emitted.
// CHECK-LABEL: define void @no_lifetime_markers
// CHECK-LABEL: define{{.*}} void @no_lifetime_markers
void no_lifetime_markers() {
// CHECK-NOT: call void @llvm.lifetime.
take_int5(return_int5());

View File

@ -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
@ -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

View File

@ -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.
@ -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.

View File

@ -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> %{{.*}})
@ -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> %{{.*}})
@ -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>
@ -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>

View File

@ -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
// 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
// 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
// FP128: @x ={{.*}} global fp128 {{.*}}, align 16
// FP128: @size ={{.*}} global i32 16
long double foo(long double d) { return d; }

View File

@ -23,8 +23,8 @@ 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;
}
@ -32,10 +32,10 @@ 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;
}
@ -43,10 +43,10 @@ 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;
}

View File

@ -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;
@ -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;
@ -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;
@ -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,
@ -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
@ -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
@ -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)

View File

@ -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; };

View File

@ -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;
@ -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;
}
@ -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;

View File

@ -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;
}

View File

@ -4,70 +4,70 @@
#include <arm_neon.h>
// CHECK-LABEL: define i8 @test_vget_lane_u8(<8 x i8> %a) #0 {
// CHECK-LABEL: define{{.*}} i8 @test_vget_lane_u8(<8 x i8> %a) #0 {
// CHECK: [[VGET_LANE:%.*]] = extractelement <8 x i8> %a, i32 7
// CHECK: ret i8 [[VGET_LANE]]
uint8_t test_vget_lane_u8(uint8x8_t a) {
return vget_lane_u8(a, 7);
}
// CHECK-LABEL: define i16 @test_vget_lane_u16(<4 x i16> %a) #0 {
// CHECK-LABEL: define{{.*}} i16 @test_vget_lane_u16(<4 x i16> %a) #0 {
// CHECK: [[VGET_LANE:%.*]] = extractelement <4 x i16> %a, i32 3
// CHECK: ret i16 [[VGET_LANE]]
uint16_t test_vget_lane_u16(uint16x4_t a) {
return vget_lane_u16(a, 3);
}
// CHECK-LABEL: define i32 @test_vget_lane_u32(<2 x i32> %a) #0 {
// CHECK-LABEL: define{{.*}} i32 @test_vget_lane_u32(<2 x i32> %a) #0 {
// CHECK: [[VGET_LANE:%.*]] = extractelement <2 x i32> %a, i32 1
// CHECK: ret i32 [[VGET_LANE]]
uint32_t test_vget_lane_u32(uint32x2_t a) {
return vget_lane_u32(a, 1);
}
// CHECK-LABEL: define i8 @test_vget_lane_s8(<8 x i8> %a) #0 {
// CHECK-LABEL: define{{.*}} i8 @test_vget_lane_s8(<8 x i8> %a) #0 {
// CHECK: [[VGET_LANE:%.*]] = extractelement <8 x i8> %a, i32 7
// CHECK: ret i8 [[VGET_LANE]]
int8_t test_vget_lane_s8(int8x8_t a) {
return vget_lane_s8(a, 7);
}
// CHECK-LABEL: define i16 @test_vget_lane_s16(<4 x i16> %a) #0 {
// CHECK-LABEL: define{{.*}} i16 @test_vget_lane_s16(<4 x i16> %a) #0 {
// CHECK: [[VGET_LANE:%.*]] = extractelement <4 x i16> %a, i32 3
// CHECK: ret i16 [[VGET_LANE]]
int16_t test_vget_lane_s16(int16x4_t a) {
return vget_lane_s16(a, 3);
}
// CHECK-LABEL: define i32 @test_vget_lane_s32(<2 x i32> %a) #0 {
// CHECK-LABEL: define{{.*}} i32 @test_vget_lane_s32(<2 x i32> %a) #0 {
// CHECK: [[VGET_LANE:%.*]] = extractelement <2 x i32> %a, i32 1
// CHECK: ret i32 [[VGET_LANE]]
int32_t test_vget_lane_s32(int32x2_t a) {
return vget_lane_s32(a, 1);
}
// CHECK-LABEL: define i8 @test_vget_lane_p8(<8 x i8> %a) #0 {
// CHECK-LABEL: define{{.*}} i8 @test_vget_lane_p8(<8 x i8> %a) #0 {
// CHECK: [[VGET_LANE:%.*]] = extractelement <8 x i8> %a, i32 7
// CHECK: ret i8 [[VGET_LANE]]
poly8_t test_vget_lane_p8(poly8x8_t a) {
return vget_lane_p8(a, 7);
}
// CHECK-LABEL: define i16 @test_vget_lane_p16(<4 x i16> %a) #0 {
// CHECK-LABEL: define{{.*}} i16 @test_vget_lane_p16(<4 x i16> %a) #0 {
// CHECK: [[VGET_LANE:%.*]] = extractelement <4 x i16> %a, i32 3
// CHECK: ret i16 [[VGET_LANE]]
poly16_t test_vget_lane_p16(poly16x4_t a) {
return vget_lane_p16(a, 3);
}
// CHECK-LABEL: define float @test_vget_lane_f32(<2 x float> %a) #0 {
// CHECK-LABEL: define{{.*}} float @test_vget_lane_f32(<2 x float> %a) #0 {
// CHECK: [[VGET_LANE:%.*]] = extractelement <2 x float> %a, i32 1
// CHECK: ret float [[VGET_LANE]]
float32_t test_vget_lane_f32(float32x2_t a) {
return vget_lane_f32(a, 1);
}
// CHECK-LABEL: define float @test_vget_lane_f16(<4 x half> %a) #0 {
// CHECK-LABEL: define{{.*}} float @test_vget_lane_f16(<4 x half> %a) #0 {
// CHECK: [[__REINT_242:%.*]] = alloca <4 x half>, align 8
// CHECK: [[__REINT1_242:%.*]] = alloca i16, align 2
// CHECK: store <4 x half> %a, <4 x half>* [[__REINT_242]], align 8
@ -83,70 +83,70 @@ float32_t test_vget_lane_f16(float16x4_t a) {
return vget_lane_f16(a, 1);
}
// CHECK-LABEL: define i8 @test_vgetq_lane_u8(<16 x i8> %a) #1 {
// CHECK-LABEL: define{{.*}} i8 @test_vgetq_lane_u8(<16 x i8> %a) #1 {
// CHECK: [[VGETQ_LANE:%.*]] = extractelement <16 x i8> %a, i32 15
// CHECK: ret i8 [[VGETQ_LANE]]
uint8_t test_vgetq_lane_u8(uint8x16_t a) {
return vgetq_lane_u8(a, 15);
}
// CHECK-LABEL: define i16 @test_vgetq_lane_u16(<8 x i16> %a) #1 {
// CHECK-LABEL: define{{.*}} i16 @test_vgetq_lane_u16(<8 x i16> %a) #1 {
// CHECK: [[VGETQ_LANE:%.*]] = extractelement <8 x i16> %a, i32 7
// CHECK: ret i16 [[VGETQ_LANE]]
uint16_t test_vgetq_lane_u16(uint16x8_t a) {
return vgetq_lane_u16(a, 7);
}
// CHECK-LABEL: define i32 @test_vgetq_lane_u32(<4 x i32> %a) #1 {
// CHECK-LABEL: define{{.*}} i32 @test_vgetq_lane_u32(<4 x i32> %a) #1 {
// CHECK: [[VGETQ_LANE:%.*]] = extractelement <4 x i32> %a, i32 3
// CHECK: ret i32 [[VGETQ_LANE]]
uint32_t test_vgetq_lane_u32(uint32x4_t a) {
return vgetq_lane_u32(a, 3);
}
// CHECK-LABEL: define i8 @test_vgetq_lane_s8(<16 x i8> %a) #1 {
// CHECK-LABEL: define{{.*}} i8 @test_vgetq_lane_s8(<16 x i8> %a) #1 {
// CHECK: [[VGETQ_LANE:%.*]] = extractelement <16 x i8> %a, i32 15
// CHECK: ret i8 [[VGETQ_LANE]]
int8_t test_vgetq_lane_s8(int8x16_t a) {
return vgetq_lane_s8(a, 15);
}
// CHECK-LABEL: define i16 @test_vgetq_lane_s16(<8 x i16> %a) #1 {
// CHECK-LABEL: define{{.*}} i16 @test_vgetq_lane_s16(<8 x i16> %a) #1 {
// CHECK: [[VGETQ_LANE:%.*]] = extractelement <8 x i16> %a, i32 7
// CHECK: ret i16 [[VGETQ_LANE]]
int16_t test_vgetq_lane_s16(int16x8_t a) {
return vgetq_lane_s16(a, 7);
}
// CHECK-LABEL: define i32 @test_vgetq_lane_s32(<4 x i32> %a) #1 {
// CHECK-LABEL: define{{.*}} i32 @test_vgetq_lane_s32(<4 x i32> %a) #1 {
// CHECK: [[VGETQ_LANE:%.*]] = extractelement <4 x i32> %a, i32 3
// CHECK: ret i32 [[VGETQ_LANE]]
int32_t test_vgetq_lane_s32(int32x4_t a) {
return vgetq_lane_s32(a, 3);
}
// CHECK-LABEL: define i8 @test_vgetq_lane_p8(<16 x i8> %a) #1 {
// CHECK-LABEL: define{{.*}} i8 @test_vgetq_lane_p8(<16 x i8> %a) #1 {
// CHECK: [[VGETQ_LANE:%.*]] = extractelement <16 x i8> %a, i32 15
// CHECK: ret i8 [[VGETQ_LANE]]
poly8_t test_vgetq_lane_p8(poly8x16_t a) {
return vgetq_lane_p8(a, 15);
}
// CHECK-LABEL: define i16 @test_vgetq_lane_p16(<8 x i16> %a) #1 {
// CHECK-LABEL: define{{.*}} i16 @test_vgetq_lane_p16(<8 x i16> %a) #1 {
// CHECK: [[VGETQ_LANE:%.*]] = extractelement <8 x i16> %a, i32 7
// CHECK: ret i16 [[VGETQ_LANE]]
poly16_t test_vgetq_lane_p16(poly16x8_t a) {
return vgetq_lane_p16(a, 7);
}
// CHECK-LABEL: define float @test_vgetq_lane_f32(<4 x float> %a) #1 {
// CHECK-LABEL: define{{.*}} float @test_vgetq_lane_f32(<4 x float> %a) #1 {
// CHECK: [[VGETQ_LANE:%.*]] = extractelement <4 x float> %a, i32 3
// CHECK: ret float [[VGETQ_LANE]]
float32_t test_vgetq_lane_f32(float32x4_t a) {
return vgetq_lane_f32(a, 3);
}
// CHECK-LABEL: define float @test_vgetq_lane_f16(<8 x half> %a) #1 {
// CHECK-LABEL: define{{.*}} float @test_vgetq_lane_f16(<8 x half> %a) #1 {
// CHECK: [[__REINT_244:%.*]] = alloca <8 x half>, align 16
// CHECK: [[__REINT1_244:%.*]] = alloca i16, align 2
// CHECK: store <8 x half> %a, <8 x half>* [[__REINT_244]], align 16
@ -162,28 +162,28 @@ float32_t test_vgetq_lane_f16(float16x8_t a) {
return vgetq_lane_f16(a, 3);
}
// CHECK-LABEL: define i64 @test_vget_lane_s64(<1 x i64> %a) #0 {
// CHECK-LABEL: define{{.*}} i64 @test_vget_lane_s64(<1 x i64> %a) #0 {
// CHECK: [[VGET_LANE:%.*]] = extractelement <1 x i64> %a, i32 0
// CHECK: ret i64 [[VGET_LANE]]
int64_t test_vget_lane_s64(int64x1_t a) {
return vget_lane_s64(a, 0);
}
// CHECK-LABEL: define i64 @test_vget_lane_u64(<1 x i64> %a) #0 {
// CHECK-LABEL: define{{.*}} i64 @test_vget_lane_u64(<1 x i64> %a) #0 {
// CHECK: [[VGET_LANE:%.*]] = extractelement <1 x i64> %a, i32 0
// CHECK: ret i64 [[VGET_LANE]]
uint64_t test_vget_lane_u64(uint64x1_t a) {
return vget_lane_u64(a, 0);
}
// CHECK-LABEL: define i64 @test_vgetq_lane_s64(<2 x i64> %a) #1 {
// CHECK-LABEL: define{{.*}} i64 @test_vgetq_lane_s64(<2 x i64> %a) #1 {
// CHECK: [[VGETQ_LANE:%.*]] = extractelement <2 x i64> %a, i32 1
// CHECK: ret i64 [[VGETQ_LANE]]
int64_t test_vgetq_lane_s64(int64x2_t a) {
return vgetq_lane_s64(a, 1);
}
// CHECK-LABEL: define i64 @test_vgetq_lane_u64(<2 x i64> %a) #1 {
// CHECK-LABEL: define{{.*}} i64 @test_vgetq_lane_u64(<2 x i64> %a) #1 {
// CHECK: [[VGETQ_LANE:%.*]] = extractelement <2 x i64> %a, i32 1
// CHECK: ret i64 [[VGETQ_LANE]]
uint64_t test_vgetq_lane_u64(uint64x2_t a) {
@ -191,70 +191,70 @@ uint64_t test_vgetq_lane_u64(uint64x2_t a) {
}
// CHECK-LABEL: define <8 x i8> @test_vset_lane_u8(i8 %a, <8 x i8> %b) #0 {
// CHECK-LABEL: define{{.*}} <8 x i8> @test_vset_lane_u8(i8 %a, <8 x i8> %b) #0 {
// CHECK: [[VSET_LANE:%.*]] = insertelement <8 x i8> %b, i8 %a, i32 7
// CHECK: ret <8 x i8> [[VSET_LANE]]
uint8x8_t test_vset_lane_u8(uint8_t a, uint8x8_t b) {
return vset_lane_u8(a, b, 7);
}
// CHECK-LABEL: define <4 x i16> @test_vset_lane_u16(i16 %a, <4 x i16> %b) #0 {
// CHECK-LABEL: define{{.*}} <4 x i16> @test_vset_lane_u16(i16 %a, <4 x i16> %b) #0 {
// CHECK: [[VSET_LANE:%.*]] = insertelement <4 x i16> %b, i16 %a, i32 3
// CHECK: ret <4 x i16> [[VSET_LANE]]
uint16x4_t test_vset_lane_u16(uint16_t a, uint16x4_t b) {
return vset_lane_u16(a, b, 3);
}
// CHECK-LABEL: define <2 x i32> @test_vset_lane_u32(i32 %a, <2 x i32> %b) #0 {
// CHECK-LABEL: define{{.*}} <2 x i32> @test_vset_lane_u32(i32 %a, <2 x i32> %b) #0 {
// CHECK: [[VSET_LANE:%.*]] = insertelement <2 x i32> %b, i32 %a, i32 1
// CHECK: ret <2 x i32> [[VSET_LANE]]
uint32x2_t test_vset_lane_u32(uint32_t a, uint32x2_t b) {
return vset_lane_u32(a, b, 1);
}
// CHECK-LABEL: define <8 x i8> @test_vset_lane_s8(i8 %a, <8 x i8> %b) #0 {
// CHECK-LABEL: define{{.*}} <8 x i8> @test_vset_lane_s8(i8 %a, <8 x i8> %b) #0 {
// CHECK: [[VSET_LANE:%.*]] = insertelement <8 x i8> %b, i8 %a, i32 7
// CHECK: ret <8 x i8> [[VSET_LANE]]
int8x8_t test_vset_lane_s8(int8_t a, int8x8_t b) {
return vset_lane_s8(a, b, 7);
}
// CHECK-LABEL: define <4 x i16> @test_vset_lane_s16(i16 %a, <4 x i16> %b) #0 {
// CHECK-LABEL: define{{.*}} <4 x i16> @test_vset_lane_s16(i16 %a, <4 x i16> %b) #0 {
// CHECK: [[VSET_LANE:%.*]] = insertelement <4 x i16> %b, i16 %a, i32 3
// CHECK: ret <4 x i16> [[VSET_LANE]]
int16x4_t test_vset_lane_s16(int16_t a, int16x4_t b) {
return vset_lane_s16(a, b, 3);
}
// CHECK-LABEL: define <2 x i32> @test_vset_lane_s32(i32 %a, <2 x i32> %b) #0 {
// CHECK-LABEL: define{{.*}} <2 x i32> @test_vset_lane_s32(i32 %a, <2 x i32> %b) #0 {
// CHECK: [[VSET_LANE:%.*]] = insertelement <2 x i32> %b, i32 %a, i32 1
// CHECK: ret <2 x i32> [[VSET_LANE]]
int32x2_t test_vset_lane_s32(int32_t a, int32x2_t b) {
return vset_lane_s32(a, b, 1);
}
// CHECK-LABEL: define <8 x i8> @test_vset_lane_p8(i8 %a, <8 x i8> %b) #0 {
// CHECK-LABEL: define{{.*}} <8 x i8> @test_vset_lane_p8(i8 %a, <8 x i8> %b) #0 {
// CHECK: [[VSET_LANE:%.*]] = insertelement <8 x i8> %b, i8 %a, i32 7
// CHECK: ret <8 x i8> [[VSET_LANE]]
poly8x8_t test_vset_lane_p8(poly8_t a, poly8x8_t b) {
return vset_lane_p8(a, b, 7);
}
// CHECK-LABEL: define <4 x i16> @test_vset_lane_p16(i16 %a, <4 x i16> %b) #0 {
// CHECK-LABEL: define{{.*}} <4 x i16> @test_vset_lane_p16(i16 %a, <4 x i16> %b) #0 {
// CHECK: [[VSET_LANE:%.*]] = insertelement <4 x i16> %b, i16 %a, i32 3
// CHECK: ret <4 x i16> [[VSET_LANE]]
poly16x4_t test_vset_lane_p16(poly16_t a, poly16x4_t b) {
return vset_lane_p16(a, b, 3);
}
// CHECK-LABEL: define <2 x float> @test_vset_lane_f32(float %a, <2 x float> %b) #0 {
// CHECK-LABEL: define{{.*}} <2 x float> @test_vset_lane_f32(float %a, <2 x float> %b) #0 {
// CHECK: [[VSET_LANE:%.*]] = insertelement <2 x float> %b, float %a, i32 1
// CHECK: ret <2 x float> [[VSET_LANE]]
float32x2_t test_vset_lane_f32(float32_t a, float32x2_t b) {
return vset_lane_f32(a, b, 1);
}
// CHECK-LABEL: define <4 x half> @test_vset_lane_f16(half* %a, <4 x half> %b) #0 {
// CHECK-LABEL: define{{.*}} <4 x half> @test_vset_lane_f16(half* %a, <4 x half> %b) #0 {
// CHECK: [[__REINT_246:%.*]] = alloca half, align 2
// CHECK: [[__REINT1_246:%.*]] = alloca <4 x half>, align 8
// CHECK: [[__REINT2_246:%.*]] = alloca <4 x i16>, align 8
@ -274,70 +274,70 @@ float16x4_t test_vset_lane_f16(float16_t *a, float16x4_t b) {
return vset_lane_f16(*a, b, 3);
}
// CHECK-LABEL: define <16 x i8> @test_vsetq_lane_u8(i8 %a, <16 x i8> %b) #1 {
// CHECK-LABEL: define{{.*}} <16 x i8> @test_vsetq_lane_u8(i8 %a, <16 x i8> %b) #1 {
// CHECK: [[VSET_LANE:%.*]] = insertelement <16 x i8> %b, i8 %a, i32 15
// CHECK: ret <16 x i8> [[VSET_LANE]]
uint8x16_t test_vsetq_lane_u8(uint8_t a, uint8x16_t b) {
return vsetq_lane_u8(a, b, 15);
}
// CHECK-LABEL: define <8 x i16> @test_vsetq_lane_u16(i16 %a, <8 x i16> %b) #1 {
// CHECK-LABEL: define{{.*}} <8 x i16> @test_vsetq_lane_u16(i16 %a, <8 x i16> %b) #1 {
// CHECK: [[VSET_LANE:%.*]] = insertelement <8 x i16> %b, i16 %a, i32 7
// CHECK: ret <8 x i16> [[VSET_LANE]]
uint16x8_t test_vsetq_lane_u16(uint16_t a, uint16x8_t b) {
return vsetq_lane_u16(a, b, 7);
}
// CHECK-LABEL: define <4 x i32> @test_vsetq_lane_u32(i32 %a, <4 x i32> %b) #1 {
// CHECK-LABEL: define{{.*}} <4 x i32> @test_vsetq_lane_u32(i32 %a, <4 x i32> %b) #1 {
// CHECK: [[VSET_LANE:%.*]] = insertelement <4 x i32> %b, i32 %a, i32 3
// CHECK: ret <4 x i32> [[VSET_LANE]]
uint32x4_t test_vsetq_lane_u32(uint32_t a, uint32x4_t b) {
return vsetq_lane_u32(a, b, 3);
}
// CHECK-LABEL: define <16 x i8> @test_vsetq_lane_s8(i8 %a, <16 x i8> %b) #1 {
// CHECK-LABEL: define{{.*}} <16 x i8> @test_vsetq_lane_s8(i8 %a, <16 x i8> %b) #1 {
// CHECK: [[VSET_LANE:%.*]] = insertelement <16 x i8> %b, i8 %a, i32 15
// CHECK: ret <16 x i8> [[VSET_LANE]]
int8x16_t test_vsetq_lane_s8(int8_t a, int8x16_t b) {
return vsetq_lane_s8(a, b, 15);
}
// CHECK-LABEL: define <8 x i16> @test_vsetq_lane_s16(i16 %a, <8 x i16> %b) #1 {
// CHECK-LABEL: define{{.*}} <8 x i16> @test_vsetq_lane_s16(i16 %a, <8 x i16> %b) #1 {
// CHECK: [[VSET_LANE:%.*]] = insertelement <8 x i16> %b, i16 %a, i32 7
// CHECK: ret <8 x i16> [[VSET_LANE]]
int16x8_t test_vsetq_lane_s16(int16_t a, int16x8_t b) {
return vsetq_lane_s16(a, b, 7);
}
// CHECK-LABEL: define <4 x i32> @test_vsetq_lane_s32(i32 %a, <4 x i32> %b) #1 {
// CHECK-LABEL: define{{.*}} <4 x i32> @test_vsetq_lane_s32(i32 %a, <4 x i32> %b) #1 {
// CHECK: [[VSET_LANE:%.*]] = insertelement <4 x i32> %b, i32 %a, i32 3
// CHECK: ret <4 x i32> [[VSET_LANE]]
int32x4_t test_vsetq_lane_s32(int32_t a, int32x4_t b) {
return vsetq_lane_s32(a, b, 3);
}
// CHECK-LABEL: define <16 x i8> @test_vsetq_lane_p8(i8 %a, <16 x i8> %b) #1 {
// CHECK-LABEL: define{{.*}} <16 x i8> @test_vsetq_lane_p8(i8 %a, <16 x i8> %b) #1 {
// CHECK: [[VSET_LANE:%.*]] = insertelement <16 x i8> %b, i8 %a, i32 15
// CHECK: ret <16 x i8> [[VSET_LANE]]
poly8x16_t test_vsetq_lane_p8(poly8_t a, poly8x16_t b) {
return vsetq_lane_p8(a, b, 15);
}
// CHECK-LABEL: define <8 x i16> @test_vsetq_lane_p16(i16 %a, <8 x i16> %b) #1 {
// CHECK-LABEL: define{{.*}} <8 x i16> @test_vsetq_lane_p16(i16 %a, <8 x i16> %b) #1 {
// CHECK: [[VSET_LANE:%.*]] = insertelement <8 x i16> %b, i16 %a, i32 7
// CHECK: ret <8 x i16> [[VSET_LANE]]
poly16x8_t test_vsetq_lane_p16(poly16_t a, poly16x8_t b) {
return vsetq_lane_p16(a, b, 7);
}
// CHECK-LABEL: define <4 x float> @test_vsetq_lane_f32(float %a, <4 x float> %b) #1 {
// CHECK-LABEL: define{{.*}} <4 x float> @test_vsetq_lane_f32(float %a, <4 x float> %b) #1 {
// CHECK: [[VSET_LANE:%.*]] = insertelement <4 x float> %b, float %a, i32 3
// CHECK: ret <4 x float> [[VSET_LANE]]
float32x4_t test_vsetq_lane_f32(float32_t a, float32x4_t b) {
return vsetq_lane_f32(a, b, 3);
}
// CHECK-LABEL: define <8 x half> @test_vsetq_lane_f16(half* %a, <8 x half> %b) #1 {
// CHECK-LABEL: define{{.*}} <8 x half> @test_vsetq_lane_f16(half* %a, <8 x half> %b) #1 {
// CHECK: [[__REINT_248:%.*]] = alloca half, align 2
// CHECK: [[__REINT1_248:%.*]] = alloca <8 x half>, align 16
// CHECK: [[__REINT2_248:%.*]] = alloca <8 x i16>, align 16
@ -357,28 +357,28 @@ float16x8_t test_vsetq_lane_f16(float16_t *a, float16x8_t b) {
return vsetq_lane_f16(*a, b, 7);
}
// CHECK-LABEL: define <1 x i64> @test_vset_lane_s64(i64 %a, <1 x i64> %b) #0 {
// CHECK-LABEL: define{{.*}} <1 x i64> @test_vset_lane_s64(i64 %a, <1 x i64> %b) #0 {
// CHECK: [[VSET_LANE:%.*]] = insertelement <1 x i64> %b, i64 %a, i32 0
// CHECK: ret <1 x i64> [[VSET_LANE]]
int64x1_t test_vset_lane_s64(int64_t a, int64x1_t b) {
return vset_lane_s64(a, b, 0);
}
// CHECK-LABEL: define <1 x i64> @test_vset_lane_u64(i64 %a, <1 x i64> %b) #0 {
// CHECK-LABEL: define{{.*}} <1 x i64> @test_vset_lane_u64(i64 %a, <1 x i64> %b) #0 {
// CHECK: [[VSET_LANE:%.*]] = insertelement <1 x i64> %b, i64 %a, i32 0
// CHECK: ret <1 x i64> [[VSET_LANE]]
uint64x1_t test_vset_lane_u64(uint64_t a, uint64x1_t b) {
return vset_lane_u64(a, b, 0);
}
// CHECK-LABEL: define <2 x i64> @test_vsetq_lane_s64(i64 %a, <2 x i64> %b) #1 {
// CHECK-LABEL: define{{.*}} <2 x i64> @test_vsetq_lane_s64(i64 %a, <2 x i64> %b) #1 {
// CHECK: [[VSET_LANE:%.*]] = insertelement <2 x i64> %b, i64 %a, i32 1
// CHECK: ret <2 x i64> [[VSET_LANE]]
int64x2_t test_vsetq_lane_s64(int64_t a, int64x2_t b) {
return vsetq_lane_s64(a, b, 1);
}
// CHECK-LABEL: define <2 x i64> @test_vsetq_lane_u64(i64 %a, <2 x i64> %b) #1 {
// CHECK-LABEL: define{{.*}} <2 x i64> @test_vsetq_lane_u64(i64 %a, <2 x i64> %b) #1 {
// CHECK: [[VSET_LANE:%.*]] = insertelement <2 x i64> %b, i64 %a, i32 1
// CHECK: ret <2 x i64> [[VSET_LANE]]
uint64x2_t test_vsetq_lane_u64(uint64_t a, uint64x2_t b) {

View File

@ -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]]

View File

@ -1,20 +1,20 @@
// 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]; }
@ -22,7 +22,7 @@ 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)*
@ -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) {
@ -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.

View File

@ -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
@ -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

View File

@ -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;
}

View File

@ -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)
@ -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)

View File

@ -24,14 +24,14 @@ 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);
}
@ -39,23 +39,23 @@ struct homogeneous_struct test_struct_variadic(struct homogeneous_struct 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);
}
@ -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);
@ -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]);
}
@ -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)

View File

@ -2,77 +2,77 @@
// 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.
@ -80,59 +80,59 @@ union u12 f12(void) {}
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) {}
@ -140,18 +140,18 @@ _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() {}
@ -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; };
@ -204,7 +204,7 @@ 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*
@ -212,7 +212,7 @@ float32x4_t f35(int i, s35_with_align s1, s35_with_align s2) {
// 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>*

View File

@ -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

View File

@ -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"[^=]}}

View File

@ -12,24 +12,24 @@
/*****************************************************************************/
SWIFTCALL void indirect_result_1(OUT int *arg0, OUT float *arg1) {}
// CHECK-LABEL: define {{.*}} void @indirect_result_1(i32* noalias sret(i32*) align 4 dereferenceable(4){{.*}}, float* noalias align 4 dereferenceable(4){{.*}})
// CHECK-LABEL: define{{.*}} void @indirect_result_1(i32* noalias sret(i32*) align 4 dereferenceable(4){{.*}}, float* noalias align 4 dereferenceable(4){{.*}})
// TODO: maybe this shouldn't suppress sret.
SWIFTCALL int indirect_result_2(OUT int *arg0, OUT float *arg1) { __builtin_unreachable(); }
// CHECK-LABEL: define {{.*}} i32 @indirect_result_2(i32* noalias align 4 dereferenceable(4){{.*}}, float* noalias align 4 dereferenceable(4){{.*}})
// CHECK-LABEL: define{{.*}} i32 @indirect_result_2(i32* noalias align 4 dereferenceable(4){{.*}}, float* noalias align 4 dereferenceable(4){{.*}})
typedef struct { char array[1024]; } struct_reallybig;
SWIFTCALL struct_reallybig indirect_result_3(OUT int *arg0, OUT float *arg1) { __builtin_unreachable(); }
// CHECK-LABEL: define {{.*}} void @indirect_result_3({{.*}}* noalias sret(%struct.struct_reallybig) {{.*}}, i32* noalias align 4 dereferenceable(4){{.*}}, float* noalias align 4 dereferenceable(4){{.*}})
// CHECK-LABEL: define{{.*}} void @indirect_result_3({{.*}}* noalias sret(%struct.struct_reallybig) {{.*}}, i32* noalias align 4 dereferenceable(4){{.*}}, float* noalias align 4 dereferenceable(4){{.*}})
SWIFTCALL void context_1(CONTEXT void *self) {}
// CHECK-LABEL: define {{.*}} void @context_1(i8* swiftself
// CHECK-LABEL: define{{.*}} void @context_1(i8* swiftself
SWIFTCALL void context_2(void *arg0, CONTEXT void *self) {}
// CHECK-LABEL: define {{.*}} void @context_2(i8*{{.*}}, i8* swiftself
// CHECK-LABEL: define{{.*}} void @context_2(i8*{{.*}}, i8* swiftself
SWIFTCALL void context_error_1(CONTEXT int *self, ERROR float **error) {}
// CHECK-LABEL: define {{.*}} void @context_error_1(i32* swiftself{{.*}}, float** swifterror %0)
// CHECK-LABEL: define{{.*}} void @context_error_1(i32* swiftself{{.*}}, float** swifterror %0)
// CHECK: [[TEMP:%.*]] = alloca float*, align 4
// CHECK: [[T0:%.*]] = load float*, float** [[ERRORARG:%.*]], align 4
// CHECK: store float* [[T0]], float** [[TEMP]], align 4
@ -40,7 +40,7 @@ void test_context_error_1() {
float *error;
context_error_1(&x, &error);
}
// CHECK-LABEL: define void @test_context_error_1()
// CHECK-LABEL: define{{.*}} void @test_context_error_1()
// CHECK: [[X:%.*]] = alloca i32, align 4
// CHECK: [[ERROR:%.*]] = alloca float*, align 4
// CHECK: [[TEMP:%.*]] = alloca swifterror float*, align 4
@ -51,7 +51,7 @@ void test_context_error_1() {
// CHECK: store float* [[T0]], float** [[ERROR]], align 4
SWIFTCALL void context_error_2(short s, CONTEXT int *self, ERROR float **error) {}
// CHECK-LABEL: define {{.*}} void @context_error_2(i16{{.*}}, i32* swiftself{{.*}}, float** swifterror %0)
// CHECK-LABEL: define{{.*}} void @context_error_2(i16{{.*}}, i32* swiftself{{.*}}, float** swifterror %0)
/*****************************************************************************/
/********************************** LOWERING *********************************/
@ -88,9 +88,9 @@ typedef long long long2 __attribute__((ext_vector_type(2)));
typedef struct {
} struct_empty;
TEST(struct_empty);
// CHECK-LABEL: define {{.*}} @return_struct_empty()
// CHECK-LABEL: define{{.*}} @return_struct_empty()
// CHECK: ret void
// CHECK-LABEL: define {{.*}} @take_struct_empty()
// CHECK-LABEL: define{{.*}} @take_struct_empty()
// CHECK: ret void
typedef struct {
@ -101,7 +101,7 @@ typedef struct {
float f1;
} struct_1;
TEST(struct_1);
// CHECK-LABEL: define {{.*}} @return_struct_1()
// CHECK-LABEL: define{{.*}} @return_struct_1()
// CHECK: [[RET:%.*]] = alloca [[REC:%.*]], align 4
// CHECK: @llvm.memset
// CHECK: [[CAST_TMP:%.*]] = bitcast [[REC]]* [[RET]] to [[AGG:{ i32, i16, \[2 x i8\], float, float }]]*
@ -118,7 +118,7 @@ TEST(struct_1);
// CHECK: [[T2:%.*]] = insertvalue [[UAGG]] [[T1]], float [[THIRD]], 2
// CHECK: [[T3:%.*]] = insertvalue [[UAGG]] [[T2]], float [[FOURTH]], 3
// CHECK: ret [[UAGG]] [[T3]]
// CHECK-LABEL: define {{.*}} @take_struct_1(i32 %0, i16 %1, float %2, float %3)
// CHECK-LABEL: define{{.*}} @take_struct_1(i32 %0, i16 %1, float %2, float %3)
// CHECK: [[V:%.*]] = alloca [[REC]], align 4
// CHECK: [[CAST_TMP:%.*]] = bitcast [[REC]]* [[V]] to [[AGG]]*
// CHECK: [[T0:%.*]] = getelementptr inbounds [[AGG]], [[AGG]]* [[CAST_TMP]], i32 0, i32 0
@ -130,7 +130,7 @@ TEST(struct_1);
// CHECK: [[T0:%.*]] = getelementptr inbounds [[AGG]], [[AGG]]* [[CAST_TMP]], i32 0, i32 4
// CHECK: store float %3, float* [[T0]], align 4
// CHECK: ret void
// CHECK-LABEL: define void @test_struct_1()
// CHECK-LABEL: define{{.*}} void @test_struct_1()
// CHECK: [[TMP:%.*]] = alloca [[REC]], align 4
// CHECK: [[CALL:%.*]] = call [[SWIFTCC]] [[UAGG]] @return_struct_1()
// CHECK: [[CAST_TMP:%.*]] = bitcast [[REC]]* [[TMP]] to [[AGG]]*
@ -166,7 +166,7 @@ typedef struct {
float f1;
} struct_2;
TEST(struct_2);
// CHECK-LABEL: define {{.*}} @return_struct_2()
// CHECK-LABEL: define{{.*}} @return_struct_2()
// CHECK: [[RET:%.*]] = alloca [[REC:%.*]], align 4
// CHECK: @llvm.memcpy
// CHECK: [[CAST_TMP:%.*]] = bitcast [[REC]]* [[RET]] to [[AGG:{ i32, i32, float, float }]]*
@ -183,7 +183,7 @@ TEST(struct_2);
// CHECK: [[T2:%.*]] = insertvalue [[UAGG]] [[T1]], float [[THIRD]], 2
// CHECK: [[T3:%.*]] = insertvalue [[UAGG]] [[T2]], float [[FOURTH]], 3
// CHECK: ret [[UAGG]] [[T3]]
// CHECK-LABEL: define {{.*}} @take_struct_2(i32 %0, i32 %1, float %2, float %3)
// CHECK-LABEL: define{{.*}} @take_struct_2(i32 %0, i32 %1, float %2, float %3)
// CHECK: [[V:%.*]] = alloca [[REC]], align 4
// CHECK: [[CAST_TMP:%.*]] = bitcast [[REC]]* [[V]] to [[AGG]]*
// CHECK: [[T0:%.*]] = getelementptr inbounds [[AGG]], [[AGG]]* [[CAST_TMP]], i32 0, i32 0
@ -195,7 +195,7 @@ TEST(struct_2);
// CHECK: [[T0:%.*]] = getelementptr inbounds [[AGG]], [[AGG]]* [[CAST_TMP]], i32 0, i32 3
// CHECK: store float %3, float* [[T0]], align 4
// CHECK: ret void
// CHECK-LABEL: define void @test_struct_2()
// CHECK-LABEL: define{{.*}} void @test_struct_2()
// CHECK: [[TMP:%.*]] = alloca [[REC]], align 4
// CHECK: [[CALL:%.*]] = call [[SWIFTCC]] [[UAGG]] @return_struct_2()
// CHECK: [[CAST_TMP:%.*]] = bitcast [[REC]]* [[TMP]] to [[AGG]]*
@ -234,7 +234,7 @@ typedef struct {
__attribute__((packed)) float f;
} struct_misaligned_1;
TEST(struct_misaligned_1)
// CHECK-LABEL: define {{.*}} @return_struct_misaligned_1()
// CHECK-LABEL: define{{.*}} @return_struct_misaligned_1()
// CHECK: [[RET:%.*]] = alloca [[REC:%.*]], align
// CHECK: @llvm.memset
// CHECK: [[CAST_TMP:%.*]] = bitcast [[REC]]* [[RET]] to [[AGG:{ i32, i8 }]]*
@ -245,7 +245,7 @@ TEST(struct_misaligned_1)
// CHECK: [[T0:%.*]] = insertvalue [[UAGG:{ i32, i8 }]] undef, i32 [[FIRST]], 0
// CHECK: [[T1:%.*]] = insertvalue [[UAGG]] [[T0]], i8 [[SECOND]], 1
// CHECK: ret [[UAGG]] [[T1]]
// CHECK-LABEL: define {{.*}} @take_struct_misaligned_1(i32 %0, i8 %1)
// CHECK-LABEL: define{{.*}} @take_struct_misaligned_1(i32 %0, i8 %1)
// CHECK: [[V:%.*]] = alloca [[REC]], align
// CHECK: [[CAST_TMP:%.*]] = bitcast [[REC]]* [[V]] to [[AGG]]*
// CHECK: [[T0:%.*]] = getelementptr inbounds [[AGG]], [[AGG]]* [[CAST_TMP]], i32 0, i32 0
@ -260,10 +260,10 @@ typedef struct {
} struct_big_1;
TEST(struct_big_1)
// CHECK-LABEL: define {{.*}} void @return_struct_big_1({{.*}} noalias sret({{.*}})
// CHECK-LABEL: define{{.*}} void @return_struct_big_1({{.*}} noalias sret({{.*}})
// Should not be byval.
// CHECK-LABEL: define {{.*}} void @take_struct_big_1({{.*}}*{{( %.*)?}})
// CHECK-LABEL: define{{.*}} void @take_struct_big_1({{.*}}*{{( %.*)?}})
/*****************************************************************************/
/********************************* TYPE MERGING ******************************/
@ -274,7 +274,7 @@ typedef union {
double d;
} union_het_fp;
TEST(union_het_fp)
// CHECK-LABEL: define {{.*}} @return_union_het_fp()
// CHECK-LABEL: define{{.*}} @return_union_het_fp()
// CHECK: [[RET:%.*]] = alloca [[REC:%.*]], align {{(4|8)}}
// CHECK: @llvm.memcpy
// CHECK: [[CAST_TMP:%.*]] = bitcast [[REC]]* [[RET]] to [[AGG:{ i32, i32 }]]*
@ -285,7 +285,7 @@ TEST(union_het_fp)
// CHECK: [[T0:%.*]] = insertvalue [[UAGG:{ i32, i32 }]] undef, i32 [[FIRST]], 0
// CHECK: [[T1:%.*]] = insertvalue [[UAGG]] [[T0]], i32 [[SECOND]], 1
// CHECK: ret [[UAGG]] [[T1]]
// CHECK-LABEL: define {{.*}} @take_union_het_fp(i32 %0, i32 %1)
// CHECK-LABEL: define{{.*}} @take_union_het_fp(i32 %0, i32 %1)
// CHECK: [[V:%.*]] = alloca [[REC]], align {{(4|8)}}
// CHECK: [[CAST_TMP:%.*]] = bitcast [[REC]]* [[V]] to [[AGG]]*
// CHECK: [[T0:%.*]] = getelementptr inbounds [[AGG]], [[AGG]]* [[CAST_TMP]], i32 0, i32 0
@ -293,7 +293,7 @@ TEST(union_het_fp)
// CHECK: [[T0:%.*]] = getelementptr inbounds [[AGG]], [[AGG]]* [[CAST_TMP]], i32 0, i32 1
// CHECK: store i32 %1, i32* [[T0]], align {{(4|8)}}
// CHECK: ret void
// CHECK-LABEL: define void @test_union_het_fp()
// CHECK-LABEL: define{{.*}} void @test_union_het_fp()
// CHECK: [[TMP:%.*]] = alloca [[REC]], align {{(4|8)}}
// CHECK: [[CALL:%.*]] = call [[SWIFTCC]] [[UAGG]] @return_union_het_fp()
// CHECK: [[CAST_TMP:%.*]] = bitcast [[REC]]* [[TMP]] to [[AGG]]*
@ -317,7 +317,7 @@ typedef union {
float f2;
} union_hom_fp;
TEST(union_hom_fp)
// CHECK-LABEL: define void @test_union_hom_fp()
// CHECK-LABEL: define{{.*}} void @test_union_hom_fp()
// CHECK: [[TMP:%.*]] = alloca [[REC:%.*]], align 4
// CHECK: [[CALL:%.*]] = call [[SWIFTCC]] float @return_union_hom_fp()
// CHECK: [[CAST_TMP:%.*]] = bitcast [[REC]]* [[TMP]] to [[AGG:{ float }]]*
@ -334,7 +334,7 @@ typedef union {
float4 fv2;
} union_hom_fp_partial;
TEST(union_hom_fp_partial)
// CHECK-LABEL: define void @test_union_hom_fp_partial()
// CHECK-LABEL: define{{.*}} void @test_union_hom_fp_partial()
// CHECK: [[TMP:%.*]] = alloca [[REC:%.*]], align 16
// CHECK: [[CALL:%.*]] = call [[SWIFTCC]] [[UAGG:{ float, float, float, float }]] @return_union_hom_fp_partial()
// CHECK: [[CAST_TMP:%.*]] = bitcast [[REC]]* [[TMP]] to [[AGG:{ float, float, float, float }]]*
@ -367,7 +367,7 @@ typedef union {
float4 fv2;
} union_het_fpv_partial;
TEST(union_het_fpv_partial)
// CHECK-LABEL: define void @test_union_het_fpv_partial()
// CHECK-LABEL: define{{.*}} void @test_union_het_fpv_partial()
// CHECK: [[TMP:%.*]] = alloca [[REC:%.*]], align 16
// CHECK: [[CALL:%.*]] = call [[SWIFTCC]] [[UAGG:{ i32, i32, float, float }]] @return_union_het_fpv_partial()
// CHECK: [[CAST_TMP:%.*]] = bitcast [[REC]]* [[TMP]] to [[AGG:{ i32, i32, float, float }]]*
@ -400,11 +400,11 @@ TEST(union_het_fpv_partial)
/*****************************************************************************/
TEST(int4)
// CHECK-LABEL: define {{.*}} <4 x i32> @return_int4()
// CHECK-LABEL: define {{.*}} @take_int4(<4 x i32>
// CHECK-LABEL: define{{.*}} <4 x i32> @return_int4()
// CHECK-LABEL: define{{.*}} @take_int4(<4 x i32>
TEST(int8)
// CHECK-LABEL: define {{.*}} @return_int8()
// CHECK-LABEL: define{{.*}} @return_int8()
// CHECK: [[RET:%.*]] = alloca [[REC:<8 x i32>]], align 32
// CHECK: store
// CHECK: load
@ -417,7 +417,7 @@ TEST(int8)
// CHECK: [[T0:%.*]] = insertvalue [[UAGG:{ <4 x i32>, <4 x i32> }]] undef, <4 x i32> [[FIRST]], 0
// CHECK: [[T1:%.*]] = insertvalue [[UAGG]] [[T0]], <4 x i32> [[SECOND]], 1
// CHECK: ret [[UAGG]] [[T1]]
// CHECK-LABEL: define {{.*}} @take_int8(<4 x i32> %0, <4 x i32> %1)
// CHECK-LABEL: define{{.*}} @take_int8(<4 x i32> %0, <4 x i32> %1)
// CHECK: [[V:%.*]] = alloca [[REC]], align
// CHECK: [[CAST_TMP:%.*]] = bitcast [[REC]]* [[V]] to [[AGG]]*
// CHECK: [[T0:%.*]] = getelementptr inbounds [[AGG]], [[AGG]]* [[CAST_TMP]], i32 0, i32 0
@ -425,7 +425,7 @@ TEST(int8)
// CHECK: [[T0:%.*]] = getelementptr inbounds [[AGG]], [[AGG]]* [[CAST_TMP]], i32 0, i32 1
// CHECK: store <4 x i32> %1, <4 x i32>* [[T0]], align
// CHECK: ret void
// CHECK-LABEL: define void @test_int8()
// CHECK-LABEL: define{{.*}} void @test_int8()
// CHECK: [[TMP1:%.*]] = alloca [[REC]], align
// CHECK: [[TMP2:%.*]] = alloca [[REC]], align
// CHECK: [[CALL:%.*]] = call [[SWIFTCC]] [[UAGG]] @return_int8()
@ -447,7 +447,7 @@ TEST(int8)
// CHECK: ret void
TEST(int5)
// CHECK-LABEL: define {{.*}} @return_int5()
// CHECK-LABEL: define{{.*}} @return_int5()
// CHECK: [[RET:%.*]] = alloca [[REC:<5 x i32>]], align 32
// CHECK: store
// CHECK: load
@ -460,7 +460,7 @@ TEST(int5)
// CHECK: [[T0:%.*]] = insertvalue [[UAGG:{ <4 x i32>, i32 }]] undef, <4 x i32> [[FIRST]], 0
// CHECK: [[T1:%.*]] = insertvalue [[UAGG]] [[T0]], i32 [[SECOND]], 1
// CHECK: ret [[UAGG]] [[T1]]
// CHECK-LABEL: define {{.*}} @take_int5(<4 x i32> %0, i32 %1)
// CHECK-LABEL: define{{.*}} @take_int5(<4 x i32> %0, i32 %1)
// CHECK: [[V:%.*]] = alloca [[REC]], align
// CHECK: [[CAST_TMP:%.*]] = bitcast [[REC]]* [[V]] to [[AGG]]*
// CHECK: [[T0:%.*]] = getelementptr inbounds [[AGG]], [[AGG]]* [[CAST_TMP]], i32 0, i32 0
@ -468,7 +468,7 @@ TEST(int5)
// CHECK: [[T0:%.*]] = getelementptr inbounds [[AGG]], [[AGG]]* [[CAST_TMP]], i32 0, i32 1
// CHECK: store i32 %1, i32* [[T0]], align
// CHECK: ret void
// CHECK-LABEL: define void @test_int5()
// CHECK-LABEL: define{{.*}} void @test_int5()
// CHECK: [[TMP1:%.*]] = alloca [[REC]], align
// CHECK: [[TMP2:%.*]] = alloca [[REC]], align
// CHECK: [[CALL:%.*]] = call [[SWIFTCC]] [[UAGG]] @return_int5()
@ -494,22 +494,22 @@ typedef struct {
int3 v __attribute__((packed));
} misaligned_int3;
TEST(misaligned_int3)
// CHECK-LABEL: define {{.*}} @take_misaligned_int3(i32 %0, i32 %1, i32 %2, i32 %3)
// CHECK-LABEL: define{{.*}} @take_misaligned_int3(i32 %0, i32 %1, i32 %2, i32 %3)
typedef struct {
float f0;
} struct_f1;
TEST(struct_f1)
// CHECK-LABEL: define swiftcc float @return_struct_f1()
// CHECK-LABEL: define swiftcc void @take_struct_f1(float %0)
// CHECK-LABEL: define{{.*}} swiftcc float @return_struct_f1()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_f1(float %0)
typedef struct {
float f0;
float f1;
} struct_f2;
TEST(struct_f2)
// CHECK-LABEL: define swiftcc { float, float } @return_struct_f2()
// CHECK-LABEL: define swiftcc void @take_struct_f2(float %0, float %1)
// CHECK-LABEL: define{{.*}} swiftcc { float, float } @return_struct_f2()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_f2(float %0, float %1)
typedef struct {
float f0;
@ -517,8 +517,8 @@ typedef struct {
float f2;
} struct_f3;
TEST(struct_f3)
// CHECK-LABEL: define swiftcc { float, float, float } @return_struct_f3()
// CHECK-LABEL: define swiftcc void @take_struct_f3(float %0, float %1, float %2)
// CHECK-LABEL: define{{.*}} swiftcc { float, float, float } @return_struct_f3()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_f3(float %0, float %1, float %2)
typedef struct {
float f0;
@ -527,24 +527,24 @@ typedef struct {
float f3;
} struct_f4;
TEST(struct_f4)
// CHECK-LABEL: define swiftcc { float, float, float, float } @return_struct_f4()
// CHECK-LABEL: define swiftcc void @take_struct_f4(float %0, float %1, float %2, float %3)
// CHECK-LABEL: define{{.*}} swiftcc { float, float, float, float } @return_struct_f4()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_f4(float %0, float %1, float %2, float %3)
typedef struct {
double d0;
} struct_d1;
TEST(struct_d1)
// CHECK-LABEL: define swiftcc double @return_struct_d1()
// CHECK-LABEL: define swiftcc void @take_struct_d1(double %0)
// CHECK-LABEL: define{{.*}} swiftcc double @return_struct_d1()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_d1(double %0)
typedef struct {
double d0;
double d1;
} struct_d2;
TEST(struct_d2)
// CHECK-LABEL: define swiftcc { double, double } @return_struct_d2()
// CHECK-LABEL: define swiftcc void @take_struct_d2(double %0, double %1)
// CHECK-LABEL: define{{.*}} swiftcc { double, double } @return_struct_d2()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_d2(double %0, double %1)
typedef struct {
double d0;
@ -552,8 +552,8 @@ typedef struct {
double d2;
} struct_d3;
TEST(struct_d3)
// CHECK-LABEL: define swiftcc { double, double, double } @return_struct_d3()
// CHECK-LABEL: define swiftcc void @take_struct_d3(double %0, double %1, double %2)
// CHECK-LABEL: define{{.*}} swiftcc { double, double, double } @return_struct_d3()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_d3(double %0, double %1, double %2)
typedef struct {
double d0;
@ -562,8 +562,8 @@ typedef struct {
double d3;
} struct_d4;
TEST(struct_d4)
// CHECK-LABEL: define swiftcc { double, double, double, double } @return_struct_d4()
// CHECK-LABEL: define swiftcc void @take_struct_d4(double %0, double %1, double %2, double %3)
// CHECK-LABEL: define{{.*}} swiftcc { double, double, double, double } @return_struct_d4()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_d4(double %0, double %1, double %2, double %3)
typedef struct {
double d0;
@ -573,23 +573,23 @@ typedef struct {
double d4;
} struct_d5;
TEST(struct_d5)
// CHECK: define swiftcc void @return_struct_d5([[STRUCT5:%.*]]* noalias sret([[STRUCT5]])
// CHECK: define swiftcc void @take_struct_d5([[STRUCT5]]
// CHECK: define{{.*}} swiftcc void @return_struct_d5([[STRUCT5:%.*]]* noalias sret([[STRUCT5]])
// CHECK: define{{.*}} swiftcc void @take_struct_d5([[STRUCT5]]
typedef struct {
char c0;
} struct_c1;
TEST(struct_c1)
// CHECK-LABEL: define swiftcc i8 @return_struct_c1()
// CHECK-LABEL: define swiftcc void @take_struct_c1(i8 %0)
// CHECK-LABEL: define{{.*}} swiftcc i8 @return_struct_c1()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_c1(i8 %0)
typedef struct {
char c0;
char c1;
} struct_c2;
TEST(struct_c2)
// CHECK-LABEL: define swiftcc i16 @return_struct_c2()
// CHECK-LABEL: define swiftcc void @take_struct_c2(i16 %0)
// CHECK-LABEL: define{{.*}} swiftcc i16 @return_struct_c2()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_c2(i16 %0)
//
typedef struct {
@ -598,8 +598,8 @@ typedef struct {
char c2;
} struct_c3;
TEST(struct_c3)
// CHECK-LABEL: define swiftcc i32 @return_struct_c3()
// CHECK-LABEL: define swiftcc void @take_struct_c3(i32 %0)
// CHECK-LABEL: define{{.*}} swiftcc i32 @return_struct_c3()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_c3(i32 %0)
typedef struct {
char c0;
@ -608,8 +608,8 @@ typedef struct {
char c3;
} struct_c4;
TEST(struct_c4)
// CHECK-LABEL: define swiftcc i32 @return_struct_c4()
// CHECK-LABEL: define swiftcc void @take_struct_c4(i32 %0)
// CHECK-LABEL: define{{.*}} swiftcc i32 @return_struct_c4()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_c4(i32 %0)
typedef struct {
char c0;
@ -619,23 +619,23 @@ typedef struct {
char c4;
} struct_c5;
TEST(struct_c5)
// CHECK-LABEL: define swiftcc { i32, i8 } @return_struct_c5()
// CHECK-LABEL: define swiftcc void @take_struct_c5(i32 %0, i8 %1)
// CHECK-LABEL: define{{.*}} swiftcc { i32, i8 } @return_struct_c5()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_c5(i32 %0, i8 %1)
typedef struct {
short s0;
} struct_s1;
TEST(struct_s1)
// CHECK-LABEL: define swiftcc i16 @return_struct_s1()
// CHECK-LABEL: define swiftcc void @take_struct_s1(i16 %0)
// CHECK-LABEL: define{{.*}} swiftcc i16 @return_struct_s1()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_s1(i16 %0)
typedef struct {
short s0;
short s1;
} struct_s2;
TEST(struct_s2)
// CHECK-LABEL: define swiftcc i32 @return_struct_s2()
// CHECK-LABEL: define swiftcc void @take_struct_s2(i32 %0)
// CHECK-LABEL: define{{.*}} swiftcc i32 @return_struct_s2()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_s2(i32 %0)
typedef struct {
short s0;
@ -643,8 +643,8 @@ typedef struct {
short s2;
} struct_s3;
TEST(struct_s3)
// CHECK-LABEL: define swiftcc { i32, i16 } @return_struct_s3()
// CHECK-LABEL: define swiftcc void @take_struct_s3(i32 %0, i16 %1)
// CHECK-LABEL: define{{.*}} swiftcc { i32, i16 } @return_struct_s3()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_s3(i32 %0, i16 %1)
typedef struct {
short s0;
@ -653,8 +653,8 @@ typedef struct {
short s3;
} struct_s4;
TEST(struct_s4)
// CHECK-LABEL: define swiftcc { i32, i32 } @return_struct_s4()
// CHECK-LABEL: define swiftcc void @take_struct_s4(i32 %0, i32 %1)
// CHECK-LABEL: define{{.*}} swiftcc { i32, i32 } @return_struct_s4()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_s4(i32 %0, i32 %1)
typedef struct {
short s0;
@ -664,24 +664,24 @@ typedef struct {
short s4;
} struct_s5;
TEST(struct_s5)
// CHECK-LABEL: define swiftcc { i32, i32, i16 } @return_struct_s5()
// CHECK-LABEL: define swiftcc void @take_struct_s5(i32 %0, i32 %1, i16 %2)
// CHECK-LABEL: define{{.*}} swiftcc { i32, i32, i16 } @return_struct_s5()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_s5(i32 %0, i32 %1, i16 %2)
typedef struct {
int i0;
} struct_i1;
TEST(struct_i1)
// CHECK-LABEL: define swiftcc i32 @return_struct_i1()
// CHECK-LABEL: define swiftcc void @take_struct_i1(i32 %0)
// CHECK-LABEL: define{{.*}} swiftcc i32 @return_struct_i1()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_i1(i32 %0)
typedef struct {
int i0;
int i1;
} struct_i2;
TEST(struct_i2)
// CHECK-LABEL: define swiftcc { i32, i32 } @return_struct_i2()
// CHECK-LABEL: define swiftcc void @take_struct_i2(i32 %0, i32 %1)
// CHECK-LABEL: define{{.*}} swiftcc { i32, i32 } @return_struct_i2()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_i2(i32 %0, i32 %1)
typedef struct {
int i0;
@ -689,8 +689,8 @@ typedef struct {
int i2;
} struct_i3;
TEST(struct_i3)
// CHECK-LABEL: define swiftcc { i32, i32, i32 } @return_struct_i3()
// CHECK-LABEL: define swiftcc void @take_struct_i3(i32 %0, i32 %1, i32 %2)
// CHECK-LABEL: define{{.*}} swiftcc { i32, i32, i32 } @return_struct_i3()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_i3(i32 %0, i32 %1, i32 %2)
typedef struct {
int i0;
@ -699,23 +699,23 @@ typedef struct {
int i3;
} struct_i4;
TEST(struct_i4)
// CHECK-LABEL: define swiftcc { i32, i32, i32, i32 } @return_struct_i4()
// CHECK-LABEL: define swiftcc void @take_struct_i4(i32 %0, i32 %1, i32 %2, i32 %3)
// CHECK-LABEL: define{{.*}} swiftcc { i32, i32, i32, i32 } @return_struct_i4()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_i4(i32 %0, i32 %1, i32 %2, i32 %3)
typedef struct {
long long l0;
} struct_l1;
TEST(struct_l1)
// CHECK-LABEL: define swiftcc i64 @return_struct_l1()
// CHECK-LABEL: define swiftcc void @take_struct_l1(i64 %0)
// CHECK-LABEL: define{{.*}} swiftcc i64 @return_struct_l1()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_l1(i64 %0)
typedef struct {
long long l0;
long long l1;
} struct_l2;
TEST(struct_l2)
// CHECK-LABEL: define swiftcc { i64, i64 } @return_struct_l2()
// CHECK-LABEL: define swiftcc void @take_struct_l2(i64 %0, i64 %1)
// CHECK-LABEL: define{{.*}} swiftcc { i64, i64 } @return_struct_l2()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_l2(i64 %0, i64 %1)
typedef struct {
long long l0;
@ -723,8 +723,8 @@ typedef struct {
long long l2;
} struct_l3;
TEST(struct_l3)
// CHECK: define swiftcc void @return_struct_l3([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define swiftcc void @take_struct_l3([[STRUCT]]
// CHECK: define{{.*}} swiftcc void @return_struct_l3([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define{{.*}} swiftcc void @take_struct_l3([[STRUCT]]
typedef struct {
long long l0;
@ -733,8 +733,8 @@ typedef struct {
long long l3;
} struct_l4;
TEST(struct_l4)
// CHECK: define swiftcc void @return_struct_l4([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define swiftcc void @take_struct_l4([[STRUCT]]
// CHECK: define{{.*}} swiftcc void @return_struct_l4([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define{{.*}} swiftcc void @take_struct_l4([[STRUCT]]
typedef struct {
long long l0;
@ -744,23 +744,23 @@ typedef struct {
long long l4;
} struct_l5;
TEST(struct_l5)
// CHECK: define swiftcc void @return_struct_l5([[STRUCT5:%.*]]* noalias sret([[STRUCT5]])
// CHECK: define swiftcc void @take_struct_l5([[STRUCT5]]*
// CHECK: define{{.*}} swiftcc void @return_struct_l5([[STRUCT5:%.*]]* noalias sret([[STRUCT5]])
// CHECK: define{{.*}} swiftcc void @take_struct_l5([[STRUCT5]]*
typedef struct {
char16 c0;
} struct_vc1;
TEST(struct_vc1)
// CHECK-LABEL: define swiftcc <16 x i8> @return_struct_vc1()
// CHECK-LABEL: define swiftcc void @take_struct_vc1(<16 x i8> %0)
// CHECK-LABEL: define{{.*}} swiftcc <16 x i8> @return_struct_vc1()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vc1(<16 x i8> %0)
typedef struct {
char16 c0;
char16 c1;
} struct_vc2;
TEST(struct_vc2)
// CHECK-LABEL: define swiftcc { <16 x i8>, <16 x i8> } @return_struct_vc2()
// CHECK-LABEL: define swiftcc void @take_struct_vc2(<16 x i8> %0, <16 x i8> %1)
// CHECK-LABEL: define{{.*}} swiftcc { <16 x i8>, <16 x i8> } @return_struct_vc2()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vc2(<16 x i8> %0, <16 x i8> %1)
typedef struct {
char16 c0;
@ -768,8 +768,8 @@ typedef struct {
char16 c2;
} struct_vc3;
TEST(struct_vc3)
// CHECK-LABEL: define swiftcc { <16 x i8>, <16 x i8>, <16 x i8> } @return_struct_vc3()
// CHECK-LABEL: define swiftcc void @take_struct_vc3(<16 x i8> %0, <16 x i8> %1, <16 x i8> %2)
// CHECK-LABEL: define{{.*}} swiftcc { <16 x i8>, <16 x i8>, <16 x i8> } @return_struct_vc3()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vc3(<16 x i8> %0, <16 x i8> %1, <16 x i8> %2)
typedef struct {
char16 c0;
@ -778,8 +778,8 @@ typedef struct {
char16 c3;
} struct_vc4;
TEST(struct_vc4)
// CHECK-LABEL: define swiftcc { <16 x i8>, <16 x i8>, <16 x i8>, <16 x i8> } @return_struct_vc4()
// CHECK-LABEL: define swiftcc void @take_struct_vc4(<16 x i8> %0, <16 x i8> %1, <16 x i8> %2, <16 x i8> %3)
// CHECK-LABEL: define{{.*}} swiftcc { <16 x i8>, <16 x i8>, <16 x i8>, <16 x i8> } @return_struct_vc4()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vc4(<16 x i8> %0, <16 x i8> %1, <16 x i8> %2, <16 x i8> %3)
typedef struct {
char16 c0;
@ -789,23 +789,23 @@ typedef struct {
char16 c4;
} struct_vc5;
TEST(struct_vc5)
// CHECK: define swiftcc void @return_struct_vc5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define swiftcc void @take_struct_vc5([[STRUCT]]
// CHECK: define{{.*}} swiftcc void @return_struct_vc5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define{{.*}} swiftcc void @take_struct_vc5([[STRUCT]]
typedef struct {
short8 c0;
} struct_vs1;
TEST(struct_vs1)
// CHECK-LABEL: define swiftcc <8 x i16> @return_struct_vs1()
// CHECK-LABEL: define swiftcc void @take_struct_vs1(<8 x i16> %0)
// CHECK-LABEL: define{{.*}} swiftcc <8 x i16> @return_struct_vs1()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vs1(<8 x i16> %0)
typedef struct {
short8 c0;
short8 c1;
} struct_vs2;
TEST(struct_vs2)
// CHECK-LABEL: define swiftcc { <8 x i16>, <8 x i16> } @return_struct_vs2()
// CHECK-LABEL: define swiftcc void @take_struct_vs2(<8 x i16> %0, <8 x i16> %1)
// CHECK-LABEL: define{{.*}} swiftcc { <8 x i16>, <8 x i16> } @return_struct_vs2()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vs2(<8 x i16> %0, <8 x i16> %1)
typedef struct {
short8 c0;
@ -813,8 +813,8 @@ typedef struct {
short8 c2;
} struct_vs3;
TEST(struct_vs3)
// CHECK-LABEL: define swiftcc { <8 x i16>, <8 x i16>, <8 x i16> } @return_struct_vs3()
// CHECK-LABEL: define swiftcc void @take_struct_vs3(<8 x i16> %0, <8 x i16> %1, <8 x i16> %2)
// CHECK-LABEL: define{{.*}} swiftcc { <8 x i16>, <8 x i16>, <8 x i16> } @return_struct_vs3()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vs3(<8 x i16> %0, <8 x i16> %1, <8 x i16> %2)
typedef struct {
short8 c0;
@ -823,8 +823,8 @@ typedef struct {
short8 c3;
} struct_vs4;
TEST(struct_vs4)
// CHECK-LABEL: define swiftcc { <8 x i16>, <8 x i16>, <8 x i16>, <8 x i16> } @return_struct_vs4()
// CHECK-LABEL: define swiftcc void @take_struct_vs4(<8 x i16> %0, <8 x i16> %1, <8 x i16> %2, <8 x i16> %3)
// CHECK-LABEL: define{{.*}} swiftcc { <8 x i16>, <8 x i16>, <8 x i16>, <8 x i16> } @return_struct_vs4()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vs4(<8 x i16> %0, <8 x i16> %1, <8 x i16> %2, <8 x i16> %3)
typedef struct {
short8 c0;
@ -834,23 +834,23 @@ typedef struct {
short8 c4;
} struct_vs5;
TEST(struct_vs5)
// CHECK: define swiftcc void @return_struct_vs5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define swiftcc void @take_struct_vs5([[STRUCT]]
// CHECK: define{{.*}} swiftcc void @return_struct_vs5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define{{.*}} swiftcc void @take_struct_vs5([[STRUCT]]
typedef struct {
int4 c0;
} struct_vi1;
TEST(struct_vi1)
// CHECK-LABEL: define swiftcc <4 x i32> @return_struct_vi1()
// CHECK-LABEL: define swiftcc void @take_struct_vi1(<4 x i32> %0)
// CHECK-LABEL: define{{.*}} swiftcc <4 x i32> @return_struct_vi1()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vi1(<4 x i32> %0)
typedef struct {
int4 c0;
int4 c1;
} struct_vi2;
TEST(struct_vi2)
// CHECK-LABEL: define swiftcc { <4 x i32>, <4 x i32> } @return_struct_vi2()
// CHECK-LABEL: define swiftcc void @take_struct_vi2(<4 x i32> %0, <4 x i32> %1)
// CHECK-LABEL: define{{.*}} swiftcc { <4 x i32>, <4 x i32> } @return_struct_vi2()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vi2(<4 x i32> %0, <4 x i32> %1)
typedef struct {
int4 c0;
@ -858,8 +858,8 @@ typedef struct {
int4 c2;
} struct_vi3;
TEST(struct_vi3)
// CHECK-LABEL: define swiftcc { <4 x i32>, <4 x i32>, <4 x i32> } @return_struct_vi3()
// CHECK-LABEL: define swiftcc void @take_struct_vi3(<4 x i32> %0, <4 x i32> %1, <4 x i32> %2)
// CHECK-LABEL: define{{.*}} swiftcc { <4 x i32>, <4 x i32>, <4 x i32> } @return_struct_vi3()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vi3(<4 x i32> %0, <4 x i32> %1, <4 x i32> %2)
typedef struct {
int4 c0;
@ -868,8 +868,8 @@ typedef struct {
int4 c3;
} struct_vi4;
TEST(struct_vi4)
// CHECK-LABEL: define swiftcc { <4 x i32>, <4 x i32>, <4 x i32>, <4 x i32> } @return_struct_vi4()
// CHECK-LABEL: define swiftcc void @take_struct_vi4(<4 x i32> %0, <4 x i32> %1, <4 x i32> %2, <4 x i32> %3)
// CHECK-LABEL: define{{.*}} swiftcc { <4 x i32>, <4 x i32>, <4 x i32>, <4 x i32> } @return_struct_vi4()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vi4(<4 x i32> %0, <4 x i32> %1, <4 x i32> %2, <4 x i32> %3)
typedef struct {
int4 c0;
@ -879,15 +879,15 @@ typedef struct {
int4 c4;
} struct_vi5;
TEST(struct_vi5)
// CHECK: define swiftcc void @return_struct_vi5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define swiftcc void @take_struct_vi5([[STRUCT]]
// CHECK: define{{.*}} swiftcc void @return_struct_vi5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define{{.*}} swiftcc void @take_struct_vi5([[STRUCT]]
typedef struct {
long2 c0;
} struct_vl1;
TEST(struct_vl1)
// CHECK-LABEL: define swiftcc <2 x i64> @return_struct_vl1()
// CHECK-LABEL: define swiftcc void @take_struct_vl1(<2 x i64> %0)
// CHECK-LABEL: define{{.*}} swiftcc <2 x i64> @return_struct_vl1()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vl1(<2 x i64> %0)
typedef struct {
long2 c0;
@ -896,8 +896,8 @@ typedef struct {
long2 c3;
} struct_vl4;
TEST(struct_vl4)
// CHECK-LABEL: define swiftcc { <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } @return_struct_vl4()
// CHECK-LABEL: define swiftcc void @take_struct_vl4(<2 x i64> %0, <2 x i64> %1, <2 x i64> %2, <2 x i64> %3)
// CHECK-LABEL: define{{.*}} swiftcc { <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } @return_struct_vl4()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vl4(<2 x i64> %0, <2 x i64> %1, <2 x i64> %2, <2 x i64> %3)
typedef struct {
long2 c0;
@ -907,15 +907,15 @@ typedef struct {
long2 c4;
} struct_vl5;
TEST(struct_vl5)
// CHECK: define swiftcc void @return_struct_vl5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define swiftcc void @take_struct_vl5([[STRUCT]]
// CHECK: define{{.*}} swiftcc void @return_struct_vl5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define{{.*}} swiftcc void @take_struct_vl5([[STRUCT]]
typedef struct {
double2 c0;
} struct_vd1;
TEST(struct_vd1)
// CHECK-LABEL: define swiftcc <2 x double> @return_struct_vd1()
// CHECK-LABEL: define swiftcc void @take_struct_vd1(<2 x double> %0)
// CHECK-LABEL: define{{.*}} swiftcc <2 x double> @return_struct_vd1()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vd1(<2 x double> %0)
typedef struct {
double2 c0;
@ -924,8 +924,8 @@ typedef struct {
double2 c3;
} struct_vd4;
TEST(struct_vd4)
// CHECK-LABEL: define swiftcc { <2 x double>, <2 x double>, <2 x double>, <2 x double> } @return_struct_vd4()
// CHECK-LABEL: define swiftcc void @take_struct_vd4(<2 x double> %0, <2 x double> %1, <2 x double> %2, <2 x double> %3)
// CHECK-LABEL: define{{.*}} swiftcc { <2 x double>, <2 x double>, <2 x double>, <2 x double> } @return_struct_vd4()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vd4(<2 x double> %0, <2 x double> %1, <2 x double> %2, <2 x double> %3)
typedef struct {
double2 c0;
@ -935,23 +935,23 @@ typedef struct {
double2 c4;
} struct_vd5;
TEST(struct_vd5)
// CHECK: define swiftcc void @return_struct_vd5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define swiftcc void @take_struct_vd5([[STRUCT]]
// CHECK: define{{.*}} swiftcc void @return_struct_vd5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define{{.*}} swiftcc void @take_struct_vd5([[STRUCT]]
typedef struct {
double4 c0;
} struct_vd41;
TEST(struct_vd41)
// CHECK-LABEL: define swiftcc { <2 x double>, <2 x double> } @return_struct_vd41()
// CHECK-LABEL: define swiftcc void @take_struct_vd41(<2 x double> %0, <2 x double> %1)
// CHECK-LABEL: define{{.*}} swiftcc { <2 x double>, <2 x double> } @return_struct_vd41()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vd41(<2 x double> %0, <2 x double> %1)
typedef struct {
double4 c0;
double4 c1;
} struct_vd42;
TEST(struct_vd42)
// CHECK-LABEL: define swiftcc { <2 x double>, <2 x double>, <2 x double>, <2 x double> } @return_struct_vd42()
// CHECK-LABEL: define swiftcc void @take_struct_vd42(<2 x double> %0, <2 x double> %1, <2 x double> %2, <2 x double> %3)
// CHECK-LABEL: define{{.*}} swiftcc { <2 x double>, <2 x double>, <2 x double>, <2 x double> } @return_struct_vd42()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vd42(<2 x double> %0, <2 x double> %1, <2 x double> %2, <2 x double> %3)
typedef struct {
double4 c0;
@ -959,23 +959,23 @@ typedef struct {
double4 c2;
} struct_vd43;
TEST(struct_vd43)
// CHECK: define swiftcc void @return_struct_vd43([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define swiftcc void @take_struct_vd43([[STRUCT]]
// CHECK: define{{.*}} swiftcc void @return_struct_vd43([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define{{.*}} swiftcc void @take_struct_vd43([[STRUCT]]
typedef struct {
float4 c0;
} struct_vf1;
TEST(struct_vf1)
// CHECK-LABEL: define swiftcc <4 x float> @return_struct_vf1()
// CHECK-LABEL: define swiftcc void @take_struct_vf1(<4 x float> %0)
// CHECK-LABEL: define{{.*}} swiftcc <4 x float> @return_struct_vf1()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vf1(<4 x float> %0)
typedef struct {
float4 c0;
float4 c1;
} struct_vf2;
TEST(struct_vf2)
// CHECK-LABEL: define swiftcc { <4 x float>, <4 x float> } @return_struct_vf2()
// CHECK-LABEL: define swiftcc void @take_struct_vf2(<4 x float> %0, <4 x float> %1)
// CHECK-LABEL: define{{.*}} swiftcc { <4 x float>, <4 x float> } @return_struct_vf2()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vf2(<4 x float> %0, <4 x float> %1)
typedef struct {
float4 c0;
@ -984,8 +984,8 @@ typedef struct {
float4 c3;
} struct_vf4;
TEST(struct_vf4)
// CHECK-LABEL: define swiftcc { <4 x float>, <4 x float>, <4 x float>, <4 x float> } @return_struct_vf4()
// CHECK-LABEL: define swiftcc void @take_struct_vf4(<4 x float> %0, <4 x float> %1, <4 x float> %2, <4 x float> %3)
// CHECK-LABEL: define{{.*}} swiftcc { <4 x float>, <4 x float>, <4 x float>, <4 x float> } @return_struct_vf4()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vf4(<4 x float> %0, <4 x float> %1, <4 x float> %2, <4 x float> %3)
typedef struct {
float4 c0;
@ -995,19 +995,19 @@ typedef struct {
float4 c4;
} struct_vf5;
TEST(struct_vf5)
// CHECK: define swiftcc void @return_struct_vf5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define swiftcc void @take_struct_vf5([[STRUCT]]
// CHECK: define{{.*}} swiftcc void @return_struct_vf5([[STRUCT:%.*]]* noalias sret([[STRUCT]])
// CHECK: define{{.*}} swiftcc void @take_struct_vf5([[STRUCT]]
typedef struct {
float8 c0;
} struct_vf81;
TEST(struct_vf81)
// CHECK-LABEL: define swiftcc { <4 x float>, <4 x float> } @return_struct_vf81()
// CHECK-LABEL: define swiftcc void @take_struct_vf81(<4 x float> %0, <4 x float> %1)
// CHECK-LABEL: define{{.*}} swiftcc { <4 x float>, <4 x float> } @return_struct_vf81()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vf81(<4 x float> %0, <4 x float> %1)
typedef struct {
float3 f3;
} struct_v1f3;
TEST(struct_v1f3)
// CHECK-LABEL: define swiftcc { <2 x float>, float } @return_struct_v1f3()
// CHECK-LABEL: define swiftcc void @take_struct_v1f3(<2 x float> %0, float %1)
// CHECK-LABEL: define{{.*}} swiftcc { <2 x float>, float } @return_struct_v1f3()
// CHECK-LABEL: define{{.*}} swiftcc void @take_struct_v1f3(<2 x float> %0, float %1)

View File

@ -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{{.*}}"

View File

@ -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);
}
@ -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; }

View File

@ -1,100 +1,100 @@
// RUN: %clang_cc1 -triple arm64-apple-ios7 -target-feature +neon -target-abi darwinpcs -ffreestanding -emit-llvm -w -o - %s | FileCheck %s
// CHECK: define signext i8 @f0()
// CHECK: define{{.*}} signext i8 @f0()
char f0(void) {
return 0;
}
// Struct as return type. Aggregates <= 16 bytes are passed directly and round
// up to multiple of 8 bytes.
// CHECK: define i64 @f1()
// CHECK: define{{.*}} i64 @f1()
struct s1 { char f0; };
struct s1 f1(void) {}
// CHECK: define i64 @f2()
// CHECK: define{{.*}} i64 @f2()
struct s2 { short f0; };
struct s2 f2(void) {}
// CHECK: define i64 @f3()
// CHECK: define{{.*}} i64 @f3()
struct s3 { int f0; };
struct s3 f3(void) {}
// CHECK: define i64 @f4()
// CHECK: define{{.*}} i64 @f4()
struct s4 { struct s4_0 { int f0; } f0; };
struct s4 f4(void) {}
// CHECK: define i64 @f5()
// CHECK: define{{.*}} i64 @f5()
struct s5 { struct { } f0; int f1; };
struct s5 f5(void) {}
// CHECK: define i64 @f6()
// CHECK: define{{.*}} i64 @f6()
struct s6 { int f0[1]; };
struct s6 f6(void) {}
// CHECK: define void @f7()
// CHECK: define{{.*}} void @f7()
struct s7 { struct { int : 0; } f0; };
struct s7 f7(void) {}
// CHECK: define void @f8()
// CHECK: define{{.*}} void @f8()
struct s8 { struct { int : 0; } f0[1]; };
struct s8 f8(void) {}
// CHECK: define i64 @f9()
// CHECK: define{{.*}} i64 @f9()
struct s9 { int f0; int : 0; };
struct s9 f9(void) {}
// CHECK: define i64 @f10()
// CHECK: define{{.*}} i64 @f10()
struct s10 { int f0; int : 0; int : 0; };
struct s10 f10(void) {}
// CHECK: define i64 @f11()
// CHECK: define{{.*}} i64 @f11()
struct s11 { int : 0; int f0; };
struct s11 f11(void) {}
// CHECK: define i64 @f12()
// CHECK: define{{.*}} i64 @f12()
union u12 { char f0; short f1; int f2; };
union u12 f12(void) {}
// Homogeneous Aggregate as return type will be passed directly.
// CHECK: define %struct.s13 @f13()
// CHECK: define{{.*}} %struct.s13 @f13()
struct s13 { float f0; };
struct s13 f13(void) {}
// CHECK: define %union.u14 @f14()
// CHECK: define{{.*}} %union.u14 @f14()
union u14 { float f0; };
union u14 f14(void) {}
// CHECK: define void @f15()
// CHECK: define{{.*}} void @f15()
void f15(struct s7 a0) {}
// CHECK: define void @f16()
// CHECK: define{{.*}} void @f16()
void f16(struct s8 a0) {}
// CHECK: define i64 @f17()
// CHECK: define{{.*}} i64 @f17()
struct s17 { short f0 : 13; char f1 : 4; };
struct s17 f17(void) {}
// CHECK: define i64 @f18()
// CHECK: define{{.*}} i64 @f18()
struct s18 { short f0; char f1 : 4; };
struct s18 f18(void) {}
// CHECK: define i64 @f19()
// CHECK: define{{.*}} i64 @f19()
struct s19 { int f0; struct s8 f1; };
struct s19 f19(void) {}
// CHECK: define i64 @f20()
// CHECK: define{{.*}} i64 @f20()
struct s20 { struct s8 f1; int f0; };
struct s20 f20(void) {}
// CHECK: define i64 @f21()
// CHECK: define{{.*}} i64 @f21()
struct s21 { struct {} f1; int f0 : 4; };
struct s21 f21(void) {}
// CHECK: define i64 @f22()
// CHECK: define i64 @f23()
// CHECK: define i64 @f24()
// CHECK: define [2 x i64] @f25()
// CHECK: define { float, float } @f26()
// CHECK: define { double, double } @f27()
// CHECK: define{{.*}} i64 @f22()
// CHECK: define{{.*}} i64 @f23()
// CHECK: define{{.*}} i64 @f24()
// CHECK: define{{.*}} [2 x i64] @f25()
// CHECK: define{{.*}} { float, float } @f26()
// CHECK: define{{.*}} { double, double } @f27()
_Complex char f22(void) {}
_Complex short f23(void) {}
_Complex int f24(void) {}
@ -102,21 +102,21 @@ _Complex long long f25(void) {}
_Complex float f26(void) {}
_Complex double f27(void) {}
// CHECK: define i64 @f28()
// CHECK: define{{.*}} i64 @f28()
struct s28 { _Complex char f0; };
struct s28 f28() {}
// CHECK: define i64 @f29()
// CHECK: define{{.*}} i64 @f29()
struct s29 { _Complex short f0; };
struct s29 f29() {}
// CHECK: define i64 @f30()
// CHECK: define{{.*}} i64 @f30()
struct s30 { _Complex int f0; };
struct s30 f30() {}
struct s31 { char x; };
void f31(struct s31 s) { }
// CHECK: define void @f31(i64 %s.coerce)
// CHECK: define{{.*}} void @f31(i64 %s.coerce)
// CHECK: %s = alloca %struct.s31, align 1
// CHECK: trunc i64 %s.coerce to i8
// CHECK: store i8 %{{.*}},
@ -128,7 +128,7 @@ void f32(struct s32 s) { }
// A composite type larger than 16 bytes should be passed indirectly.
struct s33 { char buf[32*32]; };
void f33(struct s33 s) { }
// CHECK: define void @f33(%struct.s33* %s)
// CHECK: define{{.*}} void @f33(%struct.s33* %s)
struct s34 { char c; };
void f34(struct s34 s);
@ -165,7 +165,7 @@ double t2(int i, ...) {
#include <arm_neon.h>
// Homogeneous Vector Aggregate as return type and argument type.
// CHECK: define %struct.int8x16x2_t @f0_0(<16 x i8> %{{.*}}, <16 x i8> %{{.*}})
// CHECK: define{{.*}} %struct.int8x16x2_t @f0_0(<16 x i8> %{{.*}}, <16 x i8> %{{.*}})
int8x16x2_t f0_0(int8x16_t a0, int8x16_t a1) {
return vzipq_s8(a0, a1);
}
@ -176,14 +176,14 @@ 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; }
// Vector with length bigger than 16-byte is illegal and is passed indirectly.
// CHECK: define void @f1_2(<8 x float>* noalias sret(<8 x float>) align 16 %{{.*}}, <8 x float>* %0)
// CHECK: define{{.*}} void @f1_2(<8 x float>* noalias sret(<8 x float>) align 16 %{{.*}}, <8 x float>* %0)
T_float32x8 f1_2(T_float32x8 a0) { return a0; }
// CHECK: define void @f1_3(<16 x float>* noalias sret(<16 x float>) align 16 %{{.*}}, <16 x float>* %0)
// CHECK: define{{.*}} void @f1_3(<16 x float>* noalias sret(<16 x float>) align 16 %{{.*}}, <16 x float>* %0)
T_float32x16 f1_3(T_float32x16 a0) { return a0; }
// Testing alignment with aggregates: HFA, aggregates with size <= 16 bytes and
@ -196,7 +196,7 @@ typedef struct s35 s35_with_align;
typedef __attribute__((neon_vector_type(4))) float float32x4_t;
float32x4_t f35(int i, s35_with_align s1, s35_with_align s2) {
// CHECK: define <4 x float> @f35(i32 %i, [4 x float] %s1.coerce, [4 x float] %s2.coerce)
// CHECK: define{{.*}} <4 x float> @f35(i32 %i, [4 x float] %s1.coerce, [4 x float] %s2.coerce)
// CHECK: %s1 = alloca %struct.s35, align 16
// CHECK: %s2 = alloca %struct.s35, align 16
// CHECK: %[[a:.*]] = bitcast %struct.s35* %s1 to <4 x float>*
@ -216,7 +216,7 @@ typedef struct s36 s36_with_align;
typedef __attribute__((neon_vector_type(4))) int int32x4_t;
int32x4_t f36(int i, s36_with_align s1, s36_with_align s2) {
// CHECK: define <4 x i32> @f36(i32 %i, i128 %s1.coerce, i128 %s2.coerce)
// CHECK: define{{.*}} <4 x i32> @f36(i32 %i, i128 %s1.coerce, i128 %s2.coerce)
// CHECK: %s1 = alloca %struct.s36, align 16
// CHECK: %s2 = alloca %struct.s36, align 16
// CHECK: store i128 %s1.coerce, i128* %{{.*}}, align 16
@ -237,7 +237,7 @@ struct s37
typedef struct s37 s37_with_align;
int32x4_t f37(int i, s37_with_align s1, s37_with_align s2) {
// CHECK: define <4 x i32> @f37(i32 %i, %struct.s37* %s1, %struct.s37* %s2)
// CHECK: define{{.*}} <4 x i32> @f37(i32 %i, %struct.s37* %s1, %struct.s37* %s2)
// CHECK: %[[a:.*]] = bitcast %struct.s37* %s1 to <4 x i32>*
// CHECK: load <4 x i32>, <4 x i32>* %[[a]], align 16
// CHECK: %[[b:.*]] = bitcast %struct.s37* %s2 to <4 x i32>*
@ -272,7 +272,7 @@ typedef struct s38 s38_no_align;
// passing structs in registers
__attribute__ ((noinline))
int f38(int i, s38_no_align s1, s38_no_align s2) {
// CHECK: define i32 @f38(i32 %i, i64 %s1.coerce, i64 %s2.coerce)
// CHECK: define{{.*}} i32 @f38(i32 %i, i64 %s1.coerce, i64 %s2.coerce)
// CHECK: %s1 = alloca %struct.s38, align 4
// CHECK: %s2 = alloca %struct.s38, align 4
// CHECK: store i64 %s1.coerce, i64* %{{.*}}, align 4
@ -286,7 +286,7 @@ int f38(int i, s38_no_align s1, s38_no_align s2) {
s38_no_align g38;
s38_no_align g38_2;
int caller38() {
// CHECK: define i32 @caller38()
// CHECK: define{{.*}} i32 @caller38()
// CHECK: %[[a:.*]] = load i64, i64* bitcast (%struct.s38* @g38 to i64*), align 4
// CHECK: %[[b:.*]] = load i64, i64* bitcast (%struct.s38* @g38_2 to i64*), align 4
// CHECK: call i32 @f38(i32 3, i64 %[[a]], i64 %[[b]])
@ -296,7 +296,7 @@ int caller38() {
__attribute__ ((noinline))
int f38_stack(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8,
int i9, s38_no_align s1, s38_no_align s2) {
// CHECK: define i32 @f38_stack(i32 %i, i32 %i2, i32 %i3, i32 %i4, i32 %i5, i32 %i6, i32 %i7, i32 %i8, i32 %i9, i64 %s1.coerce, i64 %s2.coerce)
// CHECK: define{{.*}} i32 @f38_stack(i32 %i, i32 %i2, i32 %i3, i32 %i4, i32 %i5, i32 %i6, i32 %i7, i32 %i8, i32 %i9, i64 %s1.coerce, i64 %s2.coerce)
// CHECK: %s1 = alloca %struct.s38, align 4
// CHECK: %s2 = alloca %struct.s38, align 4
// CHECK: store i64 %s1.coerce, i64* %{{.*}}, align 4
@ -308,7 +308,7 @@ int f38_stack(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8,
return s1.i + s2.i + i + i2 + i3 + i4 + i5 + i6 + i7 + i8 + i9 + s1.s + s2.s;
}
int caller38_stack() {
// CHECK: define i32 @caller38_stack()
// CHECK: define{{.*}} i32 @caller38_stack()
// CHECK: %[[a:.*]] = load i64, i64* bitcast (%struct.s38* @g38 to i64*), align 4
// CHECK: %[[b:.*]] = load i64, i64* bitcast (%struct.s38* @g38_2 to i64*), align 4
// CHECK: call i32 @f38_stack(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i64 %[[a]], i64 %[[b]])
@ -325,7 +325,7 @@ typedef struct s39 s39_with_align;
// passing aligned structs in registers
__attribute__ ((noinline))
int f39(int i, s39_with_align s1, s39_with_align s2) {
// CHECK: define i32 @f39(i32 %i, i128 %s1.coerce, i128 %s2.coerce)
// CHECK: define{{.*}} i32 @f39(i32 %i, i128 %s1.coerce, i128 %s2.coerce)
// CHECK: %s1 = alloca %struct.s39, align 16
// CHECK: %s2 = alloca %struct.s39, align 16
// CHECK: store i128 %s1.coerce, i128* %{{.*}}, align 16
@ -339,7 +339,7 @@ int f39(int i, s39_with_align s1, s39_with_align s2) {
s39_with_align g39;
s39_with_align g39_2;
int caller39() {
// CHECK: define i32 @caller39()
// CHECK: define{{.*}} i32 @caller39()
// CHECK: %[[a:.*]] = load i128, i128* bitcast (%struct.s39* @g39 to i128*), align 16
// CHECK: %[[b:.*]] = load i128, i128* bitcast (%struct.s39* @g39_2 to i128*), align 16
// CHECK: call i32 @f39(i32 3, i128 %[[a]], i128 %[[b]])
@ -349,7 +349,7 @@ int caller39() {
__attribute__ ((noinline))
int f39_stack(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8,
int i9, s39_with_align s1, s39_with_align s2) {
// CHECK: define i32 @f39_stack(i32 %i, i32 %i2, i32 %i3, i32 %i4, i32 %i5, i32 %i6, i32 %i7, i32 %i8, i32 %i9, i128 %s1.coerce, i128 %s2.coerce)
// CHECK: define{{.*}} i32 @f39_stack(i32 %i, i32 %i2, i32 %i3, i32 %i4, i32 %i5, i32 %i6, i32 %i7, i32 %i8, i32 %i9, i128 %s1.coerce, i128 %s2.coerce)
// CHECK: %s1 = alloca %struct.s39, align 16
// CHECK: %s2 = alloca %struct.s39, align 16
// CHECK: store i128 %s1.coerce, i128* %{{.*}}, align 16
@ -361,7 +361,7 @@ int f39_stack(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8,
return s1.i + s2.i + i + i2 + i3 + i4 + i5 + i6 + i7 + i8 + i9 + s1.s + s2.s;
}
int caller39_stack() {
// CHECK: define i32 @caller39_stack()
// CHECK: define{{.*}} i32 @caller39_stack()
// CHECK: %[[a:.*]] = load i128, i128* bitcast (%struct.s39* @g39 to i128*), align 16
// CHECK: %[[b:.*]] = load i128, i128* bitcast (%struct.s39* @g39_2 to i128*), align 16
// CHECK: call i32 @f39_stack(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i128 %[[a]], i128 %[[b]])
@ -380,7 +380,7 @@ typedef struct s40 s40_no_align;
// passing structs in registers
__attribute__ ((noinline))
int f40(int i, s40_no_align s1, s40_no_align s2) {
// CHECK: define i32 @f40(i32 %i, [2 x i64] %s1.coerce, [2 x i64] %s2.coerce)
// CHECK: define{{.*}} i32 @f40(i32 %i, [2 x i64] %s1.coerce, [2 x i64] %s2.coerce)
// CHECK: %s1 = alloca %struct.s40, align 4
// CHECK: %s2 = alloca %struct.s40, align 4
// CHECK: store [2 x i64] %s1.coerce, [2 x i64]* %{{.*}}, align 4
@ -394,7 +394,7 @@ int f40(int i, s40_no_align s1, s40_no_align s2) {
s40_no_align g40;
s40_no_align g40_2;
int caller40() {
// CHECK: define i32 @caller40()
// CHECK: define{{.*}} i32 @caller40()
// CHECK: %[[a:.*]] = load [2 x i64], [2 x i64]* bitcast (%struct.s40* @g40 to [2 x i64]*), align 4
// CHECK: %[[b:.*]] = load [2 x i64], [2 x i64]* bitcast (%struct.s40* @g40_2 to [2 x i64]*), align 4
// CHECK: call i32 @f40(i32 3, [2 x i64] %[[a]], [2 x i64] %[[b]])
@ -404,7 +404,7 @@ int caller40() {
__attribute__ ((noinline))
int f40_stack(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8,
int i9, s40_no_align s1, s40_no_align s2) {
// CHECK: define i32 @f40_stack(i32 %i, i32 %i2, i32 %i3, i32 %i4, i32 %i5, i32 %i6, i32 %i7, i32 %i8, i32 %i9, [2 x i64] %s1.coerce, [2 x i64] %s2.coerce)
// CHECK: define{{.*}} i32 @f40_stack(i32 %i, i32 %i2, i32 %i3, i32 %i4, i32 %i5, i32 %i6, i32 %i7, i32 %i8, i32 %i9, [2 x i64] %s1.coerce, [2 x i64] %s2.coerce)
// CHECK: %s1 = alloca %struct.s40, align 4
// CHECK: %s2 = alloca %struct.s40, align 4
// CHECK: store [2 x i64] %s1.coerce, [2 x i64]* %{{.*}}, align 4
@ -416,7 +416,7 @@ int f40_stack(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8,
return s1.i + s2.i + i + i2 + i3 + i4 + i5 + i6 + i7 + i8 + i9 + s1.s + s2.s;
}
int caller40_stack() {
// CHECK: define i32 @caller40_stack()
// CHECK: define{{.*}} i32 @caller40_stack()
// CHECK: %[[a:.*]] = load [2 x i64], [2 x i64]* bitcast (%struct.s40* @g40 to [2 x i64]*), align 4
// CHECK: %[[b:.*]] = load [2 x i64], [2 x i64]* bitcast (%struct.s40* @g40_2 to [2 x i64]*), align 4
// CHECK: call i32 @f40_stack(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, [2 x i64] %[[a]], [2 x i64] %[[b]])
@ -435,7 +435,7 @@ typedef struct s41 s41_with_align;
// passing aligned structs in registers
__attribute__ ((noinline))
int f41(int i, s41_with_align s1, s41_with_align s2) {
// CHECK: define i32 @f41(i32 %i, i128 %s1.coerce, i128 %s2.coerce)
// CHECK: define{{.*}} i32 @f41(i32 %i, i128 %s1.coerce, i128 %s2.coerce)
// CHECK: %s1 = alloca %struct.s41, align 16
// CHECK: %s2 = alloca %struct.s41, align 16
// CHECK: store i128 %s1.coerce, i128* %{{.*}}, align 16
@ -449,7 +449,7 @@ int f41(int i, s41_with_align s1, s41_with_align s2) {
s41_with_align g41;
s41_with_align g41_2;
int caller41() {
// CHECK: define i32 @caller41()
// CHECK: define{{.*}} i32 @caller41()
// CHECK: %[[a:.*]] = load i128, i128* bitcast (%struct.s41* @g41 to i128*), align 16
// CHECK: %[[b:.*]] = load i128, i128* bitcast (%struct.s41* @g41_2 to i128*), align 16
// CHECK: call i32 @f41(i32 3, i128 %[[a]], i128 %[[b]])
@ -459,7 +459,7 @@ int caller41() {
__attribute__ ((noinline))
int f41_stack(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8,
int i9, s41_with_align s1, s41_with_align s2) {
// CHECK: define i32 @f41_stack(i32 %i, i32 %i2, i32 %i3, i32 %i4, i32 %i5, i32 %i6, i32 %i7, i32 %i8, i32 %i9, i128 %s1.coerce, i128 %s2.coerce)
// CHECK: define{{.*}} i32 @f41_stack(i32 %i, i32 %i2, i32 %i3, i32 %i4, i32 %i5, i32 %i6, i32 %i7, i32 %i8, i32 %i9, i128 %s1.coerce, i128 %s2.coerce)
// CHECK: %s1 = alloca %struct.s41, align 16
// CHECK: %s2 = alloca %struct.s41, align 16
// CHECK: store i128 %s1.coerce, i128* %{{.*}}, align 16
@ -471,7 +471,7 @@ int f41_stack(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8,
return s1.i + s2.i + i + i2 + i3 + i4 + i5 + i6 + i7 + i8 + i9 + s1.s + s2.s;
}
int caller41_stack() {
// CHECK: define i32 @caller41_stack()
// CHECK: define{{.*}} i32 @caller41_stack()
// CHECK: %[[a:.*]] = load i128, i128* bitcast (%struct.s41* @g41 to i128*), align 16
// CHECK: %[[b:.*]] = load i128, i128* bitcast (%struct.s41* @g41_2 to i128*), align 16
// CHECK: call i32 @f41_stack(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i128 %[[a]], i128 %[[b]])
@ -492,7 +492,7 @@ typedef struct s42 s42_no_align;
// passing structs in registers
__attribute__ ((noinline))
int f42(int i, s42_no_align s1, s42_no_align s2) {
// CHECK: define i32 @f42(i32 %i, %struct.s42* %s1, %struct.s42* %s2)
// CHECK: define{{.*}} i32 @f42(i32 %i, %struct.s42* %s1, %struct.s42* %s2)
// CHECK: getelementptr inbounds %struct.s42, %struct.s42* %s1, i32 0, i32 0
// CHECK: getelementptr inbounds %struct.s42, %struct.s42* %s2, i32 0, i32 0
// CHECK: getelementptr inbounds %struct.s42, %struct.s42* %s1, i32 0, i32 1
@ -502,7 +502,7 @@ int f42(int i, s42_no_align s1, s42_no_align s2) {
s42_no_align g42;
s42_no_align g42_2;
int caller42() {
// CHECK: define i32 @caller42()
// CHECK: define{{.*}} i32 @caller42()
// CHECK: %[[a:.*]] = alloca %struct.s42, align 4
// CHECK: %[[b:.*]] = alloca %struct.s42, align 4
// CHECK: %[[c:.*]] = bitcast %struct.s42* %[[a]] to i8*
@ -516,7 +516,7 @@ int caller42() {
__attribute__ ((noinline))
int f42_stack(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8,
int i9, s42_no_align s1, s42_no_align s2) {
// CHECK: define i32 @f42_stack(i32 %i, i32 %i2, i32 %i3, i32 %i4, i32 %i5, i32 %i6, i32 %i7, i32 %i8, i32 %i9, %struct.s42* %s1, %struct.s42* %s2)
// CHECK: define{{.*}} i32 @f42_stack(i32 %i, i32 %i2, i32 %i3, i32 %i4, i32 %i5, i32 %i6, i32 %i7, i32 %i8, i32 %i9, %struct.s42* %s1, %struct.s42* %s2)
// CHECK: getelementptr inbounds %struct.s42, %struct.s42* %s1, i32 0, i32 0
// CHECK: getelementptr inbounds %struct.s42, %struct.s42* %s2, i32 0, i32 0
// CHECK: getelementptr inbounds %struct.s42, %struct.s42* %s1, i32 0, i32 1
@ -524,7 +524,7 @@ int f42_stack(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8,
return s1.i + s2.i + i + i2 + i3 + i4 + i5 + i6 + i7 + i8 + i9 + s1.s + s2.s;
}
int caller42_stack() {
// CHECK: define i32 @caller42_stack()
// CHECK: define{{.*}} i32 @caller42_stack()
// CHECK: %[[a:.*]] = alloca %struct.s42, align 4
// CHECK: %[[b:.*]] = alloca %struct.s42, align 4
// CHECK: %[[c:.*]] = bitcast %struct.s42* %[[a]] to i8*
@ -549,7 +549,7 @@ typedef struct s43 s43_with_align;
// passing aligned structs in registers
__attribute__ ((noinline))
int f43(int i, s43_with_align s1, s43_with_align s2) {
// CHECK: define i32 @f43(i32 %i, %struct.s43* %s1, %struct.s43* %s2)
// CHECK: define{{.*}} i32 @f43(i32 %i, %struct.s43* %s1, %struct.s43* %s2)
// CHECK: getelementptr inbounds %struct.s43, %struct.s43* %s1, i32 0, i32 0
// CHECK: getelementptr inbounds %struct.s43, %struct.s43* %s2, i32 0, i32 0
// CHECK: getelementptr inbounds %struct.s43, %struct.s43* %s1, i32 0, i32 1
@ -559,7 +559,7 @@ int f43(int i, s43_with_align s1, s43_with_align s2) {
s43_with_align g43;
s43_with_align g43_2;
int caller43() {
// CHECK: define i32 @caller43()
// CHECK: define{{.*}} i32 @caller43()
// CHECK: %[[a:.*]] = alloca %struct.s43, align 16
// CHECK: %[[b:.*]] = alloca %struct.s43, align 16
// CHECK: %[[c:.*]] = bitcast %struct.s43* %[[a]] to i8*
@ -573,7 +573,7 @@ int caller43() {
__attribute__ ((noinline))
int f43_stack(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8,
int i9, s43_with_align s1, s43_with_align s2) {
// CHECK: define i32 @f43_stack(i32 %i, i32 %i2, i32 %i3, i32 %i4, i32 %i5, i32 %i6, i32 %i7, i32 %i8, i32 %i9, %struct.s43* %s1, %struct.s43* %s2)
// CHECK: define{{.*}} i32 @f43_stack(i32 %i, i32 %i2, i32 %i3, i32 %i4, i32 %i5, i32 %i6, i32 %i7, i32 %i8, i32 %i9, %struct.s43* %s1, %struct.s43* %s2)
// CHECK: getelementptr inbounds %struct.s43, %struct.s43* %s1, i32 0, i32 0
// CHECK: getelementptr inbounds %struct.s43, %struct.s43* %s2, i32 0, i32 0
// CHECK: getelementptr inbounds %struct.s43, %struct.s43* %s1, i32 0, i32 1
@ -581,7 +581,7 @@ int f43_stack(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8,
return s1.i + s2.i + i + i2 + i3 + i4 + i5 + i6 + i7 + i8 + i9 + s1.s + s2.s;
}
int caller43_stack() {
// CHECK: define i32 @caller43_stack()
// CHECK: define{{.*}} i32 @caller43_stack()
// CHECK: %[[a:.*]] = alloca %struct.s43, align 16
// CHECK: %[[b:.*]] = alloca %struct.s43, align 16
// CHECK: %[[c:.*]] = bitcast %struct.s43* %[[a]] to i8*
@ -597,11 +597,11 @@ int caller43_stack() {
__attribute__ ((noinline))
int f40_split(int i, int i2, int i3, int i4, int i5, int i6, int i7,
s40_no_align s1, s40_no_align s2) {
// CHECK: define i32 @f40_split(i32 %i, i32 %i2, i32 %i3, i32 %i4, i32 %i5, i32 %i6, i32 %i7, [2 x i64] %s1.coerce, [2 x i64] %s2.coerce)
// CHECK: define{{.*}} i32 @f40_split(i32 %i, i32 %i2, i32 %i3, i32 %i4, i32 %i5, i32 %i6, i32 %i7, [2 x i64] %s1.coerce, [2 x i64] %s2.coerce)
return s1.i + s2.i + i + i2 + i3 + i4 + i5 + i6 + i7 + s1.s + s2.s;
}
int caller40_split() {
// CHECK: define i32 @caller40_split()
// CHECK: define{{.*}} i32 @caller40_split()
// CHECK: call i32 @f40_split(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, [2 x i64] %{{.*}} [2 x i64] %{{.*}})
return f40_split(1, 2, 3, 4, 5, 6, 7, g40, g40_2);
}
@ -609,11 +609,11 @@ int caller40_split() {
__attribute__ ((noinline))
int f41_split(int i, int i2, int i3, int i4, int i5, int i6, int i7,
s41_with_align s1, s41_with_align s2) {
// CHECK: define i32 @f41_split(i32 %i, i32 %i2, i32 %i3, i32 %i4, i32 %i5, i32 %i6, i32 %i7, i128 %s1.coerce, i128 %s2.coerce)
// CHECK: define{{.*}} i32 @f41_split(i32 %i, i32 %i2, i32 %i3, i32 %i4, i32 %i5, i32 %i6, i32 %i7, i128 %s1.coerce, i128 %s2.coerce)
return s1.i + s2.i + i + i2 + i3 + i4 + i5 + i6 + i7 + s1.s + s2.s;
}
int caller41_split() {
// CHECK: define i32 @caller41_split()
// CHECK: define{{.*}} i32 @caller41_split()
// CHECK: call i32 @f41_split(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i128 %{{.*}}, i128 %{{.*}})
return f41_split(1, 2, 3, 4, 5, 6, 7, g41, g41_2);
}
@ -624,7 +624,7 @@ struct HFA {
};
float test_hfa(int n, ...) {
// CHECK-LABEL: define float @test_hfa(i32 %n, ...)
// CHECK-LABEL: define{{.*}} float @test_hfa(i32 %n, ...)
// CHECK: [[THELIST:%.*]] = alloca i8*
// CHECK: [[CURLIST:%.*]] = load i8*, i8** [[THELIST]]
@ -640,7 +640,7 @@ float test_hfa(int n, ...) {
}
float test_hfa_call(struct HFA *a) {
// CHECK-LABEL: define float @test_hfa_call(%struct.HFA* %a)
// CHECK-LABEL: define{{.*}} float @test_hfa_call(%struct.HFA* %a)
// CHECK: call float (i32, ...) @test_hfa(i32 1, [4 x float] {{.*}})
test_hfa(1, *a);
}
@ -650,7 +650,7 @@ struct TooBigHFA {
};
float test_toobig_hfa(int n, ...) {
// CHECK-LABEL: define float @test_toobig_hfa(i32 %n, ...)
// CHECK-LABEL: define{{.*}} float @test_toobig_hfa(i32 %n, ...)
// CHECK: [[THELIST:%.*]] = alloca i8*
// CHECK: [[CURLIST:%.*]] = load i8*, i8** [[THELIST]]
@ -672,7 +672,7 @@ struct HVA {
};
int32x4_t test_hva(int n, ...) {
// CHECK-LABEL: define <4 x i32> @test_hva(i32 %n, ...)
// CHECK-LABEL: define{{.*}} <4 x i32> @test_hva(i32 %n, ...)
// CHECK: [[THELIST:%.*]] = alloca i8*
// CHECK: [[CURLIST:%.*]] = load i8*, i8** [[THELIST]]
@ -698,7 +698,7 @@ struct TooBigHVA {
};
int32x4_t test_toobig_hva(int n, ...) {
// CHECK-LABEL: define <4 x i32> @test_toobig_hva(i32 %n, ...)
// CHECK-LABEL: define{{.*}} <4 x i32> @test_toobig_hva(i32 %n, ...)
// CHECK: [[THELIST:%.*]] = alloca i8*
// CHECK: [[CURLIST:%.*]] = load i8*, i8** [[THELIST]]
@ -719,7 +719,7 @@ typedef __attribute__((__ext_vector_type__(3))) float float32x3_t;
typedef struct { float32x3_t arr[4]; } HFAv3;
float32x3_t test_hva_v3(int n, ...) {
// CHECK-LABEL: define <3 x float> @test_hva_v3(i32 %n, ...)
// CHECK-LABEL: define{{.*}} <3 x float> @test_hva_v3(i32 %n, ...)
// CHECK: [[THELIST:%.*]] = alloca i8*
// CHECK: [[CURLIST:%.*]] = load i8*, i8** [[THELIST]]
@ -741,7 +741,7 @@ float32x3_t test_hva_v3(int n, ...) {
}
float32x3_t test_hva_v3_call(HFAv3 *a) {
// CHECK-LABEL: define <3 x float> @test_hva_v3_call(%struct.HFAv3* %a)
// CHECK-LABEL: define{{.*}} <3 x float> @test_hva_v3_call(%struct.HFAv3* %a)
// CHECK: call <3 x float> (i32, ...) @test_hva_v3(i32 1, [4 x <4 x float>] {{.*}})
return test_hva_v3(1, *a);
}

View File

@ -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
@ -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
@ -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
@ -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;
}
@ -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
@ -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

View File

@ -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> {{%.*}})

View File

@ -4,7 +4,7 @@
#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]]
@ -12,7 +12,7 @@ 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]]
@ -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]]
@ -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]]
@ -39,7 +39,7 @@ 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]]
@ -47,7 +47,7 @@ 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]]
@ -55,7 +55,7 @@ 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]]
@ -63,7 +63,7 @@ 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]]
@ -71,7 +71,7 @@ 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]]
@ -79,7 +79,7 @@ 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]]

View File

@ -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]]
@ -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
@ -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
@ -38,7 +38,7 @@ 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]]
@ -46,7 +46,7 @@ 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
@ -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

View File

@ -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 {
@ -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
@ -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 {
@ -64,7 +64,7 @@ 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 {
@ -72,17 +72,17 @@ typedef struct {
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*

View File

@ -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);

View File

@ -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;
@ -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;

View File

@ -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
@ -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*
@ -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*
@ -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
@ -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*

View File

@ -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

View File

@ -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;

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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
@ -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

View File

@ -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;
@ -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;
@ -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);
@ -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;
@ -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]])
@ -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
@ -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();
@ -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;
@ -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) {
@ -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) {
@ -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;
@ -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) {
@ -801,7 +801,7 @@ 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);
@ -809,7 +809,7 @@ void test_builtin_os_log_merge_helper0(void *buf, int i, double 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);
@ -817,7 +817,7 @@ void test_builtin_os_log_merge_helper1(void *buf, unsigned u, long long 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
@ -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

View File

@ -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) {
@ -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
@ -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

View File

@ -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
@ -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
@ -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
@ -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
@ -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

View File

@ -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 {{.*}})

View File

@ -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 }

View File

@ -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};
@ -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() {
@ -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.]+]],
@ -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
@ -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;
@ -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() {

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -32,243 +32,243 @@
// Make sure 128 and 64 bit versions are passed like integers, and that >128
// is passed indirectly.
void ParamPassing(_ExtInt(129) a, _ExtInt(128) b, _ExtInt(64) c) {}
// LIN64: define void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i64 %{{.+}}, i64 %{{.+}}, i64 %{{.+}})
// LIN64: define{{.*}} void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i64 %{{.+}}, i64 %{{.+}}, i64 %{{.+}})
// WIN64: define dso_local void @ParamPassing(i129* %{{.+}}, i128* %{{.+}}, i64 %{{.+}})
// LIN32: define void @ParamPassing(i129* %{{.+}}, i128* %{{.+}}, i64 %{{.+}})
// LIN32: define{{.*}} void @ParamPassing(i129* %{{.+}}, i128* %{{.+}}, i64 %{{.+}})
// WIN32: define dso_local void @ParamPassing(i129* %{{.+}}, i128* %{{.+}}, i64 %{{.+}})
// NACL: define void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128* byval(i128) align 8 %{{.+}}, i64 %{{.+}})
// NVPTX64: define void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128 %{{.+}}, i64 %{{.+}})
// NVPTX: define void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128* byval(i128) align 8 %{{.+}}, i64 %{{.+}})
// SPARCV9: define void @ParamPassing(i129* %{{.+}}, i128 %{{.+}}, i64 %{{.+}})
// SPARC: define void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128* byval(i128) align 8 %{{.+}}, i64 %{{.+}})
// MIPS64: define void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128 signext %{{.+}}, i64 signext %{{.+}})
// MIPS: define void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128* byval(i128) align 8 %{{.+}}, i64 signext %{{.+}})
// NACL: define{{.*}} void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128* byval(i128) align 8 %{{.+}}, i64 %{{.+}})
// NVPTX64: define{{.*}} void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128 %{{.+}}, i64 %{{.+}})
// NVPTX: define{{.*}} void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128* byval(i128) align 8 %{{.+}}, i64 %{{.+}})
// SPARCV9: define{{.*}} void @ParamPassing(i129* %{{.+}}, i128 %{{.+}}, i64 %{{.+}})
// SPARC: define{{.*}} void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128* byval(i128) align 8 %{{.+}}, i64 %{{.+}})
// MIPS64: define{{.*}} void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128 signext %{{.+}}, i64 signext %{{.+}})
// MIPS: define{{.*}} void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128* byval(i128) align 8 %{{.+}}, i64 signext %{{.+}})
// SPIR64: define spir_func void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128* byval(i128) align 8 %{{.+}}, i64 %{{.+}})
// SPIR: define spir_func void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128* byval(i128) align 8 %{{.+}}, i64 %{{.+}})
// HEX: define void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128* byval(i128) align 8 %{{.+}}, i64 %{{.+}})
// LANAI: define void @ParamPassing(i129* byval(i129) align 4 %{{.+}}, i128* byval(i128) align 4 %{{.+}}, i64 %{{.+}})
// R600: define void @ParamPassing(i129 addrspace(5)* byval(i129) align 8 %{{.+}}, i128 addrspace(5)* byval(i128) align 8 %{{.+}}, i64 %{{.+}})
// ARC: define void @ParamPassing(i129* byval(i129) align 4 %{{.+}}, i128* byval(i128) align 4 %{{.+}}, i64 inreg %{{.+}})
// XCORE: define void @ParamPassing(i129* byval(i129) align 4 %{{.+}}, i128* byval(i128) align 4 %{{.+}}, i64 %{{.+}})
// RISCV64: define void @ParamPassing(i129* %{{.+}}, i128 %{{.+}}, i64 %{{.+}})
// RISCV32: define void @ParamPassing(i129* %{{.+}}, i128* %{{.+}}, i64 %{{.+}})
// WASM: define void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128 %{{.+}}, i64 %{{.+}})
// SYSTEMZ: define void @ParamPassing(i129* %{{.+}}, i128* %{{.+}}, i64 %{{.+}})
// PPC64: define void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128 %{{.+}}, i64 %{{.+}})
// PPC32: define void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128* byval(i128) align 8 %{{.+}}, i64 %{{.+}})
// AARCH64: define void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128 %{{.+}}, i64 %{{.+}})
// AARCH64DARWIN: define void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128 %{{.+}}, i64 %{{.+}})
// ARM: define arm_aapcscc void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128* byval(i128) align 8 %{{.+}}, i64 %{{.+}})
// HEX: define{{.*}} void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128* byval(i128) align 8 %{{.+}}, i64 %{{.+}})
// LANAI: define{{.*}} void @ParamPassing(i129* byval(i129) align 4 %{{.+}}, i128* byval(i128) align 4 %{{.+}}, i64 %{{.+}})
// R600: define{{.*}} void @ParamPassing(i129 addrspace(5)* byval(i129) align 8 %{{.+}}, i128 addrspace(5)* byval(i128) align 8 %{{.+}}, i64 %{{.+}})
// ARC: define{{.*}} void @ParamPassing(i129* byval(i129) align 4 %{{.+}}, i128* byval(i128) align 4 %{{.+}}, i64 inreg %{{.+}})
// XCORE: define{{.*}} void @ParamPassing(i129* byval(i129) align 4 %{{.+}}, i128* byval(i128) align 4 %{{.+}}, i64 %{{.+}})
// RISCV64: define{{.*}} void @ParamPassing(i129* %{{.+}}, i128 %{{.+}}, i64 %{{.+}})
// RISCV32: define{{.*}} void @ParamPassing(i129* %{{.+}}, i128* %{{.+}}, i64 %{{.+}})
// WASM: define{{.*}} void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128 %{{.+}}, i64 %{{.+}})
// SYSTEMZ: define{{.*}} void @ParamPassing(i129* %{{.+}}, i128* %{{.+}}, i64 %{{.+}})
// PPC64: define{{.*}} void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128 %{{.+}}, i64 %{{.+}})
// PPC32: define{{.*}} void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128* byval(i128) align 8 %{{.+}}, i64 %{{.+}})
// AARCH64: define{{.*}} void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128 %{{.+}}, i64 %{{.+}})
// AARCH64DARWIN: define{{.*}} void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128 %{{.+}}, i64 %{{.+}})
// ARM: define{{.*}} arm_aapcscc void @ParamPassing(i129* byval(i129) align 8 %{{.+}}, i128* byval(i128) align 8 %{{.+}}, i64 %{{.+}})
void ParamPassing2(_ExtInt(129) a, _ExtInt(127) b, _ExtInt(63) c) {}
// LIN64: define void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i64 %{{.+}}, i64 %{{.+}}, i64 %{{.+}})
// LIN64: define{{.*}} void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i64 %{{.+}}, i64 %{{.+}}, i64 %{{.+}})
// WIN64: define dso_local void @ParamPassing2(i129* %{{.+}}, i127* %{{.+}}, i63 %{{.+}})
// LIN32: define void @ParamPassing2(i129* %{{.+}}, i127* %{{.+}}, i63 %{{.+}})
// LIN32: define{{.*}} void @ParamPassing2(i129* %{{.+}}, i127* %{{.+}}, i63 %{{.+}})
// WIN32: define dso_local void @ParamPassing2(i129* %{{.+}}, i127* %{{.+}}, i63 %{{.+}})
// NACL: define void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127* byval(i127) align 8 %{{.+}}, i63 %{{.+}})
// NVPTX64: define void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127 %{{.+}}, i63 %{{.+}})
// NVPTX: define void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127* byval(i127) align 8 %{{.+}}, i63 %{{.+}})
// SPARCV9: define void @ParamPassing2(i129* %{{.+}}, i127 %{{.+}}, i63 signext %{{.+}})
// SPARC: define void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127* byval(i127) align 8 %{{.+}}, i63 %{{.+}})
// MIPS64: define void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127 signext %{{.+}}, i63 signext %{{.+}})
// MIPS: define void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127* byval(i127) align 8 %{{.+}}, i63 signext %{{.+}})
// NACL: define{{.*}} void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127* byval(i127) align 8 %{{.+}}, i63 %{{.+}})
// NVPTX64: define{{.*}} void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127 %{{.+}}, i63 %{{.+}})
// NVPTX: define{{.*}} void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127* byval(i127) align 8 %{{.+}}, i63 %{{.+}})
// SPARCV9: define{{.*}} void @ParamPassing2(i129* %{{.+}}, i127 %{{.+}}, i63 signext %{{.+}})
// SPARC: define{{.*}} void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127* byval(i127) align 8 %{{.+}}, i63 %{{.+}})
// MIPS64: define{{.*}} void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127 signext %{{.+}}, i63 signext %{{.+}})
// MIPS: define{{.*}} void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127* byval(i127) align 8 %{{.+}}, i63 signext %{{.+}})
// SPIR64: define spir_func void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127* byval(i127) align 8 %{{.+}}, i63 %{{.+}})
// SPIR: define spir_func void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127* byval(i127) align 8 %{{.+}}, i63 %{{.+}})
// HEX: define void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127* byval(i127) align 8 %{{.+}}, i63 %{{.+}})
// LANAI: define void @ParamPassing2(i129* byval(i129) align 4 %{{.+}}, i127* byval(i127) align 4 %{{.+}}, i63 %{{.+}})
// R600: define void @ParamPassing2(i129 addrspace(5)* byval(i129) align 8 %{{.+}}, i127 addrspace(5)* byval(i127) align 8 %{{.+}}, i63 %{{.+}})
// ARC: define void @ParamPassing2(i129* byval(i129) align 4 %{{.+}}, i127* byval(i127) align 4 %{{.+}}, i63 inreg %{{.+}})
// XCORE: define void @ParamPassing2(i129* byval(i129) align 4 %{{.+}}, i127* byval(i127) align 4 %{{.+}}, i63 %{{.+}})
// RISCV64: define void @ParamPassing2(i129* %{{.+}}, i127 %{{.+}}, i63 signext %{{.+}})
// RISCV32: define void @ParamPassing2(i129* %{{.+}}, i127* %{{.+}}, i63 %{{.+}})
// WASM: define void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127 %{{.+}}, i63 %{{.+}})
// SYSTEMZ: define void @ParamPassing2(i129* %{{.+}}, i127* %{{.+}}, i63 signext %{{.+}})
// PPC64: define void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127 %{{.+}}, i63 signext %{{.+}})
// PPC32: define void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127* byval(i127) align 8 %{{.+}}, i63 %{{.+}})
// AARCH64: define void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127 %{{.+}}, i63 %{{.+}})
// AARCH64DARWIN: define void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127 %{{.+}}, i63 %{{.+}})
// ARM: define arm_aapcscc void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127* byval(i127) align 8 %{{.+}}, i63 %{{.+}})
// HEX: define{{.*}} void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127* byval(i127) align 8 %{{.+}}, i63 %{{.+}})
// LANAI: define{{.*}} void @ParamPassing2(i129* byval(i129) align 4 %{{.+}}, i127* byval(i127) align 4 %{{.+}}, i63 %{{.+}})
// R600: define{{.*}} void @ParamPassing2(i129 addrspace(5)* byval(i129) align 8 %{{.+}}, i127 addrspace(5)* byval(i127) align 8 %{{.+}}, i63 %{{.+}})
// ARC: define{{.*}} void @ParamPassing2(i129* byval(i129) align 4 %{{.+}}, i127* byval(i127) align 4 %{{.+}}, i63 inreg %{{.+}})
// XCORE: define{{.*}} void @ParamPassing2(i129* byval(i129) align 4 %{{.+}}, i127* byval(i127) align 4 %{{.+}}, i63 %{{.+}})
// RISCV64: define{{.*}} void @ParamPassing2(i129* %{{.+}}, i127 %{{.+}}, i63 signext %{{.+}})
// RISCV32: define{{.*}} void @ParamPassing2(i129* %{{.+}}, i127* %{{.+}}, i63 %{{.+}})
// WASM: define{{.*}} void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127 %{{.+}}, i63 %{{.+}})
// SYSTEMZ: define{{.*}} void @ParamPassing2(i129* %{{.+}}, i127* %{{.+}}, i63 signext %{{.+}})
// PPC64: define{{.*}} void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127 %{{.+}}, i63 signext %{{.+}})
// PPC32: define{{.*}} void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127* byval(i127) align 8 %{{.+}}, i63 %{{.+}})
// AARCH64: define{{.*}} void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127 %{{.+}}, i63 %{{.+}})
// AARCH64DARWIN: define{{.*}} void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127 %{{.+}}, i63 %{{.+}})
// ARM: define{{.*}} arm_aapcscc void @ParamPassing2(i129* byval(i129) align 8 %{{.+}}, i127* byval(i127) align 8 %{{.+}}, i63 %{{.+}})
// Make sure we follow the signext rules for promotable integer types.
void ParamPassing3(_ExtInt(15) a, _ExtInt(31) b) {}
// LIN64: define void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// LIN64: define{{.*}} void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// WIN64: define dso_local void @ParamPassing3(i15 %{{.+}}, i31 %{{.+}})
// LIN32: define void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// LIN32: define{{.*}} void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// WIN32: define dso_local void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// NACL: define void @ParamPassing3(i15 %{{.+}}, i31 %{{.+}})
// NVPTX64: define void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// NVPTX: define void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// SPARCV9: define void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// SPARC: define void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// MIPS64: define void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// MIPS: define void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// NACL: define{{.*}} void @ParamPassing3(i15 %{{.+}}, i31 %{{.+}})
// NVPTX64: define{{.*}} void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// NVPTX: define{{.*}} void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// SPARCV9: define{{.*}} void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// SPARC: define{{.*}} void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// MIPS64: define{{.*}} void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// MIPS: define{{.*}} void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// SPIR64: define spir_func void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// SPIR: define spir_func void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// HEX: define void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// LANAI: define void @ParamPassing3(i15 inreg %{{.+}}, i31 inreg %{{.+}})
// R600: define void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// ARC: define void @ParamPassing3(i15 inreg signext %{{.+}}, i31 inreg signext %{{.+}})
// XCORE: define void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// RISCV64: define void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// RISCV32: define void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// WASM: define void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// SYSTEMZ: define void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// PPC64: define void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// PPC32: define void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// AARCH64: define void @ParamPassing3(i15 %{{.+}}, i31 %{{.+}})
// AARCH64DARWIN: define void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// ARM: define arm_aapcscc void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// HEX: define{{.*}} void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// LANAI: define{{.*}} void @ParamPassing3(i15 inreg %{{.+}}, i31 inreg %{{.+}})
// R600: define{{.*}} void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// ARC: define{{.*}} void @ParamPassing3(i15 inreg signext %{{.+}}, i31 inreg signext %{{.+}})
// XCORE: define{{.*}} void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// RISCV64: define{{.*}} void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// RISCV32: define{{.*}} void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// WASM: define{{.*}} void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// SYSTEMZ: define{{.*}} void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// PPC64: define{{.*}} void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// PPC32: define{{.*}} void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// AARCH64: define{{.*}} void @ParamPassing3(i15 %{{.+}}, i31 %{{.+}})
// AARCH64DARWIN: define{{.*}} void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
// ARM: define{{.*}} arm_aapcscc void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
_ExtInt(63) ReturnPassing(){}
// LIN64: define i64 @ReturnPassing(
// LIN64: define{{.*}} i64 @ReturnPassing(
// WIN64: define dso_local i63 @ReturnPassing(
// LIN32: define i63 @ReturnPassing(
// LIN32: define{{.*}} i63 @ReturnPassing(
// WIN32: define dso_local i63 @ReturnPassing(
// NACL: define i63 @ReturnPassing(
// NVPTX64: define i63 @ReturnPassing(
// NVPTX: define i63 @ReturnPassing(
// SPARCV9: define signext i63 @ReturnPassing(
// SPARC: define i63 @ReturnPassing(
// MIPS64: define i63 @ReturnPassing(
// MIPS: define i63 @ReturnPassing(
// NACL: define{{.*}} i63 @ReturnPassing(
// NVPTX64: define{{.*}} i63 @ReturnPassing(
// NVPTX: define{{.*}} i63 @ReturnPassing(
// SPARCV9: define{{.*}} signext i63 @ReturnPassing(
// SPARC: define{{.*}} i63 @ReturnPassing(
// MIPS64: define{{.*}} i63 @ReturnPassing(
// MIPS: define{{.*}} i63 @ReturnPassing(
// SPIR64: define spir_func i63 @ReturnPassing(
// SPIR: define spir_func i63 @ReturnPassing(
// HEX: define i63 @ReturnPassing(
// LANAI: define i63 @ReturnPassing(
// R600: define i63 @ReturnPassing(
// ARC: define i63 @ReturnPassing(
// XCORE: define i63 @ReturnPassing(
// RISCV64: define signext i63 @ReturnPassing(
// RISCV32: define i63 @ReturnPassing(
// WASM: define i63 @ReturnPassing(
// SYSTEMZ: define signext i63 @ReturnPassing(
// PPC64: define signext i63 @ReturnPassing(
// PPC32: define i63 @ReturnPassing(
// AARCH64: define i63 @ReturnPassing(
// AARCH64DARWIN: define i63 @ReturnPassing(
// ARM: define arm_aapcscc i63 @ReturnPassing(
// HEX: define{{.*}} i63 @ReturnPassing(
// LANAI: define{{.*}} i63 @ReturnPassing(
// R600: define{{.*}} i63 @ReturnPassing(
// ARC: define{{.*}} i63 @ReturnPassing(
// XCORE: define{{.*}} i63 @ReturnPassing(
// RISCV64: define{{.*}} signext i63 @ReturnPassing(
// RISCV32: define{{.*}} i63 @ReturnPassing(
// WASM: define{{.*}} i63 @ReturnPassing(
// SYSTEMZ: define{{.*}} signext i63 @ReturnPassing(
// PPC64: define{{.*}} signext i63 @ReturnPassing(
// PPC32: define{{.*}} i63 @ReturnPassing(
// AARCH64: define{{.*}} i63 @ReturnPassing(
// AARCH64DARWIN: define{{.*}} i63 @ReturnPassing(
// ARM: define{{.*}} arm_aapcscc i63 @ReturnPassing(
_ExtInt(64) ReturnPassing2(){}
// LIN64: define i64 @ReturnPassing2(
// LIN64: define{{.*}} i64 @ReturnPassing2(
// WIN64: define dso_local i64 @ReturnPassing2(
// LIN32: define i64 @ReturnPassing2(
// LIN32: define{{.*}} i64 @ReturnPassing2(
// WIN32: define dso_local i64 @ReturnPassing2(
// NACL: define i64 @ReturnPassing2(
// NVPTX64: define i64 @ReturnPassing2(
// NVPTX: define i64 @ReturnPassing2(
// SPARCV9: define i64 @ReturnPassing2(
// SPARC: define i64 @ReturnPassing2(
// MIPS64: define i64 @ReturnPassing2(
// MIPS: define i64 @ReturnPassing2(
// NACL: define{{.*}} i64 @ReturnPassing2(
// NVPTX64: define{{.*}} i64 @ReturnPassing2(
// NVPTX: define{{.*}} i64 @ReturnPassing2(
// SPARCV9: define{{.*}} i64 @ReturnPassing2(
// SPARC: define{{.*}} i64 @ReturnPassing2(
// MIPS64: define{{.*}} i64 @ReturnPassing2(
// MIPS: define{{.*}} i64 @ReturnPassing2(
// SPIR64: define spir_func i64 @ReturnPassing2(
// SPIR: define spir_func i64 @ReturnPassing2(
// HEX: define i64 @ReturnPassing2(
// LANAI: define i64 @ReturnPassing2(
// R600: define i64 @ReturnPassing2(
// ARC: define i64 @ReturnPassing2(
// XCORE: define i64 @ReturnPassing2(
// RISCV64: define i64 @ReturnPassing2(
// RISCV32: define i64 @ReturnPassing2(
// WASM: define i64 @ReturnPassing2(
// SYSTEMZ: define i64 @ReturnPassing2(
// PPC64: define i64 @ReturnPassing2(
// PPC32: define i64 @ReturnPassing2(
// AARCH64: define i64 @ReturnPassing2(
// AARCH64DARWIN: define i64 @ReturnPassing2(
// ARM: define arm_aapcscc i64 @ReturnPassing2(
// HEX: define{{.*}} i64 @ReturnPassing2(
// LANAI: define{{.*}} i64 @ReturnPassing2(
// R600: define{{.*}} i64 @ReturnPassing2(
// ARC: define{{.*}} i64 @ReturnPassing2(
// XCORE: define{{.*}} i64 @ReturnPassing2(
// RISCV64: define{{.*}} i64 @ReturnPassing2(
// RISCV32: define{{.*}} i64 @ReturnPassing2(
// WASM: define{{.*}} i64 @ReturnPassing2(
// SYSTEMZ: define{{.*}} i64 @ReturnPassing2(
// PPC64: define{{.*}} i64 @ReturnPassing2(
// PPC32: define{{.*}} i64 @ReturnPassing2(
// AARCH64: define{{.*}} i64 @ReturnPassing2(
// AARCH64DARWIN: define{{.*}} i64 @ReturnPassing2(
// ARM: define{{.*}} arm_aapcscc i64 @ReturnPassing2(
_ExtInt(127) ReturnPassing3(){}
// LIN64: define { i64, i64 } @ReturnPassing3(
// LIN64: define{{.*}} { i64, i64 } @ReturnPassing3(
// WIN64: define dso_local void @ReturnPassing3(i127* noalias sret
// LIN32: define void @ReturnPassing3(i127* noalias sret
// LIN32: define{{.*}} void @ReturnPassing3(i127* noalias sret
// WIN32: define dso_local void @ReturnPassing3(i127* noalias sret
// NACL: define void @ReturnPassing3(i127* noalias sret
// NACL: define{{.*}} void @ReturnPassing3(i127* noalias sret
// NVPTX/64 makes the intentional choice to put all return values direct, even
// large structures, so we do the same here.
// NVPTX64: define i127 @ReturnPassing3(
// NVPTX: define i127 @ReturnPassing3(
// SPARCV9: define i127 @ReturnPassing3(
// SPARC: define void @ReturnPassing3(i127* noalias sret
// MIPS64: define i127 @ReturnPassing3(
// MIPS: define void @ReturnPassing3(i127* noalias sret
// NVPTX64: define{{.*}} i127 @ReturnPassing3(
// NVPTX: define{{.*}} i127 @ReturnPassing3(
// SPARCV9: define{{.*}} i127 @ReturnPassing3(
// SPARC: define{{.*}} void @ReturnPassing3(i127* noalias sret
// MIPS64: define{{.*}} i127 @ReturnPassing3(
// MIPS: define{{.*}} void @ReturnPassing3(i127* noalias sret
// SPIR64: define spir_func void @ReturnPassing3(i127* noalias sret
// SPIR: define spir_func void @ReturnPassing3(i127* noalias sret
// HEX: define void @ReturnPassing3(i127* noalias sret
// LANAI: define void @ReturnPassing3(i127* noalias sret
// R600: define void @ReturnPassing3(i127 addrspace(5)* noalias sret
// ARC: define void @ReturnPassing3(i127* noalias sret
// XCORE: define void @ReturnPassing3(i127* noalias sret
// RISCV64: define i127 @ReturnPassing3(
// RISCV32: define void @ReturnPassing3(i127* noalias sret
// WASM: define i127 @ReturnPassing3(
// SYSTEMZ: define void @ReturnPassing3(i127* noalias sret
// PPC64: define i127 @ReturnPassing3(
// PPC32: define void @ReturnPassing3(i127* noalias sret
// AARCH64: define i127 @ReturnPassing3(
// AARCH64DARWIN: define i127 @ReturnPassing3(
// ARM: define arm_aapcscc void @ReturnPassing3(i127* noalias sret
// HEX: define{{.*}} void @ReturnPassing3(i127* noalias sret
// LANAI: define{{.*}} void @ReturnPassing3(i127* noalias sret
// R600: define{{.*}} void @ReturnPassing3(i127 addrspace(5)* noalias sret
// ARC: define{{.*}} void @ReturnPassing3(i127* noalias sret
// XCORE: define{{.*}} void @ReturnPassing3(i127* noalias sret
// RISCV64: define{{.*}} i127 @ReturnPassing3(
// RISCV32: define{{.*}} void @ReturnPassing3(i127* noalias sret
// WASM: define{{.*}} i127 @ReturnPassing3(
// SYSTEMZ: define{{.*}} void @ReturnPassing3(i127* noalias sret
// PPC64: define{{.*}} i127 @ReturnPassing3(
// PPC32: define{{.*}} void @ReturnPassing3(i127* noalias sret
// AARCH64: define{{.*}} i127 @ReturnPassing3(
// AARCH64DARWIN: define{{.*}} i127 @ReturnPassing3(
// ARM: define{{.*}} arm_aapcscc void @ReturnPassing3(i127* noalias sret
_ExtInt(128) ReturnPassing4(){}
// LIN64: define { i64, i64 } @ReturnPassing4(
// LIN64: define{{.*}} { i64, i64 } @ReturnPassing4(
// WIN64: define dso_local void @ReturnPassing4(i128* noalias sret
// LIN32: define void @ReturnPassing4(i128* noalias sret
// LIN32: define{{.*}} void @ReturnPassing4(i128* noalias sret
// WIN32: define dso_local void @ReturnPassing4(i128* noalias sret
// NACL: define void @ReturnPassing4(i128* noalias sret
// NVPTX64: define i128 @ReturnPassing4(
// NVPTX: define i128 @ReturnPassing4(
// SPARCV9: define i128 @ReturnPassing4(
// SPARC: define void @ReturnPassing4(i128* noalias sret
// MIPS64: define i128 @ReturnPassing4(
// MIPS: define void @ReturnPassing4(i128* noalias sret
// NACL: define{{.*}} void @ReturnPassing4(i128* noalias sret
// NVPTX64: define{{.*}} i128 @ReturnPassing4(
// NVPTX: define{{.*}} i128 @ReturnPassing4(
// SPARCV9: define{{.*}} i128 @ReturnPassing4(
// SPARC: define{{.*}} void @ReturnPassing4(i128* noalias sret
// MIPS64: define{{.*}} i128 @ReturnPassing4(
// MIPS: define{{.*}} void @ReturnPassing4(i128* noalias sret
// SPIR64: define spir_func void @ReturnPassing4(i128* noalias sret
// SPIR: define spir_func void @ReturnPassing4(i128* noalias sret
// HEX: define void @ReturnPassing4(i128* noalias sret
// LANAI: define void @ReturnPassing4(i128* noalias sret
// R600: define void @ReturnPassing4(i128 addrspace(5)* noalias sret
// ARC: define void @ReturnPassing4(i128* noalias sret
// XCORE: define void @ReturnPassing4(i128* noalias sret
// RISCV64: define i128 @ReturnPassing4(
// RISCV32: define void @ReturnPassing4(i128* noalias sret
// WASM: define i128 @ReturnPassing4(
// SYSTEMZ: define void @ReturnPassing4(i128* noalias sret
// PPC64: define i128 @ReturnPassing4(
// PPC32: define void @ReturnPassing4(i128* noalias sret
// AARCH64: define i128 @ReturnPassing4(
// AARCH64DARWIN: define i128 @ReturnPassing4(
// ARM: define arm_aapcscc void @ReturnPassing4(i128* noalias sret
// HEX: define{{.*}} void @ReturnPassing4(i128* noalias sret
// LANAI: define{{.*}} void @ReturnPassing4(i128* noalias sret
// R600: define{{.*}} void @ReturnPassing4(i128 addrspace(5)* noalias sret
// ARC: define{{.*}} void @ReturnPassing4(i128* noalias sret
// XCORE: define{{.*}} void @ReturnPassing4(i128* noalias sret
// RISCV64: define{{.*}} i128 @ReturnPassing4(
// RISCV32: define{{.*}} void @ReturnPassing4(i128* noalias sret
// WASM: define{{.*}} i128 @ReturnPassing4(
// SYSTEMZ: define{{.*}} void @ReturnPassing4(i128* noalias sret
// PPC64: define{{.*}} i128 @ReturnPassing4(
// PPC32: define{{.*}} void @ReturnPassing4(i128* noalias sret
// AARCH64: define{{.*}} i128 @ReturnPassing4(
// AARCH64DARWIN: define{{.*}} i128 @ReturnPassing4(
// ARM: define{{.*}} arm_aapcscc void @ReturnPassing4(i128* noalias sret
_ExtInt(129) ReturnPassing5(){}
// LIN64: define void @ReturnPassing5(i129* noalias sret
// LIN64: define{{.*}} void @ReturnPassing5(i129* noalias sret
// WIN64: define dso_local void @ReturnPassing5(i129* noalias sret
// LIN32: define void @ReturnPassing5(i129* noalias sret
// LIN32: define{{.*}} void @ReturnPassing5(i129* noalias sret
// WIN32: define dso_local void @ReturnPassing5(i129* noalias sret
// NACL: define void @ReturnPassing5(i129* noalias sret
// NVPTX64: define i129 @ReturnPassing5(
// NVPTX: define i129 @ReturnPassing5(
// SPARCV9: define i129 @ReturnPassing5(
// SPARC: define void @ReturnPassing5(i129* noalias sret
// MIPS64: define void @ReturnPassing5(i129* noalias sret
// MIPS: define void @ReturnPassing5(i129* noalias sret
// NACL: define{{.*}} void @ReturnPassing5(i129* noalias sret
// NVPTX64: define{{.*}} i129 @ReturnPassing5(
// NVPTX: define{{.*}} i129 @ReturnPassing5(
// SPARCV9: define{{.*}} i129 @ReturnPassing5(
// SPARC: define{{.*}} void @ReturnPassing5(i129* noalias sret
// MIPS64: define{{.*}} void @ReturnPassing5(i129* noalias sret
// MIPS: define{{.*}} void @ReturnPassing5(i129* noalias sret
// SPIR64: define spir_func void @ReturnPassing5(i129* noalias sret
// SPIR: define spir_func void @ReturnPassing5(i129* noalias sret
// HEX: define void @ReturnPassing5(i129* noalias sret
// LANAI: define void @ReturnPassing5(i129* noalias sret
// R600: define void @ReturnPassing5(i129 addrspace(5)* noalias sret
// ARC: define void @ReturnPassing5(i129* inreg noalias sret
// XCORE: define void @ReturnPassing5(i129* noalias sret
// RISCV64: define void @ReturnPassing5(i129* noalias sret
// RISCV32: define void @ReturnPassing5(i129* noalias sret
// WASM: define void @ReturnPassing5(i129* noalias sret
// SYSTEMZ: define void @ReturnPassing5(i129* noalias sret
// PPC64: define void @ReturnPassing5(i129* noalias sret
// PPC32: define void @ReturnPassing5(i129* noalias sret
// AARCH64: define void @ReturnPassing5(i129* noalias sret
// AARCH64DARWIN: define void @ReturnPassing5(i129* noalias sret
// ARM: define arm_aapcscc void @ReturnPassing5(i129* noalias sret
// HEX: define{{.*}} void @ReturnPassing5(i129* noalias sret
// LANAI: define{{.*}} void @ReturnPassing5(i129* noalias sret
// R600: define{{.*}} void @ReturnPassing5(i129 addrspace(5)* noalias sret
// ARC: define{{.*}} void @ReturnPassing5(i129* inreg noalias sret
// XCORE: define{{.*}} void @ReturnPassing5(i129* noalias sret
// RISCV64: define{{.*}} void @ReturnPassing5(i129* noalias sret
// RISCV32: define{{.*}} void @ReturnPassing5(i129* noalias sret
// WASM: define{{.*}} void @ReturnPassing5(i129* noalias sret
// SYSTEMZ: define{{.*}} void @ReturnPassing5(i129* noalias sret
// PPC64: define{{.*}} void @ReturnPassing5(i129* noalias sret
// PPC32: define{{.*}} void @ReturnPassing5(i129* noalias sret
// AARCH64: define{{.*}} void @ReturnPassing5(i129* noalias sret
// AARCH64DARWIN: define{{.*}} void @ReturnPassing5(i129* noalias sret
// ARM: define{{.*}} arm_aapcscc void @ReturnPassing5(i129* noalias sret
// SparcV9 is odd in that it has a return-size limit of 256, not 128 or 64
// like other platforms, so test to make sure this behavior will still work.
_ExtInt(256) ReturnPassing6() {}
// SPARCV9: define i256 @ReturnPassing6(
// SPARCV9: define{{.*}} i256 @ReturnPassing6(
_ExtInt(257) ReturnPassing7() {}
// SPARCV9: define void @ReturnPassing7(i257* noalias sret
// SPARCV9: define{{.*}} void @ReturnPassing7(i257* noalias sret

View File

@ -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:!.*]]
@ -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:!.*]]
@ -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:!.*]]
@ -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:!.*]]
@ -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:!.*]]
@ -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:!.*]]

View File

@ -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
}

View File

@ -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;
}

View File

@ -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);

View File

@ -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;

View File

@ -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()

View File

@ -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

View File

@ -15,7 +15,7 @@ typedef unsigned ux1x6_t __attribute__((matrix_type(1, 6)));
typedef unsigned ux6x1_t __attribute__((matrix_type(6, 1)));
void transpose_double_5x5(dx5x5_t *a) {
// CHECK-LABEL: define void @transpose_double_5x5(
// CHECK-LABEL: define{{.*}} void @transpose_double_5x5(
// CHECK: [[A:%.*]] = load <25 x double>, <25 x double>* {{.*}}, align 8
// CHECK-NEXT: [[TRANS:%.*]] = call <25 x double> @llvm.matrix.transpose.v25f64(<25 x double> [[A]], i32 5, i32 5)
// CHECK-NEXT: [[AT_ADDR:%.*]] = bitcast [25 x double]* %a_t to <25 x double>*
@ -24,7 +24,7 @@ void transpose_double_5x5(dx5x5_t *a) {
}
void transpose_float_3x2(fx3x2_t *a) {
// CHECK-LABEL: define void @transpose_float_3x2(
// CHECK-LABEL: define{{.*}} void @transpose_float_3x2(
// CHECK: [[A:%.*]] = load <6 x float>, <6 x float>* {{.*}}, align 4
// CHECK-NEXT: [[TRANS:%.*]] = call <6 x float> @llvm.matrix.transpose.v6f32(<6 x float> [[A]], i32 3, i32 2)
// CHECK-NEXT: [[AT_ADDR:%.*]] = bitcast [6 x float]* %a_t to <6 x float>*
@ -34,7 +34,7 @@ void transpose_float_3x2(fx3x2_t *a) {
}
void transpose_int_20x4(ix20x4_t *a) {
// CHECK-LABEL: define void @transpose_int_20x4(
// CHECK-LABEL: define{{.*}} void @transpose_int_20x4(
// CHECK: [[A:%.*]] = load <80 x i32>, <80 x i32>* {{.*}}, align 4
// CHECK-NEXT: [[TRANS:%.*]] = call <80 x i32> @llvm.matrix.transpose.v80i32(<80 x i32> [[A]], i32 20, i32 4)
// CHECK-NEXT: [[AT_ADDR:%.*]] = bitcast [80 x i32]* %a_t to <80 x i32>*
@ -49,7 +49,7 @@ struct Foo {
};
void transpose_struct_member(struct Foo *F) {
// CHECK-LABEL: define void @transpose_struct_member(
// CHECK-LABEL: define{{.*}} void @transpose_struct_member(
// CHECK: [[M:%.*]] = load <6 x i32>, <6 x i32>* {{.*}}, align 4
// CHECK-NEXT: [[M_T:%.*]] = call <6 x i32> @llvm.matrix.transpose.v6i32(<6 x i32> [[M]], i32 1, i32 6)
// CHECK-NEXT: [[F_ADDR:%.*]] = load %struct.Foo*, %struct.Foo** %F.addr, align 8
@ -61,7 +61,7 @@ void transpose_struct_member(struct Foo *F) {
}
void transpose_transpose_struct_member(struct Foo *F) {
// CHECK-LABEL: define void @transpose_transpose_struct_member(
// CHECK-LABEL: define{{.*}} void @transpose_transpose_struct_member(
// CHECK: [[M:%.*]] = load <6 x i32>, <6 x i32>* {{.*}}, align 4
// CHECK-NEXT: [[M_T:%.*]] = call <6 x i32> @llvm.matrix.transpose.v6i32(<6 x i32> [[M]], i32 1, i32 6)
// CHECK-NEXT: [[M_T2:%.*]] = call <6 x i32> @llvm.matrix.transpose.v6i32(<6 x i32> [[M_T]], i32 6, i32 1)
@ -76,7 +76,7 @@ void transpose_transpose_struct_member(struct Foo *F) {
dx5x5_t get_matrix();
void transpose_rvalue() {
// CHECK-LABEL: define void @transpose_rvalue()
// CHECK-LABEL: define{{.*}} void @transpose_rvalue()
// CHECK-NEXT: entry:
// CHECK-NEXT: [[M_T_ADDR:%.*]] = alloca [25 x double], align 8
// CHECK-NEXT: [[CALL:%.*]] = call <25 x double> (...) @get_matrix()
@ -90,7 +90,7 @@ void transpose_rvalue() {
const dx5x5_t global_matrix;
void transpose_global() {
// CHECK-LABEL: define void @transpose_global()
// CHECK-LABEL: define{{.*}} void @transpose_global()
// CHECK-NEXT: entry:
// CHECK-NEXT: [[M_T_ADDR:%.*]] = alloca [25 x double], align 8
// CHECK-NEXT: [[GLOBAL_MATRIX:%.*]] = load <25 x double>, <25 x double>* bitcast ([25 x double]* @global_matrix to <25 x double>*), align 8
@ -102,7 +102,7 @@ void transpose_global() {
}
void column_major_load_with_const_stride_double(double *Ptr) {
// CHECK-LABEL: define void @column_major_load_with_const_stride_double(double* %Ptr)
// CHECK-LABEL: define{{.*}} void @column_major_load_with_const_stride_double(double* %Ptr)
// CHECK: [[PTR:%.*]] = load double*, double** %Ptr.addr, align 8
// CHECK-NEXT: call <25 x double> @llvm.matrix.column.major.load.v25f64(double* align 8 [[PTR]], i64 5, i1 false, i32 5, i32 5)
@ -110,7 +110,7 @@ void column_major_load_with_const_stride_double(double *Ptr) {
}
void column_major_load_with_const_stride2_double(double *Ptr) {
// CHECK-LABEL: define void @column_major_load_with_const_stride2_double(double* %Ptr)
// CHECK-LABEL: define{{.*}} void @column_major_load_with_const_stride2_double(double* %Ptr)
// CHECK: [[PTR:%.*]] = load double*, double** %Ptr.addr, align 8
// CHECK-NEXT: call <25 x double> @llvm.matrix.column.major.load.v25f64(double* align 8 [[PTR]], i64 15, i1 false, i32 5, i32 5)
@ -118,7 +118,7 @@ void column_major_load_with_const_stride2_double(double *Ptr) {
}
void column_major_load_with_variable_stride_ull_float(float *Ptr, unsigned long long S) {
// CHECK-LABEL: define void @column_major_load_with_variable_stride_ull_float(float* %Ptr, i64 %S)
// CHECK-LABEL: define{{.*}} void @column_major_load_with_variable_stride_ull_float(float* %Ptr, i64 %S)
// CHECK: [[S:%.*]] = load i64, i64* %S.addr, align 8
// CHECK-NEXT: [[PTR:%.*]] = load float*, float** %Ptr.addr, align 8
// CHECK-NEXT: call <6 x float> @llvm.matrix.column.major.load.v6f32(float* align 4 [[PTR]], i64 [[S]], i1 false, i32 2, i32 3)
@ -127,7 +127,7 @@ void column_major_load_with_variable_stride_ull_float(float *Ptr, unsigned long
}
void column_major_load_with_stride_math_int(int *Ptr, int S) {
// CHECK-LABEL: define void @column_major_load_with_stride_math_int(i32* %Ptr, i32 %S)
// CHECK-LABEL: define{{.*}} void @column_major_load_with_stride_math_int(i32* %Ptr, i32 %S)
// CHECK: [[S:%.*]] = load i32, i32* %S.addr, align 4
// CHECK-NEXT: [[STRIDE:%.*]] = add nsw i32 [[S]], 32
// CHECK-NEXT: [[STRIDE_EXT:%.*]] = sext i32 [[STRIDE]] to i64
@ -138,7 +138,7 @@ void column_major_load_with_stride_math_int(int *Ptr, int S) {
}
void column_major_load_with_stride_math_s_int(int *Ptr, short S) {
// CHECK-LABEL: define void @column_major_load_with_stride_math_s_int(i32* %Ptr, i16 signext %S)
// CHECK-LABEL: define{{.*}} void @column_major_load_with_stride_math_s_int(i32* %Ptr, i16 signext %S)
// CHECK: [[S:%.*]] = load i16, i16* %S.addr, align 2
// CHECK-NEXT: [[S_EXT:%.*]] = sext i16 [[S]] to i32
// CHECK-NEXT: [[STRIDE:%.*]] = add nsw i32 [[S_EXT]], 32
@ -150,7 +150,7 @@ void column_major_load_with_stride_math_s_int(int *Ptr, short S) {
}
void column_major_load_array1(double Ptr[25]) {
// CHECK-LABEL: define void @column_major_load_array1(double* %Ptr)
// CHECK-LABEL: define{{.*}} void @column_major_load_array1(double* %Ptr)
// CHECK: [[ADDR:%.*]] = load double*, double** %Ptr.addr, align 8
// CHECK-NEXT: call <25 x double> @llvm.matrix.column.major.load.v25f64(double* align 8 [[ADDR]], i64 5, i1 false, i32 5, i32 5)
@ -158,7 +158,7 @@ void column_major_load_array1(double Ptr[25]) {
}
void column_major_load_array2() {
// CHECK-LABEL: define void @column_major_load_array2() #0 {
// CHECK-LABEL: define{{.*}} void @column_major_load_array2() #0 {
// CHECK-NEXT: entry:
// CHECK-NEXT: [[PTR:%.*]] = alloca [25 x double], align 16
// CHECK: [[ARRAY_DEC:%.*]] = getelementptr inbounds [25 x double], [25 x double]* [[PTR]], i64 0, i64 0
@ -169,7 +169,7 @@ void column_major_load_array2() {
}
void column_major_load_const(const double *Ptr) {
// CHECK-LABEL: define void @column_major_load_const(double* %Ptr)
// CHECK-LABEL: define{{.*}} void @column_major_load_const(double* %Ptr)
// CHECK: [[PTR:%.*]] = load double*, double** %Ptr.addr, align 8
// CHECK-NEXT: call <25 x double> @llvm.matrix.column.major.load.v25f64(double* align 8 [[PTR]], i64 5, i1 false, i32 5, i32 5)
@ -177,7 +177,7 @@ void column_major_load_const(const double *Ptr) {
}
void column_major_load_volatile(volatile double *Ptr) {
// CHECK-LABEL: define void @column_major_load_volatile(double* %Ptr)
// CHECK-LABEL: define{{.*}} void @column_major_load_volatile(double* %Ptr)
// CHECK: [[PTR:%.*]] = load double*, double** %Ptr.addr, align 8
// CHECK-NEXT: call <25 x double> @llvm.matrix.column.major.load.v25f64(double* align 8 [[PTR]], i64 5, i1 true, i32 5, i32 5)
@ -185,7 +185,7 @@ void column_major_load_volatile(volatile double *Ptr) {
}
void column_major_store_with_const_stride_double(double *Ptr) {
// CHECK-LABEL: define void @column_major_store_with_const_stride_double(double* %Ptr)
// CHECK-LABEL: define{{.*}} void @column_major_store_with_const_stride_double(double* %Ptr)
// CHECK: [[M:%.*]] = load <25 x double>, <25 x double>* {{.*}}, align 8
// CHECK-NEXT: [[PTR:%.*]] = load double*, double** %Ptr.addr, align 8
// CHECK-NEXT: call void @llvm.matrix.column.major.store.v25f64(<25 x double> [[M]], double* align 8 [[PTR]], i64 5, i1 false, i32 5, i32 5)
@ -195,7 +195,7 @@ void column_major_store_with_const_stride_double(double *Ptr) {
}
void column_major_store_with_const_stride2_double(double *Ptr) {
// CHECK-LABEL: define void @column_major_store_with_const_stride2_double(double* %Ptr)
// CHECK-LABEL: define{{.*}} void @column_major_store_with_const_stride2_double(double* %Ptr)
// CHECK: [[M:%.*]] = load <25 x double>, <25 x double>* {{.*}}, align 8
// CHECK-NEXT: [[PTR:%.*]] = load double*, double** %Ptr.addr, align 8
// CHECK-NEXT: call void @llvm.matrix.column.major.store.v25f64(<25 x double> [[M]], double* align 8 [[PTR]], i64 15, i1 false, i32 5, i32 5)
@ -205,7 +205,7 @@ void column_major_store_with_const_stride2_double(double *Ptr) {
}
void column_major_store_with_stride_math_int(int *Ptr, int S) {
// CHECK-LABEL: define void @column_major_store_with_stride_math_int(i32* %Ptr, i32 %S)
// CHECK-LABEL: define{{.*}} void @column_major_store_with_stride_math_int(i32* %Ptr, i32 %S)
// CHECK: [[M:%.*]] = load <80 x i32>, <80 x i32>* {{.*}}, align 4
// CHECK-NEXT: [[PTR:%.*]] = load i32*, i32** %Ptr.addr, align 8
// CHECK-NEXT: [[S:%.*]] = load i32, i32* %S.addr, align 4
@ -218,7 +218,7 @@ void column_major_store_with_stride_math_int(int *Ptr, int S) {
}
void column_major_store_with_stride_math_s_int(int *Ptr, short S) {
// CHECK-LABEL: define void @column_major_store_with_stride_math_s_int(i32* %Ptr, i16 signext %S)
// CHECK-LABEL: define{{.*}} void @column_major_store_with_stride_math_s_int(i32* %Ptr, i16 signext %S)
// CHECK: [[M:%.*]] = load <80 x i32>, <80 x i32>* {{.*}}, align 4
// CHECK-NEXT: [[PTR:%.*]] = load i32*, i32** %Ptr.addr, align 8
// CHECK-NEXT: [[S:%.*]] = load i16, i16* %S.addr, align 2
@ -232,7 +232,7 @@ void column_major_store_with_stride_math_s_int(int *Ptr, short S) {
}
void column_major_store_array1(double Ptr[25]) {
// CHECK-LABEL: define void @column_major_store_array1(double* %Ptr)
// CHECK-LABEL: define{{.*}} void @column_major_store_array1(double* %Ptr)
// CHECK: [[M:%.*]] = load <25 x double>, <25 x double>* {{.*}}, align 8
// CHECK-NEXT: [[PTR:%.*]] = load double*, double** %Ptr.addr, align 8
// CHECK-NEXT: call void @llvm.matrix.column.major.store.v25f64(<25 x double> [[M]], double* align 8 [[PTR]], i64 5, i1 false, i32 5, i32 5)
@ -242,7 +242,7 @@ void column_major_store_array1(double Ptr[25]) {
}
void column_major_store_array2() {
// CHECK-LABEL: define void @column_major_store_array2()
// CHECK-LABEL: define{{.*}} void @column_major_store_array2()
// CHECK: [[M:%.*]] = load <25 x double>, <25 x double>* {{.*}}, align 8
// CHECK-NEXT: [[PTR:%.*]] = getelementptr inbounds [25 x double], [25 x double]* %Ptr, i64 0, i64 0
// CHECK-NEXT: call void @llvm.matrix.column.major.store.v25f64(<25 x double> [[M]], double* align 16 [[PTR]], i64 5, i1 false, i32 5, i32 5)
@ -253,7 +253,7 @@ void column_major_store_array2() {
}
void column_major_store_volatile(volatile double *Ptr) {
// CHECK-LABEL: define void @column_major_store_volatile(double* %Ptr) #0 {
// CHECK-LABEL: define{{.*}} void @column_major_store_volatile(double* %Ptr) #0 {
// CHECK: [[M:%.*]] = load <25 x double>, <25 x double>* {{.*}}, align 8
// CHECK-NEXT: [[PTR:%.*]] = load double*, double** %Ptr.addr, align 8
// CHECK-NEXT: call void @llvm.matrix.column.major.store.v25f64(<25 x double> [[M]], double* align 8 [[PTR]], i64 5, i1 true, i32 5, i32 5)

View File

@ -8,7 +8,7 @@ typedef unsigned long long ullx4x2_t __attribute__((matrix_type(4, 2)));
// Floating point matrix/scalar additions.
void add_matrix_matrix_double(dx5x5_t a, dx5x5_t b, dx5x5_t c) {
// CHECK-LABEL: define void @add_matrix_matrix_double(<25 x double> %a, <25 x double> %b, <25 x double> %c)
// CHECK-LABEL: define{{.*}} void @add_matrix_matrix_double(<25 x double> %a, <25 x double> %b, <25 x double> %c)
// CHECK: [[B:%.*]] = load <25 x double>, <25 x double>* {{.*}}, align 8
// CHECK-NEXT: [[C:%.*]] = load <25 x double>, <25 x double>* {{.*}}, align 8
// CHECK-NEXT: [[RES:%.*]] = fadd <25 x double> [[B]], [[C]]
@ -18,7 +18,7 @@ void add_matrix_matrix_double(dx5x5_t a, dx5x5_t b, dx5x5_t c) {
}
void add_matrix_matrix_float(fx2x3_t a, fx2x3_t b, fx2x3_t c) {
// CHECK-LABEL: define void @add_matrix_matrix_float(<6 x float> %a, <6 x float> %b, <6 x float> %c)
// CHECK-LABEL: define{{.*}} void @add_matrix_matrix_float(<6 x float> %a, <6 x float> %b, <6 x float> %c)
// CHECK: [[B:%.*]] = load <6 x float>, <6 x float>* {{.*}}, align 4
// CHECK-NEXT: [[C:%.*]] = load <6 x float>, <6 x float>* {{.*}}, align 4
// CHECK-NEXT: [[RES:%.*]] = fadd <6 x float> [[B]], [[C]]
@ -28,7 +28,7 @@ void add_matrix_matrix_float(fx2x3_t a, fx2x3_t b, fx2x3_t c) {
}
void add_matrix_scalar_double_float(dx5x5_t a, float vf) {
// CHECK-LABEL: define void @add_matrix_scalar_double_float(<25 x double> %a, float %vf)
// CHECK-LABEL: define{{.*}} void @add_matrix_scalar_double_float(<25 x double> %a, float %vf)
// CHECK: [[MATRIX:%.*]] = load <25 x double>, <25 x double>* {{.*}}, align 8
// CHECK-NEXT: [[SCALAR:%.*]] = load float, float* %vf.addr, align 4
// CHECK-NEXT: [[SCALAR_EXT:%.*]] = fpext float [[SCALAR]] to double
@ -41,7 +41,7 @@ void add_matrix_scalar_double_float(dx5x5_t a, float vf) {
}
void add_matrix_scalar_double_double(dx5x5_t a, double vd) {
// CHECK-LABEL: define void @add_matrix_scalar_double_double(<25 x double> %a, double %vd)
// CHECK-LABEL: define{{.*}} void @add_matrix_scalar_double_double(<25 x double> %a, double %vd)
// CHECK: [[MATRIX:%.*]] = load <25 x double>, <25 x double>* {{.*}}, align 8
// CHECK-NEXT: [[SCALAR:%.*]] = load double, double* %vd.addr, align 8
// CHECK-NEXT: [[SCALAR_EMBED:%.*]] = insertelement <25 x double> poison, double [[SCALAR]], i32 0
@ -53,7 +53,7 @@ void add_matrix_scalar_double_double(dx5x5_t a, double vd) {
}
void add_matrix_scalar_float_float(fx2x3_t b, float vf) {
// CHECK-LABEL: define void @add_matrix_scalar_float_float(<6 x float> %b, float %vf)
// CHECK-LABEL: define{{.*}} void @add_matrix_scalar_float_float(<6 x float> %b, float %vf)
// CHECK: [[MATRIX:%.*]] = load <6 x float>, <6 x float>* {{.*}}, align 4
// CHECK-NEXT: [[SCALAR:%.*]] = load float, float* %vf.addr, align 4
// CHECK-NEXT: [[SCALAR_EMBED:%.*]] = insertelement <6 x float> poison, float [[SCALAR]], i32 0
@ -65,7 +65,7 @@ void add_matrix_scalar_float_float(fx2x3_t b, float vf) {
}
void add_matrix_scalar_float_double(fx2x3_t b, double vd) {
// CHECK-LABEL: define void @add_matrix_scalar_float_double(<6 x float> %b, double %vd)
// CHECK-LABEL: define{{.*}} void @add_matrix_scalar_float_double(<6 x float> %b, double %vd)
// CHECK: [[MATRIX:%.*]] = load <6 x float>, <6 x float>* {{.*}}, align 4
// CHECK-NEXT: [[SCALAR:%.*]] = load double, double* %vd.addr, align 8
// CHECK-NEXT: [[SCALAR_TRUNC:%.*]] = fptrunc double [[SCALAR]] to float
@ -80,7 +80,7 @@ void add_matrix_scalar_float_double(fx2x3_t b, double vd) {
// Integer matrix/scalar additions
void add_matrix_matrix_int(ix9x3_t a, ix9x3_t b, ix9x3_t c) {
// CHECK-LABEL: define void @add_matrix_matrix_int(<27 x i32> %a, <27 x i32> %b, <27 x i32> %c)
// CHECK-LABEL: define{{.*}} void @add_matrix_matrix_int(<27 x i32> %a, <27 x i32> %b, <27 x i32> %c)
// CHECK: [[B:%.*]] = load <27 x i32>, <27 x i32>* {{.*}}, align 4
// CHECK-NEXT: [[C:%.*]] = load <27 x i32>, <27 x i32>* {{.*}}, align 4
// CHECK-NEXT: [[RES:%.*]] = add <27 x i32> [[B]], [[C]]
@ -89,7 +89,7 @@ void add_matrix_matrix_int(ix9x3_t a, ix9x3_t b, ix9x3_t c) {
}
void add_matrix_matrix_unsigned_long_long(ullx4x2_t a, ullx4x2_t b, ullx4x2_t c) {
// CHECK-LABEL: define void @add_matrix_matrix_unsigned_long_long(<8 x i64> %a, <8 x i64> %b, <8 x i64> %c)
// CHECK-LABEL: define{{.*}} void @add_matrix_matrix_unsigned_long_long(<8 x i64> %a, <8 x i64> %b, <8 x i64> %c)
// CHECK: [[B:%.*]] = load <8 x i64>, <8 x i64>* {{.*}}, align 8
// CHECK-NEXT: [[C:%.*]] = load <8 x i64>, <8 x i64>* {{.*}}, align 8
// CHECK-NEXT: [[RES:%.*]] = add <8 x i64> [[B]], [[C]]
@ -99,7 +99,7 @@ void add_matrix_matrix_unsigned_long_long(ullx4x2_t a, ullx4x2_t b, ullx4x2_t c)
}
void add_matrix_scalar_int_short(ix9x3_t a, short vs) {
// CHECK-LABEL: define void @add_matrix_scalar_int_short(<27 x i32> %a, i16 signext %vs)
// CHECK-LABEL: define{{.*}} void @add_matrix_scalar_int_short(<27 x i32> %a, i16 signext %vs)
// CHECK: [[MATRIX:%.*]] = load <27 x i32>, <27 x i32>* [[MAT_ADDR:%.*]], align 4
// CHECK-NEXT: [[SCALAR:%.*]] = load i16, i16* %vs.addr, align 2
// CHECK-NEXT: [[SCALAR_EXT:%.*]] = sext i16 [[SCALAR]] to i32
@ -112,7 +112,7 @@ void add_matrix_scalar_int_short(ix9x3_t a, short vs) {
}
void add_matrix_scalar_int_long_int(ix9x3_t a, long int vli) {
// CHECK-LABEL: define void @add_matrix_scalar_int_long_int(<27 x i32> %a, i64 %vli)
// CHECK-LABEL: define{{.*}} void @add_matrix_scalar_int_long_int(<27 x i32> %a, i64 %vli)
// CHECK: [[MATRIX:%.*]] = load <27 x i32>, <27 x i32>* [[MAT_ADDR:%.*]], align 4
// CHECK-NEXT: [[SCALAR:%.*]] = load i64, i64* %vli.addr, align 8
// CHECK-NEXT: [[SCALAR_TRUNC:%.*]] = trunc i64 [[SCALAR]] to i32
@ -125,7 +125,7 @@ void add_matrix_scalar_int_long_int(ix9x3_t a, long int vli) {
}
void add_matrix_scalar_int_unsigned_long_long(ix9x3_t a, unsigned long long int vulli) {
// CHECK-LABEL: define void @add_matrix_scalar_int_unsigned_long_long(<27 x i32> %a, i64 %vulli)
// CHECK-LABEL: define{{.*}} void @add_matrix_scalar_int_unsigned_long_long(<27 x i32> %a, i64 %vulli)
// CHECK: [[MATRIX:%.*]] = load <27 x i32>, <27 x i32>* [[MAT_ADDR:%.*]], align 4
// CHECK-NEXT: [[SCALAR:%.*]] = load i64, i64* %vulli.addr, align 8
// CHECK-NEXT: [[SCALAR_TRUNC:%.*]] = trunc i64 [[SCALAR]] to i32
@ -138,7 +138,7 @@ void add_matrix_scalar_int_unsigned_long_long(ix9x3_t a, unsigned long long int
}
void add_matrix_scalar_long_long_int_short(ullx4x2_t b, short vs) {
// CHECK-LABEL: define void @add_matrix_scalar_long_long_int_short(<8 x i64> %b, i16 signext %vs)
// CHECK-LABEL: define{{.*}} void @add_matrix_scalar_long_long_int_short(<8 x i64> %b, i16 signext %vs)
// CHECK: [[SCALAR:%.*]] = load i16, i16* %vs.addr, align 2
// CHECK-NEXT: [[SCALAR_EXT:%.*]] = sext i16 [[SCALAR]] to i64
// CHECK-NEXT: [[MATRIX:%.*]] = load <8 x i64>, <8 x i64>* {{.*}}, align 8
@ -151,7 +151,7 @@ void add_matrix_scalar_long_long_int_short(ullx4x2_t b, short vs) {
}
void add_matrix_scalar_long_long_int_int(ullx4x2_t b, long int vli) {
// CHECK-LABEL: define void @add_matrix_scalar_long_long_int_int(<8 x i64> %b, i64 %vli)
// CHECK-LABEL: define{{.*}} void @add_matrix_scalar_long_long_int_int(<8 x i64> %b, i64 %vli)
// CHECK: [[SCALAR:%.*]] = load i64, i64* %vli.addr, align 8
// CHECK-NEXT: [[MATRIX:%.*]] = load <8 x i64>, <8 x i64>* {{.*}}, align 8
// CHECK-NEXT: [[SCALAR_EMBED:%.*]] = insertelement <8 x i64> poison, i64 [[SCALAR]], i32 0
@ -163,7 +163,7 @@ void add_matrix_scalar_long_long_int_int(ullx4x2_t b, long int vli) {
}
void add_matrix_scalar_long_long_int_unsigned_long_long(ullx4x2_t b, unsigned long long int vulli) {
// CHECK-LABEL: define void @add_matrix_scalar_long_long_int_unsigned_long_long
// CHECK-LABEL: define{{.*}} void @add_matrix_scalar_long_long_int_unsigned_long_long
// CHECK: [[SCALAR:%.*]] = load i64, i64* %vulli.addr, align 8
// CHECK-NEXT: [[MATRIX:%.*]] = load <8 x i64>, <8 x i64>* %0, align 8
// CHECK-NEXT: [[SCALAR_EMBED:%.*]] = insertelement <8 x i64> poison, i64 [[SCALAR]], i32 0
@ -519,7 +519,7 @@ void insert_extract(dx5x5_t a, fx3x3_t b, unsigned long j, short k) {
}
void insert_compound_stmt(dx5x5_t a) {
// CHECK-LABEL: define void @insert_compound_stmt(<25 x double> %a)
// CHECK-LABEL: define{{.*}} void @insert_compound_stmt(<25 x double> %a)
// CHECK: [[A:%.*]] = load <25 x double>, <25 x double>* [[A_PTR:%.*]], align 8
// CHECK-NEXT: [[EXT:%.*]] = extractelement <25 x double> [[A]], i64 17
// CHECK-NEXT: [[SUB:%.*]] = fsub double [[EXT]], 1.000000e+00
@ -536,7 +536,7 @@ struct Foo {
};
void insert_compound_stmt_field(struct Foo *a, float f, unsigned i, unsigned j) {
// CHECK-LABEL: define void @insert_compound_stmt_field(%struct.Foo* %a, float %f, i32 %i, i32 %j)
// CHECK-LABEL: define{{.*}} void @insert_compound_stmt_field(%struct.Foo* %a, float %f, i32 %i, i32 %j)
// CHECK: [[I:%.*]] = load i32, i32* %i.addr, align 4
// CHECK-NEXT: [[I_EXT:%.*]] = zext i32 [[I]] to i64
// CHECK-NEXT: [[J:%.*]] = load i32, i32* %j.addr, align 4
@ -556,7 +556,7 @@ void insert_compound_stmt_field(struct Foo *a, float f, unsigned i, unsigned j)
}
void matrix_as_idx(ix9x3_t a, int i, int j, dx5x5_t b) {
// CHECK-LABEL: define void @matrix_as_idx(<27 x i32> %a, i32 %i, i32 %j, <25 x double> %b)
// CHECK-LABEL: define{{.*}} void @matrix_as_idx(<27 x i32> %a, i32 %i, i32 %j, <25 x double> %b)
// CHECK: [[I1:%.*]] = load i32, i32* %i.addr, align 4
// CHECK-NEXT: [[I1_EXT:%.*]] = sext i32 [[I1]] to i64
// CHECK-NEXT: [[J1:%.*]] = load i32, i32* %j.addr, align 4

View File

@ -9,7 +9,7 @@ typedef double dx5x5_t __attribute__((matrix_type(5, 5)));
// CHECK: %struct.Matrix = type { i8, [12 x float], float }
void load_store_double(dx5x5_t *a, dx5x5_t *b) {
// CHECK-LABEL: define void @load_store_double(
// CHECK-LABEL: define{{.*}} void @load_store_double(
// CHECK-NEXT: entry:
// CHECK-NEXT: %a.addr = alloca [25 x double]*, align 8
// CHECK-NEXT: %b.addr = alloca [25 x double]*, align 8
@ -28,7 +28,7 @@ void load_store_double(dx5x5_t *a, dx5x5_t *b) {
typedef float fx3x4_t __attribute__((matrix_type(3, 4)));
void load_store_float(fx3x4_t *a, fx3x4_t *b) {
// CHECK-LABEL: define void @load_store_float(
// CHECK-LABEL: define{{.*}} void @load_store_float(
// CHECK-NEXT: entry:
// CHECK-NEXT: %a.addr = alloca [12 x float]*, align 8
// CHECK-NEXT: %b.addr = alloca [12 x float]*, align 8
@ -47,7 +47,7 @@ void load_store_float(fx3x4_t *a, fx3x4_t *b) {
typedef int ix3x4_t __attribute__((matrix_type(4, 3)));
void load_store_int(ix3x4_t *a, ix3x4_t *b) {
// CHECK-LABEL: define void @load_store_int(
// CHECK-LABEL: define{{.*}} void @load_store_int(
// CHECK-NEXT: entry:
// CHECK-NEXT: %a.addr = alloca [12 x i32]*, align 8
// CHECK-NEXT: %b.addr = alloca [12 x i32]*, align 8
@ -66,7 +66,7 @@ void load_store_int(ix3x4_t *a, ix3x4_t *b) {
typedef unsigned long long ullx3x4_t __attribute__((matrix_type(4, 3)));
void load_store_ull(ullx3x4_t *a, ullx3x4_t *b) {
// CHECK-LABEL: define void @load_store_ull(
// CHECK-LABEL: define{{.*}} void @load_store_ull(
// CHECK-NEXT: entry:
// CHECK-NEXT: %a.addr = alloca [12 x i64]*, align 8
// CHECK-NEXT: %b.addr = alloca [12 x i64]*, align 8
@ -85,7 +85,7 @@ void load_store_ull(ullx3x4_t *a, ullx3x4_t *b) {
typedef __fp16 fp16x3x4_t __attribute__((matrix_type(4, 3)));
void load_store_fp16(fp16x3x4_t *a, fp16x3x4_t *b) {
// CHECK-LABEL: define void @load_store_fp16(
// CHECK-LABEL: define{{.*}} void @load_store_fp16(
// CHECK-NEXT: entry:
// CHECK-NEXT: %a.addr = alloca [12 x half]*, align 8
// CHECK-NEXT: %b.addr = alloca [12 x half]*, align 8
@ -105,7 +105,7 @@ void load_store_fp16(fp16x3x4_t *a, fp16x3x4_t *b) {
typedef float fx3x3_t __attribute__((matrix_type(3, 3)));
void parameter_passing(fx3x3_t a, fx3x3_t *b) {
// CHECK-LABEL: define void @parameter_passing(
// CHECK-LABEL: define{{.*}} void @parameter_passing(
// CHECK-NEXT: entry:
// CHECK-NEXT: %a.addr = alloca [9 x float], align 4
// CHECK-NEXT: %b.addr = alloca [9 x float]*, align 8
@ -121,7 +121,7 @@ void parameter_passing(fx3x3_t a, fx3x3_t *b) {
}
fx3x3_t return_matrix(fx3x3_t *a) {
// CHECK-LABEL: define <9 x float> @return_matrix
// CHECK-LABEL: define{{.*}} <9 x float> @return_matrix
// CHECK-NEXT: entry:
// CHECK-NEXT: %a.addr = alloca [9 x float]*, align 8
// CHECK-NEXT: store [9 x float]* %a, [9 x float]** %a.addr, align 8
@ -139,7 +139,7 @@ typedef struct {
} Matrix;
void matrix_struct(Matrix *a, Matrix *b) {
// CHECK-LABEL: define void @matrix_struct(
// CHECK-LABEL: define{{.*}} void @matrix_struct(
// CHECK-NEXT: entry:
// CHECK-NEXT: %a.addr = alloca %struct.Matrix*, align 8
// CHECK-NEXT: %b.addr = alloca %struct.Matrix*, align 8
@ -159,7 +159,7 @@ void matrix_struct(Matrix *a, Matrix *b) {
typedef double dx4x4_t __attribute__((matrix_type(4, 4)));
void matrix_inline_asm_memory_readwrite() {
// CHECK-LABEL: define void @matrix_inline_asm_memory_readwrite()
// CHECK-LABEL: define{{.*}} void @matrix_inline_asm_memory_readwrite()
// CHECK-NEXT: entry:
// CHECK-NEXT: [[ALLOCA:%.+]] = alloca [16 x double], align 8
// CHECK-NEXT: [[PTR1:%.+]] = bitcast [16 x double]* [[ALLOCA]] to <16 x double>*

View File

@ -61,5 +61,5 @@ union HEADER {
struct Inner variable = { 1,0,1, 21 };
union HEADER hdr = {{1,2,3,4}};
// CHECK: @variable = global { i8, [3 x i8], i8, i8, i8, i8 } { i8 5, [3 x i8] undef, i8 21, i8 0, i8 0, i8 0 }, align 1
// CHECK: @hdr = global { { i8, i8, [2 x i8], i8, i8, i8, i8, i8, [3 x i8] } } { { i8, i8, [2 x i8], i8, i8, i8, i8, i8, [3 x i8] } { i8 8, i8 0, [2 x i8] undef, i8 2, i8 0, i8 0, i8 3, i8 4, [3 x i8] undef } }, align 1
// CHECK: @variable ={{.*}} global { i8, [3 x i8], i8, i8, i8, i8 } { i8 5, [3 x i8] undef, i8 21, i8 0, i8 0, i8 0 }, align 1
// CHECK: @hdr ={{.*}} global { { i8, i8, [2 x i8], i8, i8, i8, i8, i8, [3 x i8] } } { { i8, i8, [2 x i8], i8, i8, i8, i8, i8, [3 x i8] } { i8 8, i8 0, [2 x i8] undef, i8 2, i8 0, i8 0, i8 3, i8 4, [3 x i8] undef } }, align 1

View File

@ -13,7 +13,7 @@ void align_test() {
__asm ALIGN 256;
}
// DARWIN-LABEL: define void @align_test()
// DARWIN-LABEL: define{{.*}} void @align_test()
// DARWIN: call void asm sideeffect inteldialect
// DARWIN-SAME: .align 3
// DARWIN-SAME: .align 4

View File

@ -148,7 +148,7 @@ void t13() {
short j = 2;
__asm movzx eax, i
__asm movzx eax, j
// CHECK-LABEL: define void @t13()
// CHECK-LABEL: define{{.*}} void @t13()
// CHECK: call void asm sideeffect inteldialect
// CHECK-SAME: movzx eax, byte ptr $0
// CHECK-SAME: movzx eax, word ptr $1
@ -160,7 +160,7 @@ void t13_brac() {
short j = 2;
__asm movzx eax, [i]
__asm movzx eax, [j]
// CHECK-LABEL: define void @t13_brac()
// CHECK-LABEL: define{{.*}} void @t13_brac()
// CHECK: call void asm sideeffect inteldialect
// CHECK-SAME: movzx eax, byte ptr $0
// CHECK-SAME: movzx eax, word ptr $1
@ -526,7 +526,7 @@ void t38() {
void cpuid() {
__asm cpuid
// CHECK-LABEL: define void @cpuid
// CHECK-LABEL: define{{.*}} void @cpuid
// CHECK: call void asm sideeffect inteldialect "cpuid", "~{eax},~{ebx},~{ecx},~{edx},~{dirflag},~{fpsr},~{flags}"()
}
@ -548,7 +548,7 @@ typedef struct {
} C, *pC;
void t39() {
// CHECK-LABEL: define void @t39
// CHECK-LABEL: define{{.*}} void @t39
__asm mov eax, [eax].A.b
// CHECK: mov eax, [eax + $$4]
__asm mov eax, [eax] A.b
@ -571,7 +571,7 @@ void t39() {
}
void t40(float a) {
// CHECK-LABEL: define void @t40
// CHECK-LABEL: define{{.*}} void @t40
int i;
__asm fld a
// CHECK: fld dword ptr $1
@ -581,7 +581,7 @@ void t40(float a) {
}
void t41(unsigned short a) {
// CHECK-LABEL: define void @t41(i16 zeroext %a)
// CHECK-LABEL: define{{.*}} void @t41(i16 zeroext %a)
__asm mov cs, a;
// CHECK: mov cs, $0
__asm mov ds, a;
@ -598,7 +598,7 @@ void t41(unsigned short a) {
}
void t42() {
// CHECK-LABEL: define void @t42(
// CHECK-LABEL: define{{.*}} void @t42(
int flags;
__asm mov flags, eax
// CHECK: mov $0, eax
@ -606,7 +606,7 @@ void t42() {
}
void t42b() {
// CHECK-LABEL: define void @t42b(
// CHECK-LABEL: define{{.*}} void @t42b(
int mxcsr;
__asm mov mxcsr, eax
// CHECK: mov $0, eax
@ -614,7 +614,7 @@ void t42b() {
}
void t43() {
// CHECK-LABEL: define void @t43
// CHECK-LABEL: define{{.*}} void @t43
C strct;
// Work around PR20368: These should be single line blocks
__asm { mov eax, 4[strct.c1] }
@ -646,7 +646,7 @@ void t43() {
}
void t44() {
// CHECK-LABEL: define void @t44
// CHECK-LABEL: define{{.*}} void @t44
__asm {
mov cr0, eax
mov cr2, ebx
@ -657,7 +657,7 @@ void t44() {
}
void t45() {
// CHECK-LABEL: define void @t45
// CHECK-LABEL: define{{.*}} void @t45
__asm {
mov dr0, eax
mov dr1, ebx
@ -670,13 +670,13 @@ void t45() {
}
void t46() {
// CHECK-LABEL: define void @t46
// CHECK-LABEL: define{{.*}} void @t46
__asm add eax, -128[eax]
// CHECK: call void asm sideeffect inteldialect "add eax, [eax + $$-128]", "~{eax},~{flags},~{dirflag},~{fpsr},~{flags}"()
}
void t47() {
// CHECK-LABEL: define void @t47
// CHECK-LABEL: define{{.*}} void @t47
__asm {
bndmk bnd0, dword ptr [eax]
bndmk bnd1, dword ptr [ebx]
@ -687,21 +687,21 @@ void t47() {
}
void dot_operator(){
// CHECK-LABEL: define void @dot_operator
// CHECK-LABEL: define{{.*}} void @dot_operator
__asm { mov eax, 3[ebx]A.b}
// CHECK: call void asm sideeffect inteldialect "mov eax, [ebx + $$7]", "~{eax},~{dirflag},~{fpsr},~{flags}"
}
void call_clobber() {
__asm call t41
// CHECK-LABEL: define void @call_clobber
// CHECK-LABEL: define{{.*}} void @call_clobber
// CHECK: call void asm sideeffect inteldialect "call dword ptr ${0:P}", "*m,~{dirflag},~{fpsr},~{flags}"(void (i16)* @t41)
}
void xgetbv() {
__asm xgetbv
}
// CHECK-LABEL: define void @xgetbv()
// CHECK-LABEL: define{{.*}} void @xgetbv()
// CHECK: call void asm sideeffect inteldialect "xgetbv", "~{eax},~{edx},~{dirflag},~{fpsr},~{flags}"()
void label1() {
@ -709,7 +709,7 @@ void label1() {
label:
jmp label
}
// CHECK-LABEL: define void @label1()
// CHECK-LABEL: define{{.*}} void @label1()
// CHECK: call void asm sideeffect inteldialect "{{.*}}__MSASMLABEL_.${:uid}__label:\0A\09jmp {{.*}}__MSASMLABEL_.${:uid}__label", "~{dirflag},~{fpsr},~{flags}"() [[ATTR1:#[0-9]+]]
}
@ -718,7 +718,7 @@ void label2() {
jmp label
label:
}
// CHECK-LABEL: define void @label2
// CHECK-LABEL: define{{.*}} void @label2
// CHECK: call void asm sideeffect inteldialect "jmp {{.*}}__MSASMLABEL_.${:uid}__label\0A\09{{.*}}__MSASMLABEL_.${:uid}__label:", "~{dirflag},~{fpsr},~{flags}"()
}
@ -727,7 +727,7 @@ void label3() {
label:
mov eax, label
}
// CHECK-LABEL: define void @label3
// CHECK-LABEL: define{{.*}} void @label3
// CHECK: call void asm sideeffect inteldialect "{{.*}}__MSASMLABEL_.${:uid}__label:\0A\09mov eax, {{.*}}__MSASMLABEL_.${:uid}__label", "~{eax},~{dirflag},~{fpsr},~{flags}"()
}
@ -736,7 +736,7 @@ void label4() {
label:
mov eax, [label]
}
// CHECK-LABEL: define void @label4
// CHECK-LABEL: define{{.*}} void @label4
// CHECK: call void asm sideeffect inteldialect "{{.*}}__MSASMLABEL_.${:uid}__label:\0A\09mov eax, {{.*}}__MSASMLABEL_.${:uid}__label", "~{eax},~{dirflag},~{fpsr},~{flags}"()
}
@ -745,7 +745,7 @@ void label5() {
jmp dollar_label$
dollar_label$:
}
// CHECK-LABEL: define void @label5
// CHECK-LABEL: define{{.*}} void @label5
// CHECK: call void asm sideeffect inteldialect "jmp {{.*}}__MSASMLABEL_.${:uid}__dollar_label$$\0A\09{{.*}}__MSASMLABEL_.${:uid}__dollar_label$$:", "~{dirflag},~{fpsr},~{flags}"()
}
@ -756,7 +756,7 @@ void label6(){
jz short label
label:
}
// CHECK-LABEL: define void @label6
// CHECK-LABEL: define{{.*}} void @label6
// CHECK: jmp {{.*}}__MSASMLABEL_.${:uid}__label\0A\09jc {{.*}}__MSASMLABEL_.${:uid}__label\0A\09jz {{.*}}__MSASMLABEL_.${:uid}__label\0A\09{{.*}}__MSASMLABEL_.${:uid}__label:"
}
@ -765,14 +765,14 @@ void mxcsr() {
char buf[4096];
__asm fxrstor buf
}
// CHECK-LABEL: define void @mxcsr
// CHECK-LABEL: define{{.*}} void @mxcsr
// CHECK: call void asm sideeffect inteldialect "fxrstor $0", "=*m,~{fpcr},~{dirflag},~{fpsr},~{flags}"
// Make sure we can find the register for the dirflag for popfd
void dirflag() {
__asm popfd
}
// CHECK-LABEL: define void @dirflag
// CHECK-LABEL: define{{.*}} void @dirflag
// CHECK: call void asm sideeffect inteldialect "popfd", "~{dirflag},~{flags},~{esp},~{dirflag},~{fpsr},~{flags}"
typedef union _LARGE_INTEGER {
@ -790,7 +790,7 @@ typedef union _LARGE_INTEGER {
int test_indirect_field(LARGE_INTEGER LargeInteger) {
__asm mov eax, LargeInteger.LowPart
}
// CHECK-LABEL: define i32 @test_indirect_field(
// CHECK-LABEL: define{{.*}} i32 @test_indirect_field(
// CHECK: call i32 asm sideeffect inteldialect "mov eax, $1",
// MS ASM containing labels must not be duplicated (PR23715).

View File

@ -14,7 +14,7 @@ struct Foo {
};
void t1() {
// CHECK-LABEL: define void @_Z2t1v()
// CHECK-LABEL: define{{.*}} void @_Z2t1v()
Foo::ptr = (int *)0xDEADBEEF;
Foo::Bar::ptr = (int *)0xDEADBEEF;
// CHECK: call void asm sideeffect inteldialect
@ -36,14 +36,14 @@ void t2() {
int lvar = 10;
__asm mov eax, offset Foo::ptr
__asm mov eax, offset Foo::Bar::ptr
// CHECK-LABEL: define void @_Z2t2v()
// CHECK-LABEL: define{{.*}} void @_Z2t2v()
// CHECK: call void asm sideeffect inteldialect
// CHECK-SAME: mov eax, $0
// CHECK-SAME: mov eax, $1
// CHECK-SAME: "i,i,~{eax},~{dirflag},~{fpsr},~{flags}"(i32** @_ZN3Foo3ptrE, i32** @_ZN3Foo3Bar3ptrE)
}
// CHECK-LABEL: define void @_Z2t3v()
// CHECK-LABEL: define{{.*}} void @_Z2t3v()
void t3() {
__asm mov eax, LENGTH Foo::ptr
__asm mov eax, LENGTH Foo::Bar::ptr
@ -82,7 +82,7 @@ struct T4 {
void test();
};
// CHECK-LABEL: define void @_ZN2T44testEv(
// CHECK-LABEL: define{{.*}} void @_ZN2T44testEv(
void T4::test() {
// CHECK: [[T0:%.*]] = alloca [[T4:%.*]]*,
// CHECK: [[THIS:%.*]] = load [[T4]]*, [[T4]]** [[T0]]
@ -99,7 +99,7 @@ template <class T> struct T5 {
template <class U> static T create(U);
void run();
};
// CHECK-LABEL: define void @_Z5test5v()
// CHECK-LABEL: define{{.*}} void @_Z5test5v()
void test5() {
// CHECK: [[X:%.*]] = alloca i32
// CHECK: [[Y:%.*]] = alloca i32
@ -128,7 +128,7 @@ void t7_struct() {
int b;
};
__asm mov eax, [eax].A.b
// CHECK-LABEL: define void @_Z9t7_structv
// CHECK-LABEL: define{{.*}} void @_Z9t7_structv
// CHECK: call void asm sideeffect inteldialect
// CHECK-SAME: mov eax, [eax + $$4]
// CHECK-SAME: "~{eax},~{dirflag},~{fpsr},~{flags}"()
@ -140,7 +140,7 @@ void t7_typedef() {
int b;
} A;
__asm mov eax, [eax].A.b
// CHECK-LABEL: define void @_Z10t7_typedefv
// CHECK-LABEL: define{{.*}} void @_Z10t7_typedefv
// CHECK: call void asm sideeffect inteldialect
// CHECK-SAME: mov eax, [eax + $$4]
// CHECK-SAME: "~{eax},~{dirflag},~{fpsr},~{flags}"()
@ -152,7 +152,7 @@ void t7_using() {
int b;
};
__asm mov eax, [eax].A.b
// CHECK-LABEL: define void @_Z8t7_usingv
// CHECK-LABEL: define{{.*}} void @_Z8t7_usingv
// CHECK: call void asm sideeffect inteldialect
// CHECK-SAME: mov eax, [eax + $$4]
// CHECK-SAME: "~{eax},~{dirflag},~{fpsr},~{flags}"()
@ -160,7 +160,7 @@ void t7_using() {
void t8() {
__asm some_label:
// CHECK-LABEL: define void @_Z2t8v()
// CHECK-LABEL: define{{.*}} void @_Z2t8v()
// CHECK: call void asm sideeffect inteldialect
// CHECK-SAME: L__MSASMLABEL_.${:uid}__some_label:
// CHECK-SAME: "~{dirflag},~{fpsr},~{flags}"()
@ -181,7 +181,7 @@ void t8() {
}
void t9() {
// CHECK-LABEL: define void @_Z2t9v()
// CHECK-LABEL: define{{.*}} void @_Z2t9v()
struct A {
int a;
int b;

View File

@ -15,8 +15,8 @@ struct
char bar;
} ATTR t1;
int s1 = sizeof(t1);
// CHECK: @s1 = global i32 2
// CHECK-ARM: @s1 = global i32 2
// CHECK: @s1 ={{.*}} global i32 2
// CHECK-ARM: @s1 ={{.*}} global i32 2
struct
{
@ -27,8 +27,8 @@ struct
char bar;
} ATTR t2;
int s2 = sizeof(t2);
// CHECK: @s2 = global i32 2
// CHECK-ARM: @s2 = global i32 2
// CHECK: @s2 ={{.*}} global i32 2
// CHECK-ARM: @s2 ={{.*}} global i32 2
struct
{
@ -41,8 +41,8 @@ struct
char : 0;
} ATTR t3;
int s3 = sizeof(t3);
// CHECK: @s3 = global i32 2
// CHECK-ARM: @s3 = global i32 2
// CHECK: @s3 ={{.*}} global i32 2
// CHECK-ARM: @s3 ={{.*}} global i32 2
struct
{
@ -50,8 +50,8 @@ struct
char bar;
} ATTR t4;
int s4 = sizeof(t4);
// CHECK: @s4 = global i32 1
// CHECK-ARM: @s4 = global i32 1
// CHECK: @s4 ={{.*}} global i32 1
// CHECK-ARM: @s4 ={{.*}} global i32 1
struct
{
@ -61,8 +61,8 @@ struct
char bar;
} ATTR t5;
int s5 = sizeof(t5);
// CHECK: @s5 = global i32 1
// CHECK-ARM: @s5 = global i32 1
// CHECK: @s5 ={{.*}} global i32 1
// CHECK-ARM: @s5 ={{.*}} global i32 1
struct
{
@ -72,8 +72,8 @@ struct
char bar;
} ATTR t6;
int s6 = sizeof(t6);
// CHECK: @s6 = global i32 1
// CHECK-ARM: @s6 = global i32 1
// CHECK: @s6 ={{.*}} global i32 1
// CHECK-ARM: @s6 ={{.*}} global i32 1
struct
{
@ -93,8 +93,8 @@ struct
char bar7;
} ATTR t7;
int s7 = sizeof(t7);
// CHECK: @s7 = global i32 9
// CHECK-ARM: @s7 = global i32 9
// CHECK: @s7 ={{.*}} global i32 9
// CHECK-ARM: @s7 ={{.*}} global i32 9
struct
{
@ -103,8 +103,8 @@ struct
char : 0;
} ATTR t8;
int s8 = sizeof(t8);
// CHECK: @s8 = global i32 0
// CHECK-ARM: @s8 = global i32 0
// CHECK: @s8 ={{.*}} global i32 0
// CHECK-ARM: @s8 ={{.*}} global i32 0
struct
{
@ -136,8 +136,8 @@ struct
char :4;
} ATTR t9;
int s9 = sizeof(t9);
// CHECK: @s9 = global i32 28
// CHECK-ARM: @s9 = global i32 28
// CHECK: @s9 ={{.*}} global i32 28
// CHECK-ARM: @s9 ={{.*}} global i32 28
struct
{
@ -146,8 +146,8 @@ struct
char bar;
} ATTR t10;
int s10 = sizeof(t10);
// CHECK: @s10 = global i32 16
// CHECK-ARM: @s10 = global i32 8
// CHECK: @s10 ={{.*}} global i32 16
// CHECK-ARM: @s10 ={{.*}} global i32 8
// rdar://16041826 - ensure that ms_structs work correctly on a
// !useBitFieldTypeAlignment() target
@ -157,8 +157,8 @@ struct {
unsigned int c;
} ATTR t11;
int s11 = sizeof(t11);
// CHECK: @s11 = global i32 12
// CHECK-ARM: @s11 = global i32 12
// CHECK: @s11 ={{.*}} global i32 12
// CHECK-ARM: @s11 ={{.*}} global i32 12
struct {
unsigned char a : 3;
@ -166,8 +166,8 @@ struct {
unsigned short c : 6;
} ATTR t12;
int s12 = sizeof(t12);
// CHECK: @s12 = global i32 4
// CHECK-ARM: @s12 = global i32 4
// CHECK: @s12 ={{.*}} global i32 4
// CHECK-ARM: @s12 ={{.*}} global i32 4
struct {
unsigned char a : 3;
@ -175,5 +175,5 @@ struct {
__attribute__((packed)) unsigned short c : 6;
} ATTR t13;
int s13 = sizeof(t13);
// CHECK: @s13 = global i32 4
// CHECK-ARM: @s13 = global i32 4
// CHECK: @s13 ={{.*}} global i32 4
// CHECK-ARM: @s13 ={{.*}} global i32 4

View File

@ -9,7 +9,7 @@ struct S {
unsigned short f2:15;
};
// CHECK: define void @test_zero_width_bitfield(%[[STRUCT_S]]* %[[A:.*]])
// CHECK: define{{.*}} void @test_zero_width_bitfield(%[[STRUCT_S]]* %[[A:.*]])
// CHECK: %[[BF_LOAD:.*]] = load i32, i32* %[[V1:.*]], align 1
// CHECK: %[[BF_CLEAR:.*]] = and i32 %[[BF_LOAD]], 32767
// CHECK: %[[BF_CAST:.*]] = trunc i32 %[[BF_CLEAR]] to i16

View File

@ -14,7 +14,7 @@ void foo (void) {
gs = gs;
ls = gs;
}
// CHECK-LABEL: define void @foo()
// CHECK-LABEL: define{{.*}} void @foo()
// CHECK: %[[LS:.*]] = alloca %struct.s, align 4
// CHECK-NEXT: %[[ZERO:.*]] = bitcast %struct.s* %[[LS]] to i8*
// CHECK-NEXT: %[[ONE:.*]] = bitcast %struct.s* %[[LS]] to i8*
@ -34,7 +34,7 @@ void fee (void) {
s = s;
s.y = gs;
}
// CHECK-LABEL: define void @fee()
// CHECK-LABEL: define{{.*}} void @fee()
// CHECK: call void @llvm.memcpy.{{.*}}(i8* align 4 getelementptr inbounds (%struct.s1, %struct.s1* @s, i32 0, i32 0, i32 0, i32 0), i8* align 4 getelementptr inbounds (%struct.s1, %struct.s1* @s, i32 0, i32 0, i32 0, i32 0), i64 132, i1 true)
// CHECK-NEXT: call void @llvm.memcpy.{{.*}}(i8* align 4 getelementptr inbounds (%struct.s1, %struct.s1* @s, i32 0, i32 0, i32 0, i32 0), i8* align 4 getelementptr inbounds (%struct.s, %struct.s* @gs, i32 0, i32 0, i32 0), i64 132, i1 true)

View File

@ -1,39 +1,39 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm < %s | FileCheck -check-prefix=NULL-INVALID %s
// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -fno-delete-null-pointer-checks < %s | FileCheck -check-prefix=NULL-VALID %s
// NULL-INVALID: define void @foo(i32* nonnull %x)
// NULL-VALID: define void @foo(i32* %x)
// NULL-INVALID: define{{.*}} void @foo(i32* nonnull %x)
// NULL-VALID: define{{.*}} void @foo(i32* %x)
void foo(int * __attribute__((nonnull)) x) {
*x = 0;
}
// NULL-INVALID: define void @bar(i32* nonnull %x)
// NULL-VALID: define void @bar(i32* %x)
// NULL-INVALID: define{{.*}} void @bar(i32* nonnull %x)
// NULL-VALID: define{{.*}} void @bar(i32* %x)
void bar(int * x) __attribute__((nonnull(1))) {
*x = 0;
}
// NULL-INVALID: define void @bar2(i32* %x, i32* nonnull %y)
// NULL-VALID: define void @bar2(i32* %x, i32* %y)
// NULL-INVALID: define{{.*}} void @bar2(i32* %x, i32* nonnull %y)
// NULL-VALID: define{{.*}} void @bar2(i32* %x, i32* %y)
void bar2(int * x, int * y) __attribute__((nonnull(2))) {
*x = 0;
}
static int a;
// NULL-INVALID: define nonnull i32* @bar3()
// NULL-VALID: define i32* @bar3()
// NULL-INVALID: define{{.*}} nonnull i32* @bar3()
// NULL-VALID: define{{.*}} i32* @bar3()
int * bar3() __attribute__((returns_nonnull)) {
return &a;
}
// NULL-INVALID: define i32 @bar4(i32 %n, i32* nonnull %p)
// NULL-VALID: define i32 @bar4(i32 %n, i32* %p)
// NULL-INVALID: define{{.*}} i32 @bar4(i32 %n, i32* nonnull %p)
// NULL-VALID: define{{.*}} i32 @bar4(i32 %n, i32* %p)
int bar4(int n, int *p) __attribute__((nonnull)) {
return n + *p;
}
// NULL-INVALID: define i32 @bar5(i32 %n, i32* nonnull %p)
// NULL-VALID: define i32 @bar5(i32 %n, i32* %p)
// NULL-INVALID: define{{.*}} i32 @bar5(i32 %n, i32* nonnull %p)
// NULL-VALID: define{{.*}} i32 @bar5(i32 %n, i32* %p)
int bar5(int n, int *p) __attribute__((nonnull(1, 2))) {
return n + *p;
}
@ -44,18 +44,18 @@ typedef union {
double d;
} TransparentUnion __attribute__((transparent_union));
// NULL-INVALID: define i32 @bar6(i64 %
// NULL-VALID: define i32 @bar6(i64 %
// NULL-INVALID: define{{.*}} i32 @bar6(i64 %
// NULL-VALID: define{{.*}} i32 @bar6(i64 %
int bar6(TransparentUnion tu) __attribute__((nonnull(1))) {
return *tu.p;
}
// NULL-INVALID: define void @bar7(i32* nonnull %a, i32* nonnull %b)
// NULL-VALID: define void @bar7(i32* %a, i32* %b)
// NULL-INVALID: define{{.*}} void @bar7(i32* nonnull %a, i32* nonnull %b)
// NULL-VALID: define{{.*}} void @bar7(i32* %a, i32* %b)
void bar7(int *a, int *b) __attribute__((nonnull(1)))
__attribute__((nonnull(2))) {}
// NULL-INVALID: define void @bar8(i32* nonnull %a, i32* nonnull %b)
// NULL-VALID: define void @bar8(i32* %a, i32* %b)
// NULL-INVALID: define{{.*}} void @bar8(i32* nonnull %a, i32* nonnull %b)
// NULL-VALID: define{{.*}} void @bar8(i32* %a, i32* %b)
void bar8(int *a, int *b) __attribute__((nonnull))
__attribute__((nonnull(1))) {}

View File

@ -20,38 +20,38 @@ char gbuf[63];
char *gp;
int gi, gj;
// CHECK-LABEL: define void @test1
// CHECK-LABEL: define{{.*}} void @test1
void test1() {
// CHECK: = call i8* @__strcpy_chk(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @gbuf, i64 0, i64 4), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 59)
strcpy(&gbuf[4], "Hi there");
}
// CHECK-LABEL: define void @test2
// CHECK-LABEL: define{{.*}} void @test2
void test2() {
// CHECK: = call i8* @__strcpy_chk(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @gbuf, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 63)
strcpy(gbuf, "Hi there");
}
// CHECK-LABEL: define void @test3
// CHECK-LABEL: define{{.*}} void @test3
void test3() {
// CHECK: = call i8* @__strcpy_chk(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @gbuf, i64 1, i64 37), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 0)
strcpy(&gbuf[100], "Hi there");
}
// CHECK-LABEL: define void @test4
// CHECK-LABEL: define{{.*}} void @test4
void test4() {
// CHECK: = call i8* @__strcpy_chk(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @gbuf, i64 0, i64 -1), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 0)
strcpy((char*)(void*)&gbuf[-1], "Hi there");
}
// CHECK-LABEL: define void @test5
// CHECK-LABEL: define{{.*}} void @test5
void test5() {
// CHECK: = load i8*, i8** @gp
// CHECK-NEXT:= call i64 @llvm.objectsize.i64.p0i8(i8* %{{.*}}, i1 false, i1 true, i1
strcpy(gp, "Hi there");
}
// CHECK-LABEL: define void @test6
// CHECK-LABEL: define{{.*}} void @test6
void test6() {
char buf[57];
@ -59,7 +59,7 @@ void test6() {
strcpy(&buf[4], "Hi there");
}
// CHECK-LABEL: define void @test7
// CHECK-LABEL: define{{.*}} void @test7
void test7() {
int i;
// Ensure we only evaluate the side-effect once.
@ -69,7 +69,7 @@ void test7() {
strcpy((++i, gbuf), "Hi there");
}
// CHECK-LABEL: define void @test8
// CHECK-LABEL: define{{.*}} void @test8
void test8() {
char *buf[50];
// CHECK-NOT: __strcpy_chk
@ -77,14 +77,14 @@ void test8() {
strcpy(buf[++gi], "Hi there");
}
// CHECK-LABEL: define void @test9
// CHECK-LABEL: define{{.*}} void @test9
void test9() {
// CHECK-NOT: __strcpy_chk
// CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
strcpy((char *)((++gi) + gj), "Hi there");
}
// CHECK-LABEL: define void @test10
// CHECK-LABEL: define{{.*}} void @test10
char **p;
void test10() {
// CHECK-NOT: __strcpy_chk
@ -92,42 +92,42 @@ void test10() {
strcpy(*(++p), "Hi there");
}
// CHECK-LABEL: define void @test11
// CHECK-LABEL: define{{.*}} void @test11
void test11() {
// CHECK-NOT: __strcpy_chk
// CHECK: = call i8* @__inline_strcpy_chk(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @gbuf, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
strcpy(gp = gbuf, "Hi there");
}
// CHECK-LABEL: define void @test12
// CHECK-LABEL: define{{.*}} void @test12
void test12() {
// CHECK-NOT: __strcpy_chk
// CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
strcpy(++gp, "Hi there");
}
// CHECK-LABEL: define void @test13
// CHECK-LABEL: define{{.*}} void @test13
void test13() {
// CHECK-NOT: __strcpy_chk
// CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
strcpy(gp++, "Hi there");
}
// CHECK-LABEL: define void @test14
// CHECK-LABEL: define{{.*}} void @test14
void test14() {
// CHECK-NOT: __strcpy_chk
// CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
strcpy(--gp, "Hi there");
}
// CHECK-LABEL: define void @test15
// CHECK-LABEL: define{{.*}} void @test15
void test15() {
// CHECK-NOT: __strcpy_chk
// CHECK: = call i8* @__inline_strcpy_chk(i8* %{{..*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
strcpy(gp--, "Hi there");
}
// CHECK-LABEL: define void @test16
// CHECK-LABEL: define{{.*}} void @test16
void test16() {
// CHECK-NOT: __strcpy_chk
// CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))

View File

@ -4,7 +4,7 @@
int gi;
// CHECK-LABEL: define void @_Z5test1v()
// CHECK-LABEL: define{{.*}} void @_Z5test1v()
void test1() {
// Guaranteeing that our cast removal logic doesn't break more interesting
// cases.
@ -29,7 +29,7 @@ void test1() {
gi = __builtin_object_size((char*)(B*)&c, 0);
}
// CHECK-LABEL: define void @_Z5test2v()
// CHECK-LABEL: define{{.*}} void @_Z5test2v()
void test2() {
struct A { char buf[16]; };
struct B : A {};

View File

@ -11,49 +11,49 @@ struct Foo {
int gi = 0;
// CHECK-LABEL: define i32 @ObjectSize0(i8* %{{.*}}, i64 %0)
// CHECK-LABEL: define{{.*}} i32 @ObjectSize0(i8* %{{.*}}, i64 %0)
int ObjectSize0(void *const p PS(0)) {
// CHECK-NOT: @llvm.objectsize
return __builtin_object_size(p, 0);
}
// CHECK-LABEL: define i32 @DynamicObjectSize0(i8* %{{.*}}, i64 %0)
// CHECK-LABEL: define{{.*}} i32 @DynamicObjectSize0(i8* %{{.*}}, i64 %0)
int DynamicObjectSize0(void *const p PDS(0)) {
// CHECK-NOT: @llvm.objectsize
return __builtin_dynamic_object_size(p, 0);
}
// CHECK-LABEL: define i32 @ObjectSize1(i8* %{{.*}}, i64 %0)
// CHECK-LABEL: define{{.*}} i32 @ObjectSize1(i8* %{{.*}}, i64 %0)
int ObjectSize1(void *const p PS(1)) {
// CHECK-NOT: @llvm.objectsize
return __builtin_object_size(p, 1);
}
// CHECK-LABEL: define i32 @DynamicObjectSize1(i8* %{{.*}}, i64 %0)
// CHECK-LABEL: define{{.*}} i32 @DynamicObjectSize1(i8* %{{.*}}, i64 %0)
int DynamicObjectSize1(void *const p PDS(1)) {
// CHECK-NOT: @llvm.objectsize
return __builtin_dynamic_object_size(p, 1);
}
// CHECK-LABEL: define i32 @ObjectSize2(i8* %{{.*}}, i64 %0)
// CHECK-LABEL: define{{.*}} i32 @ObjectSize2(i8* %{{.*}}, i64 %0)
int ObjectSize2(void *const p PS(2)) {
// CHECK-NOT: @llvm.objectsize
return __builtin_object_size(p, 2);
}
// CHECK-LABEL: define i32 @DynamicObjectSize2(i8* %{{.*}}, i64 %0)
// CHECK-LABEL: define{{.*}} i32 @DynamicObjectSize2(i8* %{{.*}}, i64 %0)
int DynamicObjectSize2(void *const p PDS(2)) {
// CHECK-NOT: @llvm.objectsize
return __builtin_object_size(p, 2);
}
// CHECK-LABEL: define i32 @ObjectSize3(i8* %{{.*}}, i64 %0)
// CHECK-LABEL: define{{.*}} i32 @ObjectSize3(i8* %{{.*}}, i64 %0)
int ObjectSize3(void *const p PS(3)) {
// CHECK-NOT: @llvm.objectsize
return __builtin_object_size(p, 3);
}
// CHECK-LABEL: define i32 @DynamicObjectSize3(i8* %{{.*}}, i64 %0)
// CHECK-LABEL: define{{.*}} i32 @DynamicObjectSize3(i8* %{{.*}}, i64 %0)
int DynamicObjectSize3(void *const p PDS(3)) {
// CHECK-NOT: @llvm.objectsize
return __builtin_object_size(p, 3);
@ -61,7 +61,7 @@ int DynamicObjectSize3(void *const p PDS(3)) {
void *malloc(unsigned long) __attribute__((alloc_size(1)));
// CHECK-LABEL: define void @test1
// CHECK-LABEL: define{{.*}} void @test1
void test1(unsigned long sz) {
struct Foo t[10];
@ -99,7 +99,7 @@ void test1(unsigned long sz) {
gi = DynamicObjectSize2(ptr);
}
// CHECK-LABEL: define void @test2
// CHECK-LABEL: define{{.*}} void @test2
void test2(struct Foo *t) {
// CHECK: [[VAR:%[0-9]+]] = call i64 @llvm.objectsize
// CHECK: call i32 @ObjectSize1(i8* %{{.*}}, i64 [[VAR]])
@ -108,38 +108,38 @@ void test2(struct Foo *t) {
gi = ObjectSize3(&t->t[1]);
}
// CHECK-LABEL: define i32 @_Z27NoViableOverloadObjectSize0Pv
// CHECK-LABEL: define{{.*}} i32 @_Z27NoViableOverloadObjectSize0Pv
int NoViableOverloadObjectSize0(void *const p) __attribute__((overloadable)) {
// CHECK: @llvm.objectsize
return __builtin_object_size(p, 0);
}
// CHECK-LABEL: define i32 @_Z34NoViableOverloadDynamicObjectSize0Pv
// CHECK-LABEL: define{{.*}} i32 @_Z34NoViableOverloadDynamicObjectSize0Pv
int NoViableOverloadDynamicObjectSize0(void *const p)
__attribute__((overloadable)) {
// CHECK: @llvm.objectsize
return __builtin_object_size(p, 0);
}
// CHECK-LABEL: define i32 @_Z27NoViableOverloadObjectSize1Pv
// CHECK-LABEL: define{{.*}} i32 @_Z27NoViableOverloadObjectSize1Pv
int NoViableOverloadObjectSize1(void *const p) __attribute__((overloadable)) {
// CHECK: @llvm.objectsize
return __builtin_object_size(p, 1);
}
// CHECK-LABEL: define i32 @_Z27NoViableOverloadObjectSize2Pv
// CHECK-LABEL: define{{.*}} i32 @_Z27NoViableOverloadObjectSize2Pv
int NoViableOverloadObjectSize2(void *const p) __attribute__((overloadable)) {
// CHECK: @llvm.objectsize
return __builtin_object_size(p, 2);
}
// CHECK-LABEL: define i32 @_Z27NoViableOverloadObjectSize3Pv
// CHECK-LABEL: define{{.*}} i32 @_Z27NoViableOverloadObjectSize3Pv
int NoViableOverloadObjectSize3(void *const p) __attribute__((overloadable)) {
// CHECK-NOT: @llvm.objectsize
return __builtin_object_size(p, 3);
}
// CHECK-LABEL: define i32 @_Z27NoViableOverloadObjectSize0Pv
// CHECK-LABEL: define{{.*}} i32 @_Z27NoViableOverloadObjectSize0Pv
// CHECK-NOT: @llvm.objectsize
int NoViableOverloadObjectSize0(void *const p PS(0))
__attribute__((overloadable)) {
@ -187,7 +187,7 @@ int NoViableOverloadObjectSize3(void *const p PS(3))
return SHOULDNT_BE_CALLED;
}
// CHECK-LABEL: define void @test3
// CHECK-LABEL: define{{.*}} void @test3
void test3() {
struct Foo t[10];
@ -213,7 +213,7 @@ void test3() {
gi = NoViableOverloadDynamicObjectSize0(&t[1]);
}
// CHECK-LABEL: define void @test4
// CHECK-LABEL: define{{.*}} void @test4
void test4(struct Foo *t) {
// CHECK: call i32 @_Z27NoViableOverloadObjectSize0PvU17pass_object_size0(i8* %{{.*}}, i64 %{{.*}})
gi = NoViableOverloadObjectSize0(&t[1]);
@ -245,28 +245,28 @@ void test5() {
gi = g(&t[1]);
}
// CHECK-LABEL: define i32 @IndirectObjectSize0
// CHECK-LABEL: define{{.*}} i32 @IndirectObjectSize0
int IndirectObjectSize0(void *const p PS(0)) {
// CHECK: call i32 @ObjectSize0(i8* %{{.*}}, i64 %{{.*}})
// CHECK-NOT: @llvm.objectsize
return ObjectSize0(p);
}
// CHECK-LABEL: define i32 @IndirectObjectSize1
// CHECK-LABEL: define{{.*}} i32 @IndirectObjectSize1
int IndirectObjectSize1(void *const p PS(1)) {
// CHECK: call i32 @ObjectSize1(i8* %{{.*}}, i64 %{{.*}})
// CHECK-NOT: @llvm.objectsize
return ObjectSize1(p);
}
// CHECK-LABEL: define i32 @IndirectObjectSize2
// CHECK-LABEL: define{{.*}} i32 @IndirectObjectSize2
int IndirectObjectSize2(void *const p PS(2)) {
// CHECK: call i32 @ObjectSize2(i8* %{{.*}}, i64 %{{.*}})
// CHECK-NOT: @llvm.objectsize
return ObjectSize2(p);
}
// CHECK-LABEL: define i32 @IndirectObjectSize3
// CHECK-LABEL: define{{.*}} i32 @IndirectObjectSize3
int IndirectObjectSize3(void *const p PS(3)) {
// CHECK: call i32 @ObjectSize3(i8* %{{.*}}, i64 %{{.*}})
// CHECK-NOT: @llvm.objectsize
@ -289,7 +289,7 @@ int OverloadedObjectSize(void *const p PS(0),
int OverloadedObjectSize(void *const p, void *const c)
__attribute__((overloadable)) __asm__("OverloadNoSize");
// CHECK-LABEL: define void @test6
// CHECK-LABEL: define{{.*}} void @test6
void test6() {
int known[10], *opaque;
@ -308,7 +308,7 @@ void test6() {
int Identity(void *p, size_t i) { return i; }
// CHECK-NOT: define void @AsmObjectSize
// CHECK-NOT: define{{.*}} void @AsmObjectSize
int AsmObjectSize0(void *const p PS(0)) __asm__("Identity");
int AsmObjectSize1(void *const p PS(1)) __asm__("Identity");
@ -317,7 +317,7 @@ int AsmObjectSize2(void *const p PS(2)) __asm__("Identity");
int AsmObjectSize3(void *const p PS(3)) __asm__("Identity");
// CHECK-LABEL: define void @test7
// CHECK-LABEL: define{{.*}} void @test7
void test7() {
struct Foo t[10];
@ -340,7 +340,7 @@ void test7() {
gi = AsmObjectSize3(&t[1].t[1]);
}
// CHECK-LABEL: define void @test8
// CHECK-LABEL: define{{.*}} void @test8
void test8(struct Foo *t) {
// CHECK: [[VAR:%[0-9]+]] = call i64 @llvm.objectsize
// CHECK: call i32 @"\01Identity"(i8* %{{.*}}, i64 [[VAR]])
@ -354,7 +354,7 @@ void DifferingObjectSize1(void *const p __attribute__((pass_object_size(1))));
void DifferingObjectSize2(void *const p __attribute__((pass_object_size(2))));
void DifferingObjectSize3(void *const p __attribute__((pass_object_size(3))));
// CHECK-LABEL: define void @test9
// CHECK-LABEL: define{{.*}} void @test9
void test9(void *const p __attribute__((pass_object_size(0)))) {
// CHECK: @llvm.objectsize
DifferingObjectSize2(p);
@ -367,7 +367,7 @@ void test9(void *const p __attribute__((pass_object_size(0)))) {
DifferingObjectSize3(p);
}
// CHECK-LABEL: define void @test10
// CHECK-LABEL: define{{.*}} void @test10
void test10(void *const p __attribute__((pass_object_size(1)))) {
// CHECK: @llvm.objectsize
DifferingObjectSize2(p);
@ -381,7 +381,7 @@ void test10(void *const p __attribute__((pass_object_size(1)))) {
DifferingObjectSize3(p);
}
// CHECK-LABEL: define void @test11
// CHECK-LABEL: define{{.*}} void @test11
void test11(void *const p __attribute__((pass_object_size(2)))) {
// CHECK: @llvm.objectsize
DifferingObjectSize0(p);
@ -395,7 +395,7 @@ void test11(void *const p __attribute__((pass_object_size(2)))) {
DifferingObjectSize3(p);
}
// CHECK-LABEL: define void @test12
// CHECK-LABEL: define{{.*}} void @test12
void test12(void *const p __attribute__((pass_object_size(3)))) {
// CHECK: @llvm.objectsize
DifferingObjectSize0(p);
@ -407,7 +407,7 @@ void test12(void *const p __attribute__((pass_object_size(3)))) {
DifferingObjectSize3(p);
}
// CHECK-LABEL: define void @test13
// CHECK-LABEL: define{{.*}} void @test13
void test13() {
char c[10];
unsigned i = 0;
@ -435,7 +435,7 @@ void test13() {
// problems in the form of failed assertions.
void my_sprintf(char *const c __attribute__((pass_object_size(0))), ...) {}
// CHECK-LABEL: define void @test14
// CHECK-LABEL: define{{.*}} void @test14
void test14(char *c) {
// CHECK: @llvm.objectsize
// CHECK: call void (i8*, i64, ...) @my_sprintf
@ -450,7 +450,7 @@ void pass_size_unsigned(unsigned *const PS(0));
// Bug: we weren't lowering to the proper @llvm.objectsize for pointers that
// don't turn into i8*s, which caused crashes.
// CHECK-LABEL: define void @test15
// CHECK-LABEL: define{{.*}} void @test15
void test15(unsigned *I) {
// CHECK: @llvm.objectsize.i64.p0i32
// CHECK: call void @pass_size_unsigned
@ -462,7 +462,7 @@ void pass_size_as1(__attribute__((address_space(1))) void *const PS(0));
void pass_size_unsigned_as1(
__attribute__((address_space(1))) unsigned *const PS(0));
// CHECK-LABEL: define void @test16
// CHECK-LABEL: define{{.*}} void @test16
void test16(__attribute__((address_space(1))) unsigned *I) {
// CHECK: call i64 @llvm.objectsize.i64.p1i8
// CHECK: call void @pass_size_as1
@ -474,7 +474,7 @@ void test16(__attribute__((address_space(1))) unsigned *I) {
// This used to cause assertion failures, since we'd try to emit the statement
// expression (and definitions for `a`) twice.
// CHECK-LABEL: define void @test17
// CHECK-LABEL: define{{.*}} void @test17
void test17(char *C) {
// Check for 65535 to see if we're emitting this pointer twice.
// CHECK: 65535
@ -485,7 +485,7 @@ void test17(char *C) {
ObjectSize0(C + ({ int a = 65535; a; }));
}
// CHECK-LABEL: define void @test18
// CHECK-LABEL: define{{.*}} void @test18
void test18(char *const p PDS(0)) {
// CHECK-NOT: llvm.objectsize
gi = __builtin_dynamic_object_size(p, 0);

View File

@ -5,7 +5,7 @@ enum e1 g1(enum e1 *x) {
return *x;
}
// CHECK-LABEL: define i32 @g1
// CHECK-LABEL: define{{.*}} i32 @g1
// CHECK: load i32, i32* %x, align 4
// CHECK-NOT: range
// CHECK: ret

View File

@ -64,5 +64,5 @@ struct S4
// CHECK: %struct.S4 = type { [3 x i8], %struct.T4, i32 }
// CHECK: %struct.T4 = type <{ i8, i32 }>
// CHECK: @refs = global [[struct_ref]]
// CHECK: @ss = global [[struct_S]]
// CHECK: @refs ={{.*}} global [[struct_ref]]
// CHECK: @ss ={{.*}} global [[struct_S]]

View File

@ -12,7 +12,7 @@ int y = 4;
#pragma GCC visibility push(hidden)
extern __attribute((visibility("default"))) int z;
int z = 0;
// CHECK: @z = global
// CHECK: @z ={{.*}} global
#pragma GCC visibility pop
#pragma GCC visibility push(hidden)
@ -21,4 +21,4 @@ void f() {}
__attribute((visibility("default"))) void g();
void g() {}
// CHECK-LABEL: define void @g
// CHECK-LABEL: define{{.*}} void @g

View File

@ -30,7 +30,7 @@ void foo() {
// CHECK: @J = hidden constant
// CHECK: @K = hidden constant
// CHECK: @L = constant
// CHECK: @L ={{.*}} constant
// CHECK: @M = hidden global
// CHECK: @O = hidden global
// CHECK: @I = external hidden

View File

@ -2,25 +2,25 @@
// PR6695
// CHECK: define void @test0(i32* %{{.*}}, i32 %{{.*}})
// CHECK: define{{.*}} void @test0(i32* %{{.*}}, i32 %{{.*}})
void test0(int *x, int y) {
}
// CHECK: define void @test1(i32* noalias %{{.*}}, i32 %{{.*}})
// CHECK: define{{.*}} void @test1(i32* noalias %{{.*}}, i32 %{{.*}})
void test1(int * restrict x, int y) {
}
// CHECK: define void @test2(i32* %{{.*}}, i32* noalias %{{.*}})
// CHECK: define{{.*}} void @test2(i32* %{{.*}}, i32* noalias %{{.*}})
void test2(int *x, int * restrict y) {
}
typedef int * restrict rp;
// CHECK: define void @test3(i32* noalias %{{.*}}, i32 %{{.*}})
// CHECK: define{{.*}} void @test3(i32* noalias %{{.*}}, i32 %{{.*}})
void test3(rp x, int y) {
}
// CHECK: define void @test4(i32* %{{.*}}, i32* noalias %{{.*}})
// CHECK: define{{.*}} void @test4(i32* %{{.*}}, i32* noalias %{{.*}})
void test4(int *x, rp y) {
}

View File

@ -2,7 +2,7 @@
_Atomic(unsigned) atomic;
// CHECK-LABEL: define void @cmpd_assign
// CHECK-LABEL: define{{.*}} void @cmpd_assign
void cmpd_assign() {
// CHECK: br label %[[LOOP_START:.*]]
@ -17,7 +17,7 @@ void cmpd_assign() {
atomic += 1;
}
// CHECK-LABEL: define void @inc
// CHECK-LABEL: define{{.*}} void @inc
void inc() {
// CHECK: br label %[[LOOP_START:.*]]

View File

@ -52,10 +52,10 @@ public:
};
uint32_t g(uint32_t *s, StructA *A, uint64_t count) {
// CHECK-LABEL: define i32 @_Z1g
// CHECK-LABEL: define{{.*}} i32 @_Z1g
// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32:!.*]]
// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// PATH-LABEL: define i32 @_Z1g
// PATH-LABEL: define{{.*}} i32 @_Z1g
// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32:!.*]]
// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_A_f32:!.*]]
*s = 1;
@ -64,10 +64,10 @@ uint32_t g(uint32_t *s, StructA *A, uint64_t count) {
}
uint32_t g2(uint32_t *s, StructA *A, uint64_t count) {
// CHECK-LABEL: define i32 @_Z2g2
// CHECK-LABEL: define{{.*}} i32 @_Z2g2
// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// CHECK: store i16 4, i16* %{{.*}}, align 4, !tbaa [[TAG_i16:!.*]]
// PATH-LABEL: define i32 @_Z2g2
// PATH-LABEL: define{{.*}} i32 @_Z2g2
// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// PATH: store i16 4, i16* %{{.*}}, align 4, !tbaa [[TAG_A_f16:!.*]]
*s = 1;
@ -76,10 +76,10 @@ uint32_t g2(uint32_t *s, StructA *A, uint64_t count) {
}
uint32_t g3(StructA *A, StructB *B, uint64_t count) {
// CHECK-LABEL: define i32 @_Z2g3
// CHECK-LABEL: define{{.*}} i32 @_Z2g3
// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// PATH-LABEL: define i32 @_Z2g3
// PATH-LABEL: define{{.*}} i32 @_Z2g3
// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_A_f32]]
// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_B_a_f32:!.*]]
A->f32 = 1;
@ -88,10 +88,10 @@ uint32_t g3(StructA *A, StructB *B, uint64_t count) {
}
uint32_t g4(StructA *A, StructB *B, uint64_t count) {
// CHECK-LABEL: define i32 @_Z2g4
// CHECK-LABEL: define{{.*}} i32 @_Z2g4
// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// CHECK: store i16 4, i16* %{{.*}}, align 4, !tbaa [[TAG_i16]]
// PATH-LABEL: define i32 @_Z2g4
// PATH-LABEL: define{{.*}} i32 @_Z2g4
// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_A_f32]]
// PATH: store i16 4, i16* %{{.*}}, align 4, !tbaa [[TAG_B_a_f16:!.*]]
A->f32 = 1;
@ -100,10 +100,10 @@ uint32_t g4(StructA *A, StructB *B, uint64_t count) {
}
uint32_t g5(StructA *A, StructB *B, uint64_t count) {
// CHECK-LABEL: define i32 @_Z2g5
// CHECK-LABEL: define{{.*}} i32 @_Z2g5
// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// PATH-LABEL: define i32 @_Z2g5
// PATH-LABEL: define{{.*}} i32 @_Z2g5
// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_A_f32]]
// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_B_f32:!.*]]
A->f32 = 1;
@ -112,10 +112,10 @@ uint32_t g5(StructA *A, StructB *B, uint64_t count) {
}
uint32_t g6(StructA *A, StructB *B, uint64_t count) {
// CHECK-LABEL: define i32 @_Z2g6
// CHECK-LABEL: define{{.*}} i32 @_Z2g6
// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// PATH-LABEL: define i32 @_Z2g6
// PATH-LABEL: define{{.*}} i32 @_Z2g6
// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_A_f32]]
// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_B_a_f32_2:!.*]]
A->f32 = 1;
@ -124,10 +124,10 @@ uint32_t g6(StructA *A, StructB *B, uint64_t count) {
}
uint32_t g7(StructA *A, StructS *S, uint64_t count) {
// CHECK-LABEL: define i32 @_Z2g7
// CHECK-LABEL: define{{.*}} i32 @_Z2g7
// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// PATH-LABEL: define i32 @_Z2g7
// PATH-LABEL: define{{.*}} i32 @_Z2g7
// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_A_f32]]
// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_S_f32:!.*]]
A->f32 = 1;
@ -136,10 +136,10 @@ uint32_t g7(StructA *A, StructS *S, uint64_t count) {
}
uint32_t g8(StructA *A, StructS *S, uint64_t count) {
// CHECK-LABEL: define i32 @_Z2g8
// CHECK-LABEL: define{{.*}} i32 @_Z2g8
// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// CHECK: store i16 4, i16* %{{.*}}, align 4, !tbaa [[TAG_i16]]
// PATH-LABEL: define i32 @_Z2g8
// PATH-LABEL: define{{.*}} i32 @_Z2g8
// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_A_f32]]
// PATH: store i16 4, i16* %{{.*}}, align 4, !tbaa [[TAG_S_f16:!.*]]
A->f32 = 1;
@ -148,10 +148,10 @@ uint32_t g8(StructA *A, StructS *S, uint64_t count) {
}
uint32_t g9(StructS *S, StructS2 *S2, uint64_t count) {
// CHECK-LABEL: define i32 @_Z2g9
// CHECK-LABEL: define{{.*}} i32 @_Z2g9
// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// PATH-LABEL: define i32 @_Z2g9
// PATH-LABEL: define{{.*}} i32 @_Z2g9
// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_S_f32]]
// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_S_f32:!.*]]
S->f32 = 1;
@ -160,10 +160,10 @@ uint32_t g9(StructS *S, StructS2 *S2, uint64_t count) {
}
uint32_t g10(StructS *S, StructS2 *S2, uint64_t count) {
// CHECK-LABEL: define i32 @_Z3g10
// CHECK-LABEL: define{{.*}} i32 @_Z3g10
// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// PATH-LABEL: define i32 @_Z3g10
// PATH-LABEL: define{{.*}} i32 @_Z3g10
// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_S_f32]]
// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_S2_f32_2:!.*]]
S->f32 = 1;
@ -172,10 +172,10 @@ uint32_t g10(StructS *S, StructS2 *S2, uint64_t count) {
}
uint32_t g11(StructC *C, StructD *D, uint64_t count) {
// CHECK-LABEL: define i32 @_Z3g11
// CHECK-LABEL: define{{.*}} i32 @_Z3g11
// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// PATH-LABEL: define i32 @_Z3g11
// PATH-LABEL: define{{.*}} i32 @_Z3g11
// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_C_b_a_f32:!.*]]
// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_D_b_a_f32:!.*]]
C->b.a.f32 = 1;
@ -184,11 +184,11 @@ uint32_t g11(StructC *C, StructD *D, uint64_t count) {
}
uint32_t g12(StructC *C, StructD *D, uint64_t count) {
// CHECK-LABEL: define i32 @_Z3g12
// CHECK-LABEL: define{{.*}} i32 @_Z3g12
// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// TODO: differentiate the two accesses.
// PATH-LABEL: define i32 @_Z3g12
// PATH-LABEL: define{{.*}} i32 @_Z3g12
// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_B_a_f32]]
// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_B_a_f32]]
StructB *b1 = &(C->b);

View File

@ -8,7 +8,7 @@ struct A {
};
void foo(A *a, __m128 v) {
// CHECK-LABEL: define void @_Z3fooP1ADv4_f
// CHECK-LABEL: define{{.*}} void @_Z3fooP1ADv4_f
a->a = v;
// CHECK: store <4 x float> %v, <4 x float>* %{{.*}}, align 16, !tbaa [[TAG_char:!.*]]
// CHECK: store <4 x float> %{{.*}}, <4 x float>* %{{.*}}, align 16, !tbaa [[TAG_char]]

View File

@ -50,10 +50,10 @@ typedef struct
} StructS2;
uint32_t g(uint32_t *s, StructA *A, uint64_t count) {
// CHECK-LABEL: define i32 @_Z1g
// CHECK-LABEL: define{{.*}} i32 @_Z1g
// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32:!.*]]
// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// PATH-LABEL: define i32 @_Z1g
// PATH-LABEL: define{{.*}} i32 @_Z1g
// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32:!.*]]
// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_A_f32:!.*]]
*s = 1;
@ -62,10 +62,10 @@ uint32_t g(uint32_t *s, StructA *A, uint64_t count) {
}
uint32_t g2(uint32_t *s, StructA *A, uint64_t count) {
// CHECK-LABEL: define i32 @_Z2g2
// CHECK-LABEL: define{{.*}} i32 @_Z2g2
// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// CHECK: store i16 4, i16* %{{.*}}, align 4, !tbaa [[TAG_i16:!.*]]
// PATH-LABEL: define i32 @_Z2g2
// PATH-LABEL: define{{.*}} i32 @_Z2g2
// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// PATH: store i16 4, i16* %{{.*}}, align 4, !tbaa [[TAG_A_f16:!.*]]
*s = 1;
@ -74,10 +74,10 @@ uint32_t g2(uint32_t *s, StructA *A, uint64_t count) {
}
uint32_t g3(StructA *A, StructB *B, uint64_t count) {
// CHECK-LABEL: define i32 @_Z2g3
// CHECK-LABEL: define{{.*}} i32 @_Z2g3
// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// PATH-LABEL: define i32 @_Z2g3
// PATH-LABEL: define{{.*}} i32 @_Z2g3
// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_A_f32]]
// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_B_a_f32:!.*]]
A->f32 = 1;
@ -86,10 +86,10 @@ uint32_t g3(StructA *A, StructB *B, uint64_t count) {
}
uint32_t g4(StructA *A, StructB *B, uint64_t count) {
// CHECK-LABEL: define i32 @_Z2g4
// CHECK-LABEL: define{{.*}} i32 @_Z2g4
// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// CHECK: store i16 4, i16* %{{.*}}, align 4, !tbaa [[TAG_i16]]
// PATH-LABEL: define i32 @_Z2g4
// PATH-LABEL: define{{.*}} i32 @_Z2g4
// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_A_f32]]
// PATH: store i16 4, i16* %{{.*}}, align 4, !tbaa [[TAG_B_a_f16:!.*]]
A->f32 = 1;
@ -98,10 +98,10 @@ uint32_t g4(StructA *A, StructB *B, uint64_t count) {
}
uint32_t g5(StructA *A, StructB *B, uint64_t count) {
// CHECK-LABEL: define i32 @_Z2g5
// CHECK-LABEL: define{{.*}} i32 @_Z2g5
// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// PATH-LABEL: define i32 @_Z2g5
// PATH-LABEL: define{{.*}} i32 @_Z2g5
// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_A_f32]]
// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_B_f32:!.*]]
A->f32 = 1;
@ -110,10 +110,10 @@ uint32_t g5(StructA *A, StructB *B, uint64_t count) {
}
uint32_t g6(StructA *A, StructB *B, uint64_t count) {
// CHECK-LABEL: define i32 @_Z2g6
// CHECK-LABEL: define{{.*}} i32 @_Z2g6
// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// PATH-LABEL: define i32 @_Z2g6
// PATH-LABEL: define{{.*}} i32 @_Z2g6
// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_A_f32]]
// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_B_a_f32_2:!.*]]
A->f32 = 1;
@ -122,10 +122,10 @@ uint32_t g6(StructA *A, StructB *B, uint64_t count) {
}
uint32_t g7(StructA *A, StructS *S, uint64_t count) {
// CHECK-LABEL: define i32 @_Z2g7
// CHECK-LABEL: define{{.*}} i32 @_Z2g7
// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// PATH-LABEL: define i32 @_Z2g7
// PATH-LABEL: define{{.*}} i32 @_Z2g7
// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_A_f32]]
// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_S_f32:!.*]]
A->f32 = 1;
@ -134,10 +134,10 @@ uint32_t g7(StructA *A, StructS *S, uint64_t count) {
}
uint32_t g8(StructA *A, StructS *S, uint64_t count) {
// CHECK-LABEL: define i32 @_Z2g8
// CHECK-LABEL: define{{.*}} i32 @_Z2g8
// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// CHECK: store i16 4, i16* %{{.*}}, align 4, !tbaa [[TAG_i16]]
// PATH-LABEL: define i32 @_Z2g8
// PATH-LABEL: define{{.*}} i32 @_Z2g8
// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_A_f32]]
// PATH: store i16 4, i16* %{{.*}}, align 4, !tbaa [[TAG_S_f16:!.*]]
A->f32 = 1;
@ -146,10 +146,10 @@ uint32_t g8(StructA *A, StructS *S, uint64_t count) {
}
uint32_t g9(StructS *S, StructS2 *S2, uint64_t count) {
// CHECK-LABEL: define i32 @_Z2g9
// CHECK-LABEL: define{{.*}} i32 @_Z2g9
// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// PATH-LABEL: define i32 @_Z2g9
// PATH-LABEL: define{{.*}} i32 @_Z2g9
// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_S_f32]]
// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_S2_f32:!.*]]
S->f32 = 1;
@ -158,10 +158,10 @@ uint32_t g9(StructS *S, StructS2 *S2, uint64_t count) {
}
uint32_t g10(StructS *S, StructS2 *S2, uint64_t count) {
// CHECK-LABEL: define i32 @_Z3g10
// CHECK-LABEL: define{{.*}} i32 @_Z3g10
// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// CHECK: store i16 4, i16* %{{.*}}, align 4, !tbaa [[TAG_i16]]
// PATH-LABEL: define i32 @_Z3g10
// PATH-LABEL: define{{.*}} i32 @_Z3g10
// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_S_f32]]
// PATH: store i16 4, i16* %{{.*}}, align 4, !tbaa [[TAG_S2_f16:!.*]]
S->f32 = 1;
@ -170,10 +170,10 @@ uint32_t g10(StructS *S, StructS2 *S2, uint64_t count) {
}
uint32_t g11(StructC *C, StructD *D, uint64_t count) {
// CHECK-LABEL: define i32 @_Z3g11
// CHECK-LABEL: define{{.*}} i32 @_Z3g11
// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// PATH-LABEL: define i32 @_Z3g11
// PATH-LABEL: define{{.*}} i32 @_Z3g11
// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_C_b_a_f32:!.*]]
// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_D_b_a_f32:!.*]]
C->b.a.f32 = 1;
@ -182,11 +182,11 @@ uint32_t g11(StructC *C, StructD *D, uint64_t count) {
}
uint32_t g12(StructC *C, StructD *D, uint64_t count) {
// CHECK-LABEL: define i32 @_Z3g12
// CHECK-LABEL: define{{.*}} i32 @_Z3g12
// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// TODO: differentiate the two accesses.
// PATH-LABEL: define i32 @_Z3g12
// PATH-LABEL: define{{.*}} i32 @_Z3g12
// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_B_a_f32]]
// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_B_a_f32]]
StructB *b1 = &(C->b);
@ -207,9 +207,9 @@ struct five {
} ATTR;
char g13(struct five *a, struct five *b) {
return a->b;
// CHECK-LABEL: define signext i8 @_Z3g13
// CHECK-LABEL: define{{.*}} signext i8 @_Z3g13
// CHECK: load i8, i8* %{{.*}}, align 1, !tbaa [[TAG_char:!.*]]
// PATH-LABEL: define signext i8 @_Z3g13
// PATH-LABEL: define{{.*}} signext i8 @_Z3g13
// PATH: load i8, i8* %{{.*}}, align 1, !tbaa [[TAG_five_b:!.*]]
}
@ -220,9 +220,9 @@ struct six {
char c;
};
char g14(struct six *a, struct six *b) {
// CHECK-LABEL: define signext i8 @_Z3g14
// CHECK-LABEL: define{{.*}} signext i8 @_Z3g14
// CHECK: load i8, i8* %{{.*}}, align 1, !tbaa [[TAG_char]]
// PATH-LABEL: define signext i8 @_Z3g14
// PATH-LABEL: define{{.*}} signext i8 @_Z3g14
// PATH: load i8, i8* %{{.*}}, align 1, !tbaa [[TAG_six_b:!.*]]
return a->b;
}
@ -230,10 +230,10 @@ char g14(struct six *a, struct six *b) {
// Types that differ only by name may alias.
typedef StructS StructS3;
uint32_t g15(StructS *S, StructS3 *S3, uint64_t count) {
// CHECK-LABEL: define i32 @_Z3g15
// CHECK-LABEL: define{{.*}} i32 @_Z3g15
// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
// PATH-LABEL: define i32 @_Z3g15
// PATH-LABEL: define{{.*}} i32 @_Z3g15
// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_S_f32]]
// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_S_f32]]
S->f32 = 1;

View File

@ -3,7 +3,7 @@
unsigned int ui, uj, uk;
int i, j, k;
// CHECK-LABEL: define void @test0()
// CHECK-LABEL: define{{.*}} void @test0()
void test0() {
// -ftrapv doesn't affect unsigned arithmetic.
// CHECK: [[T1:%.*]] = load i32, i32* @uj
@ -23,7 +23,7 @@ void test0() {
i = j + k;
}
// CHECK-LABEL: define void @test1()
// CHECK-LABEL: define{{.*}} void @test1()
void test1() {
extern void opaque(int);
opaque(i++);
@ -37,7 +37,7 @@ void test1() {
// CHECK: call void @llvm.ubsantrap(i8 0)
}
// CHECK-LABEL: define void @test2()
// CHECK-LABEL: define{{.*}} void @test2()
void test2() {
extern void opaque(int);
opaque(++i);
@ -51,7 +51,7 @@ void test2() {
// CHECK: call void @llvm.ubsantrap(i8 0)
}
// CHECK-LABEL: define void @test3(
// CHECK-LABEL: define{{.*}} void @test3(
void test3(int a, int b, float c, float d) {
// CHECK-NOT: @llvm.trap
(void)(a / b);

View File

@ -3,7 +3,7 @@
// NOT-UB-NOT: __ubsan_handle_invalid_builtin
// CHECK: define void @check_ctz
// CHECK: define{{.*}} void @check_ctz
void check_ctz(int n) {
// CHECK: [[NOT_ZERO:%.*]] = icmp ne i32 [[N:%.*]], 0, !nosanitize
// CHECK-NEXT: br i1 [[NOT_ZERO]]
@ -23,7 +23,7 @@ void check_ctz(int n) {
__builtin_ctzll(n);
}
// CHECK: define void @check_clz
// CHECK: define{{.*}} void @check_clz
void check_clz(int n) {
// CHECK: [[NOT_ZERO:%.*]] = icmp ne i32 [[N:%.*]], 0, !nosanitize
// CHECK-NEXT: br i1 [[NOT_ZERO]]

View File

@ -1,6 +1,6 @@
// RUN: %clang_cc1 %s -emit-llvm -w -triple x86_64-apple-darwin10 -fsanitize=array-bounds -o - | FileCheck %s
// CHECK-LABEL: define i32 @foo(
// CHECK-LABEL: define{{.*}} i32 @foo(
int foo(int *const p __attribute__((pass_object_size(0))), int n) {
int x = (p)[n];
@ -25,42 +25,42 @@ int foo(int *const p __attribute__((pass_object_size(0))), int n) {
typedef struct {} ZeroSizedType;
// CHECK-LABEL: define void @bar(
// CHECK-LABEL: define{{.*}} void @bar(
ZeroSizedType bar(ZeroSizedType *const p __attribute__((pass_object_size(0))), int n) {
// CHECK-NOT: __ubsan_handle_out_of_bounds
// CHECK: ret void
return p[n];
}
// CHECK-LABEL: define i32 @baz(
// CHECK-LABEL: define{{.*}} i32 @baz(
int baz(int *const p __attribute__((pass_object_size(1))), int n) {
// CHECK: __ubsan_handle_out_of_bounds
// CHECK: ret i32
return p[n];
}
// CHECK-LABEL: define i32 @mat(
// CHECK-LABEL: define{{.*}} i32 @mat(
int mat(int *const p __attribute__((pass_object_size(2))), int n) {
// CHECK-NOT: __ubsan_handle_out_of_bounds
// CHECK: ret i32
return p[n];
}
// CHECK-LABEL: define i32 @pat(
// CHECK-LABEL: define{{.*}} i32 @pat(
int pat(int *const p __attribute__((pass_object_size(3))), int n) {
// CHECK-NOT: __ubsan_handle_out_of_bounds
// CHECK: ret i32
return p[n];
}
// CHECK-LABEL: define i32 @cat(
// CHECK-LABEL: define{{.*}} i32 @cat(
int cat(int p[static 10], int n) {
// CHECK-NOT: __ubsan_handle_out_of_bounds
// CHECK: ret i32
return p[n];
}
// CHECK-LABEL: define i32 @bat(
// CHECK-LABEL: define{{.*}} i32 @bat(
int bat(int n, int p[n]) {
// CHECK-NOT: __ubsan_handle_out_of_bounds
// CHECK: ret i32

View File

@ -5,7 +5,7 @@
extern "C" {
#endif
// CHECK-LABEL: define void @fixed_len_array
// CHECK-LABEL: define{{.*}} void @fixed_len_array
void fixed_len_array(int k) {
// CHECK: getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* [[ARR:%.*]], i64 0, i64 [[IDXPROM:%.*]]
// CHECK-NEXT: [[SMUL:%.*]] = call { i64, i1 } @llvm.smul.with.overflow.i64(i64 40, i64 [[IDXPROM]]), !nosanitize
@ -23,7 +23,7 @@ void fixed_len_array(int k) {
arr[k][k];
}
// CHECK-LABEL: define void @variable_len_array
// CHECK-LABEL: define{{.*}} void @variable_len_array
void variable_len_array(int n, int k) {
// CHECK: getelementptr inbounds i32, i32* {{.*}}, i64 [[IDXPROM:%.*]]
// CHECK-NEXT: @llvm.smul.with.overflow.i64(i64 4, i64 [[IDXPROM]]), !nosanitize
@ -37,7 +37,7 @@ void variable_len_array(int n, int k) {
arr[k][k];
}
// CHECK-LABEL: define void @pointer_array
// CHECK-LABEL: define{{.*}} void @pointer_array
void pointer_array(int **arr, int k) {
// CHECK: @llvm.smul.with.overflow.i64(i64 8, i64 {{.*}}), !nosanitize
// CHECK: call void @__ubsan_handle_pointer_overflow{{.*}}
@ -48,7 +48,7 @@ void pointer_array(int **arr, int k) {
arr[k][k];
}
// CHECK-LABEL: define void @pointer_array_unsigned_indices
// CHECK-LABEL: define{{.*}} void @pointer_array_unsigned_indices
void pointer_array_unsigned_indices(int **arr, unsigned k) {
// CHECK: icmp uge
// CHECK-NOT: select
@ -59,7 +59,7 @@ void pointer_array_unsigned_indices(int **arr, unsigned k) {
arr[k][k];
}
// CHECK-LABEL: define void @pointer_array_mixed_indices
// CHECK-LABEL: define{{.*}} void @pointer_array_mixed_indices
void pointer_array_mixed_indices(int **arr, int i, unsigned j) {
// CHECK: select
// CHECK: call void @__ubsan_handle_pointer_overflow{{.*}}
@ -80,7 +80,7 @@ struct S1 {
// TODO: Currently, structure GEPs are not checked, so there are several
// potentially unsafe GEPs here which we don't instrument.
//
// CHECK-LABEL: define void @struct_index
// CHECK-LABEL: define{{.*}} void @struct_index
void struct_index(struct S1 *p) {
// CHECK: getelementptr inbounds %struct.S1, %struct.S1* [[P:%.*]], i64 10
// CHECK-NEXT: [[BASE:%.*]] = ptrtoint %struct.S1* [[P]] to i64, !nosanitize
@ -95,7 +95,7 @@ void struct_index(struct S1 *p) {
typedef void (*funcptr_t)(void);
// CHECK-LABEL: define void @function_pointer_arith
// CHECK-LABEL: define{{.*}} void @function_pointer_arith
void function_pointer_arith(funcptr_t *p, int k) {
// CHECK: add i64 {{.*}}, 8, !nosanitize
// CHECK-NOT: select
@ -108,7 +108,7 @@ void function_pointer_arith(funcptr_t *p, int k) {
p + k;
}
// CHECK-LABEL: define void @dont_emit_checks_for_no_op_GEPs
// CHECK-LABEL: define{{.*}} void @dont_emit_checks_for_no_op_GEPs
// CHECK-C: __ubsan_handle_pointer_overflow
// CHECK-CPP-NOT: __ubsan_handle_pointer_overflow
void dont_emit_checks_for_no_op_GEPs(char *p) {

View File

@ -1,6 +1,6 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -w -emit-llvm -o - %s -fsanitize=pointer-overflow | FileCheck %s
// CHECK-LABEL: define void @variable_len_array_arith
// CHECK-LABEL: define{{.*}} void @variable_len_array_arith
void variable_len_array_arith(int n, int k) {
int vla[n];
int (*p)[n] = &vla;
@ -18,7 +18,7 @@ void variable_len_array_arith(int n, int k) {
p + k;
}
// CHECK-LABEL: define void @objc_id
// CHECK-LABEL: define{{.*}} void @objc_id
void objc_id(id *p) {
// CHECK: add i64 {{.*}}, 8, !nosanitize
// CHECK-NOT: select

View File

@ -12,120 +12,120 @@ enum E2 : char {
b
};
// CHECK-LABEL: define signext i8 @_Z4add1
// CHECK-LABEL: define{{.*}} signext i8 @_Z4add1
// CHECK-NOT: sadd.with.overflow
char add1(char c) { return c + c; }
// CHECK-LABEL: define zeroext i8 @_Z4add2
// CHECK-LABEL: define{{.*}} zeroext i8 @_Z4add2
// CHECK-NOT: uadd.with.overflow
uchar add2(uchar uc) { return uc + uc; }
// CHECK-LABEL: define i32 @_Z4add3
// CHECK-LABEL: define{{.*}} i32 @_Z4add3
// CHECK: sadd.with.overflow
int add3(E1 e) { return e + a; }
// CHECK-LABEL: define signext i8 @_Z4add4
// CHECK-LABEL: define{{.*}} signext i8 @_Z4add4
// CHECK-NOT: sadd.with.overflow
char add4(E2 e) { return e + b; }
// CHECK-LABEL: define signext i8 @_Z4sub1
// CHECK-LABEL: define{{.*}} signext i8 @_Z4sub1
// CHECK-NOT: ssub.with.overflow
char sub1(char c) { return c - c; }
// CHECK-LABEL: define zeroext i8 @_Z4sub2
// CHECK-LABEL: define{{.*}} zeroext i8 @_Z4sub2
// CHECK-NOT: usub.with.overflow
uchar sub2(uchar uc) { return uc - uc; }
// CHECK-LABEL: define signext i8 @_Z4sub3
// CHECK-LABEL: define{{.*}} signext i8 @_Z4sub3
// CHECK-NOT: ssub.with.overflow
char sub3(char c) { return -c; }
// Note: -INT_MIN can overflow.
//
// CHECK-LABEL: define i32 @_Z4sub4
// CHECK-LABEL: define{{.*}} i32 @_Z4sub4
// CHECK: ssub.with.overflow
int sub4(int i) { return -i; }
// CHECK-LABEL: define signext i8 @_Z4mul1
// CHECK-LABEL: define{{.*}} signext i8 @_Z4mul1
// CHECK-NOT: smul.with.overflow
char mul1(char c) { return c * c; }
// CHECK-LABEL: define zeroext i8 @_Z4mul2
// CHECK-LABEL: define{{.*}} zeroext i8 @_Z4mul2
// CHECK-NOT: smul.with.overflow
uchar mul2(uchar uc) { return uc * uc; }
// Note: USHRT_MAX * USHRT_MAX can overflow.
//
// CHECK-LABEL: define zeroext i16 @_Z4mul3
// CHECK-LABEL: define{{.*}} zeroext i16 @_Z4mul3
// CHECK: smul.with.overflow
ushort mul3(ushort us) { return us * us; }
// CHECK-LABEL: define i32 @_Z4mul4
// CHECK-LABEL: define{{.*}} i32 @_Z4mul4
// CHECK: smul.with.overflow
int mul4(int i, char c) { return i * c; }
// CHECK-LABEL: define i32 @_Z4mul5
// CHECK-LABEL: define{{.*}} i32 @_Z4mul5
// CHECK: smul.with.overflow
int mul5(int i, char c) { return c * i; }
// CHECK-LABEL: define signext i16 @_Z4mul6
// CHECK-LABEL: define{{.*}} signext i16 @_Z4mul6
// CHECK-NOT: smul.with.overflow
short mul6(short s) { return s * s; }
// CHECK-LABEL: define signext i8 @_Z4div1
// CHECK-LABEL: define{{.*}} signext i8 @_Z4div1
// CHECK-NOT: ubsan_handle_divrem_overflow
char div1(char c) { return c / c; }
// CHECK-LABEL: define zeroext i8 @_Z4div2
// CHECK-LABEL: define{{.*}} zeroext i8 @_Z4div2
// CHECK-NOT: ubsan_handle_divrem_overflow
uchar div2(uchar uc) { return uc / uc; }
// CHECK-LABEL: define signext i8 @_Z4div3
// CHECK-LABEL: define{{.*}} signext i8 @_Z4div3
// CHECK-NOT: ubsan_handle_divrem_overflow
char div3(char c, int i) { return c / i; }
// CHECK-LABEL: define signext i8 @_Z4div4
// CHECK-LABEL: define{{.*}} signext i8 @_Z4div4
// CHECK: ubsan_handle_divrem_overflow
char div4(int i, char c) { return i / c; }
// Note: INT_MIN / -1 can overflow.
//
// CHECK-LABEL: define signext i8 @_Z4div5
// CHECK-LABEL: define{{.*}} signext i8 @_Z4div5
// CHECK: ubsan_handle_divrem_overflow
char div5(int i, char c) { return i / c; }
// CHECK-LABEL: define signext i8 @_Z4rem1
// CHECK-LABEL: define{{.*}} signext i8 @_Z4rem1
// CHECK-NOT: ubsan_handle_divrem_overflow
char rem1(char c) { return c % c; }
// CHECK-LABEL: define zeroext i8 @_Z4rem2
// CHECK-LABEL: define{{.*}} zeroext i8 @_Z4rem2
// CHECK-NOT: ubsan_handle_divrem_overflow
uchar rem2(uchar uc) { return uc % uc; }
// CHECK-LABEL: define signext i8 @_Z4rem3
// CHECK-LABEL: define{{.*}} signext i8 @_Z4rem3
// CHECK: ubsan_handle_divrem_overflow
char rem3(int i, char c) { return i % c; }
// CHECK-LABEL: define signext i8 @_Z4rem4
// CHECK-LABEL: define{{.*}} signext i8 @_Z4rem4
// CHECK-NOT: ubsan_handle_divrem_overflow
char rem4(char c, int i) { return c % i; }
// CHECK-LABEL: define signext i8 @_Z4inc1
// CHECK-LABEL: define{{.*}} signext i8 @_Z4inc1
// CHECK-NOT: sadd.with.overflow
char inc1(char c) { return c++ + (char)0; }
// CHECK-LABEL: define zeroext i8 @_Z4inc2
// CHECK-LABEL: define{{.*}} zeroext i8 @_Z4inc2
// CHECK-NOT: uadd.with.overflow
uchar inc2(uchar uc) { return uc++ + (uchar)0; }
// CHECK-LABEL: define void @_Z4inc3
// CHECK-LABEL: define{{.*}} void @_Z4inc3
// CHECK-NOT: sadd.with.overflow
void inc3(char c) { c++; }
// CHECK-LABEL: define void @_Z4inc4
// CHECK-LABEL: define{{.*}} void @_Z4inc4
// CHECK-NOT: uadd.with.overflow
void inc4(uchar uc) { uc++; }
// CHECK-LABEL: define <4 x i32> @_Z4vremDv4_iS_
// CHECK-LABEL: define{{.*}} <4 x i32> @_Z4vremDv4_iS_
// CHECK-NOT: ubsan_handle_divrem_overflow
int4 vrem(int4 a, int4 b) { return a % b; }

View File

@ -1,34 +1,34 @@
// RUN: %clang_cc1 -triple=x86_64-apple-darwin -fsanitize=shift-exponent,shift-base -emit-llvm %s -o - | FileCheck %s
// CHECK-LABEL: define i32 @f1
// CHECK-LABEL: define{{.*}} i32 @f1
int f1(int c, int shamt) {
// CHECK: icmp ule i32 %{{.*}}, 31, !nosanitize
// CHECK: icmp ule i32 %{{.*}}, 31, !nosanitize
return 1 << (c << shamt);
}
// CHECK-LABEL: define i32 @f2
// CHECK-LABEL: define{{.*}} i32 @f2
int f2(long c, int shamt) {
// CHECK: icmp ule i32 %{{.*}}, 63, !nosanitize
// CHECK: icmp ule i64 %{{.*}}, 31, !nosanitize
return 1 << (c << shamt);
}
// CHECK-LABEL: define i32 @f3
// CHECK-LABEL: define{{.*}} i32 @f3
unsigned f3(unsigned c, int shamt) {
// CHECK: icmp ule i32 %{{.*}}, 31, !nosanitize
// CHECK: icmp ule i32 %{{.*}}, 31, !nosanitize
return 1U << (c << shamt);
}
// CHECK-LABEL: define i32 @f4
// CHECK-LABEL: define{{.*}} i32 @f4
unsigned f4(unsigned long c, int shamt) {
// CHECK: icmp ule i32 %{{.*}}, 63, !nosanitize
// CHECK: icmp ule i64 %{{.*}}, 31, !nosanitize
return 1U << (c << shamt);
}
// CHECK-LABEL: define i32 @f5
// CHECK-LABEL: define{{.*}} i32 @f5
int f5(int c, long long shamt) {
// CHECK: icmp ule i64 %{{[0-9]+}}, 31, !nosanitize
//
@ -37,7 +37,7 @@ int f5(int c, long long shamt) {
return c << shamt;
}
// CHECK-LABEL: define i32 @f6
// CHECK-LABEL: define{{.*}} i32 @f6
int f6(int c, int shamt) {
// CHECK: icmp ule i32 %[[WIDTH:.*]], 31, !nosanitize
//

View File

@ -8,7 +8,7 @@ unsigned int ii, ij, ik;
extern void opaquelong(unsigned long);
extern void opaqueint(unsigned int);
// CHECK-LABEL: define void @testlongadd()
// CHECK-LABEL: define{{.*}} void @testlongadd()
void testlongadd() {
// CHECK: [[T1:%.*]] = load i64, i64* @lj
@ -20,7 +20,7 @@ void testlongadd() {
li = lj + lk;
}
// CHECK-LABEL: define void @testlongsub()
// CHECK-LABEL: define{{.*}} void @testlongsub()
void testlongsub() {
// CHECK: [[T1:%.*]] = load i64, i64* @lj
@ -32,7 +32,7 @@ void testlongsub() {
li = lj - lk;
}
// CHECK-LABEL: define void @testlongmul()
// CHECK-LABEL: define{{.*}} void @testlongmul()
void testlongmul() {
// CHECK: [[T1:%.*]] = load i64, i64* @lj
@ -44,7 +44,7 @@ void testlongmul() {
li = lj * lk;
}
// CHECK-LABEL: define void @testlongpostinc()
// CHECK-LABEL: define{{.*}} void @testlongpostinc()
void testlongpostinc() {
opaquelong(li++);
@ -55,7 +55,7 @@ void testlongpostinc() {
// CHECK: call void @__ubsan_handle_add_overflow
}
// CHECK-LABEL: define void @testlongpreinc()
// CHECK-LABEL: define{{.*}} void @testlongpreinc()
void testlongpreinc() {
opaquelong(++li);
@ -66,7 +66,7 @@ void testlongpreinc() {
// CHECK: call void @__ubsan_handle_add_overflow
}
// CHECK-LABEL: define void @testintadd()
// CHECK-LABEL: define{{.*}} void @testintadd()
void testintadd() {
// CHECK: [[T1:%.*]] = load i32, i32* @ij
@ -78,7 +78,7 @@ void testintadd() {
ii = ij + ik;
}
// CHECK-LABEL: define void @testintsub()
// CHECK-LABEL: define{{.*}} void @testintsub()
void testintsub() {
// CHECK: [[T1:%.*]] = load i32, i32* @ij
@ -90,7 +90,7 @@ void testintsub() {
ii = ij - ik;
}
// CHECK-LABEL: define void @testintmul()
// CHECK-LABEL: define{{.*}} void @testintmul()
void testintmul() {
// CHECK: [[T1:%.*]] = load i32, i32* @ij
@ -102,7 +102,7 @@ void testintmul() {
ii = ij * ik;
}
// CHECK-LABEL: define void @testintpostinc()
// CHECK-LABEL: define{{.*}} void @testintpostinc()
void testintpostinc() {
opaqueint(ii++);
@ -113,7 +113,7 @@ void testintpostinc() {
// CHECK: call void @__ubsan_handle_add_overflow
}
// CHECK-LABEL: define void @testintpreinc()
// CHECK-LABEL: define{{.*}} void @testintpreinc()
void testintpreinc() {
opaqueint(++ii);

View File

@ -8,8 +8,8 @@
unsigned short si, sj, sk;
// CHECKS-LABEL: define void @testshortmul()
// CHECKU-LABEL: define void @testshortmul()
// CHECKS-LABEL: define{{.*}} void @testshortmul()
// CHECKU-LABEL: define{{.*}} void @testshortmul()
void testshortmul() {
// CHECKS: load i16, i16* @sj

View File

@ -69,7 +69,7 @@ vec_int1 lax_vector_compare1(int x, vec_int1 y) {
return y;
}
// CHECK: define i32 @lax_vector_compare1(i32 {{.*}}, i32 {{.*}})
// CHECK: define{{.*}} i32 @lax_vector_compare1(i32 {{.*}}, i32 {{.*}})
// CHECK: icmp eq i32
typedef int vec_int2 __attribute__((vector_size(8)));
@ -78,5 +78,5 @@ vec_int2 lax_vector_compare2(long long x, vec_int2 y) {
return y;
}
// CHECK: define void @lax_vector_compare2(<2 x i32>* {{.*sret.*}}, i64 {{.*}}, i64 {{.*}})
// CHECK: define{{.*}} void @lax_vector_compare2(<2 x i32>* {{.*sret.*}}, i64 {{.*}}, i64 {{.*}})
// CHECK: icmp eq <2 x i32>

View File

@ -1,7 +1,7 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
void test0() {
// CHECK-LABEL: define void @test0()
// CHECK-LABEL: define{{.*}} void @test0()
// CHECK: [[F:%.*]] = alloca float
// CHECK-NEXT: [[REAL:%.*]] = load volatile float, float* getelementptr inbounds ({ float, float }, { float, float }* @test0_v, i32 0, i32 0), align 4
// CHECK-NEXT: load volatile float, float* getelementptr inbounds ({{.*}} @test0_v, i32 0, i32 1), align 4
@ -12,7 +12,7 @@ void test0() {
}
void test1() {
// CHECK-LABEL: define void @test1()
// CHECK-LABEL: define{{.*}} void @test1()
// CHECK: [[REAL:%.*]] = load volatile float, float* getelementptr inbounds ({{.*}} @test1_v, i32 0, i32 0), align 4
// CHECK-NEXT: [[IMAG:%.*]] = load volatile float, float* getelementptr inbounds ({{.*}} @test1_v, i32 0, i32 1), align 4
// CHECK-NEXT: store volatile float [[REAL]], float* getelementptr inbounds ({{.*}} @test1_v, i32 0, i32 0), align 4

View File

@ -1,7 +1,7 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -O3 -emit-llvm -o - %s | FileCheck %s
// PR7490
// CHECK-LABEL: define signext i8 @_Z2f0v
// CHECK-LABEL: define{{.*}} signext i8 @_Z2f0v
// CHECK: ret i8 0
// CHECK: }
inline void* operator new[](unsigned long, void* __p) { return __p; }

Some files were not shown because too many files have changed in this diff Show More