llvm-project
fbb86350 - [LICM] Ignore AA tags on conditional stores in scalar promotion. (#218031)

Commit
2 days ago
[LICM] Ignore AA tags on conditional stores in scalar promotion. (#218031) One of the key aspects of scalar promotion, as done in LICM, is that the store is always unconditional: it executes even if the store in the loop didn't execute. This makes the aliasing check more complicated: we need to ensure that it's okay to both sink the store out of the loop, and speculatively execute the store. For the sinking, it's fine to use AA tags, but for speculatively executing the store, it's a problem: AA tags are only meaningful for operations that actually execute at runtime. Existing code will strip the AA tags from the generated store, but still used them for the aliasing checks. The new isStrongerThanMonotonic() checks don't affect correctness; this change is just moving the checks earlier because of the way the AliasSetTracker data structure works. Fixes #60860. Fixes #217052.
Author
Parents
Loading