have tblgen emit cast<> instead of dyn_cast<> when we know it must succeed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156902 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2012-05-16 04:51:09 +00:00
parent 6100366c2f
commit 7200c5cd30

View File

@ -236,10 +236,10 @@ static void EmitTypeGenerate(raw_ostream &OS, const Record *ArgType,
assert(Number < ArgNo && "Invalid matching number!");
if (ArgType->isSubClassOf("LLVMExtendedElementVectorType"))
OS << "VectorType::getExtendedElementVectorType"
<< "(dyn_cast<VectorType>(Tys[" << Number << "]))";
<< "(cast<VectorType>(Tys[" << Number << "]))";
else if (ArgType->isSubClassOf("LLVMTruncatedElementVectorType"))
OS << "VectorType::getTruncatedElementVectorType"
<< "(dyn_cast<VectorType>(Tys[" << Number << "]))";
<< "(cast<VectorType>(Tys[" << Number << "]))";
else
OS << "Tys[" << Number << "]";
} else if (VT == MVT::iAny || VT == MVT::fAny || VT == MVT::vAny) {