This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/40672] constant address loads moved into loop unnecessarily
- From: "drow at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Jul 2009 15:03:01 -0000
- Subject: [Bug target/40672] constant address loads moved into loop unnecessarily
- References: <bug-40672-13372@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from drow at gcc dot gnu dot org 2009-07-07 15:03 -------
It looks, roughly speaking, like the two nearby addresses are initially
commonized. In the process, the use after the loop ends up sharing a REG with
the use in the loop. Then the use in the loop is changed to use a new copy,
and the initialization in the loop feeds the out-of-loop copy. And the use in
the loop gets materialized above the loop as it should.
In a quick look I didn't work out which RTL pass is at fault.
--
drow at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |drow at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40672