[llvm] [VPlan] Model FOR extract of exit value in VPlan. (PR #93395)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 3 02:15:39 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());
----------------
fhahn wrote:

Added a comment to where the opcode is defined, thanks. I kept the code general for now, with the constraints that the lane to extract must be <= VF when vectorizing or <= UF otherwise.

https://github.com/llvm/llvm-project/pull/93395


More information about the llvm-commits mailing list