aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2007-09-14 05:08:12 +0000
committerTanya Lattner <tonic@nondot.org>2007-09-14 05:08:12 +0000
commit6cfb85cb1788021c45cf7717ed5ff733b9c5f21f (patch)
tree2c07387783483f32fe3586ce35bcbd03c6238c70
parent1a66c09a6f52663c9094ab3dae307f459af37a8c (diff)
Merge from mainline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_21@41952 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Scalar/LoopIndexSplit.cpp20
1 files changed, 5 insertions, 15 deletions
diff --git a/lib/Transforms/Scalar/LoopIndexSplit.cpp b/lib/Transforms/Scalar/LoopIndexSplit.cpp
index 48626ac475..b40dd04c82 100644
--- a/lib/Transforms/Scalar/LoopIndexSplit.cpp
+++ b/lib/Transforms/Scalar/LoopIndexSplit.cpp
@@ -336,24 +336,14 @@ void LoopIndexSplit::findLoopConditionals() {
if (!CI)
return;
- // FIXME
- if (CI->getPredicate() == ICmpInst::ICMP_EQ
- || CI->getPredicate() == ICmpInst::ICMP_NE)
- return;
-
+ // FIXME
if (CI->getPredicate() == ICmpInst::ICMP_SGT
|| CI->getPredicate() == ICmpInst::ICMP_UGT
|| CI->getPredicate() == ICmpInst::ICMP_SGE
- || CI->getPredicate() == ICmpInst::ICMP_UGE) {
-
- BasicBlock *FirstSuccessor = BR->getSuccessor(0);
- // splitLoop() is expecting LT/LE as exit condition predicate.
- // Swap operands here if possible to meet this requirement.
- if (!L->contains(FirstSuccessor))
- CI->swapOperands();
- else
- return;
- }
+ || CI->getPredicate() == ICmpInst::ICMP_UGE
+ || CI->getPredicate() == ICmpInst::ICMP_EQ
+ || CI->getPredicate() == ICmpInst::ICMP_NE)
+ return;
ExitCondition = CI;