]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/102893 - properly DCE empty loops inside infinite loops
authorRichard Biener <rguenther@suse.de>
Fri, 22 Oct 2021 10:45:32 +0000 (12:45 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 22 Oct 2021 11:42:57 +0000 (13:42 +0200)
commitc2a9a98a369528c8689ecb68db576f8e7dc2fa45
tree0b65b73e94cd6689eb65207deac539b7c5fdfa55
parent8a0faddadd159c19fe79572619ea6466eeed0135
tree-optimization/102893 - properly DCE empty loops inside infinite loops

The following fixes the test for an exit edge I put in place for
the fix for PR45178 where I somehow misunderstood how the cyclic
list works.

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

PR tree-optimization/102893
* tree-ssa-dce.c (find_obviously_necessary_stmts): Fix the
test for an exit edge.

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