Skip to content

Commit fc3d8fd

Browse files
authored
Merge pull request flang-compiler#236 from ROCm-Developer-Tools/tripcount_to_i32
Tripcount to i32
2 parents 8829a7b + 224db14 commit fc3d8fd

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)