Fix pasto in the substitute_and_fold_engine merge with evrp.
authorAldy Hernandez <aldyh@redhat.com>
Tue, 16 Jun 2020 11:43:57 +0000 (13:43 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Tue, 16 Jun 2020 18:46:42 +0000 (20:46 +0200)
commit8fb4d1d58362b77da78c09740c6b5562124a369e
treed470227eac24ec1358fa296e331d673a9c706ae9
parent12df77ab6df4b91d4770240bcc4ab443e4bb18b9
Fix pasto in the substitute_and_fold_engine merge with evrp.

The original code only propagated into PHI arguments if the value was
a constant.  This behavior was lost in the conversion, allowing
any value (SSAs for instance) to be propagated into PHIs.

gcc/ChangeLog:

PR tree-optimization/95649
* tree-ssa-propagate.c (propagate_into_phi_args): Do not propagate unless
value is a constant.

gcc/testsuite/ChangeLog:

* g++.dg/tree-ssa/pr95649.C: New test.
* gcc.dg/tree-ssa/pr95649.c: New test.
gcc/testsuite/g++.dg/tree-ssa/pr95649.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/pr95649.c [new file with mode: 0644]
gcc/tree-ssa-propagate.c