Handle loop with negtive induction variable increment
authorLawrence Hu <lawrence@codeaurora.org>
Fri, 24 Jul 2015 22:01:49 +0000 (22:01 +0000)
committerLawrence Hu <lawrence@codeaurora.org>
Fri, 24 Jul 2015 22:01:49 +0000 (22:01 +0000)
commit5136ca2c6d8e6b9d1a00cc0d1327903b04564046
tree7b2579a48b67cc2ad61da43b9ce6e1263b7d67c3
parentb0fd31a910a0f241019ec88a82d0c9d611ea22d0
Handle loop with negtive induction variable increment

This patch extend LoopReroll pass to hand the loops which
is similar to the following:

      while (len > 1) {
            sum4 += buf[len];
            sum4 += buf[len-1];
            len -= 2;
        }

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243171 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopRerollPass.cpp
test/Transforms/LoopReroll/negative.ll [new file with mode: 0644]