<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hi Richard,</p>
<p>Thanks for the report. Fixed in r275945.<br>
</p>
<pre class="moz-signature" cols="72">Best regards,
Alexey Bataev
=============
Software Engineer
Intel Compiler Team</pre>
<div class="moz-cite-prefix">19.07.2016 0:49, Richard Smith пишет:<br>
</div>
<blockquote cite="mid:CAOfiQq=Q8gRShg80t8RaK37_=bbpgc+equa1K=0tBgTTx3WeDQ@mail.gmail.com" type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Mon, May 30, 2016 at 2:06 AM, Alexey Bataev via cfe-commits
<span dir="ltr"><<a moz-do-not-send="true" href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Author: abataev<br>
Date: Mon May 30 04:06:50 2016<br>
New Revision: 271201<br>
<br>
URL: <a moz-do-not-send="true" href="http://llvm.org/viewvc/llvm-project?rev=271201&view=rev" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-project?rev=271201&view=rev</a><br>
Log:<br>
[OPENMP 4.5] Fixed codegen for 'priority' and destructors in task-based<br>
directives.<br>
<br>
'kmp_task_t' record type added a new field for 'priority' clause and<br>
changed the representation of pointer to destructors for privates used<br>
within loop-based directives.<br>
Old representation:<br>
<br>
typedef struct kmp_task { /* GEH: Shouldn't this be<br>
aligned somehow? */<br>
void *shareds; /**< pointer to block of<br>
pointers to shared vars */<br>
kmp_routine_entry_t routine; /**< pointer to routine<br>
to call for executing task */<br>
kmp_int32 part_id; /**< part id for the<br>
task */<br>
kmp_routine_entry_t destructors; /* pointer to function to<br>
invoke deconstructors of firstprivate C++ objects */<br>
/* private vars */<br>
} kmp_task_t;<br>
<br>
New representation:<br>
<br>
typedef struct kmp_task { /* GEH: Shouldn't this be<br>
aligned somehow? */<br>
void *shareds; /**< pointer to block of<br>
pointers to shared vars */<br>
kmp_routine_entry_t routine; /**< pointer to routine<br>
to call for executing task */<br>
kmp_int32 part_id; /**< part id for the<br>
task */<br>
kmp_cmplrdata_t data1; /* Two known<br>
optional additions: destructors and priority */<br>
kmp_cmplrdata_t data2; /* Process<br>
destructors first, priority second */<br>
/* future data */<br>
/* private vars */<br>
} kmp_task_t;<br>
<br>
Also excessive initialization of 'destructors' fields to 'null' was<br>
removed from codegen if it is known that no destructors shal be used.<br>
Currently a special bit is used in 'kmp_tasking_flags_t' bitfields<br>
('destructors_thunk' bitfield).<br>
<br>
Modified:<br>
cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp<br>
cfe/trunk/lib/CodeGen/CGStmtOpenMP.cpp<br>
cfe/trunk/test/OpenMP/task_codegen.cpp<br>
cfe/trunk/test/OpenMP/task_firstprivate_codegen.cpp<br>
cfe/trunk/test/OpenMP/task_if_codegen.cpp<br>
cfe/trunk/test/OpenMP/task_private_codegen.cpp<br>
cfe/trunk/test/OpenMP/taskloop_codegen.cpp<br>
cfe/trunk/test/OpenMP/taskloop_firstprivate_codegen.cpp<br>
cfe/trunk/test/OpenMP/taskloop_lastprivate_codegen.cpp<br>
cfe/trunk/test/OpenMP/taskloop_private_codegen.cpp<br>
cfe/trunk/test/OpenMP/taskloop_simd_codegen.cpp<br>
cfe/trunk/test/OpenMP/taskloop_simd_firstprivate_codegen.cpp<br>
cfe/trunk/test/OpenMP/taskloop_simd_lastprivate_codegen.cpp<br>
cfe/trunk/test/OpenMP/taskloop_simd_private_codegen.cpp<br>
<br>
Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp<br>
URL: <a moz-do-not-send="true" href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp?rev=271201&r1=271200&r2=271201&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp?rev=271201&r1=271200&r2=271201&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp (original)<br>
+++ cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp Mon May 30 04:06:50 2016<br>
@@ -2653,8 +2653,10 @@ enum KmpTaskTFields {<br>
KmpTaskTRoutine,<br>
/// \brief Partition id for the untied tasks.<br>
KmpTaskTPartId,<br>
- /// \brief Function with call of destructors for private variables.<br>
- KmpTaskTDestructors,<br>
+ /// Function with call of destructors for private variables.<br>
+ Data1,<br>
+ /// Task priority.<br>
+ Data2,<br>
/// (Taskloops only) Lower bound.<br>
KmpTaskTLowerBound,<br>
/// (Taskloops only) Upper bound.<br>
@@ -3178,19 +3180,27 @@ createKmpTaskTRecordDecl(CodeGenModule &<br>
// void * shareds;<br>
// kmp_routine_entry_t routine;<br>
// kmp_int32 part_id;<br>
- // kmp_routine_entry_t destructors;<br>
+ // kmp_cmplrdata_t data1;<br>
+ // kmp_cmplrdata_t data2;<br>
// For taskloops additional fields:<br>
// kmp_uint64 lb;<br>
// kmp_uint64 ub;<br>
// kmp_int64 st;<br>
// kmp_int32 liter;<br>
// };<br>
+ auto *UD = C.buildImplicitRecord("kmp_cmplrdata_t", TTK_Union);<br>
+ UD->startDefinition();<br>
+ addFieldToRecordDecl(C, UD, KmpInt32Ty);<br>
+ addFieldToRecordDecl(C, UD, KmpRoutineEntryPointerQTy);<br>
+ UD->completeDefinition();<br>
+ QualType KmpCmplrdataTy = C.getRecordType(UD);<br>
auto *RD = C.buildImplicitRecord("kmp_task_t");<br>
RD->startDefinition();<br>
addFieldToRecordDecl(C, RD, C.VoidPtrTy);<br>
addFieldToRecordDecl(C, RD, KmpRoutineEntryPointerQTy);<br>
addFieldToRecordDecl(C, RD, KmpInt32Ty);<br>
- addFieldToRecordDecl(C, RD, KmpRoutineEntryPointerQTy);<br>
+ addFieldToRecordDecl(C, RD, KmpCmplrdataTy);<br>
+ addFieldToRecordDecl(C, RD, KmpCmplrdataTy);<br>
if (isOpenMPTaskLoopDirective(Kind)) {<br>
QualType KmpUInt64Ty =<br>
CGM.getContext().getIntTypeForBitwidth(/*DestWidth=*/64, /*Signed=*/0);<br>
@@ -3805,18 +3815,30 @@ CGOpenMPRuntime::emitTaskInit(CodeGenFun<br>
/*WithLastIter=*/!Data.LastprivateVars.empty());<br>
}<br>
}<br>
+ // Fields of union "kmp_cmplrdata_t" for destructors and priority.<br>
+ enum { Priority = 0, Destructors = 1 };<br>
// Provide pointer to function with destructors for privates.<br>
- llvm::Value *DestructorFn =<br>
- NeedsCleanup ? emitDestructorsFunction(CGM, Loc, KmpInt32Ty,<br>
- KmpTaskTWithPrivatesPtrQTy,<br>
- KmpTaskTWithPrivatesQTy)<br>
- : llvm::ConstantPointerNull::get(<br>
- cast<llvm::PointerType>(KmpRoutineEntryPtrTy));<br>
- LValue Destructor = CGF.EmitLValueForField(<br>
- TDBase, *std::next(KmpTaskTQTyRD->field_begin(), KmpTaskTDestructors));<br>
- CGF.EmitStoreOfScalar(CGF.Builder.CreatePointerBitCastOrAddrSpaceCast(<br>
- DestructorFn, KmpRoutineEntryPtrTy),<br>
- Destructor);<br>
+ auto FI = std::next(KmpTaskTQTyRD->field_begin(), Data1);<br>
+ auto *KmpCmplrdataUD = (*FI)->getType()->getAsUnionType()->getDecl();<br>
+ if (NeedsCleanup) {<br>
+ llvm::Value *DestructorFn = emitDestructorsFunction(<br>
+ CGM, Loc, KmpInt32Ty, KmpTaskTWithPrivatesPtrQTy,<br>
+ KmpTaskTWithPrivatesQTy);<br>
+ LValue Data1LV = CGF.EmitLValueForField(TDBase, *FI);<br>
+ LValue DestructorsLV = CGF.EmitLValueForField(<br>
+ Data1LV, *std::next(KmpCmplrdataUD->field_begin(), Destructors));<br>
+ CGF.EmitStoreOfScalar(CGF.Builder.CreatePointerBitCastOrAddrSpaceCast(<br>
+ DestructorFn, KmpRoutineEntryPtrTy),<br>
+ DestructorsLV);<br>
+ }<br>
+ // Set priority.<br>
+ if (Data.Priority.getInt()) {<br>
+ LValue Data2LV = CGF.EmitLValueForField(<br>
+ TDBase, *std::next(KmpTaskTQTyRD->field_begin(), Data2));<br>
+ LValue PriorityLV = CGF.EmitLValueForField(<br>
+ Data2LV, *std::next(KmpCmplrdataUD->field_begin(), Priority));<br>
+ CGF.EmitStoreOfScalar(Data.Priority.getPointer(), PriorityLV);<br>
+ }<br>
Result.NewTask = NewTask;<br>
Result.TaskEntry = TaskEntry;<br>
Result.NewTaskNewTaskTTy = NewTaskNewTaskTTy;<br>
<br>
Modified: cfe/trunk/lib/CodeGen/CGStmtOpenMP.cpp<br>
URL: <a moz-do-not-send="true" href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGStmtOpenMP.cpp?rev=271201&r1=271200&r2=271201&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGStmtOpenMP.cpp?rev=271201&r1=271200&r2=271201&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/CodeGen/CGStmtOpenMP.cpp (original)<br>
+++ cfe/trunk/lib/CodeGen/CGStmtOpenMP.cpp Mon May 30 04:06:50 2016<br>
@@ -2371,6 +2371,10 @@ void CodeGenFunction::EmitOMPTaskBasedDi<br>
// TODO: Add codegen for priority clause arg when runtime lib support it.<br>
auto *Prio = Clause->getPriority();<br>
Data.Priority.setInt(Prio);<br>
+ Data.Priority.setPointer(EmitScalarConversion(<br>
+ EmitScalarExpr(Prio), Prio->getType(),<br>
+ getContext().getIntTypeForBitwidth(/*DestWidth=*/32, /*Signed=*/1),<br>
+ Prio->getExprLoc()));<br>
</blockquote>
<div><br>
</div>
<div>This doesn't look right: either Prio is known to be non-null here, in which the first line should be "setInt(true)", or Prio is *not* known to be non-null here, in which case the EmitScalarConversion call shouldn't be dereferencing it without checking.</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
}<br>
// The first function argument for tasks is a thread id, the second one is a<br>
// part id (0 for tied tasks, >=0 for untied task).<br>
<br>
Modified: cfe/trunk/test/OpenMP/task_codegen.cpp<br>
URL: <a moz-do-not-send="true" href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/task_codegen.cpp?rev=271201&r1=271200&r2=271201&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/task_codegen.cpp?rev=271201&r1=271200&r2=271201&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/OpenMP/task_codegen.cpp (original)<br>
+++ cfe/trunk/test/OpenMP/task_codegen.cpp Mon May 30 04:06:50 2016<br>
@@ -9,7 +9,7 @@<br>
// CHECK-DAG: [[IDENT_T:%.+]] = type { i32, i32, i32, i32, i8* }<br>
// CHECK-DAG: [[STRUCT_SHAREDS:%.+]] = type { i8*, [2 x [[STRUCT_S:%.+]]]* }<br>
// CHECK-DAG: [[STRUCT_SHAREDS1:%.+]] = type { [2 x [[STRUCT_S:%.+]]]* }<br>
-// CHECK-DAG: [[KMP_TASK_T:%.+]] = type { i8*, i32 (i32, i8*)*, i32, i32 (i32, i8*)* }<br>
+// CHECK-DAG: [[KMP_TASK_T:%.+]] = type { i8*, i32 (i32, i8*)*, i32, %union{{.+}}, %union{{.+}} }<br>
// CHECK-DAG: [[KMP_DEPEND_INFO:%.+]] = type { i64, i64, i8 }<br>
struct S {<br>
int a;<br>
@@ -30,13 +30,14 @@ int main() {<br>
// CHECK: store i8* [[B]], i8** [[B_REF]]<br>
// CHECK: [[S_REF:%.+]] = getelementptr inbounds [[STRUCT_SHAREDS]], [[STRUCT_SHAREDS]]* [[CAPTURES]], i32 0, i32 1<br>
// CHECK: store [2 x [[STRUCT_S]]]* [[S]], [2 x [[STRUCT_S]]]** [[S_REF]]<br>
-// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i32 33, i64 32, i64 16, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_T]]{{.*}}*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK_ENTRY1:@.+">TASK_ENTRY1:@.+</a>]]
to i32 (i32, i8*)*))<br>
+// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i32 33, i64 40, i64 16, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_T]]{{.*}}*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK_ENTRY1:@.+">TASK_ENTRY1:@.+</a>]]
to i32 (i32, i8*)*))<br>
// CHECK: [[SHAREDS_REF_PTR:%.+]] = getelementptr inbounds [[KMP_TASK_T]], [[KMP_TASK_T]]* [[TASK_PTR:%.+]], i32 0, i32 0<br>
// CHECK: [[SHAREDS_REF:%.+]] = load i8*, i8** [[SHAREDS_REF_PTR]]<br>
// CHECK: [[BITCAST:%.+]] = bitcast [[STRUCT_SHAREDS]]* [[CAPTURES]] to i8*<br>
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* [[SHAREDS_REF]], i8* [[BITCAST]], i64 16, i32 8, i1 false)<br>
-// CHECK: [[DESTRUCTORS_REF_PTR:%.+]] = getelementptr inbounds [[KMP_TASK_T]], [[KMP_TASK_T]]* [[TASK_PTR]], i32 0, i32 3<br>
-// CHECK: store i32 (i32, i8*)* null, i32 (i32, i8*)** [[DESTRUCTORS_REF_PTR]]<br>
+// CHECK: [[PRIORITY_REF_PTR:%.+]] = getelementptr inbounds [[KMP_TASK_T]], [[KMP_TASK_T]]* [[TASK_PTR]], i32 0, i32 4<br>
+// CHECK: [[PRIORITY:%.+]] = bitcast %union{{.+}}* [[PRIORITY_REF_PTR]] to i32*<br>
+// CHECK: store i32 {{.+}}, i32* [[PRIORITY]]<br>
// CHECK: call i32 @__kmpc_omp_task([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]])<br>
#pragma omp task shared(a, b, s) priority(b)<br>
{<br>
@@ -46,13 +47,11 @@ int main() {<br>
}<br>
// CHECK: [[S_REF:%.+]] = getelementptr inbounds [[STRUCT_SHAREDS1]], [[STRUCT_SHAREDS1]]* [[CAPTURES:%.+]], i32 0, i32 0<br>
// CHECK: store [2 x [[STRUCT_S]]]* [[S]], [2 x [[STRUCT_S]]]** [[S_REF]]<br>
-// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{[^,]+}}, i32 [[GTID]], i32 1, i64 32, i64 8,<br>
+// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{[^,]+}}, i32 [[GTID]], i32 1, i64 40, i64 8,<br>
// CHECK: [[SHAREDS_REF_PTR:%.+]] = getelementptr inbounds [[KMP_TASK_T]], [[KMP_TASK_T]]* [[TASK_PTR:%.+]], i32 0, i32 0<br>
// CHECK: [[SHAREDS_REF:%.+]] = load i8*, i8** [[SHAREDS_REF_PTR]]<br>
// CHECK: [[BITCAST:%.+]] = bitcast [[STRUCT_SHAREDS1]]* [[CAPTURES]] to i8*<br>
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* [[SHAREDS_REF]], i8* [[BITCAST]], i64 8, i32 8, i1 false)<br>
-// CHECK: [[DESTRUCTORS_REF_PTR:%.+]] = getelementptr inbounds [[KMP_TASK_T]], [[KMP_TASK_T]]* [[TASK_PTR]], i32 0, i32 3<br>
-// CHECK: store i32 (i32, i8*)* null, i32 (i32, i8*)** [[DESTRUCTORS_REF_PTR]]<br>
// CHECK: [[DEP:%.*]] = getelementptr inbounds [4 x [[KMP_DEPEND_INFO]]], [4 x [[KMP_DEPEND_INFO]]]* [[DEPENDENCIES:%.*]], i64 0, i64 0<br>
// CHECK: [[T0:%.*]] = getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* [[DEP]], i32 0, i32 0<br>
// CHECK: store i64 ptrtoint (i32* @{{.+}} to i64), i64* [[T0]]<br>
@@ -100,17 +99,13 @@ int main() {<br>
a = 15;<br>
s[1].a = 10;<br>
}<br>
-// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i32 0, i64 32, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_T]]{{.*}}*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK_ENTRY2:@.+">TASK_ENTRY2:@.+</a>]]
to i32 (i32, i8*)*))<br>
-// CHECK: [[DESTRUCTORS_REF_PTR:%.+]] = getelementptr inbounds [[KMP_TASK_T]]{{.*}}* {{%.+}}, i32 0, i32 3<br>
-// CHECK: store i32 (i32, i8*)* null, i32 (i32, i8*)** [[DESTRUCTORS_REF_PTR]]<br>
+// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i32 0, i64 40, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_T]]{{.*}}*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK_ENTRY2:@.+">TASK_ENTRY2:@.+</a>]]
to i32 (i32, i8*)*))<br>
// CHECK: call i32 @__kmpc_omp_task([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]])<br>
#pragma omp task untied<br>
{<br>
a = 1;<br>
}<br>
-// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i32 0, i64 32, i64 1,<br>
-// CHECK: [[DESTRUCTORS_REF_PTR:%.+]] = getelementptr inbounds [[KMP_TASK_T]]{{.*}}* {{%.+}}, i32 0, i32 3<br>
-// CHECK: store i32 (i32, i8*)* null, i32 (i32, i8*)** [[DESTRUCTORS_REF_PTR]]<br>
+// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i32 0, i64 40, i64 1,<br>
// CHECK: getelementptr inbounds [2 x [[STRUCT_S]]], [2 x [[STRUCT_S]]]* [[S]], i64 0, i64 0<br>
// CHECK: getelementptr inbounds [2 x [[KMP_DEPEND_INFO]]], [2 x [[KMP_DEPEND_INFO]]]* %{{[^,]+}}, i64 0, i64 0<br>
// CHECK: getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* %{{[^,]+}}, i32 0, i32 0<br>
@@ -149,9 +144,7 @@ int main() {<br>
{<br>
a = 1;<br>
}<br>
-// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i32 3, i64 32, i64 1,<br>
-// CHECK: [[DESTRUCTORS_REF_PTR:%.+]] = getelementptr inbounds [[KMP_TASK_T]]{{.*}}* {{%.+}}, i32 0, i32 3<br>
-// CHECK: store i32 (i32, i8*)* null, i32 (i32, i8*)** [[DESTRUCTORS_REF_PTR]]<br>
+// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i32 3, i64 40, i64 1,<br>
// CHECK: getelementptr inbounds [3 x [[KMP_DEPEND_INFO]]], [3 x [[KMP_DEPEND_INFO]]]* %{{[^,]+}}, i64 0, i64 0<br>
// CHECK: getelementptr inbounds [[KMP_DEPEND_INFO]], [[KMP_DEPEND_INFO]]* %{{[^,]+}}, i32 0, i32 0<br>
// CHECK: store i64 ptrtoint (i32* @{{.+}} to i64), i64*<br>
@@ -199,17 +192,13 @@ int main() {<br>
{<br>
a = 2;<br>
}<br>
-// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i32 3, i64 32, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_T]]{{.*}}*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK_ENTRY3:@.+">TASK_ENTRY3:@.+</a>]]
to i32 (i32, i8*)*))<br>
-// CHECK: [[DESTRUCTORS_REF_PTR:%.+]] = getelementptr inbounds [[KMP_TASK_T]]{{.*}}* {{%.+}}, i32 0, i32 3<br>
-// CHECK: store i32 (i32, i8*)* null, i32 (i32, i8*)** [[DESTRUCTORS_REF_PTR]]<br>
+// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i32 3, i64 40, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_T]]{{.*}}*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK_ENTRY3:@.+">TASK_ENTRY3:@.+</a>]]
to i32 (i32, i8*)*))<br>
// CHECK: call i32 @__kmpc_omp_task([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]])<br>
#pragma omp task final(true)<br>
{<br>
a = 2;<br>
}<br>
-// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i32 1, i64 32, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_T]]{{.*}}*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK_ENTRY4:@.+">TASK_ENTRY4:@.+</a>]]
to i32 (i32, i8*)*))<br>
-// CHECK: [[DESTRUCTORS_REF_PTR:%.+]] = getelementptr inbounds [[KMP_TASK_T]]{{.*}}* {{%.*}}, i32 0, i32 3<br>
-// CHECK: store i32 (i32, i8*)* null, i32 (i32, i8*)** [[DESTRUCTORS_REF_PTR]]<br>
+// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i32 1, i64 40, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_T]]{{.*}}*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK_ENTRY4:@.+">TASK_ENTRY4:@.+</a>]]
to i32 (i32, i8*)*))<br>
// CHECK: call i32 @__kmpc_omp_task([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]])<br>
const bool flag = false;<br>
#pragma omp task final(flag)<br>
@@ -220,9 +209,7 @@ int main() {<br>
// CHECK: [[CMP:%.+]] = icmp ne i8 [[B_VAL]], 0<br>
// CHECK: [[FINAL:%.+]] = select i1 [[CMP]], i32 2, i32 0<br>
// CHECK: [[FLAGS:%.+]] = or i32 [[FINAL]], 1<br>
-// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i32 [[FLAGS]], i64 32, i64 8, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_T]]{{.*}}*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK_ENTRY5:@.+">TASK_ENTRY5:@.+</a>]]
to i32 (i32, i8*)*))<br>
-// CHECK: [[DESTRUCTORS_REF_PTR:%.+]] = getelementptr inbounds [[KMP_TASK_T]]{{.*}}* {{%.+}}, i32 0, i32 3<br>
-// CHECK: store i32 (i32, i8*)* null, i32 (i32, i8*)** [[DESTRUCTORS_REF_PTR]]<br>
+// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i32 [[FLAGS]], i64 40, i64 8, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_T]]{{.*}}*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK_ENTRY5:@.+">TASK_ENTRY5:@.+</a>]]
to i32 (i32, i8*)*))<br>
// CHECK: call i32 @__kmpc_omp_task([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]])<br>
int c __attribute__((aligned(128)));<br>
#pragma omp task final(b) shared(c)<br>
@@ -230,9 +217,7 @@ int main() {<br>
a = 4;<br>
c = 5;<br>
}<br>
-// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i32 0, i64 32, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_T]]{{.*}}*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK_ENTRY6:@.+">TASK_ENTRY6:@.+</a>]]
to i32 (i32, i8*)*))<br>
-// CHECK: [[DESTRUCTORS_REF_PTR:%.+]] = getelementptr inbounds [[KMP_TASK_T]]{{.*}}* {{%.+}}, i32 0, i32 3<br>
-// CHECK: store i32 (i32, i8*)* null, i32 (i32, i8*)** [[DESTRUCTORS_REF_PTR]]<br>
+// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i32 0, i64 40, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_T]]{{.*}}*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK_ENTRY6:@.+">TASK_ENTRY6:@.+</a>]]
to i32 (i32, i8*)*))<br>
// CHECK: call i32 @__kmpc_omp_task([[IDENT_T]]* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]])<br>
#pragma omp task untied<br>
{<br>
@@ -275,7 +260,6 @@ int main() {<br>
// CHECK: call i32 @__kmpc_omp_task(%<br>
<br>
// CHECK: call i8* @__kmpc_omp_task_alloc(<br>
-// CHECK: store i32 (i32, i8*)* null, i32 (i32, i8*)** %<br>
// CHECK: call i32 @__kmpc_omp_task(%<br>
// CHECK: load i32*, i32** %<br>
// CHECK: store i32 2, i32* %<br>
<br>
Modified: cfe/trunk/test/OpenMP/task_firstprivate_codegen.cpp<br>
URL: <a moz-do-not-send="true" href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/task_firstprivate_codegen.cpp?rev=271201&r1=271200&r2=271201&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/task_firstprivate_codegen.cpp?rev=271201&r1=271200&r2=271201&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/OpenMP/task_firstprivate_codegen.cpp (original)<br>
+++ cfe/trunk/test/OpenMP/task_firstprivate_codegen.cpp Mon May 30 04:06:50 2016<br>
@@ -24,7 +24,7 @@ struct S {<br>
<br>
volatile double g;<br>
<br>
-// CHECK-DAG: [[KMP_TASK_T_TY:%.+]] = type { i8*, i32 (i32, i8*)*, i32, i32 (i32, i8*)* }<br>
+// CHECK-DAG: [[KMP_TASK_T_TY:%.+]] = type { i8*, i32 (i32, i8*)*, i32, %union{{.+}}, %union{{.+}} }<br>
// CHECK-DAG: [[S_DOUBLE_TY:%.+]] = type { double }<br>
// CHECK-DAG: [[PRIVATES_MAIN_TY:%.+]] = type {{.?}}{ [2 x [[S_DOUBLE_TY]]], [[S_DOUBLE_TY]], i32, [2 x i32]<br>
// CHECK-DAG: [[CAP_MAIN_TY:%.+]] = type {{.*}}{ [2 x i32]*, i32, {{.*}}[2 x [[S_DOUBLE_TY]]]*, [[S_DOUBLE_TY]]*, i{{[0-9]+}}<br>
@@ -58,7 +58,7 @@ int main() {<br>
// LAMBDA: call{{( x86_thiscallcc)?}} void [[<a class="moz-txt-link-abbreviated" href="mailto:OUTER_LAMBDA:@.+">OUTER_LAMBDA:@.+</a>]](<br>
[&]() {<br>
// LAMBDA: define{{.*}} internal{{.*}} void [[OUTER_LAMBDA]](<br>
- // LAMBDA: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 48, i64 16, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
+ // LAMBDA: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 56, i64 16, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
// LAMBDA: [[PRIVATES:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i{{.+}} 0, i{{.+}} 1<br>
// LAMBDA: [[G_PRIVATE_ADDR:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* [[PRIVATES]], i{{.+}} 0, i{{.+}} 0<br>
// LAMBDA: [[G_ADDR_REF:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i{{.+}} 0, i{{.+}} 0<br>
@@ -102,7 +102,7 @@ int main() {<br>
// BLOCKS: call void {{%.+}}(i8<br>
^{<br>
// BLOCKS: define{{.*}} internal{{.*}} void {{.+}}(i8*<br>
- // BLOCKS: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 48, i64 16, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
+ // BLOCKS: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 56, i64 16, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
// BLOCKS: [[PRIVATES:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i{{.+}} 0, i{{.+}} 1<br>
// BLOCKS: [[G_PRIVATE_ADDR:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* [[PRIVATES]], i{{.+}} 0, i{{.+}} 0<br>
// BLOCKS: [[G_ADDR_REF:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i{{.+}} 0, i{{.+}} 0<br>
@@ -191,7 +191,7 @@ int main() {<br>
// [[KMP_TASK_T]] task_data;<br>
// [[KMP_TASK_MAIN_TY]] privates;<br>
// };<br>
-// CHECK: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc([[LOC]], i32 [[GTID]], i32 9, i64 72, i64 40, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32, i8*)*))<br>
+// CHECK: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc([[LOC]], i32 [[GTID]], i32 9, i64 80, i64 40, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32, i8*)*))<br>
// CHECK: [[RES_KMP_TASK:%.+]] = bitcast i8* [[RES]] to [[KMP_TASK_MAIN_TY]]*<br>
<br>
// Fill kmp_task_t->shareds by copying from original capture argument.<br>
@@ -242,7 +242,8 @@ int main() {<br>
<br>
// Provide pointer to destructor function, which will destroy private variables at the end of the task.<br>
// CHECK: [[DESTRUCTORS_REF:%.+]] = getelementptr inbounds [[KMP_TASK_T_TY]], [[KMP_TASK_T_TY]]* [[TASK]], i{{.+}} 0, i{{.+}} 3<br>
-// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_REF]],<br>
+// CHECK: [[DESTRUCTORS_PTR:%.+]] = bitcast %union{{.+}}* [[DESTRUCTORS_REF]] to i32 (i32, i8*)**<br>
+// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_PTR]],<br>
<br>
// Start task.<br>
// CHECK: call i32 @__kmpc_omp_task([[LOC]], i32 [[GTID]], i8* [[RES]])<br>
@@ -387,7 +388,8 @@ int main() {<br>
<br>
// Provide pointer to destructor function, which will destroy private variables at the end of the task.<br>
// CHECK: [[DESTRUCTORS_REF:%.+]] = getelementptr inbounds [[KMP_TASK_T_TY]], [[KMP_TASK_T_TY]]* [[TASK]], i{{.+}} 0, i{{.+}} 3<br>
-// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_TMAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_REF]],<br>
+// CHECK: [[DESTRUCTORS_PTR:%.+]] = bitcast %union{{.+}}* [[DESTRUCTORS_REF]] to i32 (i32, i8*)**<br>
+// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_TMAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_PTR]],<br>
<br>
// Start task.<br>
// CHECK: call i32 @__kmpc_omp_task([[LOC]], i32 [[GTID]], i8* [[RES]])<br>
<br>
Modified: cfe/trunk/test/OpenMP/task_if_codegen.cpp<br>
URL: <a moz-do-not-send="true" href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/task_if_codegen.cpp?rev=271201&r1=271200&r2=271201&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/task_if_codegen.cpp?rev=271201&r1=271200&r2=271201&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/OpenMP/task_if_codegen.cpp (original)<br>
+++ cfe/trunk/test/OpenMP/task_if_codegen.cpp Mon May 30 04:06:50 2016<br>
@@ -63,11 +63,11 @@ int tmain(T Arg) {<br>
// CHECK-LABEL: @main<br>
int main() {<br>
// CHECK: [[GTID:%.+]] = call i32 @__kmpc_global_thread_num(<br>
-// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc({{[^,]+}}, i32 [[GTID]], i32 1, i64 32, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[CAP_FN7:[^ ]+]] to i32 (i32, i8*)*))<br>
+// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc({{[^,]+}}, i32 [[GTID]], i32 1, i64 40, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[CAP_FN7:[^ ]+]] to i32 (i32, i8*)*))<br>
// CHECK: call i32 @__kmpc_omp_task(%{{.+}}* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]])<br>
#pragma omp task if (true)<br>
fn7();<br>
-// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc({{[^,]+}}, i32 [[GTID]], i32 1, i64 32, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[CAP_FN8:[^ ]+]] to i32 (i32, i8*)*))<br>
+// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc({{[^,]+}}, i32 [[GTID]], i32 1, i64 40, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[CAP_FN8:[^ ]+]] to i32 (i32, i8*)*))<br>
// CHECK: [[TASK_PTR:%.+]] = bitcast i8* [[ORIG_TASK_PTR]] to<br>
// CHECK: call void @__kmpc_omp_task_begin_if0(%{{.+}}* @{{.+}}, i{{.+}} [[GTID]], i8* [[ORIG_TASK_PTR]])<br>
// CHECK: call i32 [[CAP_FN8]](i32 [[GTID]], %{{.+}}* [[TASK_PTR]])<br>
@@ -75,7 +75,7 @@ int main() {<br>
#pragma omp task if (false)<br>
fn8();<br>
<br>
-// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc({{[^,]+}}, i32 [[GTID]], i32 1, i64 32, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[CAP_FN9:[^ ]+]] to i32 (i32, i8*)*))<br>
+// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc({{[^,]+}}, i32 [[GTID]], i32 1, i64 40, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[CAP_FN9:[^ ]+]] to i32 (i32, i8*)*))<br>
// CHECK: [[TASK_PTR:%.+]] = bitcast i8* [[ORIG_TASK_PTR]] to<br>
// CHECK: br i1 %{{.+}}, label %[[OMP_THEN:.+]], label %[[OMP_ELSE:.+]]<br>
// CHECK: [[OMP_THEN]]<br>
@@ -89,7 +89,7 @@ int main() {<br>
// CHECK: [[OMP_END]]<br>
#pragma omp task if (Arg)<br>
fn9();<br>
-// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc({{[^,]+}}, i32 [[GTID]], i32 1, i64 32, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[CAP_FN10:[^ ]+]] to i32 (i32, i8*)*))<br>
+// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc({{[^,]+}}, i32 [[GTID]], i32 1, i64 40, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[CAP_FN10:[^ ]+]] to i32 (i32, i8*)*))<br>
// CHECK: [[TASK_PTR:%.+]] = bitcast i8* [[ORIG_TASK_PTR]] to<br>
// CHECK: br i1 %{{.+}}, label %[[OMP_THEN:.+]], label %[[OMP_ELSE:.+]]<br>
// CHECK: [[OMP_THEN]]<br>
@@ -126,7 +126,7 @@ int main() {<br>
<br>
// CHECK-LABEL: define {{.+}} @{{.+}}tmain<br>
// CHECK: [[GTID:%.+]] = call i32 @__kmpc_global_thread_num(<br>
-// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc(%{{[^,]+}}, i32 [[GTID]], i32 1, i64 32, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[CAP_FN1:[^ ]+]] to i32 (i32, i8*)*))<br>
+// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc(%{{[^,]+}}, i32 [[GTID]], i32 1, i64 40, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[CAP_FN1:[^ ]+]] to i32 (i32, i8*)*))<br>
// CHECK: call i32 @__kmpc_omp_task(%{{.+}}* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]])<br>
<br>
// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc(<br>
@@ -135,7 +135,7 @@ int main() {<br>
// CHECK: call i32 [[<a class="moz-txt-link-abbreviated" href="mailto:CAP_FN2:@.+">CAP_FN2:@.+</a>]](i32 [[GTID]], %{{.+}}* [[TASK_PTR]])<br>
// CHECK: call void @__kmpc_omp_task_complete_if0(%{{.+}}* @{{.+}}, i{{.+}} [[GTID]], i8* [[ORIG_TASK_PTR]])<br>
<br>
-// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc(%{{[^,]+}}, i32 [[GTID]], i32 1, i64 32, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[CAP_FN3:[^ ]+]] to i32 (i32, i8*)*))<br>
+// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc(%{{[^,]+}}, i32 [[GTID]], i32 1, i64 40, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[CAP_FN3:[^ ]+]] to i32 (i32, i8*)*))<br>
// CHECK: [[TASK_PTR:%.+]] = bitcast i8* [[ORIG_TASK_PTR]] to<br>
// CHECK: br i1 %{{.+}}, label %[[OMP_THEN:.+]], label %[[OMP_ELSE:.+]]<br>
// CHECK: [[OMP_THEN]]<br>
@@ -148,7 +148,7 @@ int main() {<br>
// CHECK: br label %[[OMP_END]]<br>
// CHECK: [[OMP_END]]<br>
<br>
-// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc(%{{[^,]+}}, i32 [[GTID]], i32 1, i64 32, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[CAP_FN4:[^ ]+]] to i32 (i32, i8*)*))<br>
+// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc(%{{[^,]+}}, i32 [[GTID]], i32 1, i64 40, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[CAP_FN4:[^ ]+]] to i32 (i32, i8*)*))<br>
// CHECK: [[TASK_PTR:%.+]] = bitcast i8* [[ORIG_TASK_PTR]] to<br>
// CHECK: br i1 %{{.+}}, label %[[OMP_THEN:.+]], label %[[OMP_ELSE:.+]]<br>
// CHECK: [[OMP_THEN]]<br>
@@ -162,7 +162,7 @@ int main() {<br>
// CHECK: br label %[[OMP_END]]<br>
// CHECK: [[OMP_END]]<br>
<br>
-// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc(%{{[^,]+}}, i32 [[GTID]], i32 1, i64 32, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[CAP_FN5:[^ ]+]] to i32 (i32, i8*)*))<br>
+// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc(%{{[^,]+}}, i32 [[GTID]], i32 1, i64 40, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[CAP_FN5:[^ ]+]] to i32 (i32, i8*)*))<br>
// CHECK: [[TASK_PTR:%.+]] = bitcast i8* [[ORIG_TASK_PTR]] to<br>
// CHECK: br i1 %{{.+}}, label %[[OMP_THEN:.+]], label %[[OMP_ELSE:.+]]<br>
// CHECK: [[OMP_THEN]]<br>
@@ -176,7 +176,7 @@ int main() {<br>
// CHECK: br label %[[OMP_END]]<br>
// CHECK: [[OMP_END]]<br>
<br>
-// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc(%{{[^,]+}}, i32 [[GTID]], i32 1, i64 32, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[CAP_FN6:[^ ]+]] to i32 (i32, i8*)*))<br>
+// CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc(%{{[^,]+}}, i32 [[GTID]], i32 1, i64 40, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[CAP_FN6:[^ ]+]] to i32 (i32, i8*)*))<br>
// CHECK: [[TASK_PTR:%.+]] = bitcast i8* [[ORIG_TASK_PTR]] to<br>
// CHECK: br i1 %{{.+}}, label %[[OMP_THEN:.+]], label %[[OMP_ELSE:.+]]<br>
// CHECK: [[OMP_THEN]]<br>
<br>
Modified: cfe/trunk/test/OpenMP/task_private_codegen.cpp<br>
URL: <a moz-do-not-send="true" href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/task_private_codegen.cpp?rev=271201&r1=271200&r2=271201&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/task_private_codegen.cpp?rev=271201&r1=271200&r2=271201&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/OpenMP/task_private_codegen.cpp (original)<br>
+++ cfe/trunk/test/OpenMP/task_private_codegen.cpp Mon May 30 04:06:50 2016<br>
@@ -24,7 +24,7 @@ struct S {<br>
<br>
volatile double g;<br>
<br>
-// CHECK-DAG: [[KMP_TASK_T_TY:%.+]] = type { i8*, i32 (i32, i8*)*, i32, i32 (i32, i8*)* }<br>
+// CHECK-DAG: [[KMP_TASK_T_TY:%.+]] = type { i8*, i32 (i32, i8*)*, i32, %union{{.+}}, %union{{.+}} }<br>
// CHECK-DAG: [[S_DOUBLE_TY:%.+]] = type { double }<br>
// CHECK-DAG: [[CAP_MAIN_TY:%.+]] = type { i8 }<br>
// CHECK-DAG: [[PRIVATES_MAIN_TY:%.+]] = type {{.?}}{ [2 x [[S_DOUBLE_TY]]], [[S_DOUBLE_TY]], i32, [2 x i32]<br>
@@ -56,7 +56,7 @@ int main() {<br>
// LAMBDA: call{{( x86_thiscallcc)?}} void [[<a class="moz-txt-link-abbreviated" href="mailto:OUTER_LAMBDA:@.+">OUTER_LAMBDA:@.+</a>]](<br>
[&]() {<br>
// LAMBDA: define{{.*}} internal{{.*}} void [[OUTER_LAMBDA]](<br>
- // LAMBDA: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 48, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
+ // LAMBDA: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 56, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
// LAMBDA: [[PRIVATES:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i{{.+}} 0, i{{.+}} 1<br>
// LAMBDA: call i32 @__kmpc_omp_task(%{{.+}}* @{{.+}}, i32 %{{.+}}, i8* [[RES]])<br>
// LAMBDA: ret<br>
@@ -92,7 +92,7 @@ int main() {<br>
// BLOCKS: call void {{%.+}}(i8<br>
^{<br>
// BLOCKS: define{{.*}} internal{{.*}} void {{.+}}(i8*<br>
- // BLOCKS: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 48, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
+ // BLOCKS: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 56, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
// BLOCKS: [[PRIVATES:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i{{.+}} 0, i{{.+}} 1<br>
// BLOCKS: call i32 @__kmpc_omp_task(%{{.+}}* @{{.+}}, i32 %{{.+}}, i8* [[RES]])<br>
// BLOCKS: ret<br>
@@ -158,7 +158,7 @@ int main() {<br>
// [[KMP_TASK_T_TY]] task_data;<br>
// [[KMP_TASK_MAIN_TY]] privates;<br>
// };<br>
-// CHECK: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc([[LOC]], i32 [[GTID]], i32 9, i64 72, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32, i8*)*))<br>
+// CHECK: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc([[LOC]], i32 [[GTID]], i32 9, i64 80, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32, i8*)*))<br>
// CHECK: [[RES_KMP_TASK:%.+]] = bitcast i8* [[RES]] to [[KMP_TASK_MAIN_TY]]*<br>
<br>
// CHECK: [[TASK:%.+]] = getelementptr inbounds [[KMP_TASK_MAIN_TY]], [[KMP_TASK_MAIN_TY]]* [[RES_KMP_TASK]], i{{[0-9]+}} 0, i{{[0-9]+}} 0<br>
@@ -182,7 +182,8 @@ int main() {<br>
<br>
// Provide pointer to destructor function, which will destroy private variables at the end of the task.<br>
// CHECK: [[DESTRUCTORS_REF:%.+]] = getelementptr inbounds [[KMP_TASK_T_TY]], [[KMP_TASK_T_TY]]* [[TASK]], i{{.+}} 0, i{{.+}} 3<br>
-// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_REF]],<br>
+// CHECK: [[DESTRUCTORS_PTR:%.+]] = bitcast %union{{.+}}* [[DESTRUCTORS_REF]] to i32 (i32, i8*)**<br>
+// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_PTR]],<br>
<br>
// Start task.<br>
// CHECK: call i32 @__kmpc_omp_task([[LOC]], i32 [[GTID]], i8* [[RES]])<br>
@@ -295,7 +296,8 @@ int main() {<br>
<br>
// Provide pointer to destructor function, which will destroy private variables at the end of the task.<br>
// CHECK: [[DESTRUCTORS_REF:%.+]] = getelementptr inbounds [[KMP_TASK_T_TY]], [[KMP_TASK_T_TY]]* [[TASK]], i{{.+}} 0, i{{.+}} 3<br>
-// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_TMAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_REF]],<br>
+// CHECK: [[DESTRUCTORS_PTR:%.+]] = bitcast %union{{.+}}* [[DESTRUCTORS_REF]] to i32 (i32, i8*)**<br>
+// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_TMAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_PTR]],<br>
<br>
// Start task.<br>
// CHECK: call i32 @__kmpc_omp_task([[LOC]], i32 [[GTID]], i8* [[RES]])<br>
<br>
Modified: cfe/trunk/test/OpenMP/taskloop_codegen.cpp<br>
URL: <a moz-do-not-send="true" href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_codegen.cpp?rev=271201&r1=271200&r2=271201&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_codegen.cpp?rev=271201&r1=271200&r2=271201&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/OpenMP/taskloop_codegen.cpp (original)<br>
+++ cfe/trunk/test/OpenMP/taskloop_codegen.cpp Mon May 30 04:06:50 2016<br>
@@ -9,32 +9,28 @@<br>
// CHECK-LABEL: @main<br>
int main(int argc, char **argv) {<br>
// CHECK: [[GTID:%.+]] = call i32 @__kmpc_global_thread_num(%ident_t* [[<a class="moz-txt-link-abbreviated" href="mailto:DEFLOC:@.+">DEFLOC:@.+</a>]])<br>
-// CHECK: [[TASKV:%.+]] = call i8* @__kmpc_omp_task_alloc(%ident_t* [[DEFLOC]], i32 [[GTID]], i32 33, i64 64, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, [[TDP_TY:%.+]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK1:@.+">TASK1:@.+</a>]] to i32 (i32,
i8*)*))<br>
+// CHECK: [[TASKV:%.+]] = call i8* @__kmpc_omp_task_alloc(%ident_t* [[DEFLOC]], i32 [[GTID]], i32 33, i64 72, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, [[TDP_TY:%.+]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK1:@.+">TASK1:@.+</a>]] to i32 (i32,
i8*)*))<br>
// CHECK: [[TASK:%.+]] = bitcast i8* [[TASKV]] to [[TDP_TY]]*<br>
// CHECK: [[TASK_DATA:%.+]] = getelementptr inbounds [[TDP_TY]], [[TDP_TY]]* [[TASK]], i32 0, i32 0<br>
-// CHECK: getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 3<br>
-// CHECK: store i32 (i32, i8*)* null, i32 (i32, i8*)** %{{.+}}<br>
-// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 4<br>
+// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 5<br>
// CHECK: store i64 0, i64* [[DOWN]],<br>
-// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 5<br>
+// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 6<br>
// CHECK: store i64 9, i64* [[UP]],<br>
-// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 6<br>
+// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 7<br>
// CHECK: store i64 1, i64* [[ST]],<br>
// CHECK: [[ST_VAL:%.+]] = load i64, i64* [[ST]],<br>
// CHECK: call void @__kmpc_taskloop(%ident_t* [[DEFLOC]], i32 [[GTID]], i8* [[TASKV]], i32 1, i64* [[DOWN]], i64* [[UP]], i64 [[ST_VAL]], i32 0, i32 0, i64 0, i8* null)<br>
#pragma omp taskloop priority(argc)<br>
for (int i = 0; i < 10; ++i)<br>
;<br>
-// CHECK: [[TASKV:%.+]] = call i8* @__kmpc_omp_task_alloc(%ident_t* [[DEFLOC]], i32 [[GTID]], i32 1, i64 64, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, [[TDP_TY:%.+]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK2:@.+">TASK2:@.+</a>]] to i32 (i32,
i8*)*))<br>
+// CHECK: [[TASKV:%.+]] = call i8* @__kmpc_omp_task_alloc(%ident_t* [[DEFLOC]], i32 [[GTID]], i32 1, i64 72, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, [[TDP_TY:%.+]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK2:@.+">TASK2:@.+</a>]] to i32 (i32,
i8*)*))<br>
// CHECK: [[TASK:%.+]] = bitcast i8* [[TASKV]] to [[TDP_TY]]*<br>
// CHECK: [[TASK_DATA:%.+]] = getelementptr inbounds [[TDP_TY]], [[TDP_TY]]* [[TASK]], i32 0, i32 0<br>
-// CHECK: getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 3<br>
-// CHECK: store i32 (i32, i8*)* null, i32 (i32, i8*)** %{{.+}}<br>
-// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 4<br>
+// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 5<br>
// CHECK: store i64 0, i64* [[DOWN]],<br>
-// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 5<br>
+// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 6<br>
// CHECK: store i64 9, i64* [[UP]],<br>
-// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 6<br>
+// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 7<br>
// CHECK: store i64 1, i64* [[ST]],<br>
// CHECK: [[ST_VAL:%.+]] = load i64, i64* [[ST]],<br>
// CHECK: [[GRAINSIZE:%.+]] = zext i32 %{{.+}} to i64<br>
@@ -42,18 +38,16 @@ int main(int argc, char **argv) {<br>
#pragma omp taskloop nogroup grainsize(argc)<br>
for (int i = 0; i < 10; ++i)<br>
;<br>
-// CHECK: [[TASKV:%.+]] = call i8* @__kmpc_omp_task_alloc(%ident_t* [[DEFLOC]], i32 [[GTID]], i32 1, i64 64, i64 24, i32 (i32, i8*)* bitcast (i32 (i32, [[TDP_TY:%.+]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK3:@.+">TASK3:@.+</a>]] to i32 (i32,
i8*)*))<br>
+// CHECK: [[TASKV:%.+]] = call i8* @__kmpc_omp_task_alloc(%ident_t* [[DEFLOC]], i32 [[GTID]], i32 1, i64 72, i64 24, i32 (i32, i8*)* bitcast (i32 (i32, [[TDP_TY:%.+]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK3:@.+">TASK3:@.+</a>]] to i32 (i32,
i8*)*))<br>
// CHECK: [[TASK:%.+]] = bitcast i8* [[TASKV]] to [[TDP_TY]]*<br>
// CHECK: [[TASK_DATA:%.+]] = getelementptr inbounds [[TDP_TY]], [[TDP_TY]]* [[TASK]], i32 0, i32 0<br>
-// CHECK: getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 3<br>
-// CHECK: store i32 (i32, i8*)* null, i32 (i32, i8*)** %{{.+}}<br>
// CHECK: [[IF:%.+]] = icmp ne i32 %{{.+}}, 0<br>
// CHECK: [[IF_INT:%.+]] = sext i1 [[IF]] to i32<br>
-// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 4<br>
+// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 5<br>
// CHECK: store i64 0, i64* [[DOWN]],<br>
-// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 5<br>
+// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 6<br>
// CHECK: store i64 %{{.+}}, i64* [[UP]],<br>
-// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 6<br>
+// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 7<br>
// CHECK: store i64 1, i64* [[ST]],<br>
// CHECK: [[ST_VAL:%.+]] = load i64, i64* [[ST]],<br>
// CHECK: call void @__kmpc_taskloop(%ident_t* [[DEFLOC]], i32 [[GTID]], i8* [[TASKV]], i32 [[IF_INT]], i64* [[DOWN]], i64* [[UP]], i64 [[ST_VAL]], i32 0, i32 2, i64 4, i8* null)<br>
@@ -65,13 +59,13 @@ int main(int argc, char **argv) {<br>
}<br>
<br>
// CHECK: define internal i32 [[TASK1]](<br>
-// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* %{{.+}}, i32 0, i32 4<br>
+// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* %{{.+}}, i32 0, i32 5<br>
// CHECK: [[DOWN_VAL:%.+]] = load i64, i64* [[DOWN]],<br>
-// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 5<br>
+// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 6<br>
// CHECK: [[UP_VAL:%.+]] = load i64, i64* [[UP]],<br>
-// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 6<br>
+// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 7<br>
// CHECK: [[ST_VAL:%.+]] = load i64, i64* [[ST]],<br>
-// CHECK: [[LITER:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 7<br>
+// CHECK: [[LITER:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 8<br>
// CHECK: [[LITER_VAL:%.+]] = load i32, i32* [[LITER]],<br>
// CHECK: store i64 [[DOWN_VAL]], i64* [[LB:%[^,]+]],<br>
// CHECK: store i64 [[UP_VAL]], i64* [[UB:%[^,]+]],<br>
@@ -95,13 +89,13 @@ int main(int argc, char **argv) {<br>
// CHECK: ret i32 0<br>
<br>
// CHECK: define internal i32 [[TASK2]](<br>
-// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* %{{.+}}, i32 0, i32 4<br>
+// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* %{{.+}}, i32 0, i32 5<br>
// CHECK: [[DOWN_VAL:%.+]] = load i64, i64* [[DOWN]],<br>
-// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 5<br>
+// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 6<br>
// CHECK: [[UP_VAL:%.+]] = load i64, i64* [[UP]],<br>
-// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 6<br>
+// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 7<br>
// CHECK: [[ST_VAL:%.+]] = load i64, i64* [[ST]],<br>
-// CHECK: [[LITER:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 7<br>
+// CHECK: [[LITER:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 8<br>
// CHECK: [[LITER_VAL:%.+]] = load i32, i32* [[LITER]],<br>
// CHECK: store i64 [[DOWN_VAL]], i64* [[LB:%[^,]+]],<br>
// CHECK: store i64 [[UP_VAL]], i64* [[UB:%[^,]+]],<br>
@@ -125,13 +119,13 @@ int main(int argc, char **argv) {<br>
// CHECK: ret i32 0<br>
<br>
// CHECK: define internal i32 [[TASK3]](<br>
-// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* %{{.+}}, i32 0, i32 4<br>
+// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* %{{.+}}, i32 0, i32 5<br>
// CHECK: [[DOWN_VAL:%.+]] = load i64, i64* [[DOWN]],<br>
-// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 5<br>
+// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 6<br>
// CHECK: [[UP_VAL:%.+]] = load i64, i64* [[UP]],<br>
-// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 6<br>
+// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 7<br>
// CHECK: [[ST_VAL:%.+]] = load i64, i64* [[ST]],<br>
-// CHECK: [[LITER:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 7<br>
+// CHECK: [[LITER:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 8<br>
// CHECK: [[LITER_VAL:%.+]] = load i32, i32* [[LITER]],<br>
// CHECK: store i64 [[DOWN_VAL]], i64* [[LB:%[^,]+]],<br>
// CHECK: store i64 [[UP_VAL]], i64* [[UB:%[^,]+]],<br>
@@ -147,16 +141,14 @@ struct S {<br>
int a;<br>
S(int c) {<br>
// CHECK: [[GTID:%.+]] = call i32 @__kmpc_global_thread_num(%ident_t* [[<a class="moz-txt-link-abbreviated" href="mailto:DEFLOC:@.+">DEFLOC:@.+</a>]])<br>
-// CHECK: [[TASKV:%.+]] = call i8* @__kmpc_omp_task_alloc(%ident_t* [[DEFLOC]], i32 [[GTID]], i32 1, i64 64, i64 16, i32 (i32, i8*)* bitcast (i32 (i32, [[TDP_TY:%.+]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK4:@.+">TASK4:@.+</a>]] to i32 (i32,
i8*)*))<br>
+// CHECK: [[TASKV:%.+]] = call i8* @__kmpc_omp_task_alloc(%ident_t* [[DEFLOC]], i32 [[GTID]], i32 1, i64 72, i64 16, i32 (i32, i8*)* bitcast (i32 (i32, [[TDP_TY:%.+]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK4:@.+">TASK4:@.+</a>]] to i32 (i32,
i8*)*))<br>
// CHECK: [[TASK:%.+]] = bitcast i8* [[TASKV]] to [[TDP_TY]]*<br>
// CHECK: [[TASK_DATA:%.+]] = getelementptr inbounds [[TDP_TY]], [[TDP_TY]]* [[TASK]], i32 0, i32 0<br>
-// CHECK: getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 3<br>
-// CHECK: store i32 (i32, i8*)* null, i32 (i32, i8*)** %{{.+}}<br>
-// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 4<br>
+// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 5<br>
// CHECK: store i64 0, i64* [[DOWN]],<br>
-// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 5<br>
+// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 6<br>
// CHECK: store i64 %{{.+}}, i64* [[UP]],<br>
-// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 6<br>
+// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 7<br>
// CHECK: store i64 1, i64* [[ST]],<br>
// CHECK: [[ST_VAL:%.+]] = load i64, i64* [[ST]],<br>
// CHECK: [[NUM_TASKS:%.+]] = zext i32 %{{.+}} to i64<br>
@@ -168,13 +160,13 @@ struct S {<br>
} s(1);<br>
<br>
// CHECK: define internal i32 [[TASK4]](<br>
-// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* %{{.+}}, i32 0, i32 4<br>
+// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* %{{.+}}, i32 0, i32 5<br>
// CHECK: [[DOWN_VAL:%.+]] = load i64, i64* [[DOWN]],<br>
-// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 5<br>
+// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 6<br>
// CHECK: [[UP_VAL:%.+]] = load i64, i64* [[UP]],<br>
-// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 6<br>
+// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 7<br>
// CHECK: [[ST_VAL:%.+]] = load i64, i64* [[ST]],<br>
-// CHECK: [[LITER:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 7<br>
+// CHECK: [[LITER:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 8<br>
// CHECK: [[LITER_VAL:%.+]] = load i32, i32* [[LITER]],<br>
// CHECK: store i64 [[DOWN_VAL]], i64* [[LB:%[^,]+]],<br>
// CHECK: store i64 [[UP_VAL]], i64* [[UB:%[^,]+]],<br>
<br>
Modified: cfe/trunk/test/OpenMP/taskloop_firstprivate_codegen.cpp<br>
URL: <a moz-do-not-send="true" href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_firstprivate_codegen.cpp?rev=271201&r1=271200&r2=271201&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_firstprivate_codegen.cpp?rev=271201&r1=271200&r2=271201&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/OpenMP/taskloop_firstprivate_codegen.cpp (original)<br>
+++ cfe/trunk/test/OpenMP/taskloop_firstprivate_codegen.cpp Mon May 30 04:06:50 2016<br>
@@ -24,7 +24,7 @@ struct S {<br>
<br>
volatile double g;<br>
<br>
-// CHECK-DAG: [[KMP_TASK_T_TY:%.+]] = type { i8*, i32 (i32, i8*)*, i32, i32 (i32, i8*)*, i64, i64, i64, i32 }<br>
+// CHECK-DAG: [[KMP_TASK_T_TY:%.+]] = type { i8*, i32 (i32, i8*)*, i32, %union{{.+}}, %union{{.+}}, i64, i64, i64, i32 }<br>
// CHECK-DAG: [[S_DOUBLE_TY:%.+]] = type { double }<br>
// CHECK-DAG: [[PRIVATES_MAIN_TY:%.+]] = type {{.?}}{ [2 x [[S_DOUBLE_TY]]], [[S_DOUBLE_TY]], i32, [2 x i32]<br>
// CHECK-DAG: [[CAP_MAIN_TY:%.+]] = type {{.*}}{ [2 x i32]*, i32, {{.*}}[2 x [[S_DOUBLE_TY]]]*, [[S_DOUBLE_TY]]*, i{{[0-9]+}}<br>
@@ -58,7 +58,7 @@ int main() {<br>
// LAMBDA: call{{( x86_thiscallcc)?}} void [[<a class="moz-txt-link-abbreviated" href="mailto:OUTER_LAMBDA:@.+">OUTER_LAMBDA:@.+</a>]](<br>
[&]() {<br>
// LAMBDA: define{{.*}} internal{{.*}} void [[OUTER_LAMBDA]](<br>
- // LAMBDA: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 80, i64 16, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
+ // LAMBDA: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 88, i64 16, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
// LAMBDA: [[PRIVATES:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i{{.+}} 0, i{{.+}} 1<br>
// LAMBDA: [[G_PRIVATE_ADDR:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* [[PRIVATES]], i{{.+}} 0, i{{.+}} 0<br>
// LAMBDA: [[G_ADDR_REF:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i{{.+}} 0, i{{.+}} 0<br>
@@ -102,7 +102,7 @@ int main() {<br>
// BLOCKS: call void {{%.+}}(i8<br>
^{<br>
// BLOCKS: define{{.*}} internal{{.*}} void {{.+}}(i8*<br>
- // BLOCKS: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 80, i64 16, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
+ // BLOCKS: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 88, i64 16, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
// BLOCKS: [[PRIVATES:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i{{.+}} 0, i{{.+}} 1<br>
// BLOCKS: [[G_PRIVATE_ADDR:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* [[PRIVATES]], i{{.+}} 0, i{{.+}} 0<br>
// BLOCKS: [[G_ADDR_REF:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i{{.+}} 0, i{{.+}} 0<br>
@@ -191,7 +191,7 @@ int main() {<br>
// [[KMP_TASK_T]] task_data;<br>
// [[KMP_TASK_MAIN_TY]] privates;<br>
// };<br>
-// CHECK: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc([[LOC]], i32 [[GTID]], i32 9, i64 104, i64 40, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32, i8*)*))<br>
+// CHECK: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc([[LOC]], i32 [[GTID]], i32 9, i64 112, i64 40, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32, i8*)*))<br>
// CHECK: [[RES_KMP_TASK:%.+]] = bitcast i8* [[RES]] to [[KMP_TASK_MAIN_TY]]*<br>
<br>
// Fill kmp_task_t->shareds by copying from original capture argument.<br>
@@ -242,7 +242,8 @@ int main() {<br>
<br>
// Provide pointer to destructor function, which will destroy private variables at the end of the task.<br>
// CHECK: [[DESTRUCTORS_REF:%.+]] = getelementptr inbounds [[KMP_TASK_T_TY]], [[KMP_TASK_T_TY]]* [[TASK]], i{{.+}} 0, i{{.+}} 3<br>
-// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_REF]],<br>
+// CHECK: [[DESTRUCTORS_PTR:%.+]] = bitcast %union{{.+}}* [[DESTRUCTORS_REF]] to i32 (i32, i8*)**<br>
+// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_PTR]],<br>
<br>
// Start task.<br>
// CHECK: call void @__kmpc_taskloop([[LOC]], i32 [[GTID]], i8* [[RES]], i32 1, i64* %{{.+}}, i64* %{{.+}}, i64 %{{.+}}, i32 0, i32 0, i64 0, i8* bitcast (void ([[KMP_TASK_MAIN_TY]]*, [[KMP_TASK_MAIN_TY]]*, i32)* [[<a class="moz-txt-link-abbreviated" href="mailto:MAIN_DUP:@.+">MAIN_DUP:@.+</a>]]
to i8*))<br>
@@ -404,7 +405,8 @@ int main() {<br>
<br>
// Provide pointer to destructor function, which will destroy private variables at the end of the task.<br>
// CHECK: [[DESTRUCTORS_REF:%.+]] = getelementptr inbounds [[KMP_TASK_T_TY]], [[KMP_TASK_T_TY]]* [[TASK]], i{{.+}} 0, i{{.+}} 3<br>
-// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_TMAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_REF]],<br>
+// CHECK: [[DESTRUCTORS_PTR:%.+]] = bitcast %union{{.+}}* [[DESTRUCTORS_REF]] to i32 (i32, i8*)**<br>
+// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_TMAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_PTR]],<br>
<br>
// Start task.<br>
// CHECK: call void @__kmpc_taskloop([[LOC]], i32 [[GTID]], i8* [[RES]], i32 1, i64* %{{.+}}, i64* %{{.+}}, i64 %{{.+}}, i32 0, i32 0, i64 0, i8* bitcast (void ([[KMP_TASK_TMAIN_TY]]*, [[KMP_TASK_TMAIN_TY]]*, i32)* [[<a class="moz-txt-link-abbreviated" href="mailto:TMAIN_DUP:@.+">TMAIN_DUP:@.+</a>]]
to i8*))<br>
<br>
Modified: cfe/trunk/test/OpenMP/taskloop_lastprivate_codegen.cpp<br>
URL: <a moz-do-not-send="true" href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_lastprivate_codegen.cpp?rev=271201&r1=271200&r2=271201&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_lastprivate_codegen.cpp?rev=271201&r1=271200&r2=271201&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/OpenMP/taskloop_lastprivate_codegen.cpp (original)<br>
+++ cfe/trunk/test/OpenMP/taskloop_lastprivate_codegen.cpp Mon May 30 04:06:50 2016<br>
@@ -24,7 +24,7 @@ struct S {<br>
<br>
volatile double g;<br>
<br>
-// CHECK-DAG: [[KMP_TASK_T_TY:%.+]] = type { i8*, i32 (i32, i8*)*, i32, i32 (i32, i8*)*, i64, i64, i64, i32 }<br>
+// CHECK-DAG: [[KMP_TASK_T_TY:%.+]] = type { i8*, i32 (i32, i8*)*, i32, %union{{.+}}, %union{{.+}}, i64, i64, i64, i32 }<br>
// CHECK-DAG: [[S_DOUBLE_TY:%.+]] = type { double }<br>
// CHECK-DAG: [[PRIVATES_MAIN_TY:%.+]] = type {{.?}}{ [2 x [[S_DOUBLE_TY]]], [[S_DOUBLE_TY]], i32, [2 x i32]<br>
// CHECK-DAG: [[CAP_MAIN_TY:%.+]] = type { [2 x i32]*, i32*, [2 x [[S_DOUBLE_TY]]]*, [[S_DOUBLE_TY]]*, i{{[0-9]+}}* }<br>
@@ -58,7 +58,7 @@ int main() {<br>
// LAMBDA: call{{( x86_thiscallcc)?}} void [[<a class="moz-txt-link-abbreviated" href="mailto:OUTER_LAMBDA:@.+">OUTER_LAMBDA:@.+</a>]](<br>
[&]() {<br>
// LAMBDA: define{{.*}} internal{{.*}} void [[OUTER_LAMBDA]](<br>
- // LAMBDA: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 80, i64 16, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
+ // LAMBDA: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 88, i64 16, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
// LAMBDA: [[PRIVATES:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i{{.+}} 0, i{{.+}} 1<br>
<br>
// LAMBDA: call void @__kmpc_taskloop(%{{.+}}* @{{.+}}, i32 %{{.+}}, i8* [[RES]], i32 1, i64* %{{.+}}, i64* %{{.+}}, i64 %{{.+}}, i32 0, i32 0, i64 0, i8* bitcast (void ([[KMP_TASK_MAIN_TY:%[^*]+]]*, [[KMP_TASK_MAIN_TY]]*, i32)* [[<a class="moz-txt-link-abbreviated" href="mailto:MAIN_DUP:@.+">MAIN_DUP:@.+</a>]]
to i8*))<br>
@@ -99,7 +99,7 @@ int main() {<br>
// BLOCKS: call void {{%.+}}(i8<br>
^{<br>
// BLOCKS: define{{.*}} internal{{.*}} void {{.+}}(i8*<br>
- // BLOCKS: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 80, i64 16, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
+ // BLOCKS: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 88, i64 16, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
// BLOCKS: [[PRIVATES:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i{{.+}} 0, i{{.+}} 1<br>
// BLOCKS: call void @__kmpc_taskloop(%{{.+}}* @{{.+}}, i32 %{{.+}}, i8* [[RES]], i32 1, i64* %{{.+}}, i64* %{{.+}}, i64 %{{.+}}, i32 0, i32 0, i64 0, i8* bitcast (void ([[KMP_TASK_MAIN_TY:%[^*]+]]*, [[KMP_TASK_MAIN_TY]]*, i32)* [[<a class="moz-txt-link-abbreviated" href="mailto:MAIN_DUP:@.+">MAIN_DUP:@.+</a>]]
to i8*))<br>
// BLOCKS: ret<br>
@@ -183,7 +183,7 @@ int main() {<br>
// [[KMP_TASK_T]] task_data;<br>
// [[KMP_TASK_MAIN_TY]] privates;<br>
// };<br>
-// CHECK: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc([[LOC]], i32 [[GTID]], i32 9, i64 104, i64 40, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32, i8*)*))<br>
+// CHECK: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc([[LOC]], i32 [[GTID]], i32 9, i64 112, i64 40, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32, i8*)*))<br>
// CHECK: [[RES_KMP_TASK:%.+]] = bitcast i8* [[RES]] to [[KMP_TASK_MAIN_TY]]*<br>
<br>
// Fill kmp_task_t->shareds by copying from original capture argument.<br>
@@ -215,7 +215,8 @@ int main() {<br>
<br>
// Provide pointer to destructor function, which will destroy private variables at the end of the task.<br>
// CHECK: [[DESTRUCTORS_REF:%.+]] = getelementptr inbounds [[KMP_TASK_T_TY]], [[KMP_TASK_T_TY]]* [[TASK]], i{{.+}} 0, i{{.+}} 3<br>
-// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_REF]],<br>
+// CHECK: [[DESTRUCTORS_PTR:%.+]] = bitcast %union{{.+}}* [[DESTRUCTORS_REF]] to i32 (i32, i8*)**<br>
+// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_PTR]],<br>
<br>
// Start task.<br>
// CHECK: call void @__kmpc_taskloop([[LOC]], i32 [[GTID]], i8* [[RES]], i32 1, i64* %{{.+}}, i64* %{{.+}}, i64 %{{.+}}, i32 0, i32 0, i64 0, i8* bitcast (void ([[KMP_TASK_MAIN_TY]]*, [[KMP_TASK_MAIN_TY]]*, i32)* [[<a class="moz-txt-link-abbreviated" href="mailto:MAIN_DUP:@.+">MAIN_DUP:@.+</a>]]
to i8*))<br>
@@ -298,7 +299,7 @@ int main() {<br>
<br>
// CHECK: define internal void [[MAIN_DUP]]([[KMP_TASK_MAIN_TY]]*, [[KMP_TASK_MAIN_TY]]*, i32)<br>
// CHECK: getelementptr inbounds [[KMP_TASK_MAIN_TY]], [[KMP_TASK_MAIN_TY]]* %{{.+}}, i32 0, i32 0<br>
-// CHECK: getelementptr inbounds [[KMP_TASK_T_TY]], [[KMP_TASK_T_TY]]* %{{.+}}, i32 0, i32 7<br>
+// CHECK: getelementptr inbounds [[KMP_TASK_T_TY]], [[KMP_TASK_T_TY]]* %{{.+}}, i32 0, i32 8<br>
// CHECK: load i32, i32* %<br>
// CHECK: store i32 %{{.+}}, i32* %<br>
// CHECK: getelementptr inbounds [[KMP_TASK_MAIN_TY]], [[KMP_TASK_MAIN_TY]]* %{{.+}}, i32 0, i32 1<br>
@@ -388,7 +389,8 @@ int main() {<br>
<br>
// Provide pointer to destructor function, which will destroy private variables at the end of the task.<br>
// CHECK: [[DESTRUCTORS_REF:%.+]] = getelementptr inbounds [[KMP_TASK_T_TY]], [[KMP_TASK_T_TY]]* [[TASK]], i{{.+}} 0, i{{.+}} 3<br>
-// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_TMAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_REF]],<br>
+// CHECK: [[DESTRUCTORS_PTR:%.+]] = bitcast %union{{.+}}* [[DESTRUCTORS_REF]] to i32 (i32, i8*)**<br>
+// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_TMAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_PTR]],<br>
<br>
// Start task.<br>
// CHECK: call void @__kmpc_taskloop([[LOC]], i32 [[GTID]], i8* [[RES]], i32 1, i64* %{{.+}}, i64* %{{.+}}, i64 %{{.+}}, i32 0, i32 0, i64 0, i8* bitcast (void ([[KMP_TASK_TMAIN_TY]]*, [[KMP_TASK_TMAIN_TY]]*, i32)* [[<a class="moz-txt-link-abbreviated" href="mailto:TMAIN_DUP:@.+">TMAIN_DUP:@.+</a>]]
to i8*))<br>
@@ -459,7 +461,7 @@ int main() {<br>
<br>
// CHECK: define internal void [[TMAIN_DUP]]([[KMP_TASK_TMAIN_TY]]*, [[KMP_TASK_TMAIN_TY]]*, i32)<br>
// CHECK: getelementptr inbounds [[KMP_TASK_TMAIN_TY]], [[KMP_TASK_TMAIN_TY]]* %{{.+}}, i32 0, i32 0<br>
-// CHECK: getelementptr inbounds [[KMP_TASK_T_TY]], [[KMP_TASK_T_TY]]* %{{.+}}, i32 0, i32 7<br>
+// CHECK: getelementptr inbounds [[KMP_TASK_T_TY]], [[KMP_TASK_T_TY]]* %{{.+}}, i32 0, i32 8<br>
// CHECK: load i32, i32* %<br>
// CHECK: store i32 %{{.+}}, i32* %<br>
// CHECK: getelementptr inbounds [[KMP_TASK_TMAIN_TY]], [[KMP_TASK_TMAIN_TY]]* %{{.+}}, i32 0, i32 2<br>
<br>
Modified: cfe/trunk/test/OpenMP/taskloop_private_codegen.cpp<br>
URL: <a moz-do-not-send="true" href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_private_codegen.cpp?rev=271201&r1=271200&r2=271201&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_private_codegen.cpp?rev=271201&r1=271200&r2=271201&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/OpenMP/taskloop_private_codegen.cpp (original)<br>
+++ cfe/trunk/test/OpenMP/taskloop_private_codegen.cpp Mon May 30 04:06:50 2016<br>
@@ -24,7 +24,7 @@ struct S {<br>
<br>
volatile double g;<br>
<br>
-// CHECK-DAG: [[KMP_TASK_T_TY:%.+]] = type { i8*, i32 (i32, i8*)*, i32, i32 (i32, i8*)*, i64, i64, i64, i32 }<br>
+// CHECK-DAG: [[KMP_TASK_T_TY:%.+]] = type { i8*, i32 (i32, i8*)*, i32, %union{{.+}}, %union{{.+}}, i64, i64, i64, i32 }<br>
// CHECK-DAG: [[S_DOUBLE_TY:%.+]] = type { double }<br>
// CHECK-DAG: [[CAP_MAIN_TY:%.+]] = type { i8 }<br>
// CHECK-DAG: [[PRIVATES_MAIN_TY:%.+]] = type {{.?}}{ [2 x [[S_DOUBLE_TY]]], [[S_DOUBLE_TY]], i32, [2 x i32]<br>
@@ -56,7 +56,7 @@ int main() {<br>
// LAMBDA: call{{( x86_thiscallcc)?}} void [[<a class="moz-txt-link-abbreviated" href="mailto:OUTER_LAMBDA:@.+">OUTER_LAMBDA:@.+</a>]](<br>
[&]() {<br>
// LAMBDA: define{{.*}} internal{{.*}} void [[OUTER_LAMBDA]](<br>
- // LAMBDA: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 80, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
+ // LAMBDA: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 88, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
// LAMBDA: [[PRIVATES:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i{{.+}} 0, i{{.+}} 1<br>
// LAMBDA: call void @__kmpc_taskloop(%{{.+}}* @{{.+}}, i32 %{{.+}}, i8* [[RES]], i32 1, i64* %{{.+}}, i64* %{{.+}}, i64 %{{.+}}, i32 0, i32 0, i64 0, i8* null)<br>
// LAMBDA: ret<br>
@@ -92,7 +92,7 @@ int main() {<br>
// BLOCKS: call void {{%.+}}(i8<br>
^{<br>
// BLOCKS: define{{.*}} internal{{.*}} void {{.+}}(i8*<br>
- // BLOCKS: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 80, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
+ // BLOCKS: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 88, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
// BLOCKS: [[PRIVATES:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i{{.+}} 0, i{{.+}} 1<br>
// BLOCKS: call void @__kmpc_taskloop(%{{.+}}* @{{.+}}, i32 %{{.+}}, i8* [[RES]], i32 1, i64* %{{.+}}, i64* %{{.+}}, i64 %{{.+}}, i32 0, i32 0, i64 0, i8* null)<br>
// BLOCKS: ret<br>
@@ -158,7 +158,7 @@ int main() {<br>
// [[KMP_TASK_T_TY]] task_data;<br>
// [[KMP_TASK_MAIN_TY]] privates;<br>
// };<br>
-// CHECK: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc([[LOC]], i32 [[GTID]], i32 9, i64 104, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32, i8*)*))<br>
+// CHECK: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc([[LOC]], i32 [[GTID]], i32 9, i64 112, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32, i8*)*))<br>
// CHECK: [[RES_KMP_TASK:%.+]] = bitcast i8* [[RES]] to [[KMP_TASK_MAIN_TY]]*<br>
<br>
// CHECK: [[TASK:%.+]] = getelementptr inbounds [[KMP_TASK_MAIN_TY]], [[KMP_TASK_MAIN_TY]]* [[RES_KMP_TASK]], i{{[0-9]+}} 0, i{{[0-9]+}} 0<br>
@@ -182,7 +182,8 @@ int main() {<br>
<br>
// Provide pointer to destructor function, which will destroy private variables at the end of the task.<br>
// CHECK: [[DESTRUCTORS_REF:%.+]] = getelementptr inbounds [[KMP_TASK_T_TY]], [[KMP_TASK_T_TY]]* [[TASK]], i{{.+}} 0, i{{.+}} 3<br>
-// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_REF]],<br>
+// CHECK: [[DESTRUCTORS_PTR:%.+]] = bitcast %union{{.+}}* [[DESTRUCTORS_REF]] to i32 (i32, i8*)**<br>
+// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_PTR]],<br>
<br>
// Start task.<br>
// CHECK: call void @__kmpc_taskloop([[LOC]], i32 [[GTID]], i8* [[RES]], i32 1, i64* %{{.+}}, i64* %{{.+}}, i64 %{{.+}}, i32 0, i32 0, i64 0, i8* bitcast (void ([[KMP_TASK_MAIN_TY]]*, [[KMP_TASK_MAIN_TY]]*, i32)* [[<a class="moz-txt-link-abbreviated" href="mailto:MAIN_DUP:@.+">MAIN_DUP:@.+</a>]]
to i8*))<br>
@@ -312,7 +313,8 @@ int main() {<br>
<br>
// Provide pointer to destructor function, which will destroy private variables at the end of the task.<br>
// CHECK: [[DESTRUCTORS_REF:%.+]] = getelementptr inbounds [[KMP_TASK_T_TY]], [[KMP_TASK_T_TY]]* [[TASK]], i{{.+}} 0, i{{.+}} 3<br>
-// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_TMAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_REF]],<br>
+// CHECK: [[DESTRUCTORS_PTR:%.+]] = bitcast %union{{.+}}* [[DESTRUCTORS_REF]] to i32 (i32, i8*)**<br>
+// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_TMAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_PTR]],<br>
<br>
// Start task.<br>
// CHECK: call void @__kmpc_taskloop([[LOC]], i32 [[GTID]], i8* [[RES]], i32 1, i64* %{{.+}}, i64* %{{.+}}, i64 %{{.+}}, i32 0, i32 0, i64 0, i8* bitcast (void ([[KMP_TASK_TMAIN_TY]]*, [[KMP_TASK_TMAIN_TY]]*, i32)* [[<a class="moz-txt-link-abbreviated" href="mailto:TMAIN_DUP:@.+">TMAIN_DUP:@.+</a>]]
to i8*))<br>
<br>
Modified: cfe/trunk/test/OpenMP/taskloop_simd_codegen.cpp<br>
URL: <a moz-do-not-send="true" href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_simd_codegen.cpp?rev=271201&r1=271200&r2=271201&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_simd_codegen.cpp?rev=271201&r1=271200&r2=271201&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/OpenMP/taskloop_simd_codegen.cpp (original)<br>
+++ cfe/trunk/test/OpenMP/taskloop_simd_codegen.cpp Mon May 30 04:06:50 2016<br>
@@ -9,32 +9,28 @@<br>
// CHECK-LABEL: @main<br>
int main(int argc, char **argv) {<br>
// CHECK: [[GTID:%.+]] = call i32 @__kmpc_global_thread_num(%ident_t* [[<a class="moz-txt-link-abbreviated" href="mailto:DEFLOC:@.+">DEFLOC:@.+</a>]])<br>
-// CHECK: [[TASKV:%.+]] = call i8* @__kmpc_omp_task_alloc(%ident_t* [[DEFLOC]], i32 [[GTID]], i32 33, i64 64, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, [[TDP_TY:%.+]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK1:@.+">TASK1:@.+</a>]] to i32 (i32,
i8*)*))<br>
+// CHECK: [[TASKV:%.+]] = call i8* @__kmpc_omp_task_alloc(%ident_t* [[DEFLOC]], i32 [[GTID]], i32 33, i64 72, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, [[TDP_TY:%.+]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK1:@.+">TASK1:@.+</a>]] to i32 (i32,
i8*)*))<br>
// CHECK: [[TASK:%.+]] = bitcast i8* [[TASKV]] to [[TDP_TY]]*<br>
// CHECK: [[TASK_DATA:%.+]] = getelementptr inbounds [[TDP_TY]], [[TDP_TY]]* [[TASK]], i32 0, i32 0<br>
-// CHECK: getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 3<br>
-// CHECK: store i32 (i32, i8*)* null, i32 (i32, i8*)** %{{.+}}<br>
-// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 4<br>
+// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 5<br>
// CHECK: store i64 0, i64* [[DOWN]],<br>
-// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 5<br>
+// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 6<br>
// CHECK: store i64 9, i64* [[UP]],<br>
-// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 6<br>
+// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 7<br>
// CHECK: store i64 1, i64* [[ST]],<br>
// CHECK: [[ST_VAL:%.+]] = load i64, i64* [[ST]],<br>
// CHECK: call void @__kmpc_taskloop(%ident_t* [[DEFLOC]], i32 [[GTID]], i8* [[TASKV]], i32 1, i64* [[DOWN]], i64* [[UP]], i64 [[ST_VAL]], i32 0, i32 0, i64 0, i8* null)<br>
#pragma omp taskloop simd priority(argc)<br>
for (int i = 0; i < 10; ++i)<br>
;<br>
-// CHECK: [[TASKV:%.+]] = call i8* @__kmpc_omp_task_alloc(%ident_t* [[DEFLOC]], i32 [[GTID]], i32 1, i64 64, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, [[TDP_TY:%.+]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK2:@.+">TASK2:@.+</a>]] to i32 (i32,
i8*)*))<br>
+// CHECK: [[TASKV:%.+]] = call i8* @__kmpc_omp_task_alloc(%ident_t* [[DEFLOC]], i32 [[GTID]], i32 1, i64 72, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, [[TDP_TY:%.+]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK2:@.+">TASK2:@.+</a>]] to i32 (i32,
i8*)*))<br>
// CHECK: [[TASK:%.+]] = bitcast i8* [[TASKV]] to [[TDP_TY]]*<br>
// CHECK: [[TASK_DATA:%.+]] = getelementptr inbounds [[TDP_TY]], [[TDP_TY]]* [[TASK]], i32 0, i32 0<br>
-// CHECK: getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 3<br>
-// CHECK: store i32 (i32, i8*)* null, i32 (i32, i8*)** %{{.+}}<br>
-// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 4<br>
+// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 5<br>
// CHECK: store i64 0, i64* [[DOWN]],<br>
-// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 5<br>
+// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 6<br>
// CHECK: store i64 9, i64* [[UP]],<br>
-// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 6<br>
+// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 7<br>
// CHECK: store i64 1, i64* [[ST]],<br>
// CHECK: [[ST_VAL:%.+]] = load i64, i64* [[ST]],<br>
// CHECK: [[GRAINSIZE:%.+]] = zext i32 %{{.+}} to i64<br>
@@ -42,18 +38,16 @@ int main(int argc, char **argv) {<br>
#pragma omp taskloop simd nogroup grainsize(argc) simdlen(4)<br>
for (int i = 0; i < 10; ++i)<br>
;<br>
-// CHECK: [[TASKV:%.+]] = call i8* @__kmpc_omp_task_alloc(%ident_t* [[DEFLOC]], i32 [[GTID]], i32 1, i64 64, i64 24, i32 (i32, i8*)* bitcast (i32 (i32, [[TDP_TY:%.+]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK3:@.+">TASK3:@.+</a>]] to i32 (i32,
i8*)*))<br>
+// CHECK: [[TASKV:%.+]] = call i8* @__kmpc_omp_task_alloc(%ident_t* [[DEFLOC]], i32 [[GTID]], i32 1, i64 72, i64 24, i32 (i32, i8*)* bitcast (i32 (i32, [[TDP_TY:%.+]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK3:@.+">TASK3:@.+</a>]] to i32 (i32,
i8*)*))<br>
// CHECK: [[TASK:%.+]] = bitcast i8* [[TASKV]] to [[TDP_TY]]*<br>
// CHECK: [[TASK_DATA:%.+]] = getelementptr inbounds [[TDP_TY]], [[TDP_TY]]* [[TASK]], i32 0, i32 0<br>
-// CHECK: getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 3<br>
-// CHECK: store i32 (i32, i8*)* null, i32 (i32, i8*)** %{{.+}}<br>
// CHECK: [[IF:%.+]] = icmp ne i32 %{{.+}}, 0<br>
// CHECK: [[IF_INT:%.+]] = sext i1 [[IF]] to i32<br>
-// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 4<br>
+// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 5<br>
// CHECK: store i64 0, i64* [[DOWN]],<br>
-// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 5<br>
+// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 6<br>
// CHECK: store i64 %{{.+}}, i64* [[UP]],<br>
-// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 6<br>
+// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 7<br>
// CHECK: store i64 1, i64* [[ST]],<br>
// CHECK: [[ST_VAL:%.+]] = load i64, i64* [[ST]],<br>
// CHECK: call void @__kmpc_taskloop(%ident_t* [[DEFLOC]], i32 [[GTID]], i8* [[TASKV]], i32 [[IF_INT]], i64* [[DOWN]], i64* [[UP]], i64 [[ST_VAL]], i32 0, i32 2, i64 4, i8* null)<br>
@@ -65,13 +59,13 @@ int main(int argc, char **argv) {<br>
}<br>
<br>
// CHECK: define internal i32 [[TASK1]](<br>
-// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* %{{.+}}, i32 0, i32 4<br>
+// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* %{{.+}}, i32 0, i32 5<br>
// CHECK: [[DOWN_VAL:%.+]] = load i64, i64* [[DOWN]],<br>
-// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 5<br>
+// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 6<br>
// CHECK: [[UP_VAL:%.+]] = load i64, i64* [[UP]],<br>
-// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 6<br>
+// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 7<br>
// CHECK: [[ST_VAL:%.+]] = load i64, i64* [[ST]],<br>
-// CHECK: [[LITER:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 7<br>
+// CHECK: [[LITER:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 8<br>
// CHECK: [[LITER_VAL:%.+]] = load i32, i32* [[LITER]],<br>
// CHECK: store i64 [[DOWN_VAL]], i64* [[LB:%[^,]+]],<br>
// CHECK: store i64 [[UP_VAL]], i64* [[UB:%[^,]+]],<br>
@@ -95,13 +89,13 @@ int main(int argc, char **argv) {<br>
// CHECK: ret i32 0<br>
<br>
// CHECK: define internal i32 [[TASK2]](<br>
-// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* %{{.+}}, i32 0, i32 4<br>
+// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* %{{.+}}, i32 0, i32 5<br>
// CHECK: [[DOWN_VAL:%.+]] = load i64, i64* [[DOWN]],<br>
-// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 5<br>
+// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 6<br>
// CHECK: [[UP_VAL:%.+]] = load i64, i64* [[UP]],<br>
-// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 6<br>
+// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 7<br>
// CHECK: [[ST_VAL:%.+]] = load i64, i64* [[ST]],<br>
-// CHECK: [[LITER:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 7<br>
+// CHECK: [[LITER:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 8<br>
// CHECK: [[LITER_VAL:%.+]] = load i32, i32* [[LITER]],<br>
// CHECK: store i64 [[DOWN_VAL]], i64* [[LB:%[^,]+]],<br>
// CHECK: store i64 [[UP_VAL]], i64* [[UB:%[^,]+]],<br>
@@ -125,13 +119,13 @@ int main(int argc, char **argv) {<br>
// CHECK: ret i32 0<br>
<br>
// CHECK: define internal i32 [[TASK3]](<br>
-// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* %{{.+}}, i32 0, i32 4<br>
+// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* %{{.+}}, i32 0, i32 5<br>
// CHECK: [[DOWN_VAL:%.+]] = load i64, i64* [[DOWN]],<br>
-// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 5<br>
+// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 6<br>
// CHECK: [[UP_VAL:%.+]] = load i64, i64* [[UP]],<br>
-// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 6<br>
+// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 7<br>
// CHECK: [[ST_VAL:%.+]] = load i64, i64* [[ST]],<br>
-// CHECK: [[LITER:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 7<br>
+// CHECK: [[LITER:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 8<br>
// CHECK: [[LITER_VAL:%.+]] = load i32, i32* [[LITER]],<br>
// CHECK: store i64 [[DOWN_VAL]], i64* [[LB:%[^,]+]],<br>
// CHECK: store i64 [[UP_VAL]], i64* [[UB:%[^,]+]],<br>
@@ -149,16 +143,14 @@ struct S {<br>
int a;<br>
S(int c) {<br>
// CHECK: [[GTID:%.+]] = call i32 @__kmpc_global_thread_num(%ident_t* [[<a class="moz-txt-link-abbreviated" href="mailto:DEFLOC:@.+">DEFLOC:@.+</a>]])<br>
-// CHECK: [[TASKV:%.+]] = call i8* @__kmpc_omp_task_alloc(%ident_t* [[DEFLOC]], i32 [[GTID]], i32 1, i64 64, i64 16, i32 (i32, i8*)* bitcast (i32 (i32, [[TDP_TY:%.+]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK4:@.+">TASK4:@.+</a>]] to i32 (i32,
i8*)*))<br>
+// CHECK: [[TASKV:%.+]] = call i8* @__kmpc_omp_task_alloc(%ident_t* [[DEFLOC]], i32 [[GTID]], i32 1, i64 72, i64 16, i32 (i32, i8*)* bitcast (i32 (i32, [[TDP_TY:%.+]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:TASK4:@.+">TASK4:@.+</a>]] to i32 (i32,
i8*)*))<br>
// CHECK: [[TASK:%.+]] = bitcast i8* [[TASKV]] to [[TDP_TY]]*<br>
// CHECK: [[TASK_DATA:%.+]] = getelementptr inbounds [[TDP_TY]], [[TDP_TY]]* [[TASK]], i32 0, i32 0<br>
-// CHECK: getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 3<br>
-// CHECK: store i32 (i32, i8*)* null, i32 (i32, i8*)** %{{.+}}<br>
-// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 4<br>
+// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 5<br>
// CHECK: store i64 0, i64* [[DOWN]],<br>
-// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 5<br>
+// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 6<br>
// CHECK: store i64 %{{.+}}, i64* [[UP]],<br>
-// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 6<br>
+// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* [[TASK_DATA]], i32 0, i32 7<br>
// CHECK: store i64 1, i64* [[ST]],<br>
// CHECK: [[ST_VAL:%.+]] = load i64, i64* [[ST]],<br>
// CHECK: [[NUM_TASKS:%.+]] = zext i32 %{{.+}} to i64<br>
@@ -170,13 +162,13 @@ struct S {<br>
} s(1);<br>
<br>
// CHECK: define internal i32 [[TASK4]](<br>
-// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* %{{.+}}, i32 0, i32 4<br>
+// CHECK: [[DOWN:%.+]] = getelementptr inbounds [[TD_TY:%.+]], [[TD_TY]]* %{{.+}}, i32 0, i32 5<br>
// CHECK: [[DOWN_VAL:%.+]] = load i64, i64* [[DOWN]],<br>
-// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 5<br>
+// CHECK: [[UP:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 6<br>
// CHECK: [[UP_VAL:%.+]] = load i64, i64* [[UP]],<br>
-// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 6<br>
+// CHECK: [[ST:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 7<br>
// CHECK: [[ST_VAL:%.+]] = load i64, i64* [[ST]],<br>
-// CHECK: [[LITER:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 7<br>
+// CHECK: [[LITER:%.+]] = getelementptr inbounds [[TD_TY]], [[TD_TY]]* %{{.+}}, i32 0, i32 8<br>
// CHECK: [[LITER_VAL:%.+]] = load i32, i32* [[LITER]],<br>
// CHECK: store i64 [[DOWN_VAL]], i64* [[LB:%[^,]+]],<br>
// CHECK: store i64 [[UP_VAL]], i64* [[UB:%[^,]+]],<br>
<br>
Modified: cfe/trunk/test/OpenMP/taskloop_simd_firstprivate_codegen.cpp<br>
URL: <a moz-do-not-send="true" href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_simd_firstprivate_codegen.cpp?rev=271201&r1=271200&r2=271201&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_simd_firstprivate_codegen.cpp?rev=271201&r1=271200&r2=271201&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/OpenMP/taskloop_simd_firstprivate_codegen.cpp (original)<br>
+++ cfe/trunk/test/OpenMP/taskloop_simd_firstprivate_codegen.cpp Mon May 30 04:06:50 2016<br>
@@ -24,7 +24,7 @@ struct S {<br>
<br>
volatile double g;<br>
<br>
-// CHECK-DAG: [[KMP_TASK_T_TY:%.+]] = type { i8*, i32 (i32, i8*)*, i32, i32 (i32, i8*)*, i64, i64, i64, i32 }<br>
+// CHECK-DAG: [[KMP_TASK_T_TY:%.+]] = type { i8*, i32 (i32, i8*)*, i32, %union{{.+}}, %union{{.+}}, i64, i64, i64, i32 }<br>
// CHECK-DAG: [[S_DOUBLE_TY:%.+]] = type { double }<br>
// CHECK-DAG: [[PRIVATES_MAIN_TY:%.+]] = type {{.?}}{ [2 x [[S_DOUBLE_TY]]], [[S_DOUBLE_TY]], i32, [2 x i32]<br>
// CHECK-DAG: [[CAP_MAIN_TY:%.+]] = type {{.*}}{ [2 x i32]*, i32, {{.*}}[2 x [[S_DOUBLE_TY]]]*, [[S_DOUBLE_TY]]*, i{{[0-9]+}}<br>
@@ -58,7 +58,7 @@ int main() {<br>
// LAMBDA: call{{( x86_thiscallcc)?}} void [[<a class="moz-txt-link-abbreviated" href="mailto:OUTER_LAMBDA:@.+">OUTER_LAMBDA:@.+</a>]](<br>
[&]() {<br>
// LAMBDA: define{{.*}} internal{{.*}} void [[OUTER_LAMBDA]](<br>
- // LAMBDA: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 80, i64 16, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
+ // LAMBDA: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 88, i64 16, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
// LAMBDA: [[PRIVATES:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i{{.+}} 0, i{{.+}} 1<br>
// LAMBDA: [[G_PRIVATE_ADDR:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* [[PRIVATES]], i{{.+}} 0, i{{.+}} 0<br>
// LAMBDA: [[G_ADDR_REF:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i{{.+}} 0, i{{.+}} 0<br>
@@ -102,7 +102,7 @@ int main() {<br>
// BLOCKS: call void {{%.+}}(i8<br>
^{<br>
// BLOCKS: define{{.*}} internal{{.*}} void {{.+}}(i8*<br>
- // BLOCKS: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 80, i64 16, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
+ // BLOCKS: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 88, i64 16, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
// BLOCKS: [[PRIVATES:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i{{.+}} 0, i{{.+}} 1<br>
// BLOCKS: [[G_PRIVATE_ADDR:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* [[PRIVATES]], i{{.+}} 0, i{{.+}} 0<br>
// BLOCKS: [[G_ADDR_REF:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i{{.+}} 0, i{{.+}} 0<br>
@@ -191,7 +191,7 @@ int main() {<br>
// [[KMP_TASK_T]] task_data;<br>
// [[KMP_TASK_MAIN_TY]] privates;<br>
// };<br>
-// CHECK: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc([[LOC]], i32 [[GTID]], i32 9, i64 104, i64 40, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32, i8*)*))<br>
+// CHECK: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc([[LOC]], i32 [[GTID]], i32 9, i64 112, i64 40, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32, i8*)*))<br>
// CHECK: [[RES_KMP_TASK:%.+]] = bitcast i8* [[RES]] to [[KMP_TASK_MAIN_TY]]*<br>
<br>
// Fill kmp_task_t->shareds by copying from original capture argument.<br>
@@ -242,7 +242,8 @@ int main() {<br>
<br>
// Provide pointer to destructor function, which will destroy private variables at the end of the task.<br>
// CHECK: [[DESTRUCTORS_REF:%.+]] = getelementptr inbounds [[KMP_TASK_T_TY]], [[KMP_TASK_T_TY]]* [[TASK]], i{{.+}} 0, i{{.+}} 3<br>
-// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_REF]],<br>
+// CHECK: [[DESTRUCTORS_PTR:%.+]] = bitcast %union{{.+}}* [[DESTRUCTORS_REF]] to i32 (i32, i8*)**<br>
+// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_PTR]],<br>
<br>
// Start task.<br>
// CHECK: call void @__kmpc_taskloop([[LOC]], i32 [[GTID]], i8* [[RES]], i32 1, i64* %{{.+}}, i64* %{{.+}}, i64 %{{.+}}, i32 0, i32 0, i64 0, i8* bitcast (void ([[KMP_TASK_MAIN_TY]]*, [[KMP_TASK_MAIN_TY]]*, i32)* [[<a class="moz-txt-link-abbreviated" href="mailto:MAIN_DUP:@.+">MAIN_DUP:@.+</a>]]
to i8*))<br>
@@ -404,7 +405,8 @@ int main() {<br>
<br>
// Provide pointer to destructor function, which will destroy private variables at the end of the task.<br>
// CHECK: [[DESTRUCTORS_REF:%.+]] = getelementptr inbounds [[KMP_TASK_T_TY]], [[KMP_TASK_T_TY]]* [[TASK]], i{{.+}} 0, i{{.+}} 3<br>
-// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_TMAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_REF]],<br>
+// CHECK: [[DESTRUCTORS_PTR:%.+]] = bitcast %union{{.+}}* [[DESTRUCTORS_REF]] to i32 (i32, i8*)**<br>
+// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_TMAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_PTR]],<br>
<br>
// Start task.<br>
// CHECK: call void @__kmpc_taskloop([[LOC]], i32 [[GTID]], i8* [[RES]], i32 1, i64* %{{.+}}, i64* %{{.+}}, i64 %{{.+}}, i32 0, i32 0, i64 0, i8* bitcast (void ([[KMP_TASK_TMAIN_TY]]*, [[KMP_TASK_TMAIN_TY]]*, i32)* [[<a class="moz-txt-link-abbreviated" href="mailto:TMAIN_DUP:@.+">TMAIN_DUP:@.+</a>]]
to i8*))<br>
<br>
Modified: cfe/trunk/test/OpenMP/taskloop_simd_lastprivate_codegen.cpp<br>
URL: <a moz-do-not-send="true" href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_simd_lastprivate_codegen.cpp?rev=271201&r1=271200&r2=271201&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_simd_lastprivate_codegen.cpp?rev=271201&r1=271200&r2=271201&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/OpenMP/taskloop_simd_lastprivate_codegen.cpp (original)<br>
+++ cfe/trunk/test/OpenMP/taskloop_simd_lastprivate_codegen.cpp Mon May 30 04:06:50 2016<br>
@@ -24,7 +24,7 @@ struct S {<br>
<br>
volatile double g;<br>
<br>
-// CHECK-DAG: [[KMP_TASK_T_TY:%.+]] = type { i8*, i32 (i32, i8*)*, i32, i32 (i32, i8*)*, i64, i64, i64, i32 }<br>
+// CHECK-DAG: [[KMP_TASK_T_TY:%.+]] = type { i8*, i32 (i32, i8*)*, i32, %union{{.+}}, %union{{.+}}, i64, i64, i64, i32 }<br>
// CHECK-DAG: [[S_DOUBLE_TY:%.+]] = type { double }<br>
// CHECK-DAG: [[PRIVATES_MAIN_TY:%.+]] = type {{.?}}{ [2 x [[S_DOUBLE_TY]]], [[S_DOUBLE_TY]], i32, [2 x i32]<br>
// CHECK-DAG: [[CAP_MAIN_TY:%.+]] = type { [2 x i32]*, i32*, [2 x [[S_DOUBLE_TY]]]*, [[S_DOUBLE_TY]]*, i{{[0-9]+}}* }<br>
@@ -58,7 +58,7 @@ int main() {<br>
// LAMBDA: call{{( x86_thiscallcc)?}} void [[<a class="moz-txt-link-abbreviated" href="mailto:OUTER_LAMBDA:@.+">OUTER_LAMBDA:@.+</a>]](<br>
[&]() {<br>
// LAMBDA: define{{.*}} internal{{.*}} void [[OUTER_LAMBDA]](<br>
- // LAMBDA: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 80, i64 16, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
+ // LAMBDA: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 88, i64 16, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
// LAMBDA: [[PRIVATES:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i{{.+}} 0, i{{.+}} 1<br>
<br>
// LAMBDA: call void @__kmpc_taskloop(%{{.+}}* @{{.+}}, i32 %{{.+}}, i8* [[RES]], i32 1, i64* %{{.+}}, i64* %{{.+}}, i64 %{{.+}}, i32 0, i32 0, i64 0, i8* bitcast (void ([[KMP_TASK_MAIN_TY:%[^*]+]]*, [[KMP_TASK_MAIN_TY]]*, i32)* [[<a class="moz-txt-link-abbreviated" href="mailto:MAIN_DUP:@.+">MAIN_DUP:@.+</a>]]
to i8*))<br>
@@ -99,7 +99,7 @@ int main() {<br>
// BLOCKS: call void {{%.+}}(i8<br>
^{<br>
// BLOCKS: define{{.*}} internal{{.*}} void {{.+}}(i8*<br>
- // BLOCKS: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 80, i64 16, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
+ // BLOCKS: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 88, i64 16, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
// BLOCKS: [[PRIVATES:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i{{.+}} 0, i{{.+}} 1<br>
// BLOCKS: call void @__kmpc_taskloop(%{{.+}}* @{{.+}}, i32 %{{.+}}, i8* [[RES]], i32 1, i64* %{{.+}}, i64* %{{.+}}, i64 %{{.+}}, i32 0, i32 0, i64 0, i8* bitcast (void ([[KMP_TASK_MAIN_TY:%[^*]+]]*, [[KMP_TASK_MAIN_TY]]*, i32)* [[<a class="moz-txt-link-abbreviated" href="mailto:MAIN_DUP:@.+">MAIN_DUP:@.+</a>]]
to i8*))<br>
// BLOCKS: ret<br>
@@ -183,7 +183,7 @@ int main() {<br>
// [[KMP_TASK_T]] task_data;<br>
// [[KMP_TASK_MAIN_TY]] privates;<br>
// };<br>
-// CHECK: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc([[LOC]], i32 [[GTID]], i32 9, i64 104, i64 40, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32, i8*)*))<br>
+// CHECK: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc([[LOC]], i32 [[GTID]], i32 9, i64 112, i64 40, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32, i8*)*))<br>
// CHECK: [[RES_KMP_TASK:%.+]] = bitcast i8* [[RES]] to [[KMP_TASK_MAIN_TY]]*<br>
<br>
// Fill kmp_task_t->shareds by copying from original capture argument.<br>
@@ -215,7 +215,8 @@ int main() {<br>
<br>
// Provide pointer to destructor function, which will destroy private variables at the end of the task.<br>
// CHECK: [[DESTRUCTORS_REF:%.+]] = getelementptr inbounds [[KMP_TASK_T_TY]], [[KMP_TASK_T_TY]]* [[TASK]], i{{.+}} 0, i{{.+}} 3<br>
-// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_REF]],<br>
+// CHECK: [[DESTRUCTORS_PTR:%.+]] = bitcast %union{{.+}}* [[DESTRUCTORS_REF]] to i32 (i32, i8*)**<br>
+// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_PTR]],<br>
<br>
// Start task.<br>
// CHECK: call void @__kmpc_taskloop([[LOC]], i32 [[GTID]], i8* [[RES]], i32 1, i64* %{{.+}}, i64* %{{.+}}, i64 %{{.+}}, i32 0, i32 0, i64 0, i8* bitcast (void ([[KMP_TASK_MAIN_TY]]*, [[KMP_TASK_MAIN_TY]]*, i32)* [[<a class="moz-txt-link-abbreviated" href="mailto:MAIN_DUP:@.+">MAIN_DUP:@.+</a>]]
to i8*))<br>
@@ -298,7 +299,7 @@ int main() {<br>
<br>
// CHECK: define internal void [[MAIN_DUP]]([[KMP_TASK_MAIN_TY]]*, [[KMP_TASK_MAIN_TY]]*, i32)<br>
// CHECK: getelementptr inbounds [[KMP_TASK_MAIN_TY]], [[KMP_TASK_MAIN_TY]]* %{{.+}}, i32 0, i32 0<br>
-// CHECK: getelementptr inbounds [[KMP_TASK_T_TY]], [[KMP_TASK_T_TY]]* %{{.+}}, i32 0, i32 7<br>
+// CHECK: getelementptr inbounds [[KMP_TASK_T_TY]], [[KMP_TASK_T_TY]]* %{{.+}}, i32 0, i32 8<br>
// CHECK: load i32, i32* %<br>
// CHECK: store i32 %{{.+}}, i32* %<br>
// CHECK: getelementptr inbounds [[KMP_TASK_MAIN_TY]], [[KMP_TASK_MAIN_TY]]* %{{.+}}, i32 0, i32 1<br>
@@ -388,7 +389,8 @@ int main() {<br>
<br>
// Provide pointer to destructor function, which will destroy private variables at the end of the task.<br>
// CHECK: [[DESTRUCTORS_REF:%.+]] = getelementptr inbounds [[KMP_TASK_T_TY]], [[KMP_TASK_T_TY]]* [[TASK]], i{{.+}} 0, i{{.+}} 3<br>
-// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_TMAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_REF]],<br>
+// CHECK: [[DESTRUCTORS_PTR:%.+]] = bitcast %union{{.+}}* [[DESTRUCTORS_REF]] to i32 (i32, i8*)**<br>
+// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_TMAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_PTR]],<br>
<br>
// Start task.<br>
// CHECK: call void @__kmpc_taskloop([[LOC]], i32 [[GTID]], i8* [[RES]], i32 1, i64* %{{.+}}, i64* %{{.+}}, i64 %{{.+}}, i32 0, i32 0, i64 0, i8* bitcast (void ([[KMP_TASK_TMAIN_TY]]*, [[KMP_TASK_TMAIN_TY]]*, i32)* [[<a class="moz-txt-link-abbreviated" href="mailto:TMAIN_DUP:@.+">TMAIN_DUP:@.+</a>]]
to i8*))<br>
@@ -459,7 +461,7 @@ int main() {<br>
<br>
// CHECK: define internal void [[TMAIN_DUP]]([[KMP_TASK_TMAIN_TY]]*, [[KMP_TASK_TMAIN_TY]]*, i32)<br>
// CHECK: getelementptr inbounds [[KMP_TASK_TMAIN_TY]], [[KMP_TASK_TMAIN_TY]]* %{{.+}}, i32 0, i32 0<br>
-// CHECK: getelementptr inbounds [[KMP_TASK_T_TY]], [[KMP_TASK_T_TY]]* %{{.+}}, i32 0, i32 7<br>
+// CHECK: getelementptr inbounds [[KMP_TASK_T_TY]], [[KMP_TASK_T_TY]]* %{{.+}}, i32 0, i32 8<br>
// CHECK: load i32, i32* %<br>
// CHECK: store i32 %{{.+}}, i32* %<br>
// CHECK: getelementptr inbounds [[KMP_TASK_TMAIN_TY]], [[KMP_TASK_TMAIN_TY]]* %{{.+}}, i32 0, i32 2<br>
<br>
Modified: cfe/trunk/test/OpenMP/taskloop_simd_private_codegen.cpp<br>
URL: <a moz-do-not-send="true" href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_simd_private_codegen.cpp?rev=271201&r1=271200&r2=271201&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_simd_private_codegen.cpp?rev=271201&r1=271200&r2=271201&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/OpenMP/taskloop_simd_private_codegen.cpp (original)<br>
+++ cfe/trunk/test/OpenMP/taskloop_simd_private_codegen.cpp Mon May 30 04:06:50 2016<br>
@@ -24,7 +24,7 @@ struct S {<br>
<br>
volatile double g;<br>
<br>
-// CHECK-DAG: [[KMP_TASK_T_TY:%.+]] = type { i8*, i32 (i32, i8*)*, i32, i32 (i32, i8*)*, i64, i64, i64, i32 }<br>
+// CHECK-DAG: [[KMP_TASK_T_TY:%.+]] = type { i8*, i32 (i32, i8*)*, i32, %union{{.+}}, %union{{.+}}, i64, i64, i64, i32 }<br>
// CHECK-DAG: [[S_DOUBLE_TY:%.+]] = type { double }<br>
// CHECK-DAG: [[CAP_MAIN_TY:%.+]] = type { i8 }<br>
// CHECK-DAG: [[PRIVATES_MAIN_TY:%.+]] = type {{.?}}{ [2 x [[S_DOUBLE_TY]]], [[S_DOUBLE_TY]], i32, [2 x i32]<br>
@@ -56,7 +56,7 @@ int main() {<br>
// LAMBDA: call{{( x86_thiscallcc)?}} void [[<a class="moz-txt-link-abbreviated" href="mailto:OUTER_LAMBDA:@.+">OUTER_LAMBDA:@.+</a>]](<br>
[&]() {<br>
// LAMBDA: define{{.*}} internal{{.*}} void [[OUTER_LAMBDA]](<br>
- // LAMBDA: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 80, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
+ // LAMBDA: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 88, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
// LAMBDA: [[PRIVATES:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i{{.+}} 0, i{{.+}} 1<br>
// LAMBDA: call void @__kmpc_taskloop(%{{.+}}* @{{.+}}, i32 %{{.+}}, i8* [[RES]], i32 1, i64* %{{.+}}, i64* %{{.+}}, i64 %{{.+}}, i32 0, i32 0, i64 0, i8* null)<br>
// LAMBDA: ret<br>
@@ -92,7 +92,7 @@ int main() {<br>
// BLOCKS: call void {{%.+}}(i8<br>
^{<br>
// BLOCKS: define{{.*}} internal{{.*}} void {{.+}}(i8*<br>
- // BLOCKS: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 80, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
+ // BLOCKS: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc(%{{[^ ]+}} @{{[^,]+}}, i32 %{{[^,]+}}, i32 1, i64 88, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32,
i8*)*))<br>
// BLOCKS: [[PRIVATES:%.+]] = getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i{{.+}} 0, i{{.+}} 1<br>
// BLOCKS: call void @__kmpc_taskloop(%{{.+}}* @{{.+}}, i32 %{{.+}}, i8* [[RES]], i32 1, i64* %{{.+}}, i64* %{{.+}}, i64 %{{.+}}, i32 0, i32 0, i64 0, i8* null)<br>
// BLOCKS: ret<br>
@@ -158,7 +158,7 @@ int main() {<br>
// [[KMP_TASK_T_TY]] task_data;<br>
// [[KMP_TASK_MAIN_TY]] privates;<br>
// };<br>
-// CHECK: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc([[LOC]], i32 [[GTID]], i32 9, i64 104, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32, i8*)*))<br>
+// CHECK: [[<a class="moz-txt-link-freetext" href="RES:%.+">RES:%.+</a>]] = call i8* @__kmpc_omp_task_alloc([[LOC]], i32 [[GTID]], i32 9, i64 112, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[TASK_ENTRY:@[^ ]+]] to i32 (i32, i8*)*))<br>
// CHECK: [[RES_KMP_TASK:%.+]] = bitcast i8* [[RES]] to [[KMP_TASK_MAIN_TY]]*<br>
<br>
// CHECK: [[TASK:%.+]] = getelementptr inbounds [[KMP_TASK_MAIN_TY]], [[KMP_TASK_MAIN_TY]]* [[RES_KMP_TASK]], i{{[0-9]+}} 0, i{{[0-9]+}} 0<br>
@@ -182,7 +182,8 @@ int main() {<br>
<br>
// Provide pointer to destructor function, which will destroy private variables at the end of the task.<br>
// CHECK: [[DESTRUCTORS_REF:%.+]] = getelementptr inbounds [[KMP_TASK_T_TY]], [[KMP_TASK_T_TY]]* [[TASK]], i{{.+}} 0, i{{.+}} 3<br>
-// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_REF]],<br>
+// CHECK: [[DESTRUCTORS_PTR:%.+]] = bitcast %union{{.+}}* [[DESTRUCTORS_REF]] to i32 (i32, i8*)**<br>
+// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_MAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_PTR]],<br>
<br>
// Start task.<br>
// CHECK: call void @__kmpc_taskloop([[LOC]], i32 [[GTID]], i8* [[RES]], i32 1, i64* %{{.+}}, i64* %{{.+}}, i64 %{{.+}}, i32 0, i32 0, i64 0, i8* bitcast (void ([[KMP_TASK_MAIN_TY]]*, [[KMP_TASK_MAIN_TY]]*, i32)* [[<a class="moz-txt-link-abbreviated" href="mailto:MAIN_DUP:@.+">MAIN_DUP:@.+</a>]]
to i8*))<br>
@@ -312,7 +313,8 @@ int main() {<br>
<br>
// Provide pointer to destructor function, which will destroy private variables at the end of the task.<br>
// CHECK: [[DESTRUCTORS_REF:%.+]] = getelementptr inbounds [[KMP_TASK_T_TY]], [[KMP_TASK_T_TY]]* [[TASK]], i{{.+}} 0, i{{.+}} 3<br>
-// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_TMAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_REF]],<br>
+// CHECK: [[DESTRUCTORS_PTR:%.+]] = bitcast %union{{.+}}* [[DESTRUCTORS_REF]] to i32 (i32, i8*)**<br>
+// CHECK: store i32 (i32, i8*)* bitcast (i32 (i32, [[KMP_TASK_TMAIN_TY]]*)* [[<a class="moz-txt-link-abbreviated" href="mailto:DESTRUCTORS:@.+">DESTRUCTORS:@.+</a>]] to i32 (i32, i8*)*), i32 (i32, i8*)** [[DESTRUCTORS_PTR]],<br>
<br>
// Start task.<br>
// CHECK: call void @__kmpc_taskloop([[LOC]], i32 [[GTID]], i8* [[RES]], i32 1, i64* %{{.+}}, i64* %{{.+}}, i64 %{{.+}}, i32 0, i32 0, i64 0, i8* bitcast (void ([[KMP_TASK_TMAIN_TY]]*, [[KMP_TASK_TMAIN_TY]]*, i32)* [[<a class="moz-txt-link-abbreviated" href="mailto:TMAIN_DUP:@.+">TMAIN_DUP:@.+</a>]]
to i8*))<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a moz-do-not-send="true" href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a moz-do-not-send="true" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
<br>
</body>
</html>