mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-02 07:32:52 +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 MVT::getExtendedIntegerVT(unsigned BitWidth) {
|
||||||
MVT VT;
|
MVT VT;
|
||||||
VT.LLVMTy = IntegerType::get(BitWidth);
|
VT.LLVMTy = IntegerType::get(BitWidth);
|
||||||
|
assert(VT.isExtended() && "Type is not extended!");
|
||||||
return VT;
|
return VT;
|
||||||
}
|
}
|
||||||
|
|
||||||
MVT MVT::getExtendedVectorVT(MVT VT, unsigned NumElements) {
|
MVT MVT::getExtendedVectorVT(MVT VT, unsigned NumElements) {
|
||||||
MVT ResultVT;
|
MVT ResultVT;
|
||||||
ResultVT.LLVMTy = VectorType::get(VT.getTypeForMVT(), NumElements);
|
ResultVT.LLVMTy = VectorType::get(VT.getTypeForMVT(), NumElements);
|
||||||
|
assert(ResultVT.isExtended() && "Type is not extended!");
|
||||||
return ResultVT;
|
return ResultVT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,6 +69,7 @@ MVT MVT::getExtendedIntegerVT(unsigned BitWidth) {
|
|||||||
if (!ET) ET = new ExtendedIntegerType(BitWidth);
|
if (!ET) ET = new ExtendedIntegerType(BitWidth);
|
||||||
MVT VT;
|
MVT VT;
|
||||||
VT.LLVMTy = ET;
|
VT.LLVMTy = ET;
|
||||||
|
assert(VT.isExtended() && "Type is not extended!");
|
||||||
return VT;
|
return VT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,6 +79,7 @@ MVT MVT::getExtendedVectorVT(MVT VT, unsigned NumElements) {
|
|||||||
if (!ET) ET = new ExtendedVectorType(VT, NumElements);
|
if (!ET) ET = new ExtendedVectorType(VT, NumElements);
|
||||||
MVT ResultVT;
|
MVT ResultVT;
|
||||||
ResultVT.LLVMTy = ET;
|
ResultVT.LLVMTy = ET;
|
||||||
|
assert(ResultVT.isExtended() && "Type is not extended!");
|
||||||
return ResultVT;
|
return ResultVT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user