[llvm] [AArch64] Convert concat(uhadd(a,b), uhadd(c,d)) to uhadd(concat(a,c), concat(b,d)) (PR #79464)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 30 05:25:51 PST 2024
- Previous message: [llvm] [AArch64] Convert concat(uhadd(a,b), uhadd(c,d)) to uhadd(concat(a,c), concat(b,d)) (PR #79464)
- Next message: [llvm] [AArch64] Convert concat(uhadd(a,b), uhadd(c,d)) to uhadd(concat(a,c), concat(b,d)) (PR #79464)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
================
@@ -18240,29 +18233,10 @@ static SDValue performConcatVectorsCombine(SDNode *N,
EVT N00VT = N00.getValueType();
EVT N10VT = N10.getValueType();
- if (N00->getOpcode() == ISD::EXTRACT_SUBVECTOR &&
- N01->getOpcode() == ISD::EXTRACT_SUBVECTOR &&
- N10->getOpcode() == ISD::EXTRACT_SUBVECTOR &&
- N11->getOpcode() == ISD::EXTRACT_SUBVECTOR && N00VT == N10VT) {
- SDValue N00Source = N00->getOperand(0);
- SDValue N01Source = N01->getOperand(0);
- SDValue N10Source = N10->getOperand(0);
- SDValue N11Source = N11->getOperand(0);
-
- if (N00Source == N10Source && N01Source == N11Source &&
- N00Source.getValueType() == VT && N01Source.getValueType() == VT) {
- assert(N0.getValueType() == N1.getValueType());
-
- uint64_t N00Index = N00.getConstantOperandVal(1);
- uint64_t N01Index = N01.getConstantOperandVal(1);
- uint64_t N10Index = N10.getConstantOperandVal(1);
- uint64_t N11Index = N11.getConstantOperandVal(1);
-
- if (N00Index == N01Index && N10Index == N11Index && N00Index == 0 &&
- N10Index == N00VT.getVectorNumElements())
- return DAG.getNode(N0Opc, dl, VT, N00Source, N01Source);
- }
- }
+ EVT PairVT = N00VT.getDoubleNumVectorElementsVT(*DAG.getContext());
+ SDValue Concat0 = DAG.getNode(ISD::CONCAT_VECTORS, dl, VT, N00, N10);
+ SDValue Concat1 = DAG.getNode(ISD::CONCAT_VECTORS, dl, VT, N01, N11);
+ return DAG.getNode(N0Opc, dl, PairVT, Concat0, Concat1);
----------------
davemgreen wrote:
PairVT -> VT
https://github.com/llvm/llvm-project/pull/79464
- Previous message: [llvm] [AArch64] Convert concat(uhadd(a,b), uhadd(c,d)) to uhadd(concat(a,c), concat(b,d)) (PR #79464)
- Next message: [llvm] [AArch64] Convert concat(uhadd(a,b), uhadd(c,d)) to uhadd(concat(a,c), concat(b,d)) (PR #79464)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the llvm-commits
mailing list