[llvm] [AArch64] Optimize two large shifts and a combine into a single combine and shift (PR #99480)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 18 21:59:41 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);
+
+ if (Trunc1->getOpcode() == ISD::TRUNCATE &&
+ Trunc2->getOpcode() == ISD::TRUNCATE) {
----------------
davemgreen wrote:
Check that the type of the trunc is double the output size, and the two truncated have the same size?
https://github.com/llvm/llvm-project/pull/99480
More information about the llvm-commits
mailing list