summaryrefslogtreecommitdiffstats
path: root/src/intel/compiler/brw_eu_compact.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel/compiler/brw_eu_compact.c')
-rw-r--r--src/intel/compiler/brw_eu_compact.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/intel/compiler/brw_eu_compact.c b/src/intel/compiler/brw_eu_compact.c
index 743ee9519c1..7674aa8b855 100644
--- a/src/intel/compiler/brw_eu_compact.c
+++ b/src/intel/compiler/brw_eu_compact.c
@@ -995,10 +995,11 @@ precompact(const struct gen_device_info *devinfo, brw_inst inst)
!(devinfo->is_haswell &&
brw_inst_opcode(devinfo, &inst) == BRW_OPCODE_DIM) &&
!(devinfo->gen >= 8 &&
- (brw_inst_src0_reg_hw_type(devinfo, &inst) == GEN8_HW_IMM_TYPE_DF ||
- brw_inst_src0_reg_hw_type(devinfo, &inst) == GEN8_HW_IMM_TYPE_UQ ||
- brw_inst_src0_reg_hw_type(devinfo, &inst) == GEN8_HW_IMM_TYPE_Q))) {
- brw_inst_set_src1_reg_hw_type(devinfo, &inst, BRW_HW_REG_TYPE_UD);
+ (brw_inst_src0_type(devinfo, &inst) == BRW_REGISTER_TYPE_DF ||
+ brw_inst_src0_type(devinfo, &inst) == BRW_REGISTER_TYPE_UQ ||
+ brw_inst_src0_type(devinfo, &inst) == BRW_REGISTER_TYPE_Q))) {
+ enum brw_reg_file file = brw_inst_src0_reg_file(devinfo, &inst);
+ brw_inst_set_src1_file_type(devinfo, &inst, file, BRW_REGISTER_TYPE_UD);
}
/* Compacted instructions only have 12-bits (plus 1 for the other 20)
@@ -1013,10 +1014,11 @@ precompact(const struct gen_device_info *devinfo, brw_inst inst)
* If we see a 0.0:F, change the type to VF so that it can be compacted.
*/
if (brw_inst_imm_ud(devinfo, &inst) == 0x0 &&
- brw_inst_src0_reg_hw_type(devinfo, &inst) == BRW_HW_REG_TYPE_F &&
- brw_inst_dst_reg_hw_type(devinfo, &inst) == BRW_HW_REG_TYPE_F &&
+ brw_inst_src0_type(devinfo, &inst) == BRW_REGISTER_TYPE_F &&
+ brw_inst_dst_type(devinfo, &inst) == BRW_REGISTER_TYPE_F &&
brw_inst_dst_hstride(devinfo, &inst) == BRW_HORIZONTAL_STRIDE_1) {
- brw_inst_set_src0_reg_hw_type(devinfo, &inst, BRW_HW_IMM_TYPE_VF);
+ enum brw_reg_file file = brw_inst_src0_reg_file(devinfo, &inst);
+ brw_inst_set_src0_file_type(devinfo, &inst, file, BRW_REGISTER_TYPE_VF);
}
/* There are no mappings for dst:d | i:d, so if the immediate is suitable
@@ -1024,10 +1026,13 @@ precompact(const struct gen_device_info *devinfo, brw_inst inst)
*/
if (is_compactable_immediate(brw_inst_imm_ud(devinfo, &inst)) &&
brw_inst_cond_modifier(devinfo, &inst) == BRW_CONDITIONAL_NONE &&
- brw_inst_src0_reg_hw_type(devinfo, &inst) == BRW_HW_REG_TYPE_D &&
- brw_inst_dst_reg_hw_type(devinfo, &inst) == BRW_HW_REG_TYPE_D) {
- brw_inst_set_src0_reg_hw_type(devinfo, &inst, BRW_HW_REG_TYPE_UD);
- brw_inst_set_dst_reg_hw_type(devinfo, &inst, BRW_HW_REG_TYPE_UD);
+ brw_inst_src0_type(devinfo, &inst) == BRW_REGISTER_TYPE_D &&
+ brw_inst_dst_type(devinfo, &inst) == BRW_REGISTER_TYPE_D) {
+ enum brw_reg_file src_file = brw_inst_src0_reg_file(devinfo, &inst);
+ enum brw_reg_file dst_file = brw_inst_dst_reg_file(devinfo, &inst);
+
+ brw_inst_set_src0_file_type(devinfo, &inst, src_file, BRW_REGISTER_TYPE_UD);
+ brw_inst_set_dst_file_type(devinfo, &inst, dst_file, BRW_REGISTER_TYPE_UD);
}
return inst;