[llvm] [LICM] Improve hoisting of calls marked with invariant_load metadata (PR #193678)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 23 03:51:01 PDT 2026


================
@@ -7305,6 +7305,9 @@ bool llvm::isSafeToSpeculativelyExecuteWithOpcode(
       return false;
     const Function *Callee = CI->getCalledFunction();
 
+    // Assume we can always speculate invariant loads.
----------------
arsenm wrote:

There was a long discussion in the original patch: https://reviews.llvm.org/D20116

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


More information about the llvm-commits mailing list