On Sat, Jan 24, 2015 at 4:16 AM, Kenneth Graunke <kenn...@whitecape.org> wrote: > "MOV.nz null src" and "CMP.nz null src 0" are equivalent instructions. > > Previously, we deleted MOV.nz instructions when the instruction > generating the MOV's source also wrote the flag register (as the flag > register already contains the desired value). However, we wouldn't > delete CMP.nz instructions that served the same purpose. > > We also didn't attempt true cmod propagation on MOV.nz instructions, > while we would for the equivalent CMP.nz form. > > This patch fixes both limitations, treating both forms equally. > CMP.nz instructions will now be deleted (helping the NIR backend), > and MOV.nz instructions will have their .nz propagated. > > No changes in shader-db without NIR. With NIR, > > total instructions in shared programs: 6006153 -> 5969364 (-0.61%) > instructions in affected programs: 2087139 -> 2050350 (-1.76%) > helped: 10704 > HURT: 0 > GAINED: 2 > LOST: 2
Nice. Thanks! Reviewed-by: Matt Turner <matts...@gmail.com> _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev