summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2019-02-11 16:02:15 -0800
committerMatt Turner <mattst88@gmail.com>2019-02-11 16:02:15 -0800
commit91a7d0e05e7a00fdde407326d390dd66cc672f89 (patch)
treeca70e54d192459e2475d035565f09b89924623c2
parent28eeca42dbe8c4f13789b2637506663ad46645f3 (diff)
intel/compiler: Avoid propagating inequality cmods if types are differentbug-109404
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109404
-rw-r--r--src/intel/compiler/brw_fs_cmod_propagation.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/intel/compiler/brw_fs_cmod_propagation.cpp b/src/intel/compiler/brw_fs_cmod_propagation.cpp
index 5fb522f810f..7686b8800ed 100644
--- a/src/intel/compiler/brw_fs_cmod_propagation.cpp
+++ b/src/intel/compiler/brw_fs_cmod_propagation.cpp
@@ -255,6 +255,13 @@ opt_cmod_propagation_local(const gen_device_info *devinfo, bblock_t *block)
if (inst->opcode == BRW_OPCODE_AND)
break;
+ /* Not safe to use inequality operators if the types are different
+ */
+ if (scan_inst->dst.type != inst->src[0].type &&
+ (inst->conditional_mod != BRW_CONDITIONAL_Z ||
+ inst->conditional_mod != BRW_CONDITIONAL_NZ))
+ break;
+
/* Comparisons operate differently for ints and floats */
if (scan_inst->dst.type != inst->dst.type &&
(scan_inst->dst.type == BRW_REGISTER_TYPE_F ||