nv50/ir: optimize sub(a, 0) to a
authorKarol Herbst <karolherbst@gmail.com>
Wed, 5 Oct 2016 22:36:23 +0000 (00:36 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 6 Oct 2016 17:39:51 +0000 (19:39 +0200)
commitf96945c5b5c3a52685e76795f03f75c75fb62fc7
tree306c03a489c8d124ff26c6f4eed9241d26615a16
parent6963f94e98e9b0a1432bc0071d495c9e31b899ae
nv50/ir: optimize sub(a, 0) to a

helped some ue4 demos and divinity OS shaders

total instructions in shared programs : 2818674 -> 2818606 (-0.00%)
total gprs used in shared programs    : 379273 -> 379273 (0.00%)
total local used in shared programs   : 9505 -> 9505 (0.00%)
total bytes used in shared programs   : 25837792 -> 25837192 (-0.00%)

                local        gpr       inst      bytes
    helped           0           0          33          33
      hurt           0           0           0           0

Signed-off-by: Karol Herbst <karolherbst@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Pierre Moreau <pierre.morrow@free.fr>
src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp