[llvm] [AArch64] Fold uaddv(a) to a if the all lanes except the 0th are zeros (PR #159086)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 16 11:47:16 PDT 2025
================
@@ -18995,6 +18995,16 @@ static SDValue performUADDVCombine(SDNode *N, SelectionDAG &DAG) {
else if (SDValue R = performUADDVZextCombine(A, DAG))
return R;
}
+
+ // uaddv(A) --> A if all lanes of A are known to be zeros except the 0th lane.
+ MVT VT = N->getSimpleValueType(0);
+ MVT OpVT = A.getSimpleValueType();
----------------
davemgreen wrote:
Are VT and OpVT always the same type for a AArch64ISD::UADDV? I believe they are, but they are not the most strictly defined opcodes we have, and the bitcast might be wrong otherwise. Can you add an assert for it?
https://github.com/llvm/llvm-project/pull/159086
More information about the llvm-commits
mailing list