i965: Don't copy propagate abs into Broadwell logic instructions.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 16 Jul 2014 04:27:08 +0000 (21:27 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 16 Jul 2014 05:12:15 +0000 (22:12 -0700)
It's not clear what abs on logical instructions means on Broadwell, and
it doesn't appear to do anything sensible.

Fixes 270 Piglit tests (the bitand/bitor/bitxor tests with abs).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81157
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Cc: "10.2" <mesa-stable@lists.freedesktop.org>
src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp

index 10e19d82ca6357d030d552dadfe4c67ee20c45f1..62e64a6773bdd07e7cc0492c4511a2836f237c55 100644 (file)
@@ -338,12 +338,9 @@ fs_visitor::try_copy_propagate(fs_inst *inst, int arg, acp_entry *entry)
    if (has_source_modifiers && entry->dst.type != inst->src[arg].type)
       return false;
 
-   if (brw->gen >= 8) {
-      if (entry->src.negate) {
-         if (is_logic_op(inst->opcode)) {
-            return false;
-         }
-      }
+   if (brw->gen >= 8 && (entry->src.negate || entry->src.abs) &&
+       is_logic_op(inst->opcode)) {
+      return false;
    }
 
    inst->src[arg].file = entry->src.file;
index 2c41d0208f25acc040ee94c7331ea79c47112a93..390448ad801a7650274793129850cab8cb8c1371 100644 (file)
@@ -249,12 +249,9 @@ try_copy_propagate(struct brw_context *brw, vec4_instruction *inst,
        value.file != ATTR)
       return false;
 
-   if (brw->gen >= 8) {
-      if (value.negate) {
-         if (is_logic_op(inst->opcode)) {
-            return false;
-         }
-      }
+   if (brw->gen >= 8 && (value.negate || value.abs) &&
+       is_logic_op(inst->opcode)) {
+      return false;
    }
 
    if (inst->src[arg].abs) {