tree-optimization/99473 - more cselim
authorRichard Biener <rguenther@suse.de>
Tue, 9 Mar 2021 08:29:29 +0000 (09:29 +0100)
committerRichard Biener <rguenther@suse.de>
Mon, 26 Apr 2021 08:10:06 +0000 (10:10 +0200)
commit577d05fc914338cd7ddc254f3bee4532331f5c13
tree7071eb36cedbf04600f64367a1a73c9485f03ce7
parent52a5515ed6619739eb122f05ce26057dd8b06fb6
tree-optimization/99473 - more cselim

This fixes the pre-condition on cselim to include all references
and decls when they end up as auto-var.

Bootstrapped/tested on x86_64-linux

2021-03-09  Richard Biener  <rguenther@suse.de>

PR tree-optimization/99473
* tree-ssa-phiopt.c (cond_store_replacement): Handle all
stores.

* gcc.dg/tree-ssa/pr99473-1.c: New testcase.
gcc/testsuite/gcc.dg/tree-ssa/pr99473-1.c [new file with mode: 0644]
gcc/tree-ssa-phiopt.c