This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/29256] [4.2/4.3/4.4 regression] loop performance regression
- From: "bonzini at gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Aug 2008 05:01:51 -0000
- Subject: [Bug middle-end/29256] [4.2/4.3/4.4 regression] loop performance regression
- References: <bug-29256-12262@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #28 from bonzini at gnu dot org 2008-08-07 05:01 -------
fwprop seems the right place to do that indeed.
Only thing, I wonder you need to "find a location to add the constant": it
could be enough to do
*x = simplify_gen_binary (PLUS, Pmode, *x, cst_to_add);
because simplify_plus_minus should have machinery to do what you are doing
already. Indeed I wonder if this code shouldn't go in simplify_plus_minus so
that propagate_rtx would call it automatically.
Also when you compute cst_to_add you can use the _const_ version of the
simplification routine.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29256