[PATCH] D82214: [SVE] Remove calls to VectorType::getNumElements from AArch64

Christopher Tetreault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 29 13:01:54 PDT 2020


ctetreau marked an inline comment as done.
ctetreau added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:9642
 
-  VectorType *VecTy = Shuffles[0]->getType();
+  auto *VecTy = Shuffles[0]->getType();
 
----------------
david-arm wrote:
> Hi @ctetreau, could you not just cast Shuffles[0]->getType() to a FixedVectorType here, then avoid having to make the two typecasts below? That way if it is indeed a scalable vector it will blow up earlier, perhaps in a more obvious place?
This would probably be better. I moved the cast down a few lines to bypass the early return and getNumInterleavedAccesses that allegedly works on the base vector type. This gets rid of quite a few casts.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82214





More information about the llvm-commits mailing list