diff options
author | Michael Maitland <michaeltmaitland@gmail.com> | 2023-11-14 13:15:41 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-14 13:15:41 -0500 |
commit | a7bbcc4690215bebb5aa5eee75c712e5a23fd09e (patch) | |
tree | be41b0e8a1fc27aabec4d355136b7074594ad636 /llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp | |
parent | 506a30d30fa3cb19b4d2f04e1354cedc09925558 (diff) | |
download | llvm-a7bbcc4690215bebb5aa5eee75c712e5a23fd09e.zip llvm-a7bbcc4690215bebb5aa5eee75c712e5a23fd09e.tar.gz llvm-a7bbcc4690215bebb5aa5eee75c712e5a23fd09e.tar.bz2 |
[RISCV][GISEL] Add support for lowerFormalArguments that contain scalable vector types (#70882)
Scalable vector types from LLVM IR can be lowered to scalable vector
types in MIR according to the RISCVAssignFn.
Diffstat (limited to 'llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp')
-rw-r--r-- | llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp b/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp index 5b4e2b7..80e9c08 100644 --- a/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp +++ b/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp @@ -1065,16 +1065,16 @@ void MachineIRBuilder::validateTruncExt(const LLT DstTy, const LLT SrcTy, #ifndef NDEBUG if (DstTy.isVector()) { assert(SrcTy.isVector() && "mismatched cast between vector and non-vector"); - assert(SrcTy.getNumElements() == DstTy.getNumElements() && + assert(SrcTy.getElementCount() == DstTy.getElementCount() && "different number of elements in a trunc/ext"); } else assert(DstTy.isScalar() && SrcTy.isScalar() && "invalid extend/trunc"); if (IsExtend) - assert(DstTy.getSizeInBits() > SrcTy.getSizeInBits() && + assert(TypeSize::isKnownGT(DstTy.getSizeInBits(), SrcTy.getSizeInBits()) && "invalid narrowing extend"); else - assert(DstTy.getSizeInBits() < SrcTy.getSizeInBits() && + assert(TypeSize::isKnownLT(DstTy.getSizeInBits(), SrcTy.getSizeInBits()) && "invalid widening trunc"); #endif } |