This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/42258] [4.5 Regression] redundant register move around mul instruction
- From: "bernds at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Mar 2010 11:44:16 -0000
- Subject: [Bug rtl-optimization/42258] [4.5 Regression] redundant register move around mul instruction
- References: <bug-42258-17659@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from bernds at codesourcery dot com 2010-03-17 11:44 -------
Created an attachment (id=20123)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20123&action=view)
A patch to fix it.
Okay, so the pattern is written strangely because it's a two-operand mul where
the input and output may not be the same register.
It may be better to write this using an earlyclobbered in-out operand, but you
can't show anymore that the operation is commutative.
It can be fixed with a simple peephole optimization, at least for this
testcase.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42258