re PR tree-optimization/90020 (-O2 -Os x86-64 wrong code generated for GNU Emacs)
authorRichard Biener <rguenther@suse.de>
Thu, 11 Apr 2019 07:34:20 +0000 (07:34 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 11 Apr 2019 07:34:20 +0000 (07:34 +0000)
commit3bab738598b67b501fd1411ef43f9c9f36f13297
tree1f6fce6719b7ea38d1b0298dc475a7a3472cf9cf
parent2fd579ab530ca9ca5682eeba305c4946bf710c25
re PR tree-optimization/90020 (-O2 -Os x86-64 wrong code generated for GNU Emacs)

2019-04-11  Richard Biener  <rguenther@suse.de>

PR tree-optimization/90020
* tree-ssa-sccvn.c (vn_reference_may_trap): New function.
* tree-ssa-sccvn.h (vn_reference_may_trap): Declare.
* tree-ssa-pre.c (compute_avail): Use it to not put
possibly trapping references after a call that might not
return into EXP_GEN.
* gcse.c (compute_hash_table_work): Do not elide
marking a block containing a call if the call might not
return.

* gcc.dg/torture/pr90020.c: New testcase.

From-SVN: r270275
gcc/ChangeLog
gcc/gcse.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr90020.c [new file with mode: 0644]
gcc/tree-ssa-pre.c
gcc/tree-ssa-sccvn.c
gcc/tree-ssa-sccvn.h