https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86710
--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> --- This kind of transformation needs to be protected by some unsafe math flag, and by a single_use (aka :s) check on the logs. No :c in the output. The third transformation has nothing to do with logs, you are just talking of simplifying (y/x)*(z/y) (possibly after suitable CSE of log(b)).