gm200/ir: optimize rcp(sqrt) to rsq
authorKarol Herbst <kherbst@redhat.com>
Sat, 4 Aug 2018 02:19:49 +0000 (04:19 +0200)
committerKarol Herbst <kherbst@redhat.com>
Sat, 4 Aug 2018 13:24:08 +0000 (15:24 +0200)
commit0ca046d7e97564c0479cb8d42ba40c798c163bb5
tree46472f59621dd703649749275424a0250777b9a4
parent6f98a3065bce873652e24e3591c3d57192514473
gm200/ir: optimize rcp(sqrt) to rsq

mitigates hurt shaders after adding sqrt:
total instructions in shared programs : 5456166 -> 5454825 (-0.02%)
total gprs used in shared programs    : 647522 -> 647551 (0.00%)
total shared used in shared programs  : 389120 -> 389120 (0.00%)
total local used in shared programs   : 21064 -> 21064 (0.00%)
total bytes used in shared programs   : 58288696 -> 58274448 (-0.02%)

                local     shared        gpr       inst      bytes
    helped           0           0           0         516         516
      hurt           0           0          27           2           2

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp