summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-09-15 16:20:12 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-09-15 16:20:12 +0000
commit2b4ace3f2990a8e035c1bfd3f6b0dabc143db0c6 (patch)
treeaf8bb9f13900b829a6cb2b2eb53d35a04a1f8f44 /llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
parent556fbfec1359694290fe9798fa84a50033370b21 (diff)
downloadbcm5719-llvm-2b4ace3f2990a8e035c1bfd3f6b0dabc143db0c6.tar.gz
bcm5719-llvm-2b4ace3f2990a8e035c1bfd3f6b0dabc143db0c6.zip
InterleavedLoadCombine - merge isa<> and dyn_cast<> duplicates. NFCI.
Silence static analyzer null dereference warning of *dyn_cast<BinaryOperator> by merging with the isa<BinaryOperator> above. llvm-svn: 371935
Diffstat (limited to 'llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp')
-rw-r--r--llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp b/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
index 9525da849e2..770c4952d16 100644
--- a/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
+++ b/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
@@ -940,8 +940,8 @@ public:
/// \param V input value
/// \param Result result polynomial
static void computePolynomial(Value &V, Polynomial &Result) {
- if (isa<BinaryOperator>(&V))
- computePolynomialBinOp(*dyn_cast<BinaryOperator>(&V), Result);
+ if (auto *BO = dyn_cast<BinaryOperator>(&V))
+ computePolynomialBinOp(*BO, Result);
else
Result = Polynomial(&V);
}
OpenPOWER on IntegriCloud