https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87977
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Wed Nov 14 09:01:47 2018 New Revision: 266098 URL: https://gcc.gnu.org/viewcvs?rev=266098&root=gcc&view=rev Log: PR tree-optimization/87977 * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division stmt, build a new one and replace the old one with it. Formatting fix. Call release_ssa_name (x) if !has_other_use and !delete_div. (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt verify lhs of stmt is still def. * gcc.dg/recip_sqrt_mult_1.c: Add -fcompare-debug to dg-options. * gcc.dg/recip_sqrt_mult_2.c: Likewise. * gcc.dg/recip_sqrt_mult_3.c: Likewise. * gcc.dg/recip_sqrt_mult_4.c: Likewise. * gcc.dg/recip_sqrt_mult_5.c: Likewise. Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/recip_sqrt_mult_1.c trunk/gcc/testsuite/gcc.dg/recip_sqrt_mult_2.c trunk/gcc/testsuite/gcc.dg/recip_sqrt_mult_3.c trunk/gcc/testsuite/gcc.dg/recip_sqrt_mult_4.c trunk/gcc/testsuite/gcc.dg/recip_sqrt_mult_5.c trunk/gcc/tree-ssa-math-opts.c