[llvm] [VPlan] Model address separately. (PR #72164)

via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 17 13:44:04 PST 2023


================
@@ -397,6 +399,50 @@ Value *VPInstruction::generateInstruction(VPTransformState &State,
     Builder.GetInsertBlock()->getTerminator()->eraseFromParent();
     return CondBr;
   }
+  case VPInstruction::VectorPtr:
+  case VPInstruction::VectorPtrReverse: {
+    // Calculate the pointer for the specific unroll-part.
+    Value *PartPtr = nullptr;
+    bool IsReverse = getOpcode() == VPInstruction::VectorPtrReverse;
+    auto *MemR = cast<VPWidenMemoryInstructionRecipe>(*user_begin());
----------------
ayalz wrote:

Relying on properties of the first user? This preserves the current behavior, but breaks recipe atomicity. Perhaps better to record ScalarDataTy inside VectorPtr[Reverse] recipes, for now, (or DL's index type for a pointer to it) rather than trying to simplify them immediately into VPInstructions. Can also record IsReverse inside the recipe rather than mangle it inside Opcode.

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


More information about the llvm-commits mailing list