[llvm] [AArch64] Optimize two large shifts and a combine into a single combine and shift (PR #99480)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 22 10:54:10 PDT 2024


================
@@ -14198,9 +14198,43 @@ SDValue AArch64TargetLowering::LowerCONCAT_VECTORS(SDValue Op,
                                    !Subtarget->isNeonAvailable()))
     return LowerFixedLengthConcatVectorsToSVE(Op, DAG);
 
-  assert(Op.getValueType().isScalableVector() &&
-         isTypeLegal(Op.getValueType()) &&
-         "Expected legal scalable vector type!");
+  if (!Op.getValueType().isScalableVector()) {
+    const SDValue Trunc1 = Op.getOperand(0);
+    const SDValue Trunc2 = Op.getOperand(1);
----------------
sopyb wrote:

I did it when I contributed to clang-tidy so I thought that's a general thing across the project, but I see you don't use clang-format either so that should've been good indication as to the fact the same rules don't apply.

I am rewriting the check into performConcatVectorsCombine, I will try not to const all variables.

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


More information about the llvm-commits mailing list