[llvm] r243302 - Revert "Remove unnecessary null check. NFC."
Pete Cooper
peter_cooper at apple.com
Mon Jul 27 11:37:58 PDT 2015
Author: pete
Date: Mon Jul 27 13:37:58 2015
New Revision: 243302
URL: http://llvm.org/viewvc/llvm-project?rev=243302&view=rev
Log:
Revert "Remove unnecessary null check. NFC."
This reverts commit r243167.
Duncan pointed out that dyn_cast can return null in these cases, so this
was an unsafe commit to make. Sorry for the noise.
Worryingly there were no tests which fail...
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopInterchange.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopInterchange.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopInterchange.cpp?rev=243302&r1=243301&r2=243302&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopInterchange.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopInterchange.cpp Mon Jul 27 13:37:58 2015
@@ -817,6 +817,9 @@ bool LoopInterchangeLegality::currentLim
InnerIndexVarInc =
dyn_cast<Instruction>(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.
More information about the llvm-commits
mailing list