[PATCH] D114600: [CodeGen][AArch64] Bail out in performConcatVectorsCombine for scalable vectors

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 25 07:49:56 PST 2021


david-arm created this revision.
david-arm added reviewers: sdesmalen, CarolineConcatto, c-rhodes.
Herald added subscribers: hiraditya, kristof.beyls.
david-arm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

I tried to exercise the existing combine patterns in performConcatVectorsCombine
for scalable vectors and at the moment it doesn't seem possible. Parts of
the code currently assume we're dealing with fixed-width vectors with calls
to getVectorNumElements(), therefore I've decided to simply bail out early
for scalable vectors.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114600

Files:
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp


Index: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
===================================================================
--- llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -14049,6 +14049,9 @@
   SDValue N0 = N->getOperand(0), N1 = N->getOperand(1);
   unsigned N0Opc = N0->getOpcode(), N1Opc = N1->getOpcode();
 
+  if (VT.isScalableVector())
+    return SDValue();
+
   // Optimize concat_vectors of truncated vectors, where the intermediate
   // type is illegal, to avoid said illegality,  e.g.,
   //   (v4i16 (concat_vectors (v2i16 (truncate (v2i64))),


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114600.389794.patch
Type: text/x-patch
Size: 617 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211125/cf0296d7/attachment.bin>


More information about the llvm-commits mailing list