From: Sanjay Patel Date: Tue, 9 Mar 2021 21:56:43 +0000 (-0500) Subject: [SLP] remove dead null check; NFC X-Git-Tag: llvmorg-14-init~12842 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=23fd647cc6b8d25076188492e6424eee60c31326;p=platform%2Fupstream%2Fllvm.git [SLP] remove dead null check; NFC We cast<> to Instruction (not dyn_cast<>), so we already required/assumed that Cmp is not null. --- diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index 065ddca..10ee163 100644 --- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -6682,7 +6682,7 @@ class HorizontalReduction { bool IsRedOp) { if (IsRedOp && isCmpSel(Kind)) { auto *Cmp = cast(cast(I)->getCondition()); - return I->getParent() == BB && Cmp && Cmp->getParent() == BB; + return I->getParent() == BB && Cmp->getParent() == BB; } return I->getParent() == BB; }