This patch does two things. First, it canonicalizes 'X >= C' -> 'X > C-1'
authorChris Lattner <sabre@nondot.org>
Thu, 7 Apr 2005 18:14:58 +0000 (18:14 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 7 Apr 2005 18:14:58 +0000 (18:14 +0000)
commit67255a1d1783c126c1cbd4982670a61bc63aacce
tree6baad1ade245700d92a05d2a4ba673996992fbad
parent0b5031abd44cdce6ce82bbe4828fa4f1e50064da
This patch does two things.  First, it canonicalizes 'X >= C' -> 'X > C-1'
(likewise for <= >=u >=u).

Second, it implements a special case hack to turn 'X gtu SINTMAX' -> 'X lt 0'

On powerpc, for example, this changes this:

        lis r2, 32767
        ori r2, r2, 65535
        cmplw cr0, r3, r2
        bgt .LBB_test_2

into:

        cmpwi cr0, r3, 0
        blt .LBB_test_2

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21142 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAG.cpp