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

llvm-svn: 156902
This commit is contained in:
Chris Lattner 2012-05-16 04:51:09 +00:00
parent 9a33fc17be
commit 346025b7c0

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) {