This is the mail archive of the
mailing list for the GCC project.
Re: Combine misses commutativity
- From: Richard Henderson <rth at redhat dot com>
- To: "Paulo J. Matos" <paulo at matos-sorge dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 10 Feb 2012 11:00:43 -0800
- Subject: Re: Combine misses commutativity
- References: <firstname.lastname@example.org>
On 02/10/2012 08:57 AM, Paulo J. Matos wrote:
> However, there's a failure to combine looking like:
> (parallel [
> (set (reg:QI 1 AL)
> (ior:QI (mem/c/i:QI (reg/f:QI 4 AP) [2 y+0 S1 A16])
> (reg:QI 30 [ x+1 ])))
> (clobber (reg:CC 13 CC))
Why do you think that combine should create this?
Really, I'd have expected swap_commutative_operands_p to have
put things around the other way. That's the way that almost
all cisc machines represent their memory operands.
... Although I don't see any specific test for this in the
code for commutative_operand_precedence. That's probably at
least a think-o.