summaryrefslogtreecommitdiffstats
path: root/src/intel/compiler
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-08-31 15:41:43 -0700
committerJason Ekstrand <[email protected]>2017-09-12 15:01:00 -0700
commitd496780fb2c7f2cf0e32b6a79dc528e5156dfcb3 (patch)
treed4c62d199a66fd4b27d50aefec8346a003d10033 /src/intel/compiler
parent4ba20c94738d1261c4ce687ea929efd10393b9ef (diff)
intel/eu/validate: Look up types on demand in execution_type()
We are looking up the execution type prior to checking how many sources we have. This leads to looking for a type for src1 on MOV instructions which is bogus. On BDW+, the src1 register type overlaps with the 64-bit immediate and causes us problems. Reviewed-by: Matt Turner <[email protected]> Cc: [email protected]
Diffstat (limited to 'src/intel/compiler')
-rw-r--r--src/intel/compiler/brw_eu_validate.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/intel/compiler/brw_eu_validate.c b/src/intel/compiler/brw_eu_validate.c
index b24b38170e0..7453218c2b6 100644
--- a/src/intel/compiler/brw_eu_validate.c
+++ b/src/intel/compiler/brw_eu_validate.c
@@ -300,15 +300,13 @@ execution_type(const struct gen_device_info *devinfo, const brw_inst *inst)
{
unsigned num_sources = num_sources_from_inst(devinfo, inst);
enum brw_reg_type src0_exec_type, src1_exec_type;
- enum brw_reg_type src0_type = brw_inst_src0_type(devinfo, inst);
- enum brw_reg_type src1_type = brw_inst_src1_type(devinfo, inst);
/* Execution data type is independent of destination data type, except in
* mixed F/HF instructions on CHV and SKL+.
*/
enum brw_reg_type dst_exec_type = brw_inst_dst_type(devinfo, inst);
- src0_exec_type = execution_type_for_type(src0_type);
+ src0_exec_type = execution_type_for_type(brw_inst_src0_type(devinfo, inst));
if (num_sources == 1) {
if ((devinfo->gen >= 9 || devinfo->is_cherryview) &&
src0_exec_type == BRW_REGISTER_TYPE_HF) {
@@ -317,7 +315,7 @@ execution_type(const struct gen_device_info *devinfo, const brw_inst *inst)
return src0_exec_type;
}
- src1_exec_type = execution_type_for_type(src1_type);
+ src1_exec_type = execution_type_for_type(brw_inst_src1_type(devinfo, inst));
if (src0_exec_type == src1_exec_type)
return src0_exec_type;