diff options
| author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-09-23 15:36:24 +0000 |
|---|---|---|
| committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-09-23 15:36:24 +0000 |
| commit | 92fb3820748b1085e1604a2bd50193a5b97e1f99 (patch) | |
| tree | 78742199770cdc2d4e01e3868b03715e49aaa752 /llvm/lib | |
| parent | d8d99d957c1624ac812d2586a22fdc72f79b758e (diff) | |
| download | bcm5719-llvm-92fb3820748b1085e1604a2bd50193a5b97e1f99.tar.gz bcm5719-llvm-92fb3820748b1085e1604a2bd50193a5b97e1f99.zip | |
HexagonLoopIdiomRecognition - silence static analyzer dyn_cast<> null dereference warnings. NFCI.
llvm-svn: 372619
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp b/llvm/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp index 18be03332f8..bda3eccac0c 100644 --- a/llvm/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp +++ b/llvm/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp @@ -632,9 +632,9 @@ Value *PolynomialMultiplyRecognize::getCountIV(BasicBlock *BB) { if (!isa<ConstantInt>(InitV) || !cast<ConstantInt>(InitV)->isZero()) continue; Value *IterV = PN->getIncomingValueForBlock(BB); - if (!isa<BinaryOperator>(IterV)) - continue; auto *BO = dyn_cast<BinaryOperator>(IterV); + if (!BO) + continue; if (BO->getOpcode() != Instruction::Add) continue; Value *IncV = nullptr; @@ -2020,7 +2020,7 @@ bool HexagonLoopIdiomRecognize::processCopyingStore(Loop *CurLoop, // See if the pointer expression is an AddRec like {base,+,1} on the current // loop, which indicates a strided load. If we have something else, it's a // random load we can't handle. - LoadInst *LI = dyn_cast<LoadInst>(SI->getValueOperand()); + auto *LI = cast<LoadInst>(SI->getValueOperand()); auto *LoadEv = cast<SCEVAddRecExpr>(SE->getSCEV(LI->getPointerOperand())); // The trip count of the loop and the base pointer of the addrec SCEV is |

