re PR tree-optimization/87977 (ICE: verify_ssa failed (error: definition in block...
authorJakub Jelinek <jakub@redhat.com>
Wed, 14 Nov 2018 09:01:47 +0000 (10:01 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 14 Nov 2018 09:01:47 +0000 (10:01 +0100)
commitc4071191f4d20d25389181b90c0a24f254a47b87
tree67c8f5e231a7aebefb6f2d37deeea480644fd560
parent38e601118ca88adf0a472750b0da83f0ef1798a7
re PR tree-optimization/87977 (ICE: verify_ssa failed (error: definition in block 4 follows the use))

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.

From-SVN: r266098
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/recip_sqrt_mult_1.c
gcc/testsuite/gcc.dg/recip_sqrt_mult_2.c
gcc/testsuite/gcc.dg/recip_sqrt_mult_3.c
gcc/testsuite/gcc.dg/recip_sqrt_mult_4.c
gcc/testsuite/gcc.dg/recip_sqrt_mult_5.c
gcc/tree-ssa-math-opts.c