From b0fd31a910a0f241019ec88a82d0c9d611ea22d0 Mon Sep 17 00:00:00 2001 From: Pete Cooper Date: Fri, 24 Jul 2015 21:38:01 +0000 Subject: [PATCH] Remove unnecessary null check. NFC. Since both places which set this variable do so with dyn_cast, and not dyn_cast_or_null, its impossible to get a nullptr here, so we can remove the check. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243167 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/LoopInterchange.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/Transforms/Scalar/LoopInterchange.cpp b/lib/Transforms/Scalar/LoopInterchange.cpp index 9d7e57ffeba..75fe0c77e7b 100644 --- a/lib/Transforms/Scalar/LoopInterchange.cpp +++ b/lib/Transforms/Scalar/LoopInterchange.cpp @@ -817,9 +817,6 @@ bool LoopInterchangeLegality::currentLimitations() { InnerIndexVarInc = dyn_cast(InnerInductionVar->getIncomingValue(0)); - if (!InnerIndexVarInc) - return true; - // Since we split the inner loop latch on this induction variable. Make sure // we do not have any instruction between the induction variable and branch // instruction. -- 2.34.1