i965/fs: Consider MOV.SAT to interfere if it has a source modifier

Graphics / Mesa 3D Graphics Library / Mesa - Matt Turner [gmail.com] - 19 February 2015 23:16 UTC

The saturate propagation pass recognizes that the second instruction below does not interfere with an attempt to propagate the saturate modifier from instruction 3 to 1.

1: add(8) dst0 src0 src1 2: mov.sat(8) dst1 dst0 3: mov.sat(8) dst2 dst0

Unfortunately, we did not consider the case of instruction 2 having a source modifier on dst0. Take for instance:

1: add(8) dst0 src0 src1 2: mov.sat(8) dst1 -dst0 3: mov.sat(8) dst2 dst0

Consider such an instruction to interfere. Increase instruction counts in Anomaly 2, which could be a bug fix depending on the values the first instruction produces.

instructions in affected programs: 53228 -> 53934 (1.33%) HURT: 360

Cc:

7f8dd91 i965/fs: Consider MOV.SAT to interfere if it has a source modifier.
.../dri/i965/brw_fs_saturate_propagation.cpp | 12 ++++--
.../dri/i965/test_fs_saturate_propagation.cpp | 44 ++++++++++++++++++++
2 files changed, 52 insertions(+), 4 deletions(-)

Upstream: cgit.freedesktop.org


  • Share