[llvm] [AA] A conservative fix for atomic store instruction. (PR #155032)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 25 07:49:28 PDT 2025


nikic 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.)

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


More information about the llvm-commits mailing list