summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-10-03 00:37:33 +0000
committerChris Lattner <sabre@nondot.org>2005-10-03 00:37:33 +0000
commit360928dbed032416b7fc1e740a9d53c9119a675c (patch)
treed8a14846018fdb55a6af08fe9b260aacf9bc2bf6
parent8fcce170cf0d3c2a49b48f6dced0a4a63ce3f97c (diff)
downloadbcm5719-llvm-360928dbed032416b7fc1e740a9d53c9119a675c.tar.gz
bcm5719-llvm-360928dbed032416b7fc1e740a9d53c9119a675c.zip
This break is bogus and I have no idea why it was there. Basically it prevents
memoizing code when IV's are used by phinodes outside of loops. In a simple example, we were getting this code before (note that r6 and r7 are isomorphic IV's): li r6, 0 or r7, r6, r6 LBB_test_3: ; no_exit lwz r2, 0(r3) cmpw cr0, r2, r5 or r2, r7, r7 beq cr0, LBB_test_5 ; loopexit LBB_test_4: ; endif addi r2, r7, 1 addi r7, r7, 1 addi r3, r3, 4 addi r6, r6, 1 cmpw cr0, r6, r4 blt cr0, LBB_test_3 ; no_exit Now we get: li r6, 0 LBB_test_3: ; no_exit or r2, r6, r6 lwz r6, 0(r3) cmpw cr0, r6, r5 beq cr0, LBB_test_6 ; loopexit LBB_test_4: ; endif addi r3, r3, 4 addi r6, r2, 1 cmpw cr0, r6, r4 blt cr0, LBB_test_3 ; no_exit this was noticed in em3d. llvm-svn: 23602
-rw-r--r--llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index cf0b6b0b958..9a39a4a3abb 100644
--- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -478,7 +478,6 @@ void BasedUser::RewriteInstructionToUseNewBase(const SCEVHandle &NewBase,
BasicBlock *NewBB = PN->getIncomingBlock(i);
NewBB->moveBefore(PN->getParent());
}
- break;
}
Value *&Code = InsertedCode[PN->getIncomingBlock(i)];
OpenPOWER on IntegriCloud