tree-optimization/100398 - avoid DSE of control flow stmt
authorRichard Biener <rguenther@suse.de>
Tue, 4 May 2021 07:18:11 +0000 (09:18 +0200)
committerRichard Biener <rguenther@suse.de>
Tue, 4 May 2021 10:31:50 +0000 (12:31 +0200)
commit2326627eb19d8c21251fd60479f1a190621c475b
tree68e2dd05cbc8e916e76dd4447f45dc69ed5c7756
parent00d8545d7058d2fcac6ef7203773f17f3b517121
tree-optimization/100398 - avoid DSE of control flow stmt

The following makes sure to preserve control altering stmts
when removing trivially dead stmts in DSE.

2021-05-04  Richard Biener  <rguenther@suse.de>

PR tree-optimization/100398
* tree-ssa-dse.c (pass_dse::execute): Preserve control
altering stmts.

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