[llvm] [VPlan] Unroll VPReplicateRecipe by VF. (PR #142433)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 9 08:37:34 PDT 2025
================
@@ -493,6 +493,9 @@ Value *VPInstruction::generate(VPTransformState &State) {
}
case Instruction::ExtractElement: {
assert(State.VF.isVector() && "Only extract elements from vectors");
+ return State.get(getOperand(0),
+ VPLane(cast<ConstantInt>(getOperand(1)->getLiveInIRValue())
+ ->getZExtValue()));
----------------
ayalz wrote:
If second operand of ExtractElement must be a (small, less than VF) compile-time constant, would it be better held in VPIRFlags, given that other flags are unneeded?
https://github.com/llvm/llvm-project/pull/142433
More information about the llvm-commits
mailing list