[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:40 PDT 2025


================
@@ -960,6 +967,8 @@ InstructionCost VPInstruction::computeCost(ElementCount VF,
         Instruction::Or, cast<VectorType>(VecTy), std::nullopt, Ctx.CostKind);
   }
   case VPInstruction::FirstActiveLane: {
+    if (VF.isScalar())
+      return InstructionCost::getInvalid();
----------------
alexey-bataev wrote:

Separate patch with a test

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


More information about the llvm-commits mailing list