forked from OSchip/llvm-project
[opaque pointer types] Explicit non-pointer type for call expressions
(migration for recent LLVM change to textual IR for calls) llvm-svn: 235147
This commit is contained in:
parent
556ffb7806
commit
d6c88ece21
|
@ -3,7 +3,7 @@
|
|||
// Make sure the call to foo is compiled as:
|
||||
// call float @foo()
|
||||
// not
|
||||
// call float (...)* bitcast (float ()* @foo to float (...)*)( )
|
||||
// call float (...) bitcast (float ()* @foo to float (...)*)( )
|
||||
|
||||
static float foo() { return 0.0; }
|
||||
// CHECK: call float @foo
|
||||
|
|
|
@ -14,6 +14,6 @@ int h() {
|
|||
return f();
|
||||
}
|
||||
|
||||
// CHECK: [[call:%.*]] = call i32 (...)* @f()
|
||||
// CHECK: [[call:%.*]] = call i32 (...) @f()
|
||||
// CHECK: ret i32 [[call]]
|
||||
|
||||
|
|
|
@ -37,9 +37,9 @@ double varargs_vec_2i(int fixed, ...) {
|
|||
|
||||
double test_2i(__int2 *in) {
|
||||
// CHECK: test_2i
|
||||
// CHECK: call arm_aapcscc double (i32, ...)* @varargs_vec_2i(i32 3, <2 x i32> {{%.*}})
|
||||
// CHECK: call arm_aapcscc double (i32, ...) @varargs_vec_2i(i32 3, <2 x i32> {{%.*}})
|
||||
// APCS-GNU: test_2i
|
||||
// APCS-GNU: call double (i32, ...)* @varargs_vec_2i(i32 3, <2 x i32> {{%.*}})
|
||||
// APCS-GNU: call double (i32, ...) @varargs_vec_2i(i32 3, <2 x i32> {{%.*}})
|
||||
return varargs_vec_2i(3, *in);
|
||||
}
|
||||
|
||||
|
@ -63,9 +63,9 @@ double varargs_vec_3c(int fixed, ...) {
|
|||
|
||||
double test_3c(__char3 *in) {
|
||||
// CHECK: test_3c
|
||||
// CHECK: call arm_aapcscc double (i32, ...)* @varargs_vec_3c(i32 3, i32 {{%.*}})
|
||||
// CHECK: call arm_aapcscc double (i32, ...) @varargs_vec_3c(i32 3, i32 {{%.*}})
|
||||
// APCS-GNU: test_3c
|
||||
// APCS-GNU: call double (i32, ...)* @varargs_vec_3c(i32 3, i32 {{%.*}})
|
||||
// APCS-GNU: call double (i32, ...) @varargs_vec_3c(i32 3, i32 {{%.*}})
|
||||
return varargs_vec_3c(3, *in);
|
||||
}
|
||||
|
||||
|
@ -94,9 +94,9 @@ double varargs_vec_5c(int fixed, ...) {
|
|||
|
||||
double test_5c(__char5 *in) {
|
||||
// CHECK: test_5c
|
||||
// CHECK: call arm_aapcscc double (i32, ...)* @varargs_vec_5c(i32 5, <2 x i32> {{%.*}})
|
||||
// CHECK: call arm_aapcscc double (i32, ...) @varargs_vec_5c(i32 5, <2 x i32> {{%.*}})
|
||||
// APCS-GNU: test_5c
|
||||
// APCS-GNU: call double (i32, ...)* @varargs_vec_5c(i32 5, <2 x i32> {{%.*}})
|
||||
// APCS-GNU: call double (i32, ...) @varargs_vec_5c(i32 5, <2 x i32> {{%.*}})
|
||||
return varargs_vec_5c(5, *in);
|
||||
}
|
||||
|
||||
|
@ -128,9 +128,9 @@ double varargs_vec_9c(int fixed, ...) {
|
|||
|
||||
double test_9c(__char9 *in) {
|
||||
// CHECK: test_9c
|
||||
// CHECK: call arm_aapcscc double (i32, ...)* @varargs_vec_9c(i32 9, <4 x i32> {{%.*}})
|
||||
// CHECK: call arm_aapcscc double (i32, ...) @varargs_vec_9c(i32 9, <4 x i32> {{%.*}})
|
||||
// APCS-GNU: test_9c
|
||||
// APCS-GNU: call double (i32, ...)* @varargs_vec_9c(i32 9, <4 x i32> {{%.*}})
|
||||
// APCS-GNU: call double (i32, ...) @varargs_vec_9c(i32 9, <4 x i32> {{%.*}})
|
||||
return varargs_vec_9c(9, *in);
|
||||
}
|
||||
|
||||
|
@ -156,9 +156,9 @@ double varargs_vec_19c(int fixed, ...) {
|
|||
|
||||
double test_19c(__char19 *in) {
|
||||
// CHECK: test_19c
|
||||
// CHECK: call arm_aapcscc double (i32, ...)* @varargs_vec_19c(i32 19, <19 x i8>* {{%.*}})
|
||||
// CHECK: call arm_aapcscc double (i32, ...) @varargs_vec_19c(i32 19, <19 x i8>* {{%.*}})
|
||||
// APCS-GNU: test_19c
|
||||
// APCS-GNU: call double (i32, ...)* @varargs_vec_19c(i32 19, <19 x i8>* {{%.*}})
|
||||
// APCS-GNU: call double (i32, ...) @varargs_vec_19c(i32 19, <19 x i8>* {{%.*}})
|
||||
return varargs_vec_19c(19, *in);
|
||||
}
|
||||
|
||||
|
@ -187,9 +187,9 @@ double varargs_vec_3s(int fixed, ...) {
|
|||
|
||||
double test_3s(__short3 *in) {
|
||||
// CHECK: test_3s
|
||||
// CHECK: call arm_aapcscc double (i32, ...)* @varargs_vec_3s(i32 3, <2 x i32> {{%.*}})
|
||||
// CHECK: call arm_aapcscc double (i32, ...) @varargs_vec_3s(i32 3, <2 x i32> {{%.*}})
|
||||
// APCS-GNU: test_3s
|
||||
// APCS-GNU: call double (i32, ...)* @varargs_vec_3s(i32 3, <2 x i32> {{%.*}})
|
||||
// APCS-GNU: call double (i32, ...) @varargs_vec_3s(i32 3, <2 x i32> {{%.*}})
|
||||
return varargs_vec_3s(3, *in);
|
||||
}
|
||||
|
||||
|
@ -221,9 +221,9 @@ double varargs_vec_5s(int fixed, ...) {
|
|||
|
||||
double test_5s(__short5 *in) {
|
||||
// CHECK: test_5s
|
||||
// CHECK: call arm_aapcscc double (i32, ...)* @varargs_vec_5s(i32 5, <4 x i32> {{%.*}})
|
||||
// CHECK: call arm_aapcscc double (i32, ...) @varargs_vec_5s(i32 5, <4 x i32> {{%.*}})
|
||||
// APCS-GNU: test_5s
|
||||
// APCS-GNU: call double (i32, ...)* @varargs_vec_5s(i32 5, <4 x i32> {{%.*}})
|
||||
// APCS-GNU: call double (i32, ...) @varargs_vec_5s(i32 5, <4 x i32> {{%.*}})
|
||||
return varargs_vec_5s(5, *in);
|
||||
}
|
||||
|
||||
|
@ -256,8 +256,8 @@ double varargs_struct(int fixed, ...) {
|
|||
|
||||
double test_struct(StructWithVec* d) {
|
||||
// CHECK: test_struct
|
||||
// CHECK: call arm_aapcscc double (i32, ...)* @varargs_struct(i32 3, [2 x i64] {{%.*}})
|
||||
// CHECK: call arm_aapcscc double (i32, ...) @varargs_struct(i32 3, [2 x i64] {{%.*}})
|
||||
// APCS-GNU: test_struct
|
||||
// APCS-GNU: call double (i32, ...)* @varargs_struct(i32 3, [2 x i64] {{%.*}})
|
||||
// APCS-GNU: call double (i32, ...) @varargs_struct(i32 3, [2 x i64] {{%.*}})
|
||||
return varargs_struct(3, *d);
|
||||
}
|
||||
|
|
|
@ -184,7 +184,7 @@ extern void takes_struct_of_four_doubles_variadic(double a, struct_of_four_doubl
|
|||
|
||||
void test_struct_of_four_doubles_variadic(void) {
|
||||
// CHECK: test_struct_of_four_doubles_variadic
|
||||
// CHECK: call arm_aapcs_vfpcc void (double, [4 x i64], [4 x i64], double, ...)* @takes_struct_of_four_doubles_variadic(double {{.*}}, [4 x i64] {{.*}}, [4 x i64] {{.*}}, double {{.*}})
|
||||
// CHECK: call arm_aapcs_vfpcc void (double, [4 x i64], [4 x i64], double, ...) @takes_struct_of_four_doubles_variadic(double {{.*}}, [4 x i64] {{.*}}, [4 x i64] {{.*}}, double {{.*}})
|
||||
takes_struct_of_four_doubles_variadic(3.0, g_s4d, g_s4d, 4.0);
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ double varargs_vec_3c(int fixed, ...) {
|
|||
|
||||
double test_3c(__char3 *in) {
|
||||
// CHECK: test_3c
|
||||
// CHECK: call double (i32, ...)* @varargs_vec_3c(i32 3, i32 {{%.*}})
|
||||
// CHECK: call double (i32, ...) @varargs_vec_3c(i32 3, i32 {{%.*}})
|
||||
return varargs_vec_3c(3, *in);
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ double varargs_vec_4c(int fixed, ...) {
|
|||
|
||||
double test_4c(__char4 *in) {
|
||||
// CHECK: test_4c
|
||||
// CHECK: call double (i32, ...)* @varargs_vec_4c(i32 4, i32 {{%.*}})
|
||||
// CHECK: call double (i32, ...) @varargs_vec_4c(i32 4, i32 {{%.*}})
|
||||
return varargs_vec_4c(4, *in);
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ double varargs_vec_5c(int fixed, ...) {
|
|||
|
||||
double test_5c(__char5 *in) {
|
||||
// CHECK: test_5c
|
||||
// CHECK: call double (i32, ...)* @varargs_vec_5c(i32 5, <2 x i32> {{%.*}})
|
||||
// CHECK: call double (i32, ...) @varargs_vec_5c(i32 5, <2 x i32> {{%.*}})
|
||||
return varargs_vec_5c(5, *in);
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ double varargs_vec_9c(int fixed, ...) {
|
|||
|
||||
double test_9c(__char9 *in) {
|
||||
// CHECK: test_9c
|
||||
// CHECK: call double (i32, ...)* @varargs_vec_9c(i32 9, <4 x i32> {{%.*}})
|
||||
// CHECK: call double (i32, ...) @varargs_vec_9c(i32 9, <4 x i32> {{%.*}})
|
||||
return varargs_vec_9c(9, *in);
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,7 @@ double varargs_vec_19c(int fixed, ...) {
|
|||
|
||||
double test_19c(__char19 *in) {
|
||||
// CHECK: test_19c
|
||||
// CHECK: call double (i32, ...)* @varargs_vec_19c(i32 19, <19 x i8>* {{%.*}})
|
||||
// CHECK: call double (i32, ...) @varargs_vec_19c(i32 19, <19 x i8>* {{%.*}})
|
||||
return varargs_vec_19c(19, *in);
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,7 @@ double varargs_vec_3s(int fixed, ...) {
|
|||
|
||||
double test_3s(__short3 *in) {
|
||||
// CHECK: test_3s
|
||||
// CHECK: call double (i32, ...)* @varargs_vec_3s(i32 3, <2 x i32> {{%.*}})
|
||||
// CHECK: call double (i32, ...) @varargs_vec_3s(i32 3, <2 x i32> {{%.*}})
|
||||
return varargs_vec_3s(3, *in);
|
||||
}
|
||||
|
||||
|
@ -154,7 +154,7 @@ double varargs_vec_5s(int fixed, ...) {
|
|||
|
||||
double test_5s(__short5 *in) {
|
||||
// CHECK: test_5s
|
||||
// CHECK: call double (i32, ...)* @varargs_vec_5s(i32 5, <4 x i32> {{%.*}})
|
||||
// CHECK: call double (i32, ...) @varargs_vec_5s(i32 5, <4 x i32> {{%.*}})
|
||||
return varargs_vec_5s(5, *in);
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@ double varargs_vec_3i(int fixed, ...) {
|
|||
|
||||
double test_3i(__int3 *in) {
|
||||
// CHECK: test_3i
|
||||
// CHECK: call double (i32, ...)* @varargs_vec_3i(i32 3, <4 x i32> {{%.*}})
|
||||
// CHECK: call double (i32, ...) @varargs_vec_3i(i32 3, <4 x i32> {{%.*}})
|
||||
return varargs_vec_3i(3, *in);
|
||||
}
|
||||
|
||||
|
@ -198,7 +198,7 @@ double varargs_vec_5i(int fixed, ...) {
|
|||
|
||||
double test_5i(__int5 *in) {
|
||||
// CHECK: test_5i
|
||||
// CHECK: call double (i32, ...)* @varargs_vec_5i(i32 5, <5 x i32>* {{%.*}})
|
||||
// CHECK: call double (i32, ...) @varargs_vec_5i(i32 5, <5 x i32>* {{%.*}})
|
||||
return varargs_vec_5i(5, *in);
|
||||
}
|
||||
|
||||
|
@ -220,7 +220,7 @@ double varargs_vec_3d(int fixed, ...) {
|
|||
|
||||
double test_3d(__double3 *in) {
|
||||
// CHECK: test_3d
|
||||
// CHECK: call double (i32, ...)* @varargs_vec_3d(i32 3, <3 x double>* {{%.*}})
|
||||
// CHECK: call double (i32, ...) @varargs_vec_3d(i32 3, <3 x double>* {{%.*}})
|
||||
return varargs_vec_3d(3, *in);
|
||||
}
|
||||
|
||||
|
@ -285,7 +285,7 @@ double test(__char3 *c3, __char5 *c5, __char9 *c9, __char19 *c19,
|
|||
__short3 *s3, __short5 *s5, __int3 *i3, __int5 *i5,
|
||||
__double3 *d3) {
|
||||
double ret = varargs_vec(3, *c3, *c5, *c9, *c19, *s3, *s5, *i3, *i5, *d3);
|
||||
// CHECK: call double (i32, ...)* @varargs_vec(i32 3, i32 {{%.*}}, <2 x i32> {{%.*}}, <4 x i32> {{%.*}}, <19 x i8>* {{%.*}}, <2 x i32> {{%.*}}, <4 x i32> {{%.*}}, <4 x i32> {{%.*}}, <5 x i32>* {{%.*}}, <3 x double>* {{%.*}})
|
||||
// CHECK: call double (i32, ...) @varargs_vec(i32 3, i32 {{%.*}}, <2 x i32> {{%.*}}, <4 x i32> {{%.*}}, <19 x i8>* {{%.*}}, <2 x i32> {{%.*}}, <4 x i32> {{%.*}}, <4 x i32> {{%.*}}, <5 x i32>* {{%.*}}, <3 x double>* {{%.*}})
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -641,7 +641,7 @@ float test_hfa(int n, ...) {
|
|||
|
||||
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] {{.*}})
|
||||
// CHECK: call float (i32, ...) @test_hfa(i32 1, [4 x float] {{.*}})
|
||||
test_hfa(1, *a);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
|
||||
// CHECK: [[Vi:%.+]] = alloca %struct.__block_byref_i, align 8
|
||||
// CHECK: call i32 (...)* @rhs()
|
||||
// CHECK: call i32 (...) @rhs()
|
||||
// CHECK: [[V7:%.+]] = getelementptr inbounds %struct.__block_byref_i, %struct.__block_byref_i* [[Vi]], i32 0, i32 1
|
||||
// CHECK: load %struct.__block_byref_i*, %struct.__block_byref_i** [[V7]]
|
||||
// CHECK: call i32 (...)* @rhs()
|
||||
// CHECK: call i32 (...) @rhs()
|
||||
// CHECK: [[V11:%.+]] = getelementptr inbounds %struct.__block_byref_i, %struct.__block_byref_i* [[Vi]], i32 0, i32 1
|
||||
// CHECK: load %struct.__block_byref_i*, %struct.__block_byref_i** [[V11]]
|
||||
|
||||
|
|
|
@ -23,9 +23,9 @@ int main() {
|
|||
|
||||
// CHECK-LABEL: define i32 @main()
|
||||
// CHECK: call void @isigprocmask()
|
||||
// CHECK: [[C:%.*]] = call i64 (...)* @bar()
|
||||
// CHECK: [[C:%.*]] = call i64 (...) @bar()
|
||||
// CHECK_O0: call void @isigprocmask()
|
||||
// CHECK_O0: [[C:%.*]] = call i64 (...)* @bar()
|
||||
// CHECK_O0: [[C:%.*]] = call i64 (...) @bar()
|
||||
// CHECK_O0-NOT: call i64 @llvm.expect
|
||||
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ void JS_ReportErrorNumber(JSErrorCallback errorCallback, ...);
|
|||
void Interpret() {
|
||||
JS_ReportErrorNumber(js_GetErrorMessage, 0);
|
||||
|
||||
// CHECK: call void ({{.*}}, ...)* @JS_ReportErrorNumber({{.*}}@js_GetErrorMessage
|
||||
// CHECK: call void ({{.*}}, ...) @JS_ReportErrorNumber({{.*}}@js_GetErrorMessage
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -380,7 +380,7 @@ void call_nonnull_variadic(int a, int *b) {
|
|||
// CHECK-UBSAN: call void @__ubsan_handle_nonnull_arg
|
||||
// CHECK-UBSAN-NOT: __ubsan_handle_nonnull_arg
|
||||
|
||||
// CHECK-COMMON: call void (i32, ...)* @nonnull_variadic
|
||||
// CHECK-COMMON: call void (i32, ...) @nonnull_variadic
|
||||
nonnull_variadic(a, b);
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,6 @@ void quux(int a1, int a2, int a3) {
|
|||
qux(a1, a2, a3);
|
||||
}
|
||||
// CHECK-LABEL: define x86_stdcallcc void @quux
|
||||
// CHECK: call void (i32, ...)* @qux
|
||||
// CHECK: call void (i32, ...) @qux
|
||||
|
||||
// CHECK: attributes [[NUW]] = { nounwind{{.*}} }
|
||||
|
|
|
@ -14,7 +14,7 @@ jmp_buf jb;
|
|||
int test_setjmp() {
|
||||
return _setjmp(jb);
|
||||
// I386-LABEL: define i32 @test_setjmp
|
||||
// I386: %[[call:.*]] = call i32 (i8*, i32, ...)* @_setjmp3(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @jb, i32 0, i32 0), i32 0)
|
||||
// I386: %[[call:.*]] = call i32 (i8*, i32, ...) @_setjmp3(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @jb, i32 0, i32 0), i32 0)
|
||||
// I386-NEXT: ret i32 %[[call]]
|
||||
|
||||
// X64-LABEL: define i32 @test_setjmp
|
||||
|
|
|
@ -6,7 +6,7 @@ typedef struct { char x[3]; } A0;
|
|||
void foo (int i, ...);
|
||||
|
||||
|
||||
// CHECK: call void (i32, ...)* @foo(i32 1, [1 x i32] {{.*}})
|
||||
// CHECK: call void (i32, ...) @foo(i32 1, [1 x i32] {{.*}})
|
||||
int main (void)
|
||||
{
|
||||
A0 a3;
|
||||
|
|
|
@ -12,6 +12,6 @@ void f(const char *f) {
|
|||
v(f, 1, 2, 3, NULL);
|
||||
}
|
||||
// WINDOWS: define void @f(i8* %f)
|
||||
// WINDOWS: call void (i8*, ...)* @v(i8* {{.*}}, i32 1, i32 2, i32 3, i64 0)
|
||||
// WINDOWS: call void (i8*, ...) @v(i8* {{.*}}, i32 1, i32 2, i32 3, i64 0)
|
||||
// LINUX: define void @f(i8* %f)
|
||||
// LINUX: call void (i8*, ...)* @v(i8* {{.*}}, i32 1, i32 2, i32 3, i32 0)
|
||||
// LINUX: call void (i8*, ...) @v(i8* {{.*}}, i32 1, i32 2, i32 3, i32 0)
|
||||
|
|
|
@ -236,7 +236,7 @@ v4i32 f55(v4i32 arg) { return arg+arg; }
|
|||
// CHECK: <8 x i32> %a10, %struct.s56_5* byval align 4,
|
||||
// CHECK: <4 x double> %a12, %struct.s56_6* byval align 4)
|
||||
|
||||
// CHECK: call void (i32, ...)* @f56_0(i32 1,
|
||||
// CHECK: call void (i32, ...) @f56_0(i32 1,
|
||||
// CHECK: i32 %{{[^ ]*}}, %struct.s56_0* byval align 4 %{{[^ ]*}},
|
||||
// CHECK: i64 %{{[^ ]*}}, %struct.s56_1* byval align 4 %{{[^ ]*}},
|
||||
// CHECK: i64 %{{[^ ]*}}, %struct.s56_2* byval align 4 %{{[^ ]*}},
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// CHECK: <8 x i32> %a10, %struct.s56_5* byval align 4,
|
||||
// CHECK: <4 x double> %a12, %struct.s56_6* byval align 4)
|
||||
|
||||
// CHECK: call void (i32, ...)* @f56_0(i32 1,
|
||||
// CHECK: call void (i32, ...) @f56_0(i32 1,
|
||||
// CHECK: i32 %{{.*}}, %struct.s56_0* byval align 4 %{{[^ ]*}},
|
||||
// CHECK: i64 %{{[^ ]*}}, %struct.s56_1* byval align 4 %{{[^ ]*}},
|
||||
// CHECK: <1 x double> %{{[^ ]*}}, %struct.s56_2* byval align 4 %{{[^ ]*}},
|
||||
|
|
|
@ -404,7 +404,7 @@ void test49(double d, double e) {
|
|||
// CHECK-LABEL: define void @test49(
|
||||
// CHECK: [[T0:%.*]] = load double, double*
|
||||
// CHECK-NEXT: [[T1:%.*]] = load double, double*
|
||||
// CHECK-NEXT: call void (double, ...)* @test49_helper(double [[T0]], double [[T1]])
|
||||
// CHECK-NEXT: call void (double, ...) @test49_helper(double [[T0]], double [[T1]])
|
||||
|
||||
void test50_helper();
|
||||
void test50(double d, double e) {
|
||||
|
@ -413,7 +413,7 @@ void test50(double d, double e) {
|
|||
// CHECK-LABEL: define void @test50(
|
||||
// CHECK: [[T0:%.*]] = load double, double*
|
||||
// CHECK-NEXT: [[T1:%.*]] = load double, double*
|
||||
// CHECK-NEXT: call void (double, double, ...)* bitcast (void (...)* @test50_helper to void (double, double, ...)*)(double [[T0]], double [[T1]])
|
||||
// CHECK-NEXT: call void (double, double, ...) bitcast (void (...)* @test50_helper to void (double, double, ...)*)(double [[T0]], double [[T1]])
|
||||
|
||||
struct test51_s { __uint128_t intval; };
|
||||
void test51(struct test51_s *s, __builtin_va_list argList) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
extern "C" int printf(...);
|
||||
|
||||
void test0() {
|
||||
// CHECK: call i32 (...)* @printf({{.*}}, i8* inttoptr (i64 3735928559 to i8*))
|
||||
// CHECK: call i32 (...) @printf({{.*}}, i8* inttoptr (i64 3735928559 to i8*))
|
||||
printf("%p\n", (void *)0xdeadbeef ? : (void *)0xaaaaaa);
|
||||
}
|
||||
|
||||
|
|
|
@ -38,5 +38,5 @@ int main()
|
|||
return 0;
|
||||
}
|
||||
|
||||
// CHECK: call i32 (i32)* (%struct.A*)* @_ZN1AcvPFiiEEv
|
||||
// CHECK: call i32 (i32)* (%struct.B*)* @_ZN1BcvRFiiEEv
|
||||
// CHECK: call i32 (i32)* @_ZN1AcvPFiiEEv
|
||||
// CHECK: call i32 (i32)* @_ZN1BcvRFiiEEv
|
||||
|
|
|
@ -490,7 +490,7 @@ struct CtorWithClosure {
|
|||
// M32-DAG: %[[this_addr:.*]] = alloca %struct.CtorWithClosure*, align 4
|
||||
// M32-DAG: store %struct.CtorWithClosure* %this, %struct.CtorWithClosure** %[[this_addr]], align 4
|
||||
// M32-DAG: %[[this:.*]] = load %struct.CtorWithClosure*, %struct.CtorWithClosure** %[[this_addr]]
|
||||
// M32-DAG: call %struct.CtorWithClosure* (%struct.CtorWithClosure*, ...)* @"\01??0CtorWithClosure@@QAA@ZZ"(%struct.CtorWithClosure* %[[this]])
|
||||
// M32-DAG: call %struct.CtorWithClosure* (%struct.CtorWithClosure*, ...) @"\01??0CtorWithClosure@@QAA@ZZ"(%struct.CtorWithClosure* %[[this]])
|
||||
// M32-DAG: ret void
|
||||
};
|
||||
|
||||
|
@ -507,7 +507,7 @@ struct __declspec(dllexport) ClassWithClosure {
|
|||
// M32-DAG: %[[this_addr:.*]] = alloca %struct.ClassWithClosure*, align 4
|
||||
// M32-DAG: store %struct.ClassWithClosure* %this, %struct.ClassWithClosure** %[[this_addr]], align 4
|
||||
// M32-DAG: %[[this:.*]] = load %struct.ClassWithClosure*, %struct.ClassWithClosure** %[[this_addr]]
|
||||
// M32-DAG: call %struct.ClassWithClosure* (%struct.ClassWithClosure*, ...)* @"\01??0ClassWithClosure@@QAA@ZZ"(%struct.ClassWithClosure* %[[this]])
|
||||
// M32-DAG: call %struct.ClassWithClosure* (%struct.ClassWithClosure*, ...) @"\01??0ClassWithClosure@@QAA@ZZ"(%struct.ClassWithClosure* %[[this]])
|
||||
// M32-DAG: ret void
|
||||
};
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ extern "C" void test_freefunc(int p1) {
|
|||
// CHECK: %[[s1:[^ ]*]] = load i32, i32* @"\01?s1@?1??test_freefunc@@9@4HA", align 4
|
||||
// CHECK: %[[l1:[^ ]*]] = load i32, i32* %[[l1_ptr]]
|
||||
// CHECK: %[[p1:[^ ]*]] = load i32, i32* %[[p1_ptr]]
|
||||
// CHECK: call i32 (i32, ...)* @basic_filter(i32 %[[p1]], i32 %[[l1]], i32 %[[s1]])
|
||||
// CHECK: call i32 (i32, ...) @basic_filter(i32 %[[p1]], i32 %[[l1]], i32 %[[s1]])
|
||||
|
||||
struct S {
|
||||
int m1;
|
||||
|
@ -53,7 +53,7 @@ void S::test_method() {
|
|||
// CHECK: %[[l1_i8:[^ ]*]] = call i8* @llvm.framerecover(i8* bitcast (void (%struct.S*)* @"\01?test_method@S@@QEAAXXZ" to i8*), i8* %frame_pointer, i32 0)
|
||||
// CHECK: %[[l1_ptr:[^ ]*]] = bitcast i8* %[[l1_i8]] to i32*
|
||||
// CHECK: %[[l1:[^ ]*]] = load i32, i32* %[[l1_ptr]]
|
||||
// CHECK: call i32 (i32, ...)* @basic_filter(i32 %[[l1]])
|
||||
// CHECK: call i32 (i32, ...) @basic_filter(i32 %[[l1]])
|
||||
|
||||
void test_lambda() {
|
||||
int l1 = 13;
|
||||
|
@ -77,4 +77,4 @@ void test_lambda() {
|
|||
// CHECK: %[[l2_i8:[^ ]*]] = call i8* @llvm.framerecover(i8* bitcast (void (%class.anon*)* @"\01??R<lambda_0>@?test_lambda@@YAXXZ@QEBAXXZ" to i8*), i8* %frame_pointer, i32 0)
|
||||
// CHECK: %[[l2_ptr:[^ ]*]] = bitcast i8* %[[l2_i8]] to i32*
|
||||
// CHECK: %[[l2:[^ ]*]] = load i32, i32* %[[l2_ptr]]
|
||||
// CHECK: call i32 (i32, ...)* @basic_filter(i32 %[[l2]])
|
||||
// CHECK: call i32 (i32, ...) @basic_filter(i32 %[[l2]])
|
||||
|
|
|
@ -16,7 +16,7 @@ void test1() {
|
|||
// CHECK: call void @_ZN1C1fEv
|
||||
c.f();
|
||||
|
||||
// CHECK: call void (%struct.C*, i32, ...)* @_ZN1C1gEiz
|
||||
// CHECK: call void (%struct.C*, i32, ...) @_ZN1C1gEiz
|
||||
c.g(1, 2, 3);
|
||||
}
|
||||
|
||||
|
|
|
@ -623,7 +623,7 @@ void (C::*getmp())() {
|
|||
// CHECK: load void (%"struct.Test4::C"*, ...)**, void (%"struct.Test4::C"*, ...)*** %{{.*}}
|
||||
// CHECK: getelementptr inbounds void (%"struct.Test4::C"*, ...)*, void (%"struct.Test4::C"*, ...)** %{{.*}}, i64 0
|
||||
// CHECK-NOT: getelementptr
|
||||
// CHECK: musttail call x86_thiscallcc void (%"struct.Test4::C"*, ...)* %
|
||||
// CHECK: musttail call x86_thiscallcc void (%"struct.Test4::C"*, ...) %
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ void call_vararg_method() {
|
|||
C instance;
|
||||
instance.vararg_method("Hello");
|
||||
// Make sure that the call uses the right calling convention:
|
||||
// CHECK: call void (%class.C*, i8*, ...)* @"\01?vararg_method@C@@QAAXPBDZZ"
|
||||
// CHECK: call void (%class.C*, i8*, ...) @"\01?vararg_method@C@@QAAXPBDZZ"
|
||||
// CHECK: ret
|
||||
|
||||
// Make sure that the definition uses the right calling convention:
|
||||
|
|
|
@ -420,7 +420,7 @@ void construct_b() {
|
|||
// CHECK-LABEL: define void @"\01?construct_b@test1@@YAXXZ"()
|
||||
// CHECK: call x86_thiscallcc %"struct.test1::B"* @"\01??0B@test1@@QAE@PAH@Z"
|
||||
// CHECK: (%"struct.test1::B"* {{.*}}, i32* {{.*}}, i32 1)
|
||||
// CHECK: call %"struct.test1::B"* (%"struct.test1::B"*, i32, i8*, ...)* @"\01??0B@test1@@QAA@PBDZZ"
|
||||
// CHECK: call %"struct.test1::B"* (%"struct.test1::B"*, i32, i8*, ...) @"\01??0B@test1@@QAA@PBDZZ"
|
||||
// CHECK: (%"struct.test1::B"* {{.*}}, i32 1, i8* {{.*}}, i32 1, i32 2)
|
||||
}
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ void f() {
|
|||
// CHECK32: comdat
|
||||
// CHECK32: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, ...)*, void (%struct.C*, ...)** %{{.*}}, i64 0
|
||||
// CHECK32: [[CALLEE:%.*]] = load void (%struct.C*, ...)*, void (%struct.C*, ...)** [[VPTR]]
|
||||
// CHECK32: musttail call x86_thiscallcc void (%struct.C*, ...)* [[CALLEE]](%struct.C* %{{.*}}, ...)
|
||||
// CHECK32: musttail call x86_thiscallcc void (%struct.C*, ...) [[CALLEE]](%struct.C* %{{.*}}, ...)
|
||||
// CHECK32-NEXT: ret void
|
||||
// CHECK32: }
|
||||
//
|
||||
|
@ -81,7 +81,7 @@ void f() {
|
|||
// CHECK64: comdat
|
||||
// CHECK64: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, ...)*, void (%struct.C*, ...)** %{{.*}}, i64 0
|
||||
// CHECK64: [[CALLEE:%.*]] = load void (%struct.C*, ...)*, void (%struct.C*, ...)** [[VPTR]]
|
||||
// CHECK64: musttail call void (%struct.C*, ...)* [[CALLEE]](%struct.C* %{{.*}}, ...)
|
||||
// CHECK64: musttail call void (%struct.C*, ...) [[CALLEE]](%struct.C* %{{.*}}, ...)
|
||||
// CHECK64-NEXT: ret void
|
||||
// CHECK64: }
|
||||
|
||||
|
@ -90,7 +90,7 @@ void f() {
|
|||
// CHECK32: #[[ATTR]] comdat
|
||||
// CHECK32: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, ...)*, void (%struct.C*, ...)** %{{.*}}, i64 1
|
||||
// CHECK32: [[CALLEE:%.*]] = load void (%struct.C*, ...)*, void (%struct.C*, ...)** [[VPTR]]
|
||||
// CHECK32: musttail call x86_thiscallcc void (%struct.C*, ...)* [[CALLEE]](%struct.C* %{{.*}}, ...)
|
||||
// CHECK32: musttail call x86_thiscallcc void (%struct.C*, ...) [[CALLEE]](%struct.C* %{{.*}}, ...)
|
||||
// CHECK32-NEXT: ret void
|
||||
// CHECK32: }
|
||||
//
|
||||
|
@ -98,7 +98,7 @@ void f() {
|
|||
// CHECK64: #[[ATTR]] comdat
|
||||
// CHECK64: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, ...)*, void (%struct.C*, ...)** %{{.*}}, i64 1
|
||||
// CHECK64: [[CALLEE:%.*]] = load void (%struct.C*, ...)*, void (%struct.C*, ...)** [[VPTR]]
|
||||
// CHECK64: musttail call void (%struct.C*, ...)* [[CALLEE]](%struct.C* %{{.*}}, ...)
|
||||
// CHECK64: musttail call void (%struct.C*, ...) [[CALLEE]](%struct.C* %{{.*}}, ...)
|
||||
// CHECK64-NEXT: ret void
|
||||
// CHECK64: }
|
||||
|
||||
|
@ -107,7 +107,7 @@ void f() {
|
|||
// CHECK32: #[[ATTR]] comdat
|
||||
// CHECK32: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, ...)*, void (%struct.C*, ...)** %{{.*}}, i64 2
|
||||
// CHECK32: [[CALLEE:%.*]] = load void (%struct.C*, ...)*, void (%struct.C*, ...)** [[VPTR]]
|
||||
// CHECK32: musttail call x86_thiscallcc void (%struct.C*, ...)* [[CALLEE]](%struct.C* %{{.*}}, ...)
|
||||
// CHECK32: musttail call x86_thiscallcc void (%struct.C*, ...) [[CALLEE]](%struct.C* %{{.*}}, ...)
|
||||
// CHECK32-NEXT: ret void
|
||||
// CHECK32: }
|
||||
//
|
||||
|
@ -115,7 +115,7 @@ void f() {
|
|||
// CHECK64: #[[ATTR]] comdat
|
||||
// CHECK64: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, ...)*, void (%struct.C*, ...)** %{{.*}}, i64 2
|
||||
// CHECK64: [[CALLEE:%.*]] = load void (%struct.C*, ...)*, void (%struct.C*, ...)** [[VPTR]]
|
||||
// CHECK64: musttail call void (%struct.C*, ...)* [[CALLEE]](%struct.C* %{{.*}}, ...)
|
||||
// CHECK64: musttail call void (%struct.C*, ...) [[CALLEE]](%struct.C* %{{.*}}, ...)
|
||||
// CHECK64-NEXT: ret void
|
||||
// CHECK64: }
|
||||
|
||||
|
@ -124,7 +124,7 @@ void f() {
|
|||
// CHECK32: #[[ATTR]]
|
||||
// CHECK32: [[VPTR:%.*]] = getelementptr inbounds void (%"struct.(anonymous namespace)::D"*, ...)*, void (%"struct.(anonymous namespace)::D"*, ...)** %{{.*}}, i64 0
|
||||
// CHECK32: [[CALLEE:%.*]] = load void (%"struct.(anonymous namespace)::D"*, ...)*, void (%"struct.(anonymous namespace)::D"*, ...)** [[VPTR]]
|
||||
// CHECK32: musttail call x86_thiscallcc void (%"struct.(anonymous namespace)::D"*, ...)* [[CALLEE]](%"struct.(anonymous namespace)::D"* %{{.*}}, ...)
|
||||
// CHECK32: musttail call x86_thiscallcc void (%"struct.(anonymous namespace)::D"*, ...) [[CALLEE]](%"struct.(anonymous namespace)::D"* %{{.*}}, ...)
|
||||
// CHECK32-NEXT: ret void
|
||||
// CHECK32: }
|
||||
//
|
||||
|
@ -132,7 +132,7 @@ void f() {
|
|||
// CHECK64: #[[ATTR]]
|
||||
// CHECK64: [[VPTR:%.*]] = getelementptr inbounds void (%"struct.(anonymous namespace)::D"*, ...)*, void (%"struct.(anonymous namespace)::D"*, ...)** %{{.*}}, i64 0
|
||||
// CHECK64: [[CALLEE:%.*]] = load void (%"struct.(anonymous namespace)::D"*, ...)*, void (%"struct.(anonymous namespace)::D"*, ...)** [[VPTR]]
|
||||
// CHECK64: musttail call void (%"struct.(anonymous namespace)::D"*, ...)* [[CALLEE]](%"struct.(anonymous namespace)::D"* %{{.*}}, ...)
|
||||
// CHECK64: musttail call void (%"struct.(anonymous namespace)::D"*, ...) [[CALLEE]](%"struct.(anonymous namespace)::D"* %{{.*}}, ...)
|
||||
// CHECK64-NEXT: ret void
|
||||
// CHECK64: }
|
||||
|
||||
|
@ -141,14 +141,14 @@ void f() {
|
|||
// CHECK32-LABEL: define linkonce_odr x86_thiscallcc void @"\01??_9C@@$BM@AE"(%struct.C* %this, ...) {{.*}} comdat
|
||||
// CHECK32: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, ...)*, void (%struct.C*, ...)** %{{.*}}, i64 3
|
||||
// CHECK32: [[CALLEE:%.*]] = load void (%struct.C*, ...)*, void (%struct.C*, ...)** [[VPTR]]
|
||||
// CHECK32: musttail call x86_thiscallcc void (%struct.C*, ...)* [[CALLEE]](%struct.C* %{{.*}}, ...)
|
||||
// CHECK32: musttail call x86_thiscallcc void (%struct.C*, ...) [[CALLEE]](%struct.C* %{{.*}}, ...)
|
||||
// CHECK32-NEXT: ret void
|
||||
// CHECK32: }
|
||||
//
|
||||
// CHECK64-LABEL: define linkonce_odr void @"\01??_9C@@$BBI@AA"(%struct.C* %this, ...) {{.*}} comdat
|
||||
// CHECK64: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, ...)*, void (%struct.C*, ...)** %{{.*}}, i64 3
|
||||
// CHECK64: [[CALLEE:%.*]] = load void (%struct.C*, ...)*, void (%struct.C*, ...)** [[VPTR]]
|
||||
// CHECK64: musttail call void (%struct.C*, ...)* [[CALLEE]](%struct.C* %{{.*}}, ...)
|
||||
// CHECK64: musttail call void (%struct.C*, ...) [[CALLEE]](%struct.C* %{{.*}}, ...)
|
||||
// CHECK64: ret void
|
||||
// CHECK64: }
|
||||
|
||||
|
@ -156,14 +156,14 @@ void f() {
|
|||
// CHECK32-LABEL: define linkonce_odr void @"\01??_9C@@$BBA@AA"(%struct.C* %this, ...) {{.*}} comdat align 2 {
|
||||
// CHECK32: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, ...)*, void (%struct.C*, ...)** %{{.*}}, i64 4
|
||||
// CHECK32: [[CALLEE:%.*]] = load void (%struct.C*, ...)*, void (%struct.C*, ...)** [[VPTR]]
|
||||
// CHECK32: musttail call void (%struct.C*, ...)* [[CALLEE]](%struct.C* %{{.*}}, ...)
|
||||
// CHECK32: musttail call void (%struct.C*, ...) [[CALLEE]](%struct.C* %{{.*}}, ...)
|
||||
// CHECK32: ret void
|
||||
// CHECK32: }
|
||||
//
|
||||
// CHECK64-LABEL: define linkonce_odr void @"\01??_9C@@$BCA@AA"(%struct.C* %this, ...) {{.*}} comdat align 2 {
|
||||
// CHECK64: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, ...)*, void (%struct.C*, ...)** %{{.*}}, i64 4
|
||||
// CHECK64: [[CALLEE:%.*]] = load void (%struct.C*, ...)*, void (%struct.C*, ...)** [[VPTR]]
|
||||
// CHECK64: musttail call void (%struct.C*, ...)* [[CALLEE]](%struct.C* %{{.*}}, ...)
|
||||
// CHECK64: musttail call void (%struct.C*, ...) [[CALLEE]](%struct.C* %{{.*}}, ...)
|
||||
// CHECK64: ret void
|
||||
// CHECK64: }
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ void f(C *c) {
|
|||
// CHECK: call x86_thiscallcc void bitcast (void (%"struct.num_params::C"*, ...)* @"\01??_9C@num_params@@$BA@AE" to void (%"struct.num_params::C"*, i32, i32)*)(%"struct.num_params::C"* %{{.*}}, i32 0, i32 0)
|
||||
|
||||
// CHECK-LABEL: define linkonce_odr x86_thiscallcc void @"\01??_9C@num_params@@$BA@AE"(%"struct.num_params::C"* %this, ...) {{.*}} comdat
|
||||
// CHECK: musttail call x86_thiscallcc void (%"struct.num_params::C"*, ...)* %{{.*}}(%"struct.num_params::C"* %{{.*}}, ...)
|
||||
// CHECK: musttail call x86_thiscallcc void (%"struct.num_params::C"*, ...) %{{.*}}(%"struct.num_params::C"* %{{.*}}, ...)
|
||||
// CHECK-NEXT: ret void
|
||||
|
||||
namespace i64_return {
|
||||
|
@ -46,7 +46,7 @@ long long f(C *c) {
|
|||
// CHECK: call x86_thiscallcc i64 bitcast (void (%"struct.i64_return::C"*, ...)* @"\01??_9C@i64_return@@$BA@AE" to i64 (%"struct.i64_return::C"*)*)(%"struct.i64_return::C"* %{{.*}})
|
||||
|
||||
// CHECK-LABEL: define linkonce_odr x86_thiscallcc void @"\01??_9C@i64_return@@$BA@AE"(%"struct.i64_return::C"* %this, ...) {{.*}} comdat
|
||||
// CHECK: musttail call x86_thiscallcc void (%"struct.i64_return::C"*, ...)* %{{.*}}(%"struct.i64_return::C"* %{{.*}}, ...)
|
||||
// CHECK: musttail call x86_thiscallcc void (%"struct.i64_return::C"*, ...) %{{.*}}(%"struct.i64_return::C"* %{{.*}}, ...)
|
||||
// CHECK-NEXT: ret void
|
||||
|
||||
namespace sret {
|
||||
|
@ -68,7 +68,7 @@ void f(C *c) {
|
|||
// CHECK: call x86_thiscallcc void bitcast (void (%"struct.sret::C"*, ...)* @"\01??_9C@sret@@$BA@AE" to void (%"struct.sret::C"*, %"struct.sret::Big"*)*)(%"struct.sret::C"* %{{.*}}, %"struct.sret::Big"* sret %{{.*}})
|
||||
|
||||
// CHECK-LABEL: define linkonce_odr x86_thiscallcc void @"\01??_9C@sret@@$BA@AE"(%"struct.sret::C"* %this, ...) {{.*}} comdat
|
||||
// CHECK: musttail call x86_thiscallcc void (%"struct.sret::C"*, ...)* %{{.*}}(%"struct.sret::C"* %{{.*}}, ...)
|
||||
// CHECK: musttail call x86_thiscallcc void (%"struct.sret::C"*, ...) %{{.*}}(%"struct.sret::C"* %{{.*}}, ...)
|
||||
// CHECK-NEXT: ret void
|
||||
|
||||
namespace cdecl_inalloca {
|
||||
|
@ -97,5 +97,5 @@ void f(C *c) {
|
|||
// CHECK: call void bitcast (void (%"struct.cdecl_inalloca::C"*, ...)* @"\01??_9C@cdecl_inalloca@@$BA@AA" to void (<{ %"struct.cdecl_inalloca::C"*, %"struct.cdecl_inalloca::Big" }>*)*)(<{ %"struct.cdecl_inalloca::C"*, %"struct.cdecl_inalloca::Big" }>* inalloca %{{.*}})
|
||||
|
||||
// CHECK-LABEL: define linkonce_odr void @"\01??_9C@cdecl_inalloca@@$BA@AA"(%"struct.cdecl_inalloca::C"* %this, ...) {{.*}} comdat
|
||||
// CHECK: musttail call void (%"struct.cdecl_inalloca::C"*, ...)* %{{.*}}(%"struct.cdecl_inalloca::C"* %{{.*}}, ...)
|
||||
// CHECK: musttail call void (%"struct.cdecl_inalloca::C"*, ...) %{{.*}}(%"struct.cdecl_inalloca::C"* %{{.*}}, ...)
|
||||
// CHECK-NEXT: ret void
|
||||
|
|
|
@ -18,4 +18,4 @@ int main(void) {
|
|||
return test(5);
|
||||
}
|
||||
|
||||
// CHECK: call i32 (i8*, ...)* @_Z6printfPKcz
|
||||
// CHECK: call i32 (i8*, ...) @_Z6printfPKcz
|
||||
|
|
|
@ -24,15 +24,15 @@ int test1() {
|
|||
|
||||
extern "C" __unknown_anytype test2_any(...);
|
||||
float test2() {
|
||||
// X86_64: call float (double, ...)* @test2_any(double {{[^,]+}})
|
||||
// I386: call float (double, ...)* @test2_any(double {{[^,]+}})
|
||||
// X86_64: call float (double, ...) @test2_any(double {{[^,]+}})
|
||||
// I386: call float (double, ...) @test2_any(double {{[^,]+}})
|
||||
return (float) test2_any(0.5f);
|
||||
}
|
||||
|
||||
extern "C" __unknown_anytype test2a_any(...);
|
||||
float test2a() {
|
||||
// X86_64: call float (float, ...)* @test2a_any(float {{[^,]+}})
|
||||
// I386: call float (float, ...)* @test2a_any(float {{[^,]+}})
|
||||
// X86_64: call float (float, ...) @test2a_any(float {{[^,]+}})
|
||||
// I386: call float (float, ...) @test2a_any(float {{[^,]+}})
|
||||
return (float) test2a_any((float) 0.5f);
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,7 @@ void test10() {
|
|||
extern "C" __unknown_anytype malloc(...);
|
||||
void test11() {
|
||||
void *s = (void*)malloc(12);
|
||||
// COMMON: call i8* (i32, ...)* @malloc(i32 12)
|
||||
// COMMON: call i8* (i32, ...) @malloc(i32 12)
|
||||
void *d = (void*)malloc(435);
|
||||
// COMMON: call i8* (i32, ...)* @malloc(i32 435)
|
||||
// COMMON: call i8* (i32, ...) @malloc(i32 435)
|
||||
}
|
||||
|
|
|
@ -13,14 +13,14 @@ void test(X x) {
|
|||
// CHECK-LABEL: define void @"\01?test@@YAXUX@@@Z"
|
||||
|
||||
// X86: %[[argmem:[^ ]*]] = alloca inalloca <{ %struct.X }>
|
||||
// X86: call void (<{ %struct.X }>*, ...)* bitcast (void (...)* @"\01?vararg@@YAXZZ" to void (<{ %struct.X }>*, ...)*)(<{ %struct.X }>* inalloca %[[argmem]])
|
||||
// X86: call void (<{ %struct.X }>*, ...) bitcast (void (...)* @"\01?vararg@@YAXZZ" to void (<{ %struct.X }>*, ...)*)(<{ %struct.X }>* inalloca %[[argmem]])
|
||||
|
||||
// X64: alloca %struct.X
|
||||
|
||||
// X64: %[[agg:[^ ]*]] = alloca %struct.X
|
||||
// X64: %[[valptr:[^ ]*]] = getelementptr %struct.X, %struct.X* %[[agg]], i32 0, i32 0
|
||||
// X64: %[[val:[^ ]*]] = load i32, i32* %[[valptr]]
|
||||
// X64: call void (...)* @"\01?vararg@@YAXZZ"(i32 %[[val]])
|
||||
// X64: call void (...) @"\01?vararg@@YAXZZ"(i32 %[[val]])
|
||||
|
||||
// CHECK-NOT: llvm.trap
|
||||
vararg(x);
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace test0 {
|
|||
return -1;
|
||||
}
|
||||
|
||||
// CHECK: call i32 (...)* @_ZN5test05test1Ez(i32 0)
|
||||
// CHECK: call i32 (...) @_ZN5test05test1Ez(i32 0)
|
||||
void test() {
|
||||
test1(0);
|
||||
}
|
||||
|
@ -38,6 +38,6 @@ namespace test1 {
|
|||
// CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* [[T0]], i8* [[T1]], i64 8, i32 4, i1 false)
|
||||
// CHECK-NEXT: [[T0:%.*]] = bitcast [[A]]* [[TMP]] to i64*
|
||||
// CHECK-NEXT: [[T1:%.*]] = load i64, i64* [[T0]], align 1
|
||||
// CHECK-NEXT: call void (...)* @_ZN5test13fooEz(i64 [[T1]])
|
||||
// CHECK-NEXT: call void (...) @_ZN5test13fooEz(i64 [[T1]])
|
||||
// CHECK-NEXT: ret void
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ void test3(void (^sink)(id*)) {
|
|||
// CHECK-NEXT: call void [[F1]](i8* [[BLOCK]], i8** [[TEMP]])
|
||||
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[TEMP]]
|
||||
// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retain(i8* [[T0]])
|
||||
// CHECK-NEXT: call void (...)* @clang.arc.use(i8* [[V]]) [[NUW]]
|
||||
// CHECK-NEXT: call void (...) @clang.arc.use(i8* [[V]]) [[NUW]]
|
||||
// CHECK-NEXT: [[T2:%.*]] = load i8*, i8** [[STRONG]]
|
||||
// CHECK-NEXT: store i8* [[T1]], i8** [[STRONG]]
|
||||
// CHECK-NEXT: call void @objc_release(i8* [[T2]])
|
||||
|
|
|
@ -56,7 +56,7 @@ void test_array(id a, id b) {
|
|||
// CHECK-NEXT: [[T2:%.*]] = bitcast [2 x i8*]* [[OBJECTS]] to i8**
|
||||
// CHECK-NEXT: [[T3:%.*]] = call i8* bitcast ({{.*@objc_msgSend.*}})(i8* [[T1]], i8* [[SEL]], i8** [[T2]], i64 2)
|
||||
// CHECK-NEXT: [[T4:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T3]])
|
||||
// CHECK: call void (...)* @clang.arc.use(i8* [[V0]], i8* [[V1]])
|
||||
// CHECK: call void (...) @clang.arc.use(i8* [[V0]], i8* [[V1]])
|
||||
id arr = @[a, b];
|
||||
|
||||
// CHECK: call void @objc_release
|
||||
|
@ -100,7 +100,7 @@ void test_dictionary(id k1, id o1, id k2, id o2) {
|
|||
// CHECK-NEXT: [[T3:%.*]] = bitcast [2 x i8*]* [[KEYS]] to i8**
|
||||
// CHECK-NEXT: [[T4:%.*]] = call i8* bitcast ({{.*@objc_msgSend.*}})(i8* [[T1]], i8* [[SEL]], i8** [[T2]], i8** [[T3]], i64 2)
|
||||
// CHECK-NEXT: [[T5:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T4]])
|
||||
// CHECK-NEXT: call void (...)* @clang.arc.use(i8* [[V0]], i8* [[V1]], i8* [[V2]], i8* [[V3]])
|
||||
// CHECK-NEXT: call void (...) @clang.arc.use(i8* [[V0]], i8* [[V1]], i8* [[V2]], i8* [[V3]])
|
||||
|
||||
id dict = @{ k1 : o1, k2 : o2 };
|
||||
|
||||
|
@ -145,7 +145,7 @@ void test_property(B *b) {
|
|||
// CHECK-NEXT: [[T2:%.*]] = bitcast [1 x i8*]* [[OBJECTS]] to i8**
|
||||
// CHECK-NEXT: [[T3:%.*]] = call i8* bitcast ({{.*}} @objc_msgSend to {{.*}}(i8* [[T1]], i8* [[SEL]], i8** [[T2]], i64 1)
|
||||
// CHECK-NEXT: call i8* @objc_retainAutoreleasedReturnValue(i8* [[T3]])
|
||||
// CHECK-NEXT: call void (...)* @clang.arc.use(i8* [[V1]])
|
||||
// CHECK-NEXT: call void (...) @clang.arc.use(i8* [[V1]])
|
||||
// CHECK-NEXT: bitcast
|
||||
// CHECK-NEXT: bitcast
|
||||
// CHECK-NEXT: store
|
||||
|
|
|
@ -67,7 +67,7 @@ void test1(int cond) {
|
|||
// CHECK-NEXT: br i1 [[T0]],
|
||||
// CHECK: [[T0:%.*]] = load i8*, i8** [[TEMP1]]
|
||||
// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retain(i8* [[T0]])
|
||||
// CHECK-NEXT: call void (...)* @clang.arc.use(i8* [[W]]) [[NUW]]
|
||||
// CHECK-NEXT: call void (...) @clang.arc.use(i8* [[W]]) [[NUW]]
|
||||
// CHECK-NEXT: [[T2:%.*]] = load i8*, i8** [[ARG]]
|
||||
// CHECK-NEXT: store i8* [[T1]], i8** [[ARG]]
|
||||
// CHECK-NEXT: call void @objc_release(i8* [[T2]])
|
||||
|
|
|
@ -875,7 +875,7 @@ void test33(Test33 *ptr) {
|
|||
// CHECK-NEXT: [[T1:%.*]] = bitcast [[A_T]]* [[T0]] to i8*
|
||||
// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retain(i8* [[T1]])
|
||||
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[A_T]]*
|
||||
// CHECK-NEXT: call void (...)* @clang.arc.use([[A_T]]* [[W0]]) [[NUW]]
|
||||
// CHECK-NEXT: call void (...) @clang.arc.use([[A_T]]* [[W0]]) [[NUW]]
|
||||
// CHECK-NEXT: [[T4:%.*]] = load [[A_T]]*, [[A_T]]** [[A]]
|
||||
// CHECK-NEXT: store [[A_T]]* [[T3]], [[A_T]]** [[A]]
|
||||
// CHECK-NEXT: [[T5:%.*]] = bitcast [[A_T]]* [[T4]] to i8*
|
||||
|
@ -891,7 +891,7 @@ void test33(Test33 *ptr) {
|
|||
// CHECK-NEXT: [[T1:%.*]] = bitcast [[A_T]]* [[T0]] to i8*
|
||||
// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retain(i8* [[T1]])
|
||||
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[A_T]]*
|
||||
// CHECK-NEXT: call void (...)* @clang.arc.use([[A_T]]* [[W0]]) [[NUW]]
|
||||
// CHECK-NEXT: call void (...) @clang.arc.use([[A_T]]* [[W0]]) [[NUW]]
|
||||
// CHECK-NEXT: [[T4:%.*]] = load [[A_T]]*, [[A_T]]** [[A]]
|
||||
// CHECK-NEXT: store [[A_T]]* [[T3]], [[A_T]]** [[A]]
|
||||
// CHECK-NEXT: [[T5:%.*]] = bitcast [[A_T]]* [[T4]] to i8*
|
||||
|
@ -974,7 +974,7 @@ void test37(void) {
|
|||
// CHECK-NEXT: [[T2:%.*]] = bitcast [[TEST37]]* [[T1]] to i8*
|
||||
// CHECK-NEXT: [[T3:%.*]] = call i8* @objc_retain(i8* [[T2]])
|
||||
// CHECK-NEXT: [[T4:%.*]] = bitcast i8* [[T3]] to [[TEST37]]*
|
||||
// CHECK-NEXT: call void (...)* @clang.arc.use(i8* [[W1]]) [[NUW]]
|
||||
// CHECK-NEXT: call void (...) @clang.arc.use(i8* [[W1]]) [[NUW]]
|
||||
// CHECK-NEXT: [[T5:%.*]] = load [[TEST37]]*, [[TEST37]]** [[VAR]]
|
||||
// CHECK-NEXT: store [[TEST37]]* [[T4]], [[TEST37]]** [[VAR]]
|
||||
// CHECK-NEXT: [[T6:%.*]] = bitcast [[TEST37]]* [[T5]] to i8*
|
||||
|
|
|
@ -116,7 +116,7 @@ void test3(void (^block)(int, ...)) {
|
|||
// CHECK-NEXT: [[T3:%.*]] = bitcast [[BLOCK_T]]* [[T1]] to i8*
|
||||
// CHECK-NEXT: [[T4:%.*]] = load i8*, i8** [[T2]]
|
||||
// CHECK-NEXT: [[T5:%.*]] = bitcast i8* [[T4]] to void (i8*, i32, ...)*
|
||||
// CHECK-NEXT: call void (i8*, i32, ...)* [[T5]](i8* [[T3]], i32 0, i32 1, i32 2, i32 3)
|
||||
// CHECK-NEXT: call void (i8*, i32, ...) [[T5]](i8* [[T3]], i32 0, i32 1, i32 2, i32 3)
|
||||
// CHECK-NEXT: ret void
|
||||
|
||||
void test4(void (^block)()) {
|
||||
|
|
|
@ -9,7 +9,7 @@ void test0(void) {
|
|||
[Test0 test];
|
||||
}
|
||||
// CHECK-LABEL: define void @test0()
|
||||
// CHECK: [[T0:%.*]] = call i8* (i8*, i8*, ...)* (i8*, i8*)* @objc_msg_lookup(i8* bitcast (i64* @_OBJC_CLASS_Test0 to i8*),
|
||||
// CHECK: [[T0:%.*]] = call i8* (i8*, i8*, ...)* @objc_msg_lookup(i8* bitcast (i64* @_OBJC_CLASS_Test0 to i8*),
|
||||
// CHECK-NEXT: [[T1:%.*]] = bitcast i8* (i8*, i8*, ...)* [[T0]] to void (i8*, i8*)*
|
||||
// CHECK-NEXT: call void [[T1]](i8* bitcast (i64* @_OBJC_CLASS_Test0 to i8*),
|
||||
// CHECK-NEXT: ret void
|
||||
|
|
|
@ -99,7 +99,7 @@ void test4(Test4 *t) {
|
|||
extern int test4_printf(const char *, ...);
|
||||
// CHECK: [[TMP:%.*]] = call float {{.*}} @objc_msgSend
|
||||
// CHECK-NEXT: [[EXT:%.*]] = fpext float [[TMP]] to double
|
||||
// CHECK-NEXT: call i32 (i8*, ...)* @test4_printf(i8* {{.*}}, double [[EXT]])
|
||||
// CHECK-NEXT: call i32 (i8*, ...) @test4_printf(i8* {{.*}}, double [[EXT]])
|
||||
// CHECK-NEXT: ret void
|
||||
test4_printf("%.2f", t.f);
|
||||
}
|
||||
|
|
|
@ -19,11 +19,11 @@ void test0(void) {
|
|||
}
|
||||
|
||||
// HASSTRET-LABEL: define void @test0()
|
||||
// HASSTRET: [[T0:%.*]] = call i8* (i8*, i8*, ...)* (i8*, i8*)* @objc_msg_lookup_stret(i8* bitcast (i64* @_OBJC_CLASS_Test0 to i8*),
|
||||
// HASSTRET: [[T0:%.*]] = call i8* (i8*, i8*, ...)* @objc_msg_lookup_stret(i8* bitcast (i64* @_OBJC_CLASS_Test0 to i8*),
|
||||
// HASSTRET-NEXT: [[T1:%.*]] = bitcast i8* (i8*, i8*, ...)* [[T0]] to void (%struct.test*, i8*, i8*)*
|
||||
// HASSTRET-NEXT: call void [[T1]](%struct.test* sret {{.*}}, i8* bitcast (i64* @_OBJC_CLASS_Test0 to i8*),
|
||||
|
||||
// NOSTRET-LABEL: define void @test0()
|
||||
// NOSTRET: [[T0:%.*]] = call i8* (i8*, i8*, ...)* (i8*, i8*)* @objc_msg_lookup(i8*
|
||||
// NOSTRET: [[T0:%.*]] = call i8* (i8*, i8*, ...)* @objc_msg_lookup(i8*
|
||||
// NOSTRET-NEXT: [[T1:%.*]] = bitcast i8* (i8*, i8*, ...)* [[T0]] to void (%struct.test*, i8*, i8*)*
|
||||
// NOSTRET-NEXT: call void [[T1]](%struct.test* sret {{.*}}, i8* {{.*}}, i8* bitcast ([2 x { i8*, i8* }]*
|
||||
|
|
|
@ -38,6 +38,6 @@ static inline void _inlineFunction() {
|
|||
// CHECK: [[ZERO:%.*]] = load %struct._class_t*, %struct._class_t** @"OBJC_CLASSLIST_REFERENCES_
|
||||
// CHECK-NEXT: [[ONE:%.*]] = load i8*, i8** @OBJC_SELECTOR_REFERENCES_
|
||||
// CHECK-NEXT: [[TWO:%.*]] = bitcast %struct._class_t* [[ZERO]] to i8*
|
||||
// CHECK-NEXT: call void (i8*, i8*, [[T:%.*]]*, ...)* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, [[T:%.*]]*, ...)*)(i8* [[TWO]], i8* [[ONE]], [[T:%.*]]* bitcast (%struct.NSConstantString* @_unnamed_cfstring_{{.*}} to [[T:%.*]]*))
|
||||
// CHECK-NEXT: call void (i8*, i8*, [[T:%.*]]*, ...) bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, [[T:%.*]]*, ...)*)(i8* [[TWO]], i8* [[ONE]], [[T:%.*]]* bitcast (%struct.NSConstantString* @_unnamed_cfstring_{{.*}} to [[T:%.*]]*))
|
||||
// CHECK-NEXT: ret void
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@ void f1(A *a) {
|
|||
}
|
||||
|
||||
void f2(A *a) {
|
||||
// CHECK-X86-32: call void (i8*, i8*, i32, ...)* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i32, ...)*)
|
||||
// CHECK-X86-64: call void (i8*, i8*, i32, ...)* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i32, ...)*)
|
||||
// CHECK-X86-32: call void (i8*, i8*, i32, ...) bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i32, ...)*)
|
||||
// CHECK-X86-64: call void (i8*, i8*, i32, ...) bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, i32, ...)*)
|
||||
[a im2: 1, 2];
|
||||
}
|
||||
|
||||
|
@ -33,8 +33,8 @@ void f2(A *a) {
|
|||
[super im1: 1];
|
||||
}
|
||||
-(void) bar {
|
||||
// CHECK-X86-32: call void (%struct._objc_super*, i8*, i32, ...)* bitcast (i8* (%struct._objc_super*, i8*, ...)* @objc_msgSendSuper to void (%struct._objc_super*, i8*, i32, ...)*)
|
||||
// CHECK-X86-64: call void (%struct._objc_super*, i8*, i32, ...)* bitcast (i8* (%struct._objc_super*, i8*, ...)* @objc_msgSendSuper to void (%struct._objc_super*, i8*, i32, ...)*)
|
||||
// CHECK-X86-32: call void (%struct._objc_super*, i8*, i32, ...) bitcast (i8* (%struct._objc_super*, i8*, ...)* @objc_msgSendSuper to void (%struct._objc_super*, i8*, i32, ...)*)
|
||||
// CHECK-X86-64: call void (%struct._objc_super*, i8*, i32, ...) bitcast (i8* (%struct._objc_super*, i8*, ...)* @objc_msgSendSuper to void (%struct._objc_super*, i8*, i32, ...)*)
|
||||
[super im2: 1, 2];
|
||||
}
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ void test34(int cond) {
|
|||
// CHECK-NEXT: br i1 [[T0]],
|
||||
// CHECK: [[T0:%.*]] = load i8*, i8** [[TEMP1]]
|
||||
// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retain(i8* [[T0]])
|
||||
// CHECK-NEXT: call void (...)* @clang.arc.use(i8* [[W0]])
|
||||
// CHECK-NEXT: call void (...) @clang.arc.use(i8* [[W0]])
|
||||
// CHECK-NEXT: [[T2:%.*]] = load i8*, i8** [[ARG]]
|
||||
// CHECK-NEXT: store i8* [[T1]], i8** [[ARG]]
|
||||
// CHECK-NEXT: call void @objc_release(i8* [[T2]])
|
||||
|
|
|
@ -10,8 +10,8 @@ fp f() { auto x = []{ return 3; }; return x; }
|
|||
// MRC-LABEL: define internal i32 ()* @"_ZZ1fvENK3$_0cvU13block_pointerFivEEv"
|
||||
// MRC: store i8* bitcast (i8** @_NSConcreteStackBlock to i8*)
|
||||
// MRC: store i8* bitcast (i32 (i8*)* @"___ZZ1fvENK3$_0cvU13block_pointerFivEEv_block_invoke" to i8*)
|
||||
// MRC: call i32 ()* (i8*, i8*)* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i32 ()* (i8*, i8*)*)
|
||||
// MRC: call i32 ()* (i8*, i8*)* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i32 ()* (i8*, i8*)*)
|
||||
// MRC: call i32 ()* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i32 ()* (i8*, i8*)*)
|
||||
// MRC: call i32 ()* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i32 ()* (i8*, i8*)*)
|
||||
// MRC: ret i32 ()*
|
||||
|
||||
// ARC-LABEL: define i32 ()* @_Z1fv(
|
||||
|
|
|
@ -68,7 +68,7 @@ int main() {
|
|||
// LAMBDA: call void [[OUTER_LAMBDA:@.+]](
|
||||
[&]() {
|
||||
// LAMBDA: define{{.*}} internal{{.*}} void [[OUTER_LAMBDA]](
|
||||
// LAMBDA: call void {{.+}}* @__kmpc_fork_call({{.+}}, i32 1, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i8* %{{.+}})
|
||||
// LAMBDA: call void {{.+}} @__kmpc_fork_call({{.+}}, i32 1, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i8* %{{.+}})
|
||||
#pragma omp parallel
|
||||
#pragma omp for firstprivate(g)
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
|
@ -106,10 +106,10 @@ int main() {
|
|||
#elif defined(BLOCKS)
|
||||
// BLOCKS: [[G:@.+]] = global i{{[0-9]+}} 1212,
|
||||
// BLOCKS-LABEL: @main
|
||||
// BLOCKS: call void {{%.+}}(i8*
|
||||
// BLOCKS: call void {{%.+}}(i8
|
||||
^{
|
||||
// BLOCKS: define{{.*}} internal{{.*}} void {{.+}}(i8*
|
||||
// BLOCKS: call void {{.+}}* @__kmpc_fork_call({{.+}}, i32 1, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i8* %{{.+}})
|
||||
// BLOCKS: call void {{.+}} @__kmpc_fork_call({{.+}}, i32 1, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i8* %{{.+}})
|
||||
#pragma omp parallel
|
||||
#pragma omp for firstprivate(g)
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
|
@ -130,7 +130,7 @@ int main() {
|
|||
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
|
||||
// BLOCKS: i{{[0-9]+}}* [[G_PRIVATE_ADDR]]
|
||||
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
|
||||
// BLOCKS: call void {{%.+}}(i8*
|
||||
// BLOCKS: call void {{%.+}}(i8
|
||||
// BLOCKS: call void @__kmpc_for_static_fini(
|
||||
// BLOCKS: call i32 @__kmpc_cancel_barrier(
|
||||
^{
|
||||
|
@ -211,7 +211,7 @@ int main() {
|
|||
// CHECK: define {{.*}} i{{[0-9]+}} [[TMAIN_INT]]()
|
||||
// CHECK: [[TEST:%.+]] = alloca [[S_INT_TY]],
|
||||
// CHECK: call {{.*}} [[S_INT_TY_DEF_CONSTR:@.+]]([[S_INT_TY]]* [[TEST]])
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...)* @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, [[CAP_TMAIN_TY]]*)* [[TMAIN_MICROTASK:@.+]] to void
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, [[CAP_TMAIN_TY]]*)* [[TMAIN_MICROTASK:@.+]] to void
|
||||
// CHECK: call {{.*}} [[S_INT_TY_DESTR:@.+]]([[S_INT_TY]]*
|
||||
// CHECK: ret
|
||||
//
|
||||
|
|
|
@ -55,7 +55,7 @@ int main() {
|
|||
// LAMBDA: call void [[OUTER_LAMBDA:@.+]](
|
||||
[&]() {
|
||||
// LAMBDA: define{{.*}} internal{{.*}} void [[OUTER_LAMBDA]](
|
||||
// LAMBDA: call void {{.+}}* @__kmpc_fork_call({{.+}}, i32 1, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i8* %{{.+}})
|
||||
// LAMBDA: call void {{.+}} @__kmpc_fork_call({{.+}}, i32 1, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i8* %{{.+}})
|
||||
#pragma omp parallel
|
||||
#pragma omp for lastprivate(g)
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
|
@ -104,10 +104,10 @@ int main() {
|
|||
#elif defined(BLOCKS)
|
||||
// BLOCKS: [[G:@.+]] = global i{{[0-9]+}} 1212,
|
||||
// BLOCKS-LABEL: @main
|
||||
// BLOCKS: call void {{%.+}}(i8*
|
||||
// BLOCKS: call void {{%.+}}(i8
|
||||
^{
|
||||
// BLOCKS: define{{.*}} internal{{.*}} void {{.+}}(i8*
|
||||
// BLOCKS: call void {{.+}}* @__kmpc_fork_call({{.+}}, i32 1, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i8* %{{.+}})
|
||||
// BLOCKS: call void {{.+}} @__kmpc_fork_call({{.+}}, i32 1, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i8* %{{.+}})
|
||||
#pragma omp parallel
|
||||
#pragma omp for lastprivate(g)
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
|
@ -124,7 +124,7 @@ int main() {
|
|||
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
|
||||
// BLOCKS: i{{[0-9]+}}* [[G_PRIVATE_ADDR]]
|
||||
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
|
||||
// BLOCKS: call void {{%.+}}(i8*
|
||||
// BLOCKS: call void {{%.+}}(i8
|
||||
// BLOCKS: call void @__kmpc_for_static_fini(%{{.+}}* @{{.+}}, i32 %{{.+}})
|
||||
g = 1;
|
||||
// Check for final copying of private values back to original vars.
|
||||
|
@ -179,8 +179,8 @@ int main() {
|
|||
// CHECK: [[TEST:%.+]] = alloca [[S_FLOAT_TY]],
|
||||
// CHECK: call {{.*}} [[S_FLOAT_TY_DEF_CONSTR:@.+]]([[S_FLOAT_TY]]* [[TEST]])
|
||||
// CHECK: %{{.+}} = bitcast [[CAP_MAIN_TY]]*
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...)* @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, [[CAP_MAIN_TY]]*)* [[MAIN_MICROTASK:@.+]] to void
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...)* @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, %{{.+}}*)* [[MAIN_MICROTASK1:@.+]] to void
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, [[CAP_MAIN_TY]]*)* [[MAIN_MICROTASK:@.+]] to void
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, %{{.+}}*)* [[MAIN_MICROTASK1:@.+]] to void
|
||||
// CHECK: = call {{.+}} [[TMAIN_INT:@.+]]()
|
||||
// CHECK: call void [[S_FLOAT_TY_DESTR:@.+]]([[S_FLOAT_TY]]*
|
||||
// CHECK: ret
|
||||
|
@ -286,7 +286,7 @@ int main() {
|
|||
// CHECK: define {{.*}} i{{[0-9]+}} [[TMAIN_INT]]()
|
||||
// CHECK: [[TEST:%.+]] = alloca [[S_INT_TY]],
|
||||
// CHECK: call {{.*}} [[S_INT_TY_DEF_CONSTR:@.+]]([[S_INT_TY]]* [[TEST]])
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...)* @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, [[CAP_TMAIN_TY]]*)* [[TMAIN_MICROTASK:@.+]] to void
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, [[CAP_TMAIN_TY]]*)* [[TMAIN_MICROTASK:@.+]] to void
|
||||
// CHECK: call void [[S_INT_TY_DESTR:@.+]]([[S_INT_TY]]*
|
||||
// CHECK: ret
|
||||
//
|
||||
|
|
|
@ -39,7 +39,7 @@ int main (int argc, char **argv) {
|
|||
// CHECK: [[ARGC_REF:%.+]] = getelementptr inbounds %struct.anon, %struct.anon* [[AGG_CAPTURED]], i32 0, i32 0
|
||||
// CHECK-NEXT: store i32* {{%[a-z0-9.]+}}, i32** [[ARGC_REF]]
|
||||
// CHECK-NEXT: [[BITCAST:%.+]] = bitcast %struct.anon* [[AGG_CAPTURED]] to i8*
|
||||
// CHECK-NEXT: call void (%ident_t*, i32, void (i32*, i32*, ...)*, ...)* @__kmpc_fork_call(%ident_t* [[DEF_LOC_2]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* [[OMP_OUTLINED:@.+]] to void (i32*, i32*, ...)*), i8* [[BITCAST]])
|
||||
// CHECK-NEXT: call void (%ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%ident_t* [[DEF_LOC_2]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* [[OMP_OUTLINED:@.+]] to void (i32*, i32*, ...)*), i8* [[BITCAST]])
|
||||
// CHECK-NEXT: [[ARGV:%.+]] = load i8**, i8*** {{%[a-z0-9.]+}}
|
||||
// CHECK-NEXT: [[RET:%.+]] = call {{[a-z]*[ ]?i32}} [[TMAIN:@.+tmain.+]](i8** [[ARGV]])
|
||||
// CHECK-NEXT: ret i32 [[RET]]
|
||||
|
@ -55,7 +55,7 @@ int main (int argc, char **argv) {
|
|||
// CHECK-DEBUG-NEXT: [[KMPC_LOC_PSOURCE_REF:%.+]] = getelementptr inbounds %ident_t, %ident_t* [[LOC_2_ADDR]], i32 0, i32 4
|
||||
// CHECK-DEBUG-NEXT: store i8* getelementptr inbounds ([{{.+}} x i8], [{{.+}} x i8]* [[LOC1]], i32 0, i32 0), i8** [[KMPC_LOC_PSOURCE_REF]]
|
||||
// CHECK-DEBUG-NEXT: [[BITCAST:%.+]] = bitcast %struct.anon* [[AGG_CAPTURED]] to i8*
|
||||
// CHECK-DEBUG-NEXT: call void (%ident_t*, i32, void (i32*, i32*, ...)*, ...)* @__kmpc_fork_call(%ident_t* [[LOC_2_ADDR]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* [[OMP_OUTLINED:@.+]] to void (i32*, i32*, ...)*), i8* [[BITCAST]])
|
||||
// CHECK-DEBUG-NEXT: call void (%ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%ident_t* [[LOC_2_ADDR]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* [[OMP_OUTLINED:@.+]] to void (i32*, i32*, ...)*), i8* [[BITCAST]])
|
||||
// CHECK-DEBUG-NEXT: [[ARGV:%.+]] = load i8**, i8*** {{%[a-z0-9.]+}}
|
||||
// CHECK-DEBUG-NEXT: [[RET:%.+]] = call i32 [[TMAIN:@.+tmain.+]](i8** [[ARGV]])
|
||||
// CHECK-DEBUG-NEXT: ret i32 [[RET]]
|
||||
|
@ -100,7 +100,7 @@ int main (int argc, char **argv) {
|
|||
// CHECK: [[ARGC_REF:%.+]] = getelementptr inbounds %struct.anon.0, %struct.anon.0* [[AGG_CAPTURED]], i32 0, i32 0
|
||||
// CHECK-NEXT: store i8*** {{%[a-z0-9.]+}}, i8**** [[ARGC_REF]]
|
||||
// CHECK-NEXT: [[BITCAST:%.+]] = bitcast %struct.anon.0* [[AGG_CAPTURED]] to i8*
|
||||
// CHECK-NEXT: call void (%ident_t*, i32, void (i32*, i32*, ...)*, ...)* @__kmpc_fork_call(%ident_t* [[DEF_LOC_2]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon.0*)* [[OMP_OUTLINED:@.+]] to void (i32*, i32*, ...)*), i8* [[BITCAST]])
|
||||
// CHECK-NEXT: call void (%ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%ident_t* [[DEF_LOC_2]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon.0*)* [[OMP_OUTLINED:@.+]] to void (i32*, i32*, ...)*), i8* [[BITCAST]])
|
||||
// CHECK-NEXT: ret i32 0
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-DEBUG: define linkonce_odr i32 [[TMAIN]](i8** %argc)
|
||||
|
@ -114,7 +114,7 @@ int main (int argc, char **argv) {
|
|||
// CHECK-DEBUG-NEXT: [[KMPC_LOC_PSOURCE_REF:%.+]] = getelementptr inbounds %ident_t, %ident_t* [[LOC_2_ADDR]], i32 0, i32 4
|
||||
// CHECK-DEBUG-NEXT: store i8* getelementptr inbounds ([{{.+}} x i8], [{{.+}} x i8]* [[LOC2]], i32 0, i32 0), i8** [[KMPC_LOC_PSOURCE_REF]]
|
||||
// CHECK-DEBUG-NEXT: [[BITCAST:%.+]] = bitcast %struct.anon.0* [[AGG_CAPTURED]] to i8*
|
||||
// CHECK-DEBUG-NEXT: call void (%ident_t*, i32, void (i32*, i32*, ...)*, ...)* @__kmpc_fork_call(%ident_t* [[LOC_2_ADDR]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon.0*)* [[OMP_OUTLINED:@.+]] to void (i32*, i32*, ...)*), i8* [[BITCAST]])
|
||||
// CHECK-DEBUG-NEXT: call void (%ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%ident_t* [[LOC_2_ADDR]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon.0*)* [[OMP_OUTLINED:@.+]] to void (i32*, i32*, ...)*), i8* [[BITCAST]])
|
||||
// CHECK-DEBUG-NEXT: ret i32 0
|
||||
// CHECK-DEBUG-NEXT: }
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ int main() {
|
|||
// LAMBDA: call{{( x86_thiscallcc)?}} void [[OUTER_LAMBDA:@.+]](
|
||||
[&]() {
|
||||
// LAMBDA: define{{.*}} internal{{.*}} void [[OUTER_LAMBDA]](
|
||||
// LAMBDA: call void {{.+}}* @__kmpc_fork_call({{.+}}, i32 1, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i8*
|
||||
// LAMBDA: call void {{.+}} @__kmpc_fork_call({{.+}}, i32 1, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i8*
|
||||
#pragma omp parallel copyin(g)
|
||||
{
|
||||
// LAMBDA: define{{.*}} internal{{.*}} void [[OMP_REGION]](i32* %{{.+}}, i32* %{{.+}}, %{{.+}}* [[ARG:%.+]])
|
||||
|
@ -89,10 +89,10 @@ int main() {
|
|||
#elif defined(BLOCKS)
|
||||
// BLOCKS: [[G:@.+]] = global i{{[0-9]+}} 1212,
|
||||
// BLOCKS-LABEL: @main
|
||||
// BLOCKS: call void {{%.+}}(i8*
|
||||
// BLOCKS: call void {{%.+}}(i8
|
||||
^{
|
||||
// BLOCKS: define{{.*}} internal{{.*}} void {{.+}}(i8*
|
||||
// BLOCKS: call void {{.+}}* @__kmpc_fork_call({{.+}}, i32 1, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i8*
|
||||
// BLOCKS: call void {{.+}} @__kmpc_fork_call({{.+}}, i32 1, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i8*
|
||||
#pragma omp parallel copyin(g)
|
||||
{
|
||||
// BLOCKS: define{{.*}} internal{{.*}} void [[OMP_REGION]](i32* %{{.+}}, i32* %{{.+}}, %{{.+}}* [[ARG:%.+]])
|
||||
|
@ -111,7 +111,7 @@ int main() {
|
|||
g = 1;
|
||||
// BLOCKS: store volatile i{{[0-9]+}} 1, i{{[0-9]+}}*
|
||||
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
|
||||
// BLOCKS: call void {{%.+}}(i8*
|
||||
// BLOCKS: call void {{%.+}}(i8
|
||||
^{
|
||||
// BLOCKS: define {{.+}} void {{@.+}}(i8*
|
||||
g = 2;
|
||||
|
@ -146,8 +146,8 @@ int main() {
|
|||
// CHECK-LABEL: @main
|
||||
// CHECK: [[TEST:%.+]] = alloca [[S_FLOAT_TY]],
|
||||
// CHECK: call {{.*}} [[S_FLOAT_TY_COPY_ASSIGN:@.+]]([[S_FLOAT_TY]]* [[TEST]], [[S_FLOAT_TY]]*
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...)* @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, {{%.+}}*)* [[MAIN_MICROTASK:@.+]] to void (i32*, i32*, ...)*), i8* %{{.+}})
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...)* @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, {{%.+}}*)* [[MAIN_MICROTASK1:@.+]] to void (i32*, i32*, ...)*), i8* %{{.+}})
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, {{%.+}}*)* [[MAIN_MICROTASK:@.+]] to void (i32*, i32*, ...)*), i8* %{{.+}})
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, {{%.+}}*)* [[MAIN_MICROTASK1:@.+]] to void (i32*, i32*, ...)*), i8* %{{.+}})
|
||||
// CHECK: = call {{.*}}i{{.+}} [[TMAIN_INT:@.+]]()
|
||||
// CHECK: call {{.*}} [[S_FLOAT_TY_DESTR:@.+]]([[S_FLOAT_TY]]*
|
||||
// CHECK: ret
|
||||
|
@ -209,8 +209,8 @@ int main() {
|
|||
// CHECK: define {{.*}} i{{[0-9]+}} [[TMAIN_INT]]()
|
||||
// CHECK: [[TEST:%.+]] = alloca [[S_INT_TY]],
|
||||
// CHECK: call {{.*}} [[S_INT_TY_COPY_ASSIGN:@.+]]([[S_INT_TY]]* [[TEST]], [[S_INT_TY]]*
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...)* @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, {{%.+}}*)* [[TMAIN_MICROTASK:@.+]] to void (i32*, i32*, ...)*), i8* %{{.+}})
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...)* @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, {{%.+}}*)* [[TMAIN_MICROTASK1:@.+]] to void (i32*, i32*, ...)*), i8* %{{.+}})
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, {{%.+}}*)* [[TMAIN_MICROTASK:@.+]] to void (i32*, i32*, ...)*), i8* %{{.+}})
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, {{%.+}}*)* [[TMAIN_MICROTASK1:@.+]] to void (i32*, i32*, ...)*), i8* %{{.+}})
|
||||
// CHECK: call {{.*}} [[S_INT_TY_DESTR:@.+]]([[S_INT_TY]]*
|
||||
// CHECK: ret
|
||||
//
|
||||
|
|
|
@ -60,7 +60,7 @@ int main() {
|
|||
// LAMBDA: [[G_LOCAL_REF:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* [[AGG_CAPTURED:%.+]], i{{[0-9]+}} 0, i{{[0-9]+}} 0
|
||||
// LAMBDA: store i{{[0-9]+}}* [[G]], i{{[0-9]+}}** [[G_LOCAL_REF]]
|
||||
// LAMBDA: [[ARG:%.+]] = bitcast %{{.+}}* [[AGG_CAPTURED]] to i8*
|
||||
// LAMBDA: call void {{.+}}* @__kmpc_fork_call({{.+}}, i32 1, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i8* [[ARG]])
|
||||
// LAMBDA: call void {{.+}} @__kmpc_fork_call({{.+}}, i32 1, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i8* [[ARG]])
|
||||
#pragma omp parallel firstprivate(g)
|
||||
{
|
||||
// LAMBDA: define{{.*}} internal{{.*}} void [[OMP_REGION]](i32* %{{.+}}, i32* %{{.+}}, %{{.+}}* [[ARG:%.+]])
|
||||
|
@ -92,13 +92,13 @@ int main() {
|
|||
#elif defined(BLOCKS)
|
||||
// BLOCKS: [[G:@.+]] = global i{{[0-9]+}} 1212,
|
||||
// BLOCKS-LABEL: @main
|
||||
// BLOCKS: call void {{%.+}}(i8*
|
||||
// BLOCKS: call void {{%.+}}(i8
|
||||
^{
|
||||
// BLOCKS: define{{.*}} internal{{.*}} void {{.+}}(i8*
|
||||
// BLOCKS: [[G_LOCAL_REF:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* [[AGG_CAPTURED:%.+]], i{{[0-9]+}} 0, i{{[0-9]+}} 0
|
||||
// BLOCKS: store i{{[0-9]+}}* [[G]], i{{[0-9]+}}** [[G_LOCAL_REF]]
|
||||
// BLOCKS: [[ARG:%.+]] = bitcast %{{.+}}* [[AGG_CAPTURED]] to i8*
|
||||
// BLOCKS: call void {{.+}}* @__kmpc_fork_call({{.+}}, i32 1, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i8* [[ARG]])
|
||||
// BLOCKS: call void {{.+}} @__kmpc_fork_call({{.+}}, i32 1, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i8* [[ARG]])
|
||||
#pragma omp parallel firstprivate(g)
|
||||
{
|
||||
// BLOCKS: define{{.*}} internal{{.*}} void [[OMP_REGION]](i32* %{{.+}}, i32* %{{.+}}, %{{.+}}* [[ARG:%.+]])
|
||||
|
@ -115,7 +115,7 @@ int main() {
|
|||
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
|
||||
// BLOCKS: i{{[0-9]+}}* [[G_PRIVATE_ADDR]]
|
||||
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
|
||||
// BLOCKS: call void {{%.+}}(i8*
|
||||
// BLOCKS: call void {{%.+}}(i8
|
||||
^{
|
||||
// BLOCKS: define {{.+}} void {{@.+}}(i8*
|
||||
g = 2;
|
||||
|
@ -148,7 +148,7 @@ int main() {
|
|||
// CHECK: [[TEST:%.+]] = alloca [[S_FLOAT_TY]],
|
||||
// CHECK: call {{.*}} [[S_FLOAT_TY_DEF_CONSTR:@.+]]([[S_FLOAT_TY]]* [[TEST]])
|
||||
// CHECK: %{{.+}} = bitcast [[CAP_MAIN_TY]]*
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...)* @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, [[CAP_MAIN_TY]]*)* [[MAIN_MICROTASK:@.+]] to void
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, [[CAP_MAIN_TY]]*)* [[MAIN_MICROTASK:@.+]] to void
|
||||
// CHECK: = call {{.*}}i{{.+}} [[TMAIN_INT:@.+]]()
|
||||
// CHECK: call {{.*}} [[S_FLOAT_TY_DESTR:@.+]]([[S_FLOAT_TY]]*
|
||||
// CHECK: ret
|
||||
|
@ -195,7 +195,7 @@ int main() {
|
|||
// CHECK: define {{.*}} i{{[0-9]+}} [[TMAIN_INT]]()
|
||||
// CHECK: [[TEST:%.+]] = alloca [[S_INT_TY]],
|
||||
// CHECK: call {{.*}} [[S_INT_TY_DEF_CONSTR:@.+]]([[S_INT_TY]]* [[TEST]])
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...)* @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, [[CAP_TMAIN_TY]]*)* [[TMAIN_MICROTASK:@.+]] to void
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, [[CAP_TMAIN_TY]]*)* [[TMAIN_MICROTASK:@.+]] to void
|
||||
// CHECK: call {{.*}} [[S_INT_TY_DESTR:@.+]]([[S_INT_TY]]*
|
||||
// CHECK: ret
|
||||
//
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
// CHECK-LABEL: define {{.*void}} @{{.*}}without_schedule_clause{{.*}}(float* {{.+}}, float* {{.+}}, float* {{.+}}, float* {{.+}})
|
||||
void without_schedule_clause(float *a, float *b, float *c, float *d) {
|
||||
#pragma omp parallel for
|
||||
// CHECK: call void ([[IDENT_T_TY]]*, i32, void (i32*, i32*, ...)*, ...)* @__kmpc_fork_call([[IDENT_T_TY]]* [[DEFAULT_LOC:[@%].+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %{{.+}}*)* [[OMP_PARALLEL_FUNC:@.+]] to void (i32*, i32*, ...)*), i8* %{{.+}})
|
||||
// CHECK: call void ([[IDENT_T_TY]]*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call([[IDENT_T_TY]]* [[DEFAULT_LOC:[@%].+]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %{{.+}}*)* [[OMP_PARALLEL_FUNC:@.+]] to void (i32*, i32*, ...)*), i8* %{{.+}})
|
||||
// CHECK: define internal void [[OMP_PARALLEL_FUNC]](i32* [[GTID_PARAM_ADDR:%.+]], i32* %{{.+}}, %{{.+}}* %{{.+}})
|
||||
// CHECK: store i32* [[GTID_PARAM_ADDR]], i32** [[GTID_REF_ADDR:%.+]],
|
||||
// CHECK: [[GTID_REF:%.+]] = load i32*, i32** [[GTID_REF_ADDR]],
|
||||
|
@ -59,7 +59,7 @@ void without_schedule_clause(float *a, float *b, float *c, float *d) {
|
|||
// CHECK-LABEL: define {{.*void}} @{{.*}}static_not_chunked{{.*}}(float* {{.+}}, float* {{.+}}, float* {{.+}}, float* {{.+}})
|
||||
void static_not_chunked(float *a, float *b, float *c, float *d) {
|
||||
#pragma omp parallel for schedule(static)
|
||||
// CHECK: call void ([[IDENT_T_TY]]*, i32, void (i32*, i32*, ...)*, ...)* @__kmpc_fork_call([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %{{.+}}*)* [[OMP_PARALLEL_FUNC:@.+]] to void (i32*, i32*, ...)*), i8* %{{.+}})
|
||||
// CHECK: call void ([[IDENT_T_TY]]*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %{{.+}}*)* [[OMP_PARALLEL_FUNC:@.+]] to void (i32*, i32*, ...)*), i8* %{{.+}})
|
||||
// CHECK: define internal void [[OMP_PARALLEL_FUNC]](i32* [[GTID_PARAM_ADDR:%.+]], i32* %{{.+}}, %{{.+}}* %{{.+}})
|
||||
// CHECK: store i32* [[GTID_PARAM_ADDR]], i32** [[GTID_REF_ADDR:%.+]],
|
||||
// CHECK: [[GTID_REF:%.+]] = load i32*, i32** [[GTID_REF_ADDR]],
|
||||
|
@ -107,7 +107,7 @@ void static_not_chunked(float *a, float *b, float *c, float *d) {
|
|||
// CHECK-LABEL: define {{.*void}} @{{.*}}static_chunked{{.*}}(float* {{.+}}, float* {{.+}}, float* {{.+}}, float* {{.+}})
|
||||
void static_chunked(float *a, float *b, float *c, float *d) {
|
||||
#pragma omp parallel for schedule(static, 5)
|
||||
// CHECK: call void ([[IDENT_T_TY]]*, i32, void (i32*, i32*, ...)*, ...)* @__kmpc_fork_call([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %{{.+}}*)* [[OMP_PARALLEL_FUNC:@.+]] to void (i32*, i32*, ...)*), i8* %{{.+}})
|
||||
// CHECK: call void ([[IDENT_T_TY]]*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %{{.+}}*)* [[OMP_PARALLEL_FUNC:@.+]] to void (i32*, i32*, ...)*), i8* %{{.+}})
|
||||
// CHECK: define internal void [[OMP_PARALLEL_FUNC]](i32* [[GTID_PARAM_ADDR:%.+]], i32* %{{.+}}, %{{.+}}* %{{.+}})
|
||||
// CHECK: store i32* [[GTID_PARAM_ADDR]], i32** [[GTID_REF_ADDR:%.+]],
|
||||
// CHECK: [[GTID_REF:%.+]] = load i32*, i32** [[GTID_REF_ADDR]],
|
||||
|
@ -174,7 +174,7 @@ void static_chunked(float *a, float *b, float *c, float *d) {
|
|||
// CHECK-LABEL: define {{.*void}} @{{.*}}dynamic1{{.*}}(float* {{.+}}, float* {{.+}}, float* {{.+}}, float* {{.+}})
|
||||
void dynamic1(float *a, float *b, float *c, float *d) {
|
||||
#pragma omp parallel for schedule(dynamic)
|
||||
// CHECK: call void ([[IDENT_T_TY]]*, i32, void (i32*, i32*, ...)*, ...)* @__kmpc_fork_call([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %{{.+}}*)* [[OMP_PARALLEL_FUNC:@.+]] to void (i32*, i32*, ...)*), i8* %{{.+}})
|
||||
// CHECK: call void ([[IDENT_T_TY]]*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %{{.+}}*)* [[OMP_PARALLEL_FUNC:@.+]] to void (i32*, i32*, ...)*), i8* %{{.+}})
|
||||
// CHECK: define internal void [[OMP_PARALLEL_FUNC]](i32* [[GTID_PARAM_ADDR:%.+]], i32* %{{.+}}, %{{.+}}* %{{.+}})
|
||||
// CHECK: store i32* [[GTID_PARAM_ADDR]], i32** [[GTID_REF_ADDR:%.+]],
|
||||
// CHECK: [[GTID_REF:%.+]] = load i32*, i32** [[GTID_REF_ADDR]],
|
||||
|
@ -223,7 +223,7 @@ void dynamic1(float *a, float *b, float *c, float *d) {
|
|||
// CHECK-LABEL: define {{.*void}} @{{.*}}guided7{{.*}}(float* {{.+}}, float* {{.+}}, float* {{.+}}, float* {{.+}})
|
||||
void guided7(float *a, float *b, float *c, float *d) {
|
||||
#pragma omp parallel for schedule(guided, 7)
|
||||
// CHECK: call void ([[IDENT_T_TY]]*, i32, void (i32*, i32*, ...)*, ...)* @__kmpc_fork_call([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %{{.+}}*)* [[OMP_PARALLEL_FUNC:@.+]] to void (i32*, i32*, ...)*), i8* %{{.+}})
|
||||
// CHECK: call void ([[IDENT_T_TY]]*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %{{.+}}*)* [[OMP_PARALLEL_FUNC:@.+]] to void (i32*, i32*, ...)*), i8* %{{.+}})
|
||||
// CHECK: define internal void [[OMP_PARALLEL_FUNC]](i32* [[GTID_PARAM_ADDR:%.+]], i32* %{{.+}}, %{{.+}}* %{{.+}})
|
||||
// CHECK: store i32* [[GTID_PARAM_ADDR]], i32** [[GTID_REF_ADDR:%.+]],
|
||||
// CHECK: [[GTID_REF:%.+]] = load i32*, i32** [[GTID_REF_ADDR]],
|
||||
|
@ -274,7 +274,7 @@ void test_auto(float *a, float *b, float *c, float *d) {
|
|||
unsigned int x = 0;
|
||||
unsigned int y = 0;
|
||||
#pragma omp parallel for schedule(auto) collapse(2)
|
||||
// CHECK: call void ([[IDENT_T_TY]]*, i32, void (i32*, i32*, ...)*, ...)* @__kmpc_fork_call([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %{{.+}}*)* [[OMP_PARALLEL_FUNC:@.+]] to void (i32*, i32*, ...)*), i8* %{{.+}})
|
||||
// CHECK: call void ([[IDENT_T_TY]]*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %{{.+}}*)* [[OMP_PARALLEL_FUNC:@.+]] to void (i32*, i32*, ...)*), i8* %{{.+}})
|
||||
// CHECK: define internal void [[OMP_PARALLEL_FUNC]](i32* [[GTID_PARAM_ADDR:%.+]], i32* %{{.+}}, %{{.+}}* %{{.+}})
|
||||
// CHECK: store i32* [[GTID_PARAM_ADDR]], i32** [[GTID_REF_ADDR:%.+]],
|
||||
// CHECK: [[GTID_REF:%.+]] = load i32*, i32** [[GTID_REF_ADDR]],
|
||||
|
@ -325,7 +325,7 @@ void test_auto(float *a, float *b, float *c, float *d) {
|
|||
void runtime(float *a, float *b, float *c, float *d) {
|
||||
int x = 0;
|
||||
#pragma omp parallel for collapse(2) schedule(runtime)
|
||||
// CHECK: call void ([[IDENT_T_TY]]*, i32, void (i32*, i32*, ...)*, ...)* @__kmpc_fork_call([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %{{.+}}*)* [[OMP_PARALLEL_FUNC:@.+]] to void (i32*, i32*, ...)*), i8* %{{.+}})
|
||||
// CHECK: call void ([[IDENT_T_TY]]*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %{{.+}}*)* [[OMP_PARALLEL_FUNC:@.+]] to void (i32*, i32*, ...)*), i8* %{{.+}})
|
||||
// CHECK: define internal void [[OMP_PARALLEL_FUNC]](i32* [[GTID_PARAM_ADDR:%.+]], i32* %{{.+}}, %{{.+}}* %{{.+}})
|
||||
// CHECK: store i32* [[GTID_PARAM_ADDR]], i32** [[GTID_REF_ADDR:%.+]],
|
||||
// CHECK: [[GTID_REF:%.+]] = load i32*, i32** [[GTID_REF_ADDR]],
|
||||
|
|
|
@ -16,7 +16,7 @@ int Arg;
|
|||
|
||||
// CHECK-LABEL: define void @{{.+}}gtid_test
|
||||
void gtid_test() {
|
||||
// CHECK: call void {{.+}}* @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{.+}} 1, {{.+}}* [[GTID_TEST_REGION1:@.+]] to void
|
||||
// CHECK: call void {{.+}} @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{.+}} 1, {{.+}}* [[GTID_TEST_REGION1:@.+]] to void
|
||||
#pragma omp parallel
|
||||
#pragma omp parallel if (false)
|
||||
gtid_test();
|
||||
|
|
|
@ -48,11 +48,11 @@ int main() {
|
|||
// CHECK: [[S_CHAR_OP:%.+]] = invoke{{.*}} i8 [[S_TY_CHAR_OP:@.+]]([[S_TY]]* [[S_ADDR]])
|
||||
// CHECK: store i8 [[S_CHAR_OP]], i8* [[A_ADDR]]
|
||||
// CHECK: call void @__kmpc_push_num_threads([[IDENT_T_TY]]* [[DEF_LOC_2]], i32 [[GTID]], i32 2)
|
||||
// CHECK: call void {{.*}}* @__kmpc_fork_call(
|
||||
// CHECK: call void {{.*}} @__kmpc_fork_call(
|
||||
// CHECK: [[A_VAL:%.+]] = load i8, i8* [[A_ADDR]]
|
||||
// CHECK: [[RES:%.+]] = sext i8 [[A_VAL]] to i32
|
||||
// CHECK: call void @__kmpc_push_num_threads([[IDENT_T_TY]]* [[DEF_LOC_2]], i32 [[GTID]], i32 [[RES]])
|
||||
// CHECK: call void {{.*}}* @__kmpc_fork_call(
|
||||
// CHECK: call void {{.*}} @__kmpc_fork_call(
|
||||
// CHECK: invoke{{.*}} [[INT_TY:i[0-9]+]] [[TMAIN_CHAR_5:@.+]]()
|
||||
// CHECK: invoke{{.*}} [[INT_TY]] [[TMAIN_S_1:@.+]]()
|
||||
// CHECK: call {{.*}} [[S_TY_DESTR:@.+]]([[S_TY]]* [[S_ADDR]])
|
||||
|
@ -62,22 +62,22 @@ int main() {
|
|||
// CHECK: define{{.*}} [[INT_TY]] [[TMAIN_CHAR_5]]()
|
||||
// CHECK: [[GTID:%.+]] = call i32 @__kmpc_global_thread_num([[IDENT_T_TY]]* [[DEF_LOC_2]])
|
||||
// CHECK: call void @__kmpc_push_num_threads([[IDENT_T_TY]]* [[DEF_LOC_2]], i32 [[GTID]], i32 5)
|
||||
// CHECK: call void {{.*}}* @__kmpc_fork_call(
|
||||
// CHECK: call void {{.*}} @__kmpc_fork_call(
|
||||
// CHECK: call void @__kmpc_push_num_threads([[IDENT_T_TY]]* [[DEF_LOC_2]], i32 [[GTID]], i32 23)
|
||||
// CHECK: call void {{.*}}* @__kmpc_fork_call(
|
||||
// CHECK: call void {{.*}} @__kmpc_fork_call(
|
||||
// CHECK: ret [[INT_TY]] 0
|
||||
// CHECK-NEXT: }
|
||||
|
||||
// CHECK: define{{.*}} [[INT_TY]] [[TMAIN_S_1]]()
|
||||
// CHECK: [[GTID:%.+]] = call i32 @__kmpc_global_thread_num([[IDENT_T_TY]]* [[DEF_LOC_2]])
|
||||
// CHECK: call void @__kmpc_push_num_threads([[IDENT_T_TY]]* [[DEF_LOC_2]], i32 [[GTID]], i32 1)
|
||||
// CHECK: call void {{.*}}* @__kmpc_fork_call(
|
||||
// CHECK: call void {{.*}} @__kmpc_fork_call(
|
||||
// CHECK: call {{.*}} [[S_TY_CONSTR]]([[S_TY]]* [[S_TEMP:%.+]], [[INTPTR_T_TY]] [[INTPTR_T_TY_ATTR]]23)
|
||||
// CHECK: [[S_CHAR_OP:%.+]] = invoke{{.*}} i8 [[S_TY_CHAR_OP]]([[S_TY]]* [[S_TEMP]])
|
||||
// CHECK: [[RES:%.+]] = sext {{.*}}i8 [[S_CHAR_OP]] to i32
|
||||
// CHECK: call void @__kmpc_push_num_threads([[IDENT_T_TY]]* [[DEF_LOC_2]], i32 [[GTID]], i32 [[RES]])
|
||||
// CHECK: call {{.*}} [[S_TY_DESTR]]([[S_TY]]* [[S_TEMP]])
|
||||
// CHECK: call void {{.*}}* @__kmpc_fork_call(
|
||||
// CHECK: call void {{.*}} @__kmpc_fork_call(
|
||||
// CHECK: ret [[INT_TY]] 0
|
||||
// CHECK: }
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ int main() {
|
|||
// LAMBDA: [[G_LOCAL_REF:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* [[AGG_CAPTURED:%.+]], i{{[0-9]+}} 0, i{{[0-9]+}} 0
|
||||
// LAMBDA: store i{{[0-9]+}}* [[G]], i{{[0-9]+}}** [[G_LOCAL_REF]]
|
||||
// LAMBDA: [[ARG:%.+]] = bitcast %{{.+}}* [[AGG_CAPTURED]] to i8*
|
||||
// LAMBDA: call void {{.+}}* @__kmpc_fork_call({{.+}}, i32 1, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i8* [[ARG]])
|
||||
// LAMBDA: call void {{.+}} @__kmpc_fork_call({{.+}}, i32 1, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i8* [[ARG]])
|
||||
#pragma omp parallel private(g)
|
||||
{
|
||||
// LAMBDA: define{{.*}} internal{{.*}} void [[OMP_REGION]](i32* %{{.+}}, i32* %{{.+}}, %{{.+}}* [[ARG:%.+]])
|
||||
|
@ -73,13 +73,13 @@ int main() {
|
|||
#elif defined(BLOCKS)
|
||||
// BLOCKS: [[G:@.+]] = global i{{[0-9]+}} 1212,
|
||||
// BLOCKS-LABEL: @main
|
||||
// BLOCKS: call void {{%.+}}(i8*
|
||||
// BLOCKS: call void {{%.+}}(i8
|
||||
^{
|
||||
// BLOCKS: define{{.*}} internal{{.*}} void {{.+}}(i8*
|
||||
// BLOCKS: [[G_LOCAL_REF:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* [[AGG_CAPTURED:%.+]], i{{[0-9]+}} 0, i{{[0-9]+}} 0
|
||||
// BLOCKS: store i{{[0-9]+}}* [[G]], i{{[0-9]+}}** [[G_LOCAL_REF]]
|
||||
// BLOCKS: [[ARG:%.+]] = bitcast %{{.+}}* [[AGG_CAPTURED]] to i8*
|
||||
// BLOCKS: call void {{.+}}* @__kmpc_fork_call({{.+}}, i32 1, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i8* [[ARG]])
|
||||
// BLOCKS: call void {{.+}} @__kmpc_fork_call({{.+}}, i32 1, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i8* [[ARG]])
|
||||
#pragma omp parallel private(g)
|
||||
{
|
||||
// BLOCKS: define{{.*}} internal{{.*}} void [[OMP_REGION]](i32* %{{.+}}, i32* %{{.+}}, %{{.+}}* [[ARG:%.+]])
|
||||
|
@ -90,7 +90,7 @@ int main() {
|
|||
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
|
||||
// BLOCKS: i{{[0-9]+}}* [[G_PRIVATE_ADDR]]
|
||||
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
|
||||
// BLOCKS: call void {{%.+}}(i8*
|
||||
// BLOCKS: call void {{%.+}}(i8
|
||||
^{
|
||||
// BLOCKS: define {{.+}} void {{@.+}}(i8*
|
||||
g = 2;
|
||||
|
@ -121,7 +121,7 @@ int main() {
|
|||
// CHECK: [[TEST:%.+]] = alloca [[S_FLOAT_TY]],
|
||||
// CHECK: call {{.*}} [[S_FLOAT_TY_DEF_CONSTR:@.+]]([[S_FLOAT_TY]]* [[TEST]])
|
||||
// CHECK: %{{.+}} = bitcast [[CAP_MAIN_TY]]*
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...)* @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, [[CAP_MAIN_TY]]*)* [[MAIN_MICROTASK:@.+]] to void
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, [[CAP_MAIN_TY]]*)* [[MAIN_MICROTASK:@.+]] to void
|
||||
// CHECK: = call i{{.+}} [[TMAIN_INT:@.+]]()
|
||||
// CHECK: call void [[S_FLOAT_TY_DESTR:@.+]]([[S_FLOAT_TY]]*
|
||||
// CHECK: ret
|
||||
|
@ -147,7 +147,7 @@ int main() {
|
|||
// CHECK: define {{.*}} i{{[0-9]+}} [[TMAIN_INT]]()
|
||||
// CHECK: [[TEST:%.+]] = alloca [[S_INT_TY]],
|
||||
// CHECK: call {{.*}} [[S_INT_TY_DEF_CONSTR:@.+]]([[S_INT_TY]]* [[TEST]])
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...)* @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, [[CAP_TMAIN_TY]]*)* [[TMAIN_MICROTASK:@.+]] to void
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, [[CAP_TMAIN_TY]]*)* [[TMAIN_MICROTASK:@.+]] to void
|
||||
// CHECK: call void [[S_INT_TY_DESTR:@.+]]([[S_INT_TY]]*
|
||||
// CHECK: ret
|
||||
//
|
||||
|
|
|
@ -53,7 +53,7 @@ int main() {
|
|||
// LAMBDA: [[G_LOCAL_REF:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* [[AGG_CAPTURED:%.+]], i{{[0-9]+}} 0, i{{[0-9]+}} 0
|
||||
// LAMBDA: store i{{[0-9]+}}* [[G]], i{{[0-9]+}}** [[G_LOCAL_REF]]
|
||||
// LAMBDA: [[ARG:%.+]] = bitcast %{{.+}}* [[AGG_CAPTURED]] to i8*
|
||||
// LAMBDA: call void {{.+}}* @__kmpc_fork_call({{.+}}, i32 1, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i8* [[ARG]])
|
||||
// LAMBDA: call void {{.+}} @__kmpc_fork_call({{.+}}, i32 1, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i8* [[ARG]])
|
||||
#pragma omp parallel reduction(+:g)
|
||||
{
|
||||
// LAMBDA: define{{.*}} internal{{.*}} void [[OMP_REGION]](i32* %{{.+}}, i32* %{{.+}}, %{{.+}}* [[ARG:%.+]])
|
||||
|
@ -108,13 +108,13 @@ int main() {
|
|||
#elif defined(BLOCKS)
|
||||
// BLOCKS: [[G:@.+]] = global i{{[0-9]+}} 1212,
|
||||
// BLOCKS-LABEL: @main
|
||||
// BLOCKS: call void {{%.+}}(i8*
|
||||
// BLOCKS: call void {{%.+}}(i8
|
||||
^{
|
||||
// BLOCKS: define{{.*}} internal{{.*}} void {{.+}}(i8*
|
||||
// BLOCKS: [[G_LOCAL_REF:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* [[AGG_CAPTURED:%.+]], i{{[0-9]+}} 0, i{{[0-9]+}} 0
|
||||
// BLOCKS: store i{{[0-9]+}}* [[G]], i{{[0-9]+}}** [[G_LOCAL_REF]]
|
||||
// BLOCKS: [[ARG:%.+]] = bitcast %{{.+}}* [[AGG_CAPTURED]] to i8*
|
||||
// BLOCKS: call void {{.+}}* @__kmpc_fork_call({{.+}}, i32 1, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i8* [[ARG]])
|
||||
// BLOCKS: call void {{.+}} @__kmpc_fork_call({{.+}}, i32 1, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i8* [[ARG]])
|
||||
#pragma omp parallel reduction(-:g)
|
||||
{
|
||||
// BLOCKS: define{{.*}} internal{{.*}} void [[OMP_REGION]](i32* %{{.+}}, i32* %{{.+}}, %{{.+}}* [[ARG:%.+]])
|
||||
|
@ -133,7 +133,7 @@ int main() {
|
|||
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
|
||||
// BLOCKS: i{{[0-9]+}}* [[G_PRIVATE_ADDR]]
|
||||
// BLOCKS-NOT: [[G]]{{[[^:word:]]}}
|
||||
// BLOCKS: call void {{%.+}}(i8*
|
||||
// BLOCKS: call void {{%.+}}(i8
|
||||
|
||||
// BLOCKS: [[G_PRIV_REF:%.+]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[RED_LIST]], i32 0, i32 0
|
||||
// BLOCKS: [[BITCAST:%.+]] = bitcast i32* [[G_PRIVATE_ADDR]] to i8*
|
||||
|
@ -185,7 +185,7 @@ int main() {
|
|||
// CHECK: [[TEST:%.+]] = alloca [[S_FLOAT_TY]],
|
||||
// CHECK: call {{.*}} [[S_FLOAT_TY_CONSTR:@.+]]([[S_FLOAT_TY]]* [[TEST]])
|
||||
// CHECK: %{{.+}} = bitcast [[CAP_MAIN_TY]]*
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...)* @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, [[CAP_MAIN_TY]]*)* [[MAIN_MICROTASK:@.+]] to void
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, [[CAP_MAIN_TY]]*)* [[MAIN_MICROTASK:@.+]] to void
|
||||
// CHECK: = call {{.*}}i{{.+}} [[TMAIN_INT:@.+]]()
|
||||
// CHECK: call {{.*}} [[S_FLOAT_TY_DESTR:@.+]]([[S_FLOAT_TY]]*
|
||||
// CHECK: ret
|
||||
|
@ -457,7 +457,7 @@ int main() {
|
|||
// CHECK: [[TEST:%.+]] = alloca [[S_INT_TY]],
|
||||
// CHECK: call {{.*}} [[S_INT_TY_CONSTR:@.+]]([[S_INT_TY]]* [[TEST]])
|
||||
// CHECK: %{{.+}} = bitcast [[CAP_TMAIN_TY]]*
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...)* @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, [[CAP_TMAIN_TY]]*)* [[TMAIN_MICROTASK:@.+]] to void
|
||||
// CHECK: call void (%{{.+}}*, i{{[0-9]+}}, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{[0-9]+}} 1, void (i{{[0-9]+}}*, i{{[0-9]+}}*, ...)* bitcast (void (i{{[0-9]+}}*, i{{[0-9]+}}*, [[CAP_TMAIN_TY]]*)* [[TMAIN_MICROTASK:@.+]] to void
|
||||
// CHECK: call {{.*}} [[S_INT_TY_DESTR:@.+]]([[S_INT_TY]]*
|
||||
// CHECK: ret
|
||||
//
|
||||
|
|
|
@ -22,7 +22,7 @@ T tmain() {
|
|||
|
||||
// CHECK-LABEL: @main
|
||||
int main() {
|
||||
// CHECK: call void (%{{.+}}*, i32, void (i32*, i32*, ...)*, ...)* @__kmpc_fork_call(%{{.+}}* @{{.+}}, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %{{.+}}*)* [[OMP_PARALLEL_FUNC:@.+]] to void (i32*, i32*, ...)*), i8* %{{.+}})
|
||||
// CHECK: call void (%{{.+}}*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%{{.+}}* @{{.+}}, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %{{.+}}*)* [[OMP_PARALLEL_FUNC:@.+]] to void (i32*, i32*, ...)*), i8* %{{.+}})
|
||||
// CHECK-LABEL: }
|
||||
// CHECK: define internal void [[OMP_PARALLEL_FUNC]](i32* [[GTID_PARAM_ADDR:%.+]], i32* %{{.+}}, %{{.+}}* %{{.+}})
|
||||
// CHECK: store i32* [[GTID_PARAM_ADDR]], i32** [[GTID_REF_ADDR:%.+]],
|
||||
|
|
Loading…
Reference in New Issue