https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115825
--- Comment #22 from Jan Hubicka <hubicka at ucw dot cz> --- > /* If there is pure/const call in the function, then we can > still optimize the unrolled loop body if it contains some > other interesting code than the calls and code storing or > cumulating the return value. */ Note that these days we could optimize around non-pure/const functions if modref summary is informative enough. Common case is when function return value by writting to pointer passed as argument. I am however not sure how to predict this - i.e. where to draw line between useful and useless modref summary. Honza