Compilers will also speculatively devirtualize under some circumstances.
https://hubicka.blogspot.com/2014/02/devirtualization-in-c-p...