[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
Mon Aug 4 01:40:01 PDT 2025
================
@@ -9985,6 +9998,25 @@ bool LoopVectorizePass::processLoop(Loop *L) {
return false;
}
+ if (!LVL.getSpeculativeLoads().empty()) {
+ if (!EnableSpeculativeLoads) {
+ reportVectorizationFailure("Auto-vectorization of loops with speculative "
+ "load is not enabled",
+ "SpeculativeLoadsDisabled", ORE, L);
+ return false;
+ }
+ // DataWithEVL is needed to lower VPWidenFFLoadRecipe into
+ // VPWidenFFLoadEVLRecipe.
----------------
arcbbb wrote:
I’ve updated the comment with additional explanation. Let me know if it is still unclear.
https://github.com/llvm/llvm-project/pull/151300
More information about the llvm-commits
mailing list