[llvm] [mlir] [Flang][MLIR][OpenMP] Fix Target Data if (present(...)) causing LLVM-IR branching error (PR #123771)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 30 08:33:06 PST 2025
================
@@ -3727,6 +3727,9 @@ convertOmpTargetData(Operation *op, llvm::IRBuilderBase &builder,
}
break;
case BodyGenTy::DupNoPriv:
+ // We must always restoreIP regardless of doing anything the caller
+ // does not restore it, leading to incorrect (no) branch generation.
+ builder.restoreIP(codeGenIP);
----------------
agozillon wrote:
Thank you @TIFitis I'll leave the better fix to you then in your PR and just land this in the meantime to address the current reproducer!
https://github.com/llvm/llvm-project/pull/123771
More information about the llvm-commits
mailing list