phiprop: allowing prop into loop if there is a phi already
This is a small improvement over the original change
for PR60183 where if we created a phi already we can
reuse it always but since the order of this use might
be before the use which was valid to transform. we
need a vector to save the delayed ones.
Bootstrapped and tested on x86_64-linux-gnu.
PR tree-optimization/60183
gcc/ChangeLog:
* tree-ssa-phiprop.cc (propagate_with_phi): Delay the decision
of always rejecting proping into the loop until all are done.
if there was some delay stmts and a phi was created fill them in.
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/phiprop-5.c: New test.
Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>