[llvm] [LV] Add support for speculative loads in loops that may fault (PR #151300)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 30 06:05:41 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);
----------------
alexey-bataev wrote:
```suggestion
auto *Load = cast<LoadInst>(I);
```
https://github.com/llvm/llvm-project/pull/151300
More information about the llvm-commits
mailing list