[flang] [llvm] [mlir] [Flang]Fix for changed code at the end of AllocaIP. (PR #92430)

Mats Petersson via llvm-commits llvm-commits at lists.llvm.org
Thu May 30 05:09:42 PDT 2024


================
@@ -2137,10 +2137,9 @@ OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::createReductions(
   unsigned NumReductions = ReductionInfos.size();
   Type *RedArrayTy = ArrayType::get(Builder.getPtrTy(), NumReductions);
   Builder.SetInsertPoint(AllocaIP.getBlock()->getTerminator());
-  //  Builder.restoreIP(AllocaIP);
   Value *RedArray = Builder.CreateAlloca(RedArrayTy, nullptr, "red.array");
 
-  Builder.SetInsertPoint(InsertBlock, InsertBlock->end());
+  Builder.SetInsertPoint(InsertBlock, InsertBlock->begin());
----------------
Leporacanthicus wrote:

I must have confused myself - I thought I'd changed that earlier, but that must have been another place... 

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


More information about the llvm-commits mailing list