[llvm] [AArch64] Convert UADDV(add(zext, zext)) into UADDLV(concat). (PR #78301)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 18 07:39:49 PST 2024


================
@@ -16613,11 +16613,56 @@ static SDValue performUADDVAddCombine(SDValue A, SelectionDAG &DAG) {
   return SDValue();
 }
 
+// We can convert a UADDV(add(zext(64-bit source), zext(64-bit source))) into
+// UADDLV(concat), where the concat represents the 64-bit zext sources.
+static SDValue performUADDVZextCombine(SDValue A, SelectionDAG &DAG) {
+  // Look for add(zext(64-bit source), zext(64-bit source)), returning
+  // UADDLV(concat(zext, zext)) if found.
+  if (A.getOpcode() != ISD::ADD)
----------------
david-arm wrote:

I don't think we need to check for ADD here because it was already checked in `performUADDVCombine`.

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


More information about the llvm-commits mailing list