[PATCH] D28004: AMDGPU: Invert cmp + select with constant

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 20 14:46:36 PST 2016


arsenm created this revision.
arsenm added a subscriber: llvm-commits.
Herald added a reviewer: tstellarAMD.
Herald added subscribers: tony-tye, yaxunl, nhaehnle, wdng, kzhuravl.

Canonicalize a select with a constant to the false side. This
enables more instruction shrinking opportunities since an
inline immediate can be used for the false side of v_cndmask_b32_e32.

      

This seems to usually be better but causes some code size regressions
in some tests.


https://reviews.llvm.org/D28004

Files:
  lib/Target/AMDGPU/AMDGPUISelLowering.cpp
  test/CodeGen/AMDGPU/ctlz.ll
  test/CodeGen/AMDGPU/select-fabs-fneg-extract.ll
  test/CodeGen/AMDGPU/select.f16.ll
  test/CodeGen/AMDGPU/v_cndmask.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28004.82162.patch
Type: text/x-patch
Size: 26009 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161220/1ba6ab64/attachment.bin>


More information about the llvm-commits mailing list