[Mesa-dev] [PATCH v2 49/53] intel/compiler: fix cmod propagation for non 32-bit types

Iago Toral Quiroga itoral at igalia.com
Wed Dec 19 11:51:17 UTC 2018


---
 src/intel/compiler/brw_fs_cmod_propagation.cpp | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/intel/compiler/brw_fs_cmod_propagation.cpp b/src/intel/compiler/brw_fs_cmod_propagation.cpp
index 7bb5c9afbc9..dfef9d720a2 100644
--- a/src/intel/compiler/brw_fs_cmod_propagation.cpp
+++ b/src/intel/compiler/brw_fs_cmod_propagation.cpp
@@ -244,8 +244,7 @@ opt_cmod_propagation_local(const gen_device_info *devinfo,
             /* CMP's result is the same regardless of dest type. */
             if (inst->conditional_mod == BRW_CONDITIONAL_NZ &&
                 scan_inst->opcode == BRW_OPCODE_CMP &&
-                (inst->dst.type == BRW_REGISTER_TYPE_D ||
-                 inst->dst.type == BRW_REGISTER_TYPE_UD)) {
+                brw_reg_type_is_integer(inst->dst.type)) {
                inst->remove(block);
                progress = true;
                break;
@@ -258,9 +257,8 @@ opt_cmod_propagation_local(const gen_device_info *devinfo,
                break;
 
             /* Comparisons operate differently for ints and floats */
-            if (scan_inst->dst.type != inst->dst.type &&
-                (scan_inst->dst.type == BRW_REGISTER_TYPE_F ||
-                 inst->dst.type == BRW_REGISTER_TYPE_F))
+            if (brw_reg_type_is_floating_point(scan_inst->dst.type) !=
+                brw_reg_type_is_floating_point(inst->dst.type))
                break;
 
             /* If the instruction generating inst's source also wrote the
-- 
2.17.1



More information about the mesa-dev mailing list