[llvm] [VPlan] Unroll VPReplicateRecipe by VF. (PR #142433)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 10 02:49:59 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()));
Value *Vec = State.get(getOperand(0));
Value *Idx = State.get(getOperand(1), /*IsScalar=*/true);
return Builder.CreateExtractElement(Vec, Idx, Name);
----------------
fhahn wrote:
Removed thanks
https://github.com/llvm/llvm-project/pull/142433
More information about the llvm-commits
mailing list