tree-optimization/97901 - ICE propagating out LC PHIs
authorRichard Biener <rguenther@suse.de>
Thu, 19 Nov 2020 09:43:35 +0000 (10:43 +0100)
committerRichard Biener <rguenther@suse.de>
Thu, 19 Nov 2020 10:35:45 +0000 (11:35 +0100)
commitec383f0bdb4077b744d493d02afff5f13f33029e
treebbf63ed251ec0c1f16ab8fd62e35c51a7c4ffffb
parent43a0debd527b75eb564cad6bd47f5d5bb301dfad
tree-optimization/97901 - ICE propagating out LC PHIs

We need to fold the stmt to canonicalize MEM_REFs which means
we're back to using replace_uses_by.  Which means we need dominators
to not require a CFG cleanup upthread.

2020-11-19  Richard Biener  <rguenther@suse.de>

PR tree-optimization/97901
* tree-ssa-propagate.c (clean_up_loop_closed_phi): Compute
dominators and use replace_uses_by.

* gcc.dg/torture/pr97901.c: New testcase.
gcc/testsuite/gcc.dg/torture/pr97901.c [new file with mode: 0644]
gcc/tree-ssa-propagate.c