diff options
author | Ilia Mirkin <[email protected]> | 2016-01-20 17:59:34 -0500 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-01-20 18:03:36 -0500 |
commit | dc3ac418bf889620c93f50c68ef55b9e9de3afd3 (patch) | |
tree | 2ac7da4aa79a1d62fefcc5bd37fb738d7c009f3f /src | |
parent | 3a635761685e839447fec2e5f84ce8bb8682dbc7 (diff) |
nv50/ir: don't flip SHL(ADD) into ADD(SHL) if ADD sources have modifiers
Fixes: 31fde8fa (nv50/ir: flip shl(add, imm) into add(shl, imm))
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 2 |
1 files changed, 2 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 75773553840..95e9fdfc57d 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp @@ -1229,6 +1229,8 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s) adds = 1; else return; + if (si->src(!adds).mod != Modifier(0)) + return; // SHL(ADD(x, y), z) = ADD(SHL(x, z), SHL(y, z)) // This is more operations, but if one of x, y is an immediate, then |