From 5387a45910fcd4aab3116422233560812b3d43ee Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Sun, 15 Sep 2019 16:20:12 +0000 Subject: [PATCH] InterleavedLoadCombine - merge isa<> and dyn_cast<> duplicates. NFCI. Silence static analyzer null dereference warning of *dyn_cast by merging with the isa above. llvm-svn: 371935 --- lib/CodeGen/InterleavedLoadCombinePass.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CodeGen/InterleavedLoadCombinePass.cpp b/lib/CodeGen/InterleavedLoadCombinePass.cpp index 9525da849e2..770c4952d16 100644 --- a/lib/CodeGen/InterleavedLoadCombinePass.cpp +++ b/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(&V)) - computePolynomialBinOp(*dyn_cast(&V), Result); + if (auto *BO = dyn_cast(&V)) + computePolynomialBinOp(*BO, Result); else Result = Polynomial(&V); }