LoopVectorize - silence static analyzer dyn_cast<CmpInst> null dereference warning. NFCI.

The static analyzer is warning about a potential null dereference, but we should be able to use cast<CmpInst> directly and if not assert will fire for us.

llvm-svn: 372732
This commit is contained in:
Simon Pilgrim 2019-09-24 11:27:38 +00:00
parent b2077fdc37
commit 934f18144d
1 changed files with 1 additions and 1 deletions

View File

@ -4178,7 +4178,7 @@ void InnerLoopVectorizer::widenInstruction(Instruction &I) {
case Instruction::FCmp: {
// Widen compares. Generate vector compares.
bool FCmp = (I.getOpcode() == Instruction::FCmp);
auto *Cmp = dyn_cast<CmpInst>(&I);
auto *Cmp = cast<CmpInst>(&I);
setDebugLocFromInst(Builder, Cmp);
for (unsigned Part = 0; Part < UF; ++Part) {
Value *A = getOrCreateVectorValue(Cmp->getOperand(0), Part);