Compile:
authorChris Lattner <sabre@nondot.org>
Wed, 20 Sep 2006 06:41:35 +0000 (06:41 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 20 Sep 2006 06:41:35 +0000 (06:41 +0000)
commite3152e54b5e92ef4bc29b3d8c5923893d31617ab
tree83acfd58c8e16712eee5d54c9dd46fb9b815b589
parent72475c04ed86a4d1d5613c608dfdd8b2f78e2a7a
Compile:
int test3(int a, int b) { return (a < 0) ? a : 0; }

to:

_test3:
        srawi r2, r3, 31
        and r3, r2, r3
        blr

instead of:

_test3:
        cmpwi cr0, r3, 1
        li r2, 0
        blt cr0, LBB2_2 ;entry
LBB2_1: ;entry
        mr r3, r2
LBB2_2: ;entry
        blr

This implements: PowerPC/select_lt0.ll:seli32_a_a

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