mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-04 01:42:09 +00:00
Add some asserts to verify MVT invariant assumptions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58701 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
aa386d0881
commit
38bb2f8d09
@ -20,12 +20,14 @@ using namespace llvm;
|
||||
MVT MVT::getExtendedIntegerVT(unsigned BitWidth) {
|
||||
MVT VT;
|
||||
VT.LLVMTy = IntegerType::get(BitWidth);
|
||||
assert(VT.isExtended() && "Type is not extended!");
|
||||
return VT;
|
||||
}
|
||||
|
||||
MVT MVT::getExtendedVectorVT(MVT VT, unsigned NumElements) {
|
||||
MVT ResultVT;
|
||||
ResultVT.LLVMTy = VectorType::get(VT.getTypeForMVT(), NumElements);
|
||||
assert(ResultVT.isExtended() && "Type is not extended!");
|
||||
return ResultVT;
|
||||
}
|
||||
|
||||
|
@ -69,6 +69,7 @@ MVT MVT::getExtendedIntegerVT(unsigned BitWidth) {
|
||||
if (!ET) ET = new ExtendedIntegerType(BitWidth);
|
||||
MVT VT;
|
||||
VT.LLVMTy = ET;
|
||||
assert(VT.isExtended() && "Type is not extended!");
|
||||
return VT;
|
||||
}
|
||||
|
||||
@ -78,6 +79,7 @@ MVT MVT::getExtendedVectorVT(MVT VT, unsigned NumElements) {
|
||||
if (!ET) ET = new ExtendedVectorType(VT, NumElements);
|
||||
MVT ResultVT;
|
||||
ResultVT.LLVMTy = ET;
|
||||
assert(ResultVT.isExtended() && "Type is not extended!");
|
||||
return ResultVT;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user