OSDN Git Service

i965/fs: Consider MOV.SAT to interfere if it has a source modifier.
authorMatt Turner <mattst88@gmail.com>
Wed, 11 Feb 2015 00:25:47 +0000 (16:25 -0800)
committerMatt Turner <mattst88@gmail.com>
Fri, 20 Feb 2015 05:16:43 +0000 (21:16 -0800)
commit7f8dd91d166e49d7da98f90d6428dc2705fb96d0
tree41fda24f78f53c02194c90b5697726c6f9416fb3
parent871ad3f08bc34e16fdd728e9a4821b9a83e509f0
i965/fs: Consider MOV.SAT to interfere if it has a source modifier.

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: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/brw_fs_saturate_propagation.cpp
src/mesa/drivers/dri/i965/test_fs_saturate_propagation.cpp