summaryrefslogtreecommitdiff
path: root/src/intel/compiler/brw_fs_combine_constants.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel/compiler/brw_fs_combine_constants.cpp')
-rw-r--r--src/intel/compiler/brw_fs_combine_constants.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/intel/compiler/brw_fs_combine_constants.cpp b/src/intel/compiler/brw_fs_combine_constants.cpp
index 2a28351beef..d10ac0219cf 100644
--- a/src/intel/compiler/brw_fs_combine_constants.cpp
+++ b/src/intel/compiler/brw_fs_combine_constants.cpp
@@ -56,7 +56,14 @@ could_coissue(const struct gen_device_info *devinfo, const fs_inst *inst)
case BRW_OPCODE_CMP:
case BRW_OPCODE_ADD:
case BRW_OPCODE_MUL:
- return true;
+ /* Only float instructions can coissue. We don't have a great
+ * understanding of whether or not something like float(int(a) + int(b))
+ * would be considered float (based on the destination type) or integer
+ * (based on the source types), so we take the conservative choice of
+ * only promoting when both destination and source are float.
+ */
+ return inst->dst.type == BRW_REGISTER_TYPE_F &&
+ inst->src[0].type == BRW_REGISTER_TYPE_F;
default:
return false;
}