From 115c79be10bf3712a1e1bc25a563c90388c1bcaa Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 14 Sep 2016 22:15:14 +0200 Subject: [PATCH] nv50/ir: optimize SHLADD(a, b, c) to MOV((a << b) + c) Signed-off-by: Samuel Pitoiset Reviewed-by: Ilia Mirkin --- src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 3 +++ 1 file changed, 3 insertions(+) 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; } -- 2.30.2