tree-optimization/96349 - avoid abnormal coalescing issues in loop split
authorRichard Biener <rguenther@suse.de>
Tue, 28 Jul 2020 07:45:52 +0000 (09:45 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 29 Jul 2020 11:30:14 +0000 (13:30 +0200)
commit2b2f3867c09c8977268b8ffbd646ac242188b335
tree3a0e21225cc5f32893335cde1f5bb4f0356a63c4
parent883eec6653b4dd89f7ed0cdad2b0b1010e045e12
tree-optimization/96349 - avoid abnormal coalescing issues in loop split

This avoids splitting a loop when the entry value of a loop PHI is
involved with abnormal coalescing.

2020-07-28  Richard Biener  <rguenther@suse.de>

PR tree-optimization/96349
* tree-ssa-loop-split.c (stmt_semi_invariant_p_1): When the
condition runs into a loop PHI with an abnormal entry value give up.

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