[RISCV] Infer mask type for vector intrinsics from the data type
authorCraig Topper <craig.topper@sifive.com>
Thu, 17 Dec 2020 04:04:48 +0000 (20:04 -0800)
committerCraig Topper <craig.topper@sifive.com>
Thu, 17 Dec 2020 04:18:30 +0000 (20:18 -0800)
commit0d7dd026c89baa3f8542ae267d26f55fada36717
tree979a455df42a0ffa15767a7b88e8d83e9fa3da33
parent1e42ad9d629157a9bba53d3c216e3182bcb1408f
[RISCV] Infer mask type for vector intrinsics from the data type

We can use LLVMScalarOrSameVectorWidth<0, llvm_i1_ty> to infer the mask type from the anyvector_ty. This will save us from needing to pass it to getDeclaration when creating these intrinsics from clang.

No tests updates are needed because our declarations are exploiting a behavior in the IR parser where the declaration of an intrinsic doesn't need to mention all the types as long as there isn't a name conflict in the file.

Reviewed By: khchen

Differential Revision: https://reviews.llvm.org/D93409
llvm/include/llvm/IR/IntrinsicsRISCV.td