This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/33638] [4.3 regression]: wrong code with -fforce-addr
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Oct 2007 08:56:23 -0000
- Subject: [Bug rtl-optimization/33638] [4.3 regression]: wrong code with -fforce-addr
- References: <bug-33638-9562@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #21 from ubizjak at gmail dot com 2007-10-08 08:56 -------
The problem is, that we don't have correct REG_DEP_TRUE expr of the call to
powf after we have pushed ebp+const into temp register.
I'm testing following patch to explow.c:
Index: explow.c
===================================================================
--- explow.c (revision 129120)
+++ explow.c (working copy)
@@ -488,7 +488,9 @@ memory_address (enum machine_mode mode,
win2:
x = oldx;
win:
- if (flag_force_addr && ! cse_not_expected && !REG_P (x))
+ if (flag_force_addr && ! cse_not_expected && !REG_P (x)
+ && ! reg_mentioned_p (virtual_outgoing_args_rtx, x)
+ && ! reg_mentioned_p (stack_pointer_rtx, x))
{
x = force_operand (x, NULL_RTX);
x = force_reg (Pmode, x);
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33638