https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77896
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Basically what I am trying to say is there is a lot of analysis needed to determine if the lifetime of object does not end during a call to a virtual function. > Altering the test case to trigger speculative devirtualization as follows: This is a dup of another bug which says once it has been speculative to a specific function which does not change the lifetime of the object, we can split the loop. That is a dup of bug 67886 really.