http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53265
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29637|0 |1 is obsolete| | --- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-03-11 17:10:30 UTC --- Created attachment 29639 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29639 gcc48-pr53265.patch Updated version of the patch. Haven't added docs yet. The reason for not warning in discover_iteration_bound_by_body_walk etc. is that I'd say the undefined behavior warning would then be misleading, those don't detect undefined behavior, but something else, right? Can you think of a testcase where we'd decrease number of iterations in those routines when it has constant number_of_latch_iterations? Also, with the estimate_numbers_of_loop_iterations_loop second hunk I'm not really sure about the warning name - after all, when we warn, we actually don't aggressively optimize anything, we aggressively optimize only when we actually don't warn and can't easily warn.