[PATCH][RTL-ree] PR rtl-optimization/68194: Restrict copy instruction in presence of conditional moves
Tue Nov 17 12:10:00 GMT 2015
On 11/17/2015 10:08 AM, Kyrill Tkachov wrote:
> Yes, I had considered that as well. It should be equivalent. I didn't
> use !reg_used_between_p because I thought
> it'd be more expensive than checking reg_overlap_mentioned_p since we
> must iterate over a number of instructions
> and call reg_overlap_mentioned_p on each one. But I suppose this case is
> rare enough that it wouldn't make any
> measurable difference.
> Would you prefer to use !reg_used_between_p here?
I would but apparently it doesn't work, so that's kind of neither here
>> The added comment could lead to some confusion since it's placed in
>> front of an existing if statement that also tests a different
>> condition. Also, if we go with your fix,
>>> + || !reg_overlap_mentioned_p (tmp_reg, SET_SRC (PATTERN
>> Shouldn't this really be !rtx_equal_p?
> Maybe, will it behave the right way if the two regs have different modes
> or when subregs are involved?
It would return false, in which case we'll conservatively fail here. I
think that's desirable?
More information about the Gcc-patches