[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


================
@@ -2088,11 +2090,15 @@ bool llvm::promoteLoopAccessesToScalars(
         FoundLoadToPromote = true;
 
         Align InstAlignment = Load->getAlign();
+        bool GuaranteedToExecute =
+            SafetyInfo->isGuaranteedToExecute(*UI, DT, CurLoop);
----------------
nikic wrote:

Unnecessary intermediate variable?

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


More information about the llvm-commits mailing list