[llvm] [RISCV] Change vector tuple type's TypeSize to scalable (PR #114329)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 30 17:08:41 PDT 2024


================
@@ -63,6 +63,7 @@ class VTVecTup<int size, int nf, ValueType dummy_elt, int value>
   let NF = nf;
   let ElementType = dummy_elt;
   let isRISCVVecTuple = true;
+  let isScalable = true;
----------------
topperc wrote:

What I don't want is for this to return true for a tuples.

```
    bool isScalableVector() const {                                              
      return (SimpleTy >= MVT::FIRST_SCALABLE_VECTOR_VALUETYPE &&                
              SimpleTy <= MVT::LAST_SCALABLE_VECTOR_VALUETYPE);                  
    }  
```

I think you just need to change `Sc || Ty == aarch64svcount` in this to `Sc || Tup || Ty == aarch64svcount`

```
    TypeSize getSizeInBits() const {
      static constexpr TypeSize SizeTable[] = {
#define GET_VT_ATTR(Ty, N, Sz, Any, Int, FP, Vec, Sc, Tup, NF, NElem, EltTy) \
    TypeSize(Sz, Sc || Ty == aarch64svcount /* FIXME: Not in the td. */),
#include "llvm/CodeGen/GenVT.inc"                                                
#undef GET_VT_ATTR
```

https://github.com/llvm/llvm-project/pull/114329


More information about the llvm-commits mailing list