OSDN Git Service

SelectionDAG: Select min/max when both are used
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 16 May 2016 20:58:23 +0000 (20:58 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 16 May 2016 20:58:23 +0000 (20:58 +0000)
commit3b880e33a0c61ed2500d4883b139e00eac1a0988
tree60e379f405ebcd3e9a0796a3eacc225515c8c69d
parent7f7d4688d407a12a16944307cc684aa31f0d0682
SelectionDAG: Select min/max when both are used

Allow two users of the condition if the other user
is also a min/max select. i.e.

%c = icmp slt i32 %x, %y
%min = select i1 %c, i32 %x, i32 %y
%max = select i1 %c, i32 %y, i32 %x

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269699 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
test/CodeGen/AMDGPU/select-i1.ll
test/CodeGen/AMDGPU/sminmax.ll