[llvm-branch-commits] [llvm] [mlir] [OpenMP]Update use_device_clause lowering (PR #101707)
Akash Banerjee via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Aug 21 10:27:49 PDT 2024
================
@@ -6357,7 +6357,7 @@ OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::createTargetData(
// Disable TargetData CodeGen on Device pass.
if (Config.IsTargetDevice.value_or(false)) {
if (BodyGenCB)
- Builder.restoreIP(BodyGenCB(Builder.saveIP(), BodyGenTy::NoPriv));
+ Builder.restoreIP(BodyGenCB(CodeGenIP, BodyGenTy::NoPriv));
----------------
TIFitis wrote:
It's because `CodeGenIP` hasn't been restored by the `Builder` at this point. Instead of passing `CodeGenIP`, I've moved the `restoreIp` call upward.
https://github.com/llvm/llvm-project/pull/101707
More information about the llvm-branch-commits
mailing list