[Mesa-dev] [PATCH] i965/fs: bail on move-to-flag in sel peephole

Connor Abbott cwabbott0 at gmail.com
Thu Mar 19 18:08:10 PDT 2015


Fixes a piglit regression
(shaders/glsl-fs-vec4-indexing-temp-dst-in-nested-loop-combined) with
my series for GVN.

Signed-off-by: Connor Abbott <cwabbott0 at gmail.com>
---
I think this particular case might not trigger anymore after Matt's
patch to improve cmod prop since we're better at getting rid of
mov-to-flag before the bug can trigger, but we should probably still
fix this.

 src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp b/src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp
index ee485fa..740ba67 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp
@@ -176,7 +176,9 @@ fs_visitor::opt_peephole_sel()
          /* Check that the MOVs are the right form. */
          if (!then_mov[i]->dst.equals(else_mov[i]->dst) ||
              then_mov[i]->is_partial_write() ||
-             else_mov[i]->is_partial_write()) {
+             else_mov[i]->is_partial_write() ||
+             then_mov[i]->conditional_mod != BRW_CONDITIONAL_NONE ||
+             else_mov[i]->conditional_mod != BRW_CONDITIONAL_NONE) {
             movs = i;
             break;
          }
-- 
2.1.0



More information about the mesa-dev mailing list