[llvm] [AA] A conservative fix for atomic store instruction. (PR #155032)
David Li via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 25 09:30:17 PDT 2025
david-xl wrote:
> > yes, the same fix should be applied to LoadInst too (with a test case). @nikic can you clarify 'return ModRef for relaxed?'
>
> Previously we returned ModRef for non-aliasing locations and for aliasing locations. This patch will return NoModRef for non-aliasing locations and Mod for aliasing locations. I'm suggesting NoModRef for non-aliasing locations and ModRef for aliasing locations. ModRef encodes the ordering requirement for relaxed/monotonic operations.
>
> (As said, I'm not 100% sure just Mod is wrong for store, just that Ref would be wrong for monotonic load, and I'd rather keep symmetry.)
This makes total sense (limiting the fix for one scenario -- non-aliasing relaxed loads/stores).
https://github.com/llvm/llvm-project/pull/155032
More information about the llvm-commits
mailing list