[llvm] [LICM] Only set AA metadata on hoisted load if it executes. (PR #117204)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 22 09:19:19 PST 2024
================
@@ -2247,7 +2253,7 @@ bool llvm::promoteLoopAccessesToScalars(
PreheaderLoad->setOrdering(AtomicOrdering::Unordered);
PreheaderLoad->setAlignment(Alignment);
PreheaderLoad->setDebugLoc(DebugLoc());
- if (AATags)
+ if (AATags && LoadIsGuanteedToExecute)
----------------
nikic wrote:
I think we also need to check StoreIsGuaranteedToExecute for the LoopPromoter use above. Should only copy AATags if it's a non-speculative store.
https://github.com/llvm/llvm-project/pull/117204
More information about the llvm-commits
mailing list