NVPTXAsmPrinter - Don't dereference a dyn_cast result. NFCI.

llvm-svn: 372166
This commit is contained in:
Simon Pilgrim 2019-09-17 19:16:00 +00:00
parent 6e1a9b0fdf
commit 5a5f04afcb
1 changed files with 1 additions and 1 deletions

View File

@ -1861,7 +1861,7 @@ void NVPTXAsmPrinter::bufferLEByte(const Constant *CPV, int Bytes,
case Type::HalfTyID:
case Type::FloatTyID:
case Type::DoubleTyID: {
const ConstantFP *CFP = dyn_cast<ConstantFP>(CPV);
const auto *CFP = cast<ConstantFP>(CPV);
Type *Ty = CFP->getType();
if (Ty == Type::getHalfTy(CPV->getContext())) {
APInt API = CFP->getValueAPF().bitcastToAPInt();