[clang] [CIR] Match OGCG noalias and memory effects on operator new (PR #221818)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 8 17:56:35 PDT 2026
================
@@ -457,6 +457,18 @@ void convertSideEffectForCall(mlir::Operation *callOp, bool isNothrow,
noUnwind = true;
willReturn = true;
break;
+
+ case cir::SideEffect::InaccessibleOrErrno:
+ memoryEffect = mlir::LLVM::MemoryEffectsAttr::get(
+ callOp->getContext(), /*other=*/ModRefInfo::NoModRef,
+ /*argMem=*/ModRefInfo::NoModRef,
+ /*inaccessibleMem=*/ModRefInfo::ModRef,
+ /*errnoMem=*/ModRefInfo::Mod,
----------------
andykaylor wrote:
The assumption of `ModRefInfo::Mod` here is problematic. That's the only way classic codegen ever uses `llvm::MemoryEffects::inaccessibleOrErrnoMemOnly()` but the function allows other combinations.
https://github.com/llvm/llvm-project/pull/221818
More information about the cfe-commits
mailing list