nv50/ir: move a * b -> a << log2(b) code into createMul()
authorRhys Perry <pendingchaos02@gmail.com>
Wed, 13 Jun 2018 15:30:01 +0000 (16:30 +0100)
committerRhys Perry <pendingchaos02@gmail.com>
Mon, 27 Aug 2018 12:56:47 +0000 (13:56 +0100)
commit2f52925f5c60c72c9389bfdc122c3d5f8e15b25f
treeadb69f9ebd07b998164fd28778f724e9952906c8
parentb60bc7a4ab0b252ce8f8a82076a45f3a16202d58
nv50/ir: move a * b -> a << log2(b) code into createMul()

With this commit, OP_MAD is handled on nv50 too. This commit is also
useful for later commits.

Also, instead of creating a shladd, it relies on LateAlgebraicOpt to
create one. This simplifies the code and helps shader-db slightly overall.

total instructions in shared programs : 5820882 -> 5819319 (-0.03%)
total gprs used in shared programs    : 670595 -> 670571 (-0.00%)
total shared used in shared programs  : 548832 -> 548832 (0.00%)
total local used in shared programs   : 21164 -> 21164 (0.00%)

                local     shared        gpr       inst      bytes
    helped           0           0          18         230         230
      hurt           0           0           8         263         263

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp