aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcse.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2019-04-11 07:34:20 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2019-04-11 07:34:20 +0000
commit3bab738598b67b501fd1411ef43f9c9f36f13297 (patch)
tree1f6fce6719b7ea38d1b0298dc475a7a3472cf9cf /gcc/gcse.c
parent2fd579ab530ca9ca5682eeba305c4946bf710c25 (diff)
downloadgcc-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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/gcse.c b/gcc/gcse.c
index 6c77671..7fbdd67 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -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);
}