diff options
author | Eric Anholt <[email protected]> | 2019-02-18 18:13:09 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2019-02-18 18:13:09 -0800 |
commit | 0bba9c8489726fa7ddb855f5ad68b1934dd0312b (patch) | |
tree | 10783dab613fb461faf54a0e1cbfd96f690709d7 /src/broadcom | |
parent | 1a775d43c9360257b267d097f60fc6ef751730f2 (diff) |
v3d: Emit a simpler negate for the iabs implementation.
One program affected in my shader-db.
instructions in affected programs: 110 -> 108 (-1.82%)
Diffstat (limited to 'src/broadcom')
-rw-r--r-- | src/broadcom/compiler/nir_to_vir.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c index dc65e379b7f..4a0fd7d20e7 100644 --- a/src/broadcom/compiler/nir_to_vir.c +++ b/src/broadcom/compiler/nir_to_vir.c @@ -1027,8 +1027,7 @@ ntq_emit_alu(struct v3d_compile *c, nir_alu_instr *instr) } case nir_op_iabs: - result = vir_MAX(c, src[0], - vir_SUB(c, vir_uniform_ui(c, 0), src[0])); + result = vir_MAX(c, src[0], vir_NEG(c, src[0])); break; case nir_op_fddx: |