From 2b4ace3f2990a8e035c1bfd3f6b0dabc143db0c6 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 --- llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp b/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp index 9525da8..770c495 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(&V)) - computePolynomialBinOp(*dyn_cast(&V), Result); + if (auto *BO = dyn_cast(&V)) + computePolynomialBinOp(*BO, Result); else Result = Polynomial(&V); } -- 2.7.4