diff options
author | Samuel Pitoiset <[email protected]> | 2016-09-14 22:15:14 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2016-09-29 21:20:47 +0200 |
commit | 115c79be10bf3712a1e1bc25a563c90388c1bcaa (patch) | |
tree | 286a54db8ef52d58116934794230c0de91b3061b /src/gallium/drivers/nouveau | |
parent | 2e008be9a9a4c94564c11718e0f6fc029caa0e44 (diff) |
nv50/ir: optimize SHLADD(a, b, c) to MOV((a << b) + c)
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau')
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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; } |