aboutsummaryrefslogtreecommitdiffstats
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
commita3a23f630a668ce1f32e8a6635ba6b1aa6880201 (patch)
tree3ef2e01cad63ed174cf6bfa232a48080667ef15c
parent125642991f6ae8f771010d2bca058bf7893f2c13 (diff)
downloadexternal_llvm-a3a23f630a668ce1f32e8a6635ba6b1aa6880201.zip
external_llvm-a3a23f630a668ce1f32e8a6635ba6b1aa6880201.tar.gz
external_llvm-a3a23f630a668ce1f32e8a6635ba6b1aa6880201.tar.bz2
Avoid negative logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41829 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Scalar/LoopIndexSplit.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/Scalar/LoopIndexSplit.cpp b/lib/Transforms/Scalar/LoopIndexSplit.cpp
index f182c91..48626ac 100644
--- a/lib/Transforms/Scalar/LoopIndexSplit.cpp
+++ b/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