[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
Mon Nov 25 13:13:47 PST 2024


================
@@ -2088,6 +2093,8 @@ bool llvm::promoteLoopAccessesToScalars(
         FoundLoadToPromote = true;
 
         Align InstAlignment = Load->getAlign();
+        LoadIsGuaranteedToExecute |=
----------------
nikic wrote:

Maybe wrap this in `if (!LoadIsGuaranteedToExecute)` to save unnecessary queries.

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


More information about the llvm-commits mailing list