diff --git a/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp b/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp index 48626ac475ed633c5115e93166ce0bd1bd526298..b40dd04c82dd240d42e9d084f386a9827684c565 100644 --- a/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp +++ b/llvm/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;