This break is bogus and I have no idea why it was there. Basically it prevents
authorChris Lattner <sabre@nondot.org>
Mon, 3 Oct 2005 00:37:33 +0000 (00:37 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 3 Oct 2005 00:37:33 +0000 (00:37 +0000)
commit1902ff4d82559f248082dec39f50628330bad275
treebcd4f91b54472466c91205cdbc5e3818208f9b74
parent37edbf0b21959e176672ae51f8b7e86ba1ef727d
This break is bogus and I have no idea why it was there.  Basically it prevents
memoizing code when IV's are used by phinodes outside of loops.  In a simple
example, we were getting this code before (note that r6 and r7 are isomorphic
IV's):

        li r6, 0
        or r7, r6, r6
LBB_test_3:     ; no_exit
        lwz r2, 0(r3)
        cmpw cr0, r2, r5
        or r2, r7, r7
        beq cr0, LBB_test_5     ; loopexit
LBB_test_4:     ; endif
        addi r2, r7, 1
        addi r7, r7, 1
        addi r3, r3, 4
        addi r6, r6, 1
        cmpw cr0, r6, r4
        blt cr0, LBB_test_3     ; no_exit

Now we get:

        li r6, 0
LBB_test_3:     ; no_exit
        or r2, r6, r6
        lwz r6, 0(r3)
        cmpw cr0, r6, r5
        beq cr0, LBB_test_6     ; loopexit
LBB_test_4:     ; endif
        addi r3, r3, 4
        addi r6, r2, 1
        cmpw cr0, r6, r4
        blt cr0, LBB_test_3     ; no_exit

this was noticed in em3d.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23602 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopStrengthReduce.cpp