aco: Fix optimizing branching sequence with s_and_saveexec.
This optimization was broken for two reasons:
- s_and_saveexec has two operands, the copy value and exec
- s_and_saveexec has an exec read, so exec_write_used will always be true before we find branch_exec_val_idx
Foz-DB Navi21:
Totals:
CodeSize: 386931332 -> 386931228 (-0.00%)
Instrs: 72444488 -> 72444462 (-0.00%)
Latency: 712020581 -> 709523420 (-0.35%); split: -0.35%, +0.00%
InvThroughput: 138440283 -> 138071063 (-0.27%); split: -0.27%, +0.00%
Copies: 4978454 -> 5154765 (+3.54%)
Totals from 31453 (23.31% of 134913) affected shaders:
CodeSize: 204831260 -> 204831156 (-0.00%)
Instrs: 38157117 -> 38157091 (-0.00%)
Latency: 533708882 -> 531211721 (-0.47%); split: -0.47%, +0.00%
InvThroughput: 107088408 -> 106719188 (-0.34%); split: -0.35%, +0.00%
Copies: 2326179 -> 2502490 (+7.58%)
PERCENTAGE DELTAS Shaders CodeSize Instrs Latency InvThroughput Copies
assassins_creed_origins 2104 . . -0.19% -0.18% +2.96%
battlefront2 4568 . . -0.16% -0.12% +3.03%
britannia 465 . . -0.13% -0.04% +2.67%
control_msaa4x 752 . . -0.08% -0.01% +0.81%
control_no_msaa 752 . . -0.08% -0.01% +0.81%
cyberpunk_2077 5465 . . -0.23% -0.01% +3.14%
dark_souls_1_remastered 2017 . . -0.35% . +1.12%
dark_souls_2_sotfs 3262 . . -0.00% . +0.00%
dark_souls_3 8904 . . -0.34% -0.13% +3.94%
death_stranding 1467 . . -0.10% -0.01% +3.55%
detroit_become_human 19959 -0.00% -0.00% -0.63% -0.43% +4.05%
deus_ex_md 8063 . . -0.08% -0.05% +0.58%
dirt4 4030 . . -0.38% -0.31% +6.39%
doom_2016 2045 . . -0.11% -0.04% +3.74%
doom_eternal 1211 . . -0.20% -0.11% +4.32%
dota2 1015 . . -0.05% -0.00% +1.31%
dow3 280 . . -0.08% -0.01% +1.32%
evilwithin_demo 740 . . -0.03% -0.01% +0.78%
f12017 3365 . . -0.30% -0.21% +2.92%
farcry5 5925 . . -0.40% -0.28% +4.13%
gtav 2987 . . -0.01% -0.01% +0.29%
heaven_d3d9_strict_float_ultra_4xaa 286 . . -0.04% -0.00% +0.48%
hitman 1606 . . -0.41% -0.35% +3.25%
madmax 948 . . -0.03% -0.00% +0.42%
PERCENTAGE DELTAS Shaders CodeSize Instrs Latency InvThroughput Copies
monster_hunter_world_d3d11 3122 . . -0.31% -0.19% +8.09%
monster_hunter_world_d3d12 450 . . -0.53% -0.06% +10.75%
nier 2422 . . -0.11% -0.09% +0.79%
parallel-rdp/small_subgroup 246 . . -0.35% -0.15% +10.91%
parallel-rdp/small_uber_subgroup 55 . . -0.06% -0.05% +1.29%
parallel-rdp/subgroup 327 . . -0.39% -0.11% +13.69%
parallel-rdp/uber_subgroup 55 . . -0.04% -0.03% +1.99%
q2rtx 49 . . -0.54% -0.53% +10.77%
rage2 6876 . . -0.26% -0.20% +3.78%
rdr2 3888 . . -0.24% -0.78% +5.04%
redout 2509 . . -0.15% -0.02% +3.16%
rottr 8120 . . -0.06% -0.04% +0.55%
sottr_demo 5705 . . -0.47% -0.40% +7.51%
strange_brigade 1417 . . -0.05% -0.04% +1.26%
talos 794 . . -0.00% -0.00% +0.02%
thewitness 3150 . . -0.06% -0.00% +1.62%
threekingdoms 844 . . -0.05% -0.01% +1.33%
tomb_raider 6410 . . -0.02% -0.02% +0.27%
warhammer2 1803 . . -0.05% -0.00% +1.74%
wolfenstein2_fp16 1012 . . -0.14% -0.06% +5.82%
worldofwarships 2130 . . -0.09% -0.00% +1.43%
youngblood 631 . . -0.20% -0.13% +6.96%
youngblood_fp16 682 . . -0.12% -0.08% +5.74%
---------------------------------------------------------------------------------------------------
All affected 31453 -0.00% -0.00% -0.47% -0.34% +7.58%
---------------------------------------------------------------------------------------------------
Total 134913 -0.00% -0.00% -0.35% -0.27% +3.54%