[llvm] [AArch64] Convert concat(uhadd(a,b), uhadd(c,d)) to uhadd(concat(a,c), concat(b,d)) (PR #79464)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 26 01:54:34 PST 2024


================
@@ -18200,6 +18200,19 @@ static SDValue performConcatVectorsCombine(SDNode *N,
     return true;
   };
 
+  // concat(uhadd(a, b), uhadd(c, d)) -> uhadd(concat(a, c), concat(b, d))
+  if (N0Opc == ISD::AVGFLOORU && N1Opc == ISD::AVGFLOORU) {
----------------
david-arm wrote:

I think we also need to check that the concat operation only has 2 operands. In theory, you can do concats of as many vectors as you want so long as they are all the same size.

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


More information about the llvm-commits mailing list