On Mon, Apr 23, 2012 at 7:04 PM, Ulrich Weigand <uweig...@de.ibm.com> wrote:
> Uros Bizjak wrote:
>
>> I don't have any problems with proposed order, but in my failed
>> attempt to convert x86 to post-reload compare elimination,
>> constrain_operands failed to recognize generated combined add+compare
>> pattern, when commutative matched operands were swapped (e.g. the
>> perfectly valid x86 add pattern above). constrain_operands was called
>> from the call to validate_change (please see compare-elim.c) when
>> flags clobber was substituted with compare.
>
> I would consider the pattern you mention above:
>
>> >> (set (reg: ax) (plus (reg: bx)(reg: ax)))
>
> "perfectly valid" only *before* reload, but invalid after reload.

You are right. I didn't notice that addsi_1 has additional r/r/0
alternative, and this alternative is in fact missing from addsi_2. I
automatically assumed that something is wrong with pattern
recognizers...

Thanks for your explanation, I will fix this oversight in i386.md ASAP.

Uros.

Reply via email to