[llvm] [RFC][LV] Add support for speculative loads in loops that may fault (PR #151300)

Shih-Po Hung via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 1 06:07:07 PDT 2025


================
@@ -7756,6 +7766,12 @@ VPRecipeBuilder::tryToWidenMemory(Instruction *I, ArrayRef<VPValue *> Operands,
     Builder.insert(VectorPtr);
     Ptr = VectorPtr;
   }
+  if (Legal->getSpeculativeLoads().contains(I)) {
+    LoadInst *Load = dyn_cast<LoadInst>(I);
----------------
arcbbb wrote:

Fixed. Thanks!

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


More information about the llvm-commits mailing list