From 346025b7c02ed961b5785e47acad76ac9a4e491a Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 16 May 2012 04:51:09 +0000 Subject: [PATCH] have tblgen emit cast<> instead of dyn_cast<> when we know it must succeed. llvm-svn: 156902 --- utils/TableGen/IntrinsicEmitter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/TableGen/IntrinsicEmitter.cpp b/utils/TableGen/IntrinsicEmitter.cpp index 05ba5d2490e..be1fd639f7b 100644 --- a/utils/TableGen/IntrinsicEmitter.cpp +++ b/utils/TableGen/IntrinsicEmitter.cpp @@ -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(Tys[" << Number << "]))"; + << "(cast(Tys[" << Number << "]))"; else if (ArgType->isSubClassOf("LLVMTruncatedElementVectorType")) OS << "VectorType::getTruncatedElementVectorType" - << "(dyn_cast(Tys[" << Number << "]))"; + << "(cast(Tys[" << Number << "]))"; else OS << "Tys[" << Number << "]"; } else if (VT == MVT::iAny || VT == MVT::fAny || VT == MVT::vAny) {