[PATCH] D107597: [DAG] Fold concat_vectors(concat_vectors(x,y),concat_vectors(a,b)) -> concat_vectors(x,y,a,b)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 6 01:06:41 PDT 2021


RKSimon added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:13587
   // canonicalise to that.
   if (N0 == N1 && VT.getVectorNumElements() == 2) {
     assert(VT.getScalarSizeInBits() == 64);
----------------
dmgreen wrote:
> Can you add a N->getNumOperands() == 2 check here, to be safe.
OK - by the looks of it none of the folds in this function are safe for N->getNumOperands() != 2 - but I'll leave the tests on the individual fold so this can be more easily improved in the future.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107597/new/

https://reviews.llvm.org/D107597



More information about the llvm-commits mailing list