On Thu, Feb 5, 2015 at 4:14 AM, Ian Romanick wrote:
> On 01/20/2015 01:31 AM, Matt Turner wrote:
>> @@ -73,10 +72,14 @@ opt_cmod_propagation_local(fs_visitor *v, bblock_t
>> *block)
>> scan_inst->dst.reg == inst->src[0].reg &&
>> scan_inst->dst.reg_offset == inst->src[
On 01/20/2015 01:31 AM, Matt Turner wrote:
> @@ -73,10 +72,14 @@ opt_cmod_propagation_local(fs_visitor *v, bblock_t *block)
> scan_inst->dst.reg == inst->src[0].reg &&
> scan_inst->dst.reg_offset == inst->src[0].reg_offset &&
> !scan_inst->is_partial_write(
This allows us to apply the optimization in cases where the CMP's
argument is negated, by flipping the conditional mod. For example, it
allows us to optimize this:
add(8) temp a b
cmp.l.f0(8) null -temp 0.0
into
add.ge.f0(8) temp a b
total instructions in shared