mesa/src/amd
Samuel Pitoiset d9e4504b0d aco: optimize v_add+s_lshl to v_mad_u32_u24 on GFX6-8
This optimizes v_add(c, s_lshl(a, b)) to v_mad_u32_u24(a, 1<<b, c)
if 'b' is a constant (less than or equal to 6 to avoid creating
literals) and 'a' known to be a 16-bit or a 24-bit value.

On GFX9+, this is already optimized to v_lshl_add_u32.

fossils-db (Polaris10):
Totals from 1916 (1.36% of 140385) affected shaders:
SGPRs: 88322 -> 87780 (-0.61%); split: -0.66%, +0.05%
CodeSize: 7852668 -> 7851800 (-0.01%); split: -0.01%, +0.00%
Instrs: 1533965 -> 1530459 (-0.23%); split: -0.23%, +0.00%
Cycles: 57001852 -> 56983244 (-0.03%); split: -0.03%, +0.00%
VMEM: 372561 -> 371733 (-0.22%); split: +0.03%, -0.25%
SMEM: 108859 -> 103711 (-4.73%); split: +0.23%, -4.96%
VClause: 37231 -> 37204 (-0.07%)
SClause: 58116 -> 58086 (-0.05%); split: -0.06%, +0.01%
Copies: 199953 -> 199931 (-0.01%); split: -0.03%, +0.02%
Branches: 63478 -> 63477 (-0.00%)
PreSGPRs: 61818 -> 61816 (-0.00%)

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7673>
2020-11-23 18:34:40 +00:00
..
addrlib amd/addrlib: Use signed char for INT_8. 2020-11-13 02:37:54 +00:00
common ac,radv: use better export formats for 8-bit when RB+ isn't allowed 2020-11-23 17:54:16 +00:00
compiler aco: optimize v_add+s_lshl to v_mad_u32_u24 on GFX6-8 2020-11-23 18:34:40 +00:00
llvm ac/llvm: prepare for passing VS->TCS IO via VGPRs 2020-11-23 02:22:21 +00:00
registers amd: add register enums for VRS 2020-11-17 22:16:19 +00:00
vulkan ac,radv: use better export formats for 8-bit when RB+ isn't allowed 2020-11-23 17:54:16 +00:00
Android.addrlib.mk android: amd/addrlib: add gfx10 support 2019-07-10 09:03:55 +02:00
Android.common.mk android: amd/registers: switch to new generated register definitions 2020-09-06 20:20:34 +02:00
Android.compiler.mk android: aco/isel: Move context initialization code to a dedicated file 2020-09-14 21:26:53 +02:00
Android.mk android: aco: add support for libmesa_aco 2019-09-28 15:56:34 +02:00
Makefile.sources android: aco: add aco_form_hard_clauses.cpp to Makefile.sources 2020-10-30 13:34:06 +00:00
meson.build aco: add framework for unit testing 2020-07-30 16:13:08 +00:00