From: Francisco Jerez Date: Fri, 2 Sep 2016 04:16:14 +0000 (-0700) Subject: i965/fs: Compare full register offsets in cmod propagation pass. X-Git-Tag: upstream/17.1.0~6352 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9ae77d702043231571b5ef08951224e3c77baddd;p=platform%2Fupstream%2Fmesa.git i965/fs: Compare full register offsets in cmod propagation pass. This could potentially have misoptimized a program in cases where inst->src[0] had a non-zero sub-GRF offset. Reviewed-by: Iago Toral Quiroga --- diff --git a/src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp index 7607d20..291ae4c 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp @@ -90,8 +90,7 @@ opt_cmod_propagation_local(const gen_device_info *devinfo, bblock_t *block) foreach_inst_in_block_reverse_starting_from(fs_inst, scan_inst, inst) { if (scan_inst->overwrites_reg(inst->src[0])) { if (scan_inst->is_partial_write() || - scan_inst->dst.offset / REG_SIZE != - inst->src[0].offset / REG_SIZE || + scan_inst->dst.offset != inst->src[0].offset || scan_inst->exec_size != inst->exec_size) break;