[llvm] [LoopVectorize] Generate wide active lane masks (PR #147535)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 14 06:19:55 PDT 2025
================
@@ -614,7 +615,9 @@ Value *VPInstruction::generate(VPTransformState &State) {
Name);
auto *Int1Ty = Type::getInt1Ty(Builder.getContext());
- auto *PredTy = VectorType::get(Int1Ty, State.VF);
+ auto PredTy = VectorType::get(
+ Int1Ty, State.VF * cast<ConstantInt>(getOperand(2)->getLiveInIRValue())
+ ->getZExtValue());
----------------
david-arm wrote:
I think that given we're now potentially generating a different mask we should update the cost for VPInstruction::ActiveLaneMask in VPInstruction::computeCost if using a wider mask. Again, it's not going to make much difference because the wider mask is generated after the cost model anyway, but good to have it for completeness.
https://github.com/llvm/llvm-project/pull/147535
More information about the llvm-commits
mailing list