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

Rin Dobrescu via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 18 08:38:28 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)
----------------
Rin18 wrote:

Yeah, I took the check from performUADDVAddCombine too, but it is useless since we already check for that when we call the function, you're right. I'll remove it. 

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


More information about the llvm-commits mailing list