nv50/ir: optimize IMAD to SHLADD in presence of power of 2
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 14 Sep 2016 16:49:36 +0000 (18:49 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 29 Sep 2016 19:20:41 +0000 (21:20 +0200)
commite4eb0fca024babcd7bea2b34a7e7605287963ce0
tree1120256d9daa92695668dfe39c0b290f8119e4c7
parent31545b64b80aa939a693723e07f06fe45160ae62
nv50/ir: optimize IMAD to SHLADD in presence of power of 2

Only and only if src1 is a power of 2 we can replace IMAD by SHLADD.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp