[PATCH] D79587: [CodeGen][SVE] Legalisation of extends with scalable types

David Sherwood via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 29 07:02:02 PDT 2020


david-arm added a comment.

Hi Kerry, just a couple of comments about the use of getVectorNumElements() - we're trying to remove calls to this function so it would be good if you could use  getVectorElementCount() instead. Thanks!



================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:13837
+
+  if (InVT.getVectorNumElements() != (VT.getVectorNumElements()*2))
+    return;
----------------
I think we want to move away from calling getVectorNumElements(), so might need to change this to something like

ElementCount ResEC = VT.getVectorElementCount();
if (InVT.getVectorElementCount() != (ResEC * 2))


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:13845
+  unsigned Index = CIndex->getZExtValue();
+  if ((Index != 0) && (Index != VT.getVectorNumElements()))
+    return;
----------------
And here you could then change this to:

if ((Index != 0) && (Index != ResEC.Min))



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

https://reviews.llvm.org/D79587





More information about the cfe-commits mailing list