Skip to content

Commit 224db14

Browse files
committed
for_static_loop_4 expects i32 tripcount, so trunc it
1 parent 8829a7b commit 224db14

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2834,7 +2834,9 @@ OpenMPIRBuilder::applyWorkshareLoopDevice(DebugLoc DL, CanonicalLoopInfo *CLI) {
28342834
/*identifier*/ Ident,
28352835
/*loop body func*/ Builder.CreateBitCast(&OutlinedFn, ParallelTaskPtr),
28362836
/*loop body args*/ LoopBodyArg,
2837-
/*num of iters*/ TripCount,
2837+
/*num of iters*/
2838+
Builder.CreateZExtOrTrunc(TripCount, Type::getInt32Ty(M.getContext()),
2839+
"TripCountTrunc"),
28382840
/*num of threads*/ NumThreads,
28392841
/*block chunk*/ Builder.getInt32(1)};
28402842

0 commit comments

Comments
 (0)