[llvm] [VPlan] Model FOR extract of exit value in VPlan. (PR #93395)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 3 06:29:33 PDT 2024
================
@@ -558,6 +559,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();
+
----------------
ayalz wrote:
```suggestion
assert(Offset > 0 && "Offset from end must be positive");
```
https://github.com/llvm/llvm-project/pull/93395
More information about the llvm-commits
mailing list