[PATCH] D20225: SelectionDAG: Select min/max when both are used

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu May 12 18:47:18 PDT 2016


arsenm created this revision.
arsenm added a reviewer: jmolloy.
arsenm added a subscriber: llvm-commits.
Herald added a reviewer: tstellarAMD.

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

http://reviews.llvm.org/D20225

Files:
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  test/CodeGen/AMDGPU/select-i1.ll
  test/CodeGen/AMDGPU/sminmax.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20225.57126.patch
Type: text/x-patch
Size: 5581 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160513/ecb4d845/attachment.bin>


More information about the llvm-commits mailing list