Skip to content

Conversation

@arsenm
Copy link
Contributor

@arsenm arsenm commented Nov 12, 2025

No description provided.

Copy link
Contributor Author

arsenm commented Nov 12, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@arsenm arsenm marked this pull request as ready for review November 12, 2025 20:23
@llvmbot
Copy link
Member

llvmbot commented Nov 12, 2025

@llvm/pr-subscribers-backend-x86
@llvm/pr-subscribers-backend-arm
@llvm/pr-subscribers-llvm-selectiondag
@llvm/pr-subscribers-backend-aarch64

@llvm/pr-subscribers-backend-risc-v

Author: Matt Arsenault (arsenm)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/167756.diff

1 Files Affected:

  • (modified) llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp (+8-6)
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
index 417122d467054..ff3511726ea07 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
@@ -3344,7 +3344,7 @@ void DAGTypeLegalizer::SplitVecRes_VP_REVERSE(SDNode *N, SDValue &Lo,
 
   SDValue TrueMask = DAG.getBoolConstant(true, DL, Mask.getValueType(), VT);
   SDValue Store = DAG.getStridedStoreVP(DAG.getEntryNode(), DL, Val, StorePtr,
-                                        DAG.getUNDEF(PtrVT), Stride, TrueMask,
+                                        DAG.getPOISON(PtrVT), Stride, TrueMask,
                                         EVL, MemVT, StoreMMO, ISD::UNINDEXED);
 
   SDValue Load = DAG.getLoadVP(VT, DL, Store, StackPtr, Mask, EVL, LoadMMO);
@@ -3387,14 +3387,16 @@ void DAGTypeLegalizer::SplitVecRes_VP_SPLICE(SDNode *N, SDValue &Lo,
 
   SDValue StackPtr2 = TLI.getVectorElementPointer(DAG, StackPtr, VT, EVL1);
 
+  SDValue PoisonPtr = DAG.getPOISON(PtrVT);
+
   SDValue TrueMask = DAG.getBoolConstant(true, DL, Mask.getValueType(), VT);
-  SDValue StoreV1 = DAG.getStoreVP(DAG.getEntryNode(), DL, V1, StackPtr,
-                                   DAG.getUNDEF(PtrVT), TrueMask, EVL1,
-                                   V1.getValueType(), StoreMMO, ISD::UNINDEXED);
+  SDValue StoreV1 =
+      DAG.getStoreVP(DAG.getEntryNode(), DL, V1, StackPtr, PoisonPtr, TrueMask,
+                     EVL1, V1.getValueType(), StoreMMO, ISD::UNINDEXED);
 
   SDValue StoreV2 =
-      DAG.getStoreVP(StoreV1, DL, V2, StackPtr2, DAG.getUNDEF(PtrVT), TrueMask,
-                     EVL2, V2.getValueType(), StoreMMO, ISD::UNINDEXED);
+      DAG.getStoreVP(StoreV1, DL, V2, StackPtr2, PoisonPtr, TrueMask, EVL2,
+                     V2.getValueType(), StoreMMO, ISD::UNINDEXED);
 
   SDValue Load;
   if (Imm >= 0) {

@arsenm arsenm force-pushed the users/arsenm/dag/legalizer-use-poison-load-store-offsets branch from 2a9f464 to ca207de Compare November 12, 2025 20:24
@arsenm arsenm force-pushed the users/arsenm/dag/legalizer-use-poison-load-store-offsets branch from ca207de to 894713d Compare November 12, 2025 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants