diff options
author | Matt Turner <[email protected]> | 2017-08-01 12:21:54 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2017-08-21 14:05:23 -0700 |
commit | 1d79c828d80f289de51b12efc2a5448fe7ebafd6 (patch) | |
tree | 807cc4091426ecb098363aee33bbd5f57694a495 | |
parent | 48aa6ecb8759fcaed68db4b03600c92572759158 (diff) |
i965: Don't let raw-move check be tricked by immediate vector types
UB and B type encodings are the same as UV and VF. Noticed when writing
the following patch.
Reviewed-by: Scott D Phillips <[email protected]>
-rw-r--r-- | src/intel/compiler/brw_eu_validate.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/intel/compiler/brw_eu_validate.c b/src/intel/compiler/brw_eu_validate.c index e089c1f90f8..827cd707c70 100644 --- a/src/intel/compiler/brw_eu_validate.c +++ b/src/intel/compiler/brw_eu_validate.c @@ -96,10 +96,17 @@ inst_is_raw_move(const struct gen_device_info *devinfo, const brw_inst *inst) unsigned dst_type = signed_type(brw_inst_dst_reg_type(devinfo, inst)); unsigned src_type = signed_type(brw_inst_src0_reg_type(devinfo, inst)); - if (brw_inst_src0_reg_file(devinfo, inst) != BRW_IMMEDIATE_VALUE && - (brw_inst_src0_negate(devinfo, inst) || - brw_inst_src0_abs(devinfo, inst))) + if (brw_inst_src0_reg_file(devinfo, inst) == BRW_IMMEDIATE_VALUE) { + /* FIXME: not strictly true */ + if (brw_inst_src0_reg_type(devinfo, inst) == BRW_HW_REG_IMM_TYPE_VF || + brw_inst_src0_reg_type(devinfo, inst) == BRW_HW_REG_IMM_TYPE_UV || + brw_inst_src0_reg_type(devinfo, inst) == BRW_HW_REG_IMM_TYPE_V) { + return false; + } + } else if (brw_inst_src0_negate(devinfo, inst) || + brw_inst_src0_abs(devinfo, inst)) { return false; + } return brw_inst_opcode(devinfo, inst) == BRW_OPCODE_MOV && brw_inst_saturate(devinfo, inst) == 0 && |