tree-optimization/101151 - fix irreducible region check for sinking
authorRichard Biener <rguenther@suse.de>
Tue, 22 Jun 2021 08:14:02 +0000 (10:14 +0200)
committerRichard Biener <rguenther@suse.de>
Tue, 22 Jun 2021 10:09:59 +0000 (12:09 +0200)
commita2ef8395fa970498985764514044e5fd00f7d5c0
tree10b6023661e131ef103b33f2cca0018f39c8df1f
parent7822285515cd4dab86f722a9f4969b6952904a37
tree-optimization/101151 - fix irreducible region check for sinking

The check whether two blocks are in the same irreducible region
and thus post-dominance checks being unreliable was incomplete
since an irreducible region can contain reducible sub-regions but
if one block is in the irreducible part and one not the check
still doesn't work as expected.

2021-06-22  Richard Biener  <rguenther@suse.de>

PR tree-optimization/101151
* tree-ssa-sink.c (statement_sink_location): Expand irreducible
region check.

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