tree-optimization/96565 - improve DSE with paths ending in noreturn
authorRichard Biener <rguenther@suse.de>
Wed, 26 Aug 2020 06:44:59 +0000 (08:44 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 27 Aug 2020 06:07:34 +0000 (08:07 +0200)
commit989bc4ca2f2978baecff00f6d0532994b82897ef
tree818b5867caed131fd5c269b18d5a1948d6cbb459
parent3ae0cd94abc15e33dc06ca7a5f76f14b1d74129f
tree-optimization/96565 - improve DSE with paths ending in noreturn

This improves DSEs stmt walking by not considering a DEF without
uses for further processing (and thus giving up when there's two
paths to follow).

2020-08-26  Richard Biener  <rguenther@suse.de>

PR tree-optimization/96565
* tree-ssa-dse.c (dse_classify_store): Remove defs with
no uses from further processing.

* gcc.dg/tree-ssa/ssa-dse-40.c: New testcase.
* gcc.dg/builtin-object-size-4.c: Adjust.
gcc/testsuite/gcc.dg/builtin-object-size-4.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-40.c [new file with mode: 0644]
gcc/tree-ssa-dse.c