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

Cameron McInally via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 28 07:44:48 PDT 2019


cameron.mcinally accepted this revision.
cameron.mcinally added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/include/llvm/CodeGen/ValueTypes.h:292
+    /// Return the size of the specified value type in bits. An assert will
+    /// occur if this is called on a scalable vector type.
     unsigned getSizeInBits() const {
----------------
Nit-picky: would it make sense to add an explicit !scalable assert to all these functions?

I see that this particular function is guarded by the asserts in getSizeInBits() and getExtendedSizeInBits(), but there's really no guarantee that future modifications will preserve this behavior.

To be clear, I don't feel strongly about this. Just thinking aloud...


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