From: Samuel Pitoiset Date: Wed, 14 Sep 2016 20:15:14 +0000 (+0200) Subject: nv50/ir: optimize SHLADD(a, b, c) to MOV((a << b) + c) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=115c79be10bf3712a1e1bc25a563c90388c1bcaa;p=mesa.git nv50/ir: optimize SHLADD(a, b, c) to MOV((a << b) + c) Signed-off-by: Samuel Pitoiset Reviewed-by: Ilia Mirkin --- diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp index cbbe34d1e0b..9875738593e 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp @@ -778,6 +778,9 @@ ConstantFolding::expr(Instruction *i, } break; } + case OP_SHLADD: + res.data.u32 = (a->data.u32 << b->data.u32) + c->data.u32; + break; default: return; }