http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52323



--- Comment #4 from Steven Bosscher <steven at gcc dot gnu.org> 2012-10-09 
22:16:34 UTC ---

IMHO -fgcse should just be disabled on ix86.



Index: i386.c

===================================================================

--- i386.c    (revision 192273)

+++ i386.c    (working copy)

@@ -3264,6 +3264,15 @@ ix86_option_override_internal (bool main

   SUBSUBTARGET_OVERRIDE_OPTIONS;

 #endif



+  /* RTL lazy code motion (-fgcse) causes nothing but trouble on

+     non-X32 32-bits targets.  Most profitable code transformation

+     opportunities have already been performed by GIMPLE PRE.  The

+     remaining cases at the RTL stage are address arithmetic exprs

+     in loops, and loop-invariant.c handles those much better than

+     lazy code motion.  */

+  if (! (TARGET_X32 || TARGET_64BIT))

+    flag_gcse = 0;

+

   /* -fPIC is the default for x86_64.  */

   if (TARGET_MACHO && TARGET_64BIT)

     flag_pic = 2;





Patch needs a foster parent, I don't care enough about old 32-bits i386 :-)

Reply via email to