Skip to content

r300: fix RC_OMOD_DIV_2 modifier

Pavel Ondračka requested to merge ondracka/mesa:r300_omod_div2 into main

Backend only recognizes the MUL a*0.5 pattern if there is an immediate as one of the sources, however by then the source would we already converted to RC_FILE_NONE with constant half swizzles. So teach peephole_omod to recognize this pattern as well.

There is also a cycles reporting fix in presence of KIL.

RV530:
total instructions in shared programs: 128860 -> 128750 (-0.09%)
instructions in affected programs: 11942 -> 11832 (-0.92%)
helped: 106
HURT: 17
total presub in shared programs: 8739 -> 8736 (-0.03%)
presub in affected programs: 32 -> 29 (-9.38%)
helped: 3
HURT: 0
total omod in shared programs: 427 -> 1212 (183.84%)
omod in affected programs: 38 -> 823 (2065.79%)
helped: 0
HURT: 160
total temps in shared programs: 17544 -> 17554 (0.06%)
temps in affected programs: 70 -> 80 (14.29%)
helped: 0
HURT: 10
total lits in shared programs: 3153 -> 3159 (0.19%)
lits in affected programs: 9 -> 15 (66.67%)
helped: 0
HURT: 6
total cycles in shared programs: 191334 -> 191253 (-0.04%)
cycles in affected programs: 21240 -> 21159 (-0.38%)
helped: 101
HURT: 27
Edited by Pavel Ondračka

Merge request reports