[llvm] r371935 - InterleavedLoadCombine - merge isa<> and dyn_cast<> duplicates. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 15 09:20:12 PDT 2019
Author: rksimon
Date: Sun Sep 15 09:20:12 2019
New Revision: 371935
URL: http://llvm.org/viewvc/llvm-project?rev=371935&view=rev
Log:
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.
Modified:
llvm/trunk/lib/CodeGen/InterleavedLoadCombinePass.cpp
Modified: llvm/trunk/lib/CodeGen/InterleavedLoadCombinePass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/InterleavedLoadCombinePass.cpp?rev=371935&r1=371934&r2=371935&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/InterleavedLoadCombinePass.cpp (original)
+++ llvm/trunk/lib/CodeGen/InterleavedLoadCombinePass.cpp Sun Sep 15 09:20:12 2019
@@ -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);
}
More information about the llvm-commits
mailing list