[RISCV] Reduce dependency on RISCV::RVVBitsPerBlock for calculating vector size for...
authorCraig Topper <craig.topper@sifive.com>
Thu, 18 May 2023 17:09:50 +0000 (10:09 -0700)
committerCraig Topper <craig.topper@sifive.com>
Thu, 18 May 2023 17:09:50 +0000 (10:09 -0700)
commit3f43abc9e78cce99741f7c8cf54552c95cc98d9f
treeaffaeae040e080feb2880c347f589cf24284306d
parentd3b33042227019a82693733627973170d9760218
[RISCV] Reduce dependency on RISCV::RVVBitsPerBlock for calculating vector size for -mrvv-vector-bits.

We can use the minimum value of the BuiltinType's ElementCount and
the element size.

This needs to be done to support LMUL!=1 types anyway.

I did have to make an ordering change in the error checks in
HandleRISCVRVVVectorBitsTypeAttr to check if the type is an RVV
VLS type before checking the size.
clang/lib/AST/ASTContext.cpp
clang/lib/Sema/SemaType.cpp