aco: Improve SCC nocompare optimization when SCC is clobbered.
When SCC is clobbered between s_cmp and its operand's writer,
the current optimization that eliminates s_cmp won't kick in.
However, when s_cmp is the only user of its operand temporary,
it is possible to "pull down" the instruction that wrote the operand.
Fossil DB stats on Navi 21:
Totals from 63302 (46.92% of 134906) affected shaders:
CodeSize:
176689272 ->
176418332 (-0.15%)
Instrs:
33552237 ->
33484502 (-0.20%)
Latency:
205847485 ->
205816205 (-0.02%); split: -0.02%, +0.00%
InvThroughput:
34321285 ->
34319908 (-0.00%); split: -0.00%, +0.00%
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16266>