diff options
author | Richard Biener <rguenther@suse.de> | 2019-04-11 07:34:20 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2019-04-11 07:34:20 +0000 |
commit | 3bab738598b67b501fd1411ef43f9c9f36f13297 (patch) | |
tree | 1f6fce6719b7ea38d1b0298dc475a7a3472cf9cf /gcc/gcse.c | |
parent | 2fd579ab530ca9ca5682eeba305c4946bf710c25 (diff) | |
download | gcc-3bab738598b67b501fd1411ef43f9c9f36f13297.zip gcc-3bab738598b67b501fd1411ef43f9c9f36f13297.tar.gz gcc-3bab738598b67b501fd1411ef43f9c9f36f13297.tar.bz2 |
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
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r-- | gcc/gcse.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1532,7 +1532,8 @@ compute_hash_table_work (struct gcse_hash_table_d *table) 0, regno, hrsi) record_last_reg_set_info (insn, regno); - if (! RTL_CONST_OR_PURE_CALL_P (insn)) + if (! RTL_CONST_OR_PURE_CALL_P (insn) + || RTL_LOOPING_CONST_OR_PURE_CALL_P (insn)) record_last_mem_set_info (insn); } |