This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

commutativity not applied


Hi,
I have introduced a pattern in thumb.md, gcc-2.95.3:

(define_insn "DIEE_PATTERN_1_1"
[(set(match_operand:SI 0 "register_operand" "=r")
     (mult:SI(plus:SI(match_operand:SI 1 "register_operand" "%r")
                     (match_operand:SI  2 "register_operand" "r"))
             (plus:SI(mult:SI(match_operand:SI  3 "register_operand"
"%r")
	                     (match_operand:SI  4 "register_operand" "r"))
	             (match_operand:SI 5 "register_operand" "r"))))]
""
"mov\\t%R0, #0")

don't look at the output template, it's a temporary line.

I tried this pattern with a simple C program, and it is recognized if
the line is:

x=(a*b+c)*(d+e)

while it is not recognized if the code is:

x=(d+e)*(a*b+c)

is the pattern wrong or is it GCC's problem?

thanks in advance,
Marco Marcello


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]