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 rtl-optimization/59857] 4.8.2 loop optimization is worse than 4.5.1 under ARM


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

--- Comment #2 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
My suspicion is that ulv is short-hand for unsigned long volatile -- since
without it this testcase is completely degenerate:  val isn't used at all, so
when ulv is not volatile, then entire function reduces to 'return 10;'

The difference between the output when ulv is volatile is then down to
no-longer using post-increment operations on volatile memory accesses.  I
suspect this was done to fix problems we've had with incorrect optimizations of
volatile operations.

I think we've seen similar bug reports to this in the past.  GCC is *very*
conservative when dealing with volatile objects, so I'm not surprised we don't
do this optimization.


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