This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/36090] [4.3/4.4 Regression] ppc64 cacoshl miscompilation
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 May 2008 09:34:53 -0000
- Subject: [Bug target/36090] [4.3/4.4 Regression] ppc64 cacoshl miscompilation
- References: <bug-36090-87@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #11 from jakub at gcc dot gnu dot org 2008-05-02 09:34 -------
The unexpected address is created by simplify_plus_minus on
(plus:DI (reg:DI 2 2)
(const:DI (minus:DI (symbol_ref/u:DI ("*.LC1") [flags 0x2])
(symbol_ref:DI ("*.LCTOC1")))))
and
(const_int 8 [0x8])
where the .LCTOC1 and +8 pair is simplified together. Unfortunately, if we
refuse it in rs6000_legitimate_address, fwprop doesn't try harder
(LEGITIMIZE_ADDRESS/memory_address isn't called) and nothing afterwards
propagates it either, so we end up with:
la 9,.LC1@toc(2)
ld 0,8(9)
instead of
ld 0,.LC1@toc+8(2)
So I'm afraid we want to accept it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36090