[llvm] [SPARC] Don't combine misaligned memory ops with BSWAP (PR #206345)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 5 04:45:31 PDT 2026


================
@@ -3299,17 +3302,21 @@ SDValue SparcTargetLowering::PerformSTORECombine(SDNode *N,
   SelectionDAG &DAG = DCI.DAG;
   SDValue Op = N->getOperand(1);
   EVT VT = Op.getValueType();
+  EVT MemVT = cast<StoreSDNode>(N)->getMemoryVT();
   unsigned Opcode = Op.getOpcode();
+  StoreSDNode *SN = dyn_cast<StoreSDNode>(N);
----------------
s-barannikov wrote:

```suggestion
  auto *SN = dyn_cast<StoreSDNode>(N);
```

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


More information about the llvm-commits mailing list