[clang] [llvm] [NVPTX] Support i256 load/store with 256-bit vector load (PR #155198)

Drew Kersnar via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 26 15:46:52 PDT 2025


================
@@ -5126,11 +5235,34 @@ static SDValue combinePackingMovIntoStore(SDNode *N,
                                      ST->getMemoryVT(), ST->getMemOperand());
 }
 
-static SDValue PerformStoreCombine(SDNode *N,
-                                   TargetLowering::DAGCombinerInfo &DCI) {
+static SDValue combineSTORE(SDNode *N, TargetLowering::DAGCombinerInfo &DCI,
+                            const NVPTXSubtarget &STI) {
+
+  if (DCI.isBeforeLegalize() && N->getOpcode() == ISD::STORE) {
+    // Here is our chance to custom lower a store with a non-simple type.
+    // Unfortunately, we can't do this in the legalizer because there is no
+    // way to setOperationAction for an non-simple type.
+    StoreSDNode *ST = cast<StoreSDNode>(N);
+    if (!ST->getValue().getValueType().isSimple())
+      return lowerSTOREVector(SDValue(ST, 0), DCI.DAG, STI);
+  }
----------------
dakersnar wrote:

Is this handling only for i256? Out of curiosity, why does that count as a non-simple type?

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


More information about the llvm-commits mailing list