Page MenuHomePhabricator

AMDGPU: Invert cmp + select with constant

Authored by arsenm on Dec 20 2016, 2:46 PM.



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.

Diff Detail

Event Timeline

arsenm updated this revision to Diff 82162.Dec 20 2016, 2:46 PM
arsenm retitled this revision from to AMDGPU: Invert cmp + select with constant.
arsenm updated this object.
arsenm added a subscriber: llvm-commits.
arsenm updated this revision to Diff 82241.Dec 21 2016, 9:20 AM
arsenm edited edge metadata.

Use correct type for inverting setcc

tstellarAMD accepted this revision.Dec 21 2016, 6:40 PM
tstellarAMD edited edge metadata.


This revision is now accepted and ready to land.Dec 21 2016, 6:40 PM
arsenm closed this revision.Dec 22 2016, 1:50 PM