[llvm] [MSSA] Don't check non-AA memory effects when using template access (PR #76142)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 2 12:31:12 PST 2024


nikic wrote:

> In your example `nowreadnone` is a MemoryDef, which doesn't get the defining access updated. It has an optimized field which will be set to `writes x` but its defining should still be `writes y`. The mechanism for deleting accesses relies on this too. If a clone is created for `nowreadnone`, then deleted later (if checked and found it doesn't access memory), then all it's uses will get as the defining access, its own defining access.

Ah yes, good point.

> I'm ok with moving fwd with this solution to resolve the asserts. I haven't found a counter example for the generalization yet, but I need more time to check it's safe, it's still possible it's missing cases where it's not correct.

Hm, could it happen that the new defining access ends up in a different block, for which we haven't cloned accesses yet?

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


More information about the llvm-commits mailing list