This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/34027] [4.3 regression] -Os code size nearly doubled



------- Comment #4 from jakub at gcc dot gnu dot org  2007-11-09 12:30 -------
So then shouldn't this bug be about:
unsigned long long
foo (unsigned long long ns)
{
  return ns % 1000000000L;
}

unsigned long long
bar (unsigned long long ns)
{
  return ns - (ns / 1000000000L) * 1000000000L;
}

not compiling the same code at -Os?  On x86_64 with -O2 it actually produces
identical code with the subtraction, supposedly that's faster.  Guess even
(ns / 1000000000L) * 1000000000L should be folded into
ns - (ns % 1000000000L).


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]