[llvm] [VPlan] Model FOR extract of exit value in VPlan. (PR #93395)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 2 14:16:30 PDT 2024
================
@@ -558,6 +560,29 @@ Value *VPInstruction::generatePerPart(VPTransformState &State, unsigned Part) {
return ReducedPartRdx;
}
+ case VPInstruction::ExtractFromEnd: {
+ if (Part != 0)
+ return State.get(this, 0, /*IsScalar*/ true);
+
+ auto *CI = cast<ConstantInt>(getOperand(1)->getLiveInIRValue());
+ unsigned Offset = CI->getZExtValue();
+
+ // Extract lane VF - Offset in the from the operand.
----------------
ayalz wrote:
```suggestion
// Extract lane VF - Offset from the operand.
```
Better place under the "if", as it applies to the horizontal "then" case.
https://github.com/llvm/llvm-project/pull/93395
More information about the llvm-commits
mailing list