[llvm] [AArch64] Generalize integer FPR lane stores for all types (PR #134117)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 16 05:04:06 PDT 2025
================
@@ -24025,6 +24025,13 @@ static SDValue performSTORECombine(SDNode *N,
EVT VectorVT = Vector.getValueType();
EVT ElemVT = VectorVT.getVectorElementType();
+ // Propagate zero constants (applying this fold may miss optimizations).
+ if (ISD::isConstantSplatVectorAllZeros(Vector.getNode())) {
+ SDValue ZeroElt = DAG.getConstant(0, DL, ValueVT);
+ DAG.ReplaceAllUsesWith(Value, ZeroElt);
+ return SDValue();
+ }
----------------
paulwalker-arm wrote:
I'd say we're missing an obvious combine and looking at `DAGCombiner::visitBITCAST` I see
```
TODO: Support FP bitcasts after legalize types
```
It's not worth looking for trouble so I'll take the current fix and we can circle back later if necessary. That said, `DAG.getConstant` is specific to integers so the code needs moving after the `!ValueVT.isInteger()` bailout.
https://github.com/llvm/llvm-project/pull/134117
More information about the llvm-commits
mailing list