[PATCH] D92554: [SVE] Fix crashes with inline assembly

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 8 05:51:18 PST 2020


david-arm added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:7418
+      uint64_t VTSize = VT.getFixedSizeInBits();
+      if (VTSize == 16)
         return std::make_pair(0U, &AArch64::FPR16RegClass);
----------------
sdesmalen wrote:
> nit: is it worth rewriting this to:
> 
>   TypeSize VTSize = VT.getSizeInBits();
>   if (VTSize == TypeSize::getScalable(1))
>     return ...
>   if (VTSize == TypeSize::getFixed(16))
>     return ...
>   if (VTSize == TypeSize::getFixed(32))
>     return ...
> 
>   if (VT.isScalableVector())
>     return std::make_pair(0U, nullptr);
>   break;
Hi Sander, I tried rewriting this and then I realised we can't check "VTSize == TypeSize::getScalable(1)" because this is looking for a size of "vscale x 1 byte", which isn't the same as a predicate. I felt it was more obvious to check the element type explicitly. Hope that's ok!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92554



More information about the llvm-commits mailing list