[Mlir-commits] [llvm] [mlir] [OpenMP][OMPIRBuilder] Fix lastiter assertion in target workshare loop (PR #214996)

Abid Qadeer llvmlistbot at llvm.org
Fri Aug 14 04:50:18 PDT 2026


================
@@ -6605,6 +6613,15 @@ OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::applyWorkshareLoopTarget(
   ToBeDeleted.push_back(NewLoopCntLoad);
   ToBeDeleted.push_back(NewLoopCnt);
 
+  // Set p.lastiter to 1 if the current iteration is the last one.
+  Builder.restoreIP(CLI->getBody(), CLI->getBody()->getFirstInsertionPt());
----------------
abidh wrote:

This is failing to build for me. Did you miss {}

https://github.com/llvm/llvm-project/pull/214996


More information about the Mlir-commits mailing list