summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2007-09-11 01:10:45 +0000
committerDevang Patel <dpatel@apple.com>2007-09-11 01:10:45 +0000
commit7ed6eb899283a6adebd376b2d9b92fb8b3f223ac (patch)
tree2a201d63ab47441e06ed141917309c3b27e85baf
parent8c95373cede0eb8b0e8913a46856d02b12e90a60 (diff)
downloadbcm5719-llvm-7ed6eb899283a6adebd376b2d9b92fb8b3f223ac.tar.gz
bcm5719-llvm-7ed6eb899283a6adebd376b2d9b92fb8b3f223ac.zip
Avoid negative logic.
llvm-svn: 41829
-rw-r--r--llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp b/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp
index f182c9138ca..48626ac475e 100644
--- a/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp
@@ -410,10 +410,10 @@ void LoopIndexSplit::findSplitCondition() {
// If split condition predicate is GT or GE then first execute
// false branch of split condition.
- if (CI->getPredicate() != ICmpInst::ICMP_ULT
- && CI->getPredicate() != ICmpInst::ICMP_SLT
- && CI->getPredicate() != ICmpInst::ICMP_ULE
- && CI->getPredicate() != ICmpInst::ICMP_SLE)
+ if (CI->getPredicate() == ICmpInst::ICMP_UGT
+ || CI->getPredicate() == ICmpInst::ICMP_SGT
+ || CI->getPredicate() == ICmpInst::ICMP_UGE
+ || CI->getPredicate() == ICmpInst::ICMP_SGE)
SD.UseTrueBranchFirst = false;
// If one operand is loop invariant and second operand is SCEVAddRecExpr
OpenPOWER on IntegriCloud