tree-optimization/79333 - fold stmts following SSA edges in VN
authorRichard Biener <rguenther@suse.de>
Tue, 4 May 2021 13:51:20 +0000 (15:51 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 5 May 2021 07:11:32 +0000 (09:11 +0200)
commitd846f225c25c5885250c303c8d118caa08c447ab
treec4fa398db14529b017baaa0696620167001518eb
parent8ebf6b99952ada09bf9ea0144dcd1d46363b0464
tree-optimization/79333 - fold stmts following SSA edges in VN

This makes sure to follow SSA edges when folding eliminated stmts.
This reaps the same benefit as forwprop folding all stmts, not
waiting for one to produce copysign in the new testcase.

2021-05-04  Richard Biener  <rguenther@suse.de>

PR tree-optimization/79333
* tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt):
Fold stmt following SSA edges.

* gcc.dg/tree-ssa/ssa-fre-94.c: New testcase.
* gcc.dg/graphite/fuse-1.c: Adjust.
* gcc.dg/pr43864-4.c: Likewise.
gcc/testsuite/gcc.dg/graphite/fuse-1.c
gcc/testsuite/gcc.dg/pr43864-4.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-94.c [new file with mode: 0644]
gcc/tree-ssa-sccvn.c