intel/compiler: fix lower conversions to account for predication
authorIago Toral Quiroga <itoral@igalia.com>
Tue, 17 Jul 2018 09:10:34 +0000 (11:10 +0200)
committerIago Toral Quiroga <itoral@igalia.com>
Fri, 27 Jul 2018 12:48:29 +0000 (14:48 +0200)
The pass can create a temporary result for the instruction and then
moves from it to the original destination, however, if the original
instruction was predicated, the mov has to be predicated as well.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
src/intel/compiler/brw_fs_lower_conversions.cpp

index e27e2402746e1d21a1c7470dc32e917bc209c7f8..145fb55f995e5fe760506075245eb374c14226c3 100644 (file)
@@ -98,7 +98,10 @@ fs_visitor::lower_conversions()
              * size_written accordingly.
              */
             inst->size_written = inst->dst.component_size(inst->exec_size);
-            ibld.at(block, inst->next).MOV(dst, strided_temp)->saturate = saturate;
+
+            fs_inst *mov = ibld.at(block, inst->next).MOV(dst, strided_temp);
+            mov->saturate = saturate;
+            mov->predicate = inst->predicate;
 
             progress = true;
          }