[PATCH] D75672: [ValueTypes] Add support for scalable EVTs

Cullen Rhodes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 6 03:18:32 PST 2020


c-rhodes added a comment.

In D75672#1907847 <https://reviews.llvm.org/D75672#1907847>, @efriedma wrote:

> Please post patches with full context (-U10000)


I've updated the patch, sorry about that.



================
Comment at: llvm/include/llvm/CodeGen/ValueTypes.h:265
     unsigned getVectorNumElements() const {
-      assert(isVector() && "Invalid vector type!");
+      assert((isVector() || isScalableVector()) && "Invalid vector type!");
       if (isSimple())
----------------
efriedma wrote:
> Not sure changing getVectorNumElements like this makes sense.
I've removed this change, there was just one place in SelectionDAGBuilder I had to fix up to call `getVectorElementCount`. I had a chat with Graham and he suggested it would be good to check if it's a fixed-length vector here, maybe by having something similar to the MVT `isFixedLengthVector` on the EVT which could call `MVT::isFixedLengthVector` if it's a `SimplyTy` or check it's not a scalable vector otherwise.


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

https://reviews.llvm.org/D75672





More information about the llvm-commits mailing list