i965/fs: bail on move-to-flag in sel peephole
authorConnor Abbott <cwabbott0@gmail.com>
Fri, 20 Mar 2015 00:58:58 +0000 (20:58 -0400)
committerConnor Abbott <cwabbott0@gmail.com>
Fri, 20 Mar 2015 15:53:11 +0000 (11:53 -0400)
Fixes a piglit regression
(shaders/glsl-fs-vec4-indexing-temp-dst-in-nested-loop-combined) with
my series for GVN.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Connor Abbott <cwabbott0@gmail.com>
src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp

index ee485fa8dda782f2a15be441f6cddcba947d8281..740ba67bb9453e05a27ec9c4aeb382e3b7011537 100644 (file)
@@ -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;
          }