[PATCH] D66871: [SVE] MVT scalable size queries

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 6 03:35:31 PST 2019


sdesmalen added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64StackOffset.h:59
+    int64_t OffsetInBytes = Other.first *
+                           (Other.second.getSizeInBits().getKnownMinSize() / 8);
     if (Other.second.isScalableVector())
----------------
Should this be more explicit here? 
e.g.
```
const TypeSize &Size = Other.second.getSizeInBits();
if (Size.isScalable())
  ScalableBytes += Other.first * Size.getScalableSize() / 8;
else
  Bytes += Other.first * Size.getFixedSize() /8;```
(Note that this also assumes adding a `getScalableSize()` to `TypeSize`)


================
Comment at: llvm/utils/TableGen/CodeGenDAGPatterns.cpp:506
   auto LT = [](MVT A, MVT B) -> bool {
+    // Always treat non-scalable MVTs as smaller than scalable MVTs for the
+    // purposes of ordering.
----------------
Is this a good argument to add an interface for `isKnownGreater` and `isKnownGreaterOrEqual` (vis-a-vis `isKnownSmaller`/`IsKnownSmallerOrEqual`) to TypeSize as suggested in https://reviews.llvm.org/D53137#1621351 ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66871





More information about the llvm-commits mailing list