• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisión43a607ba1d6cd80eeb5dadade1ef5bebee614cf6 (tree)
Tiempo2019-03-25 21:15:59
Autorrguenth <rguenth@138b...>
Commiterrguenth

Log Message

2019-03-25 Richard Biener <rguenther@suse.de>

PR tree-optimization/89802
* tree-ssa-math-opts.c (convert_mult_to_fma_1): Properly
move EH data to folded stmt.

* g++.dg/tree-ssa/pr89802.C: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269913 138bc75d-0d04-0410-961f-82ee72b054a4

Cambiar Resumen

Diferencia incremental

--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
1+2019-03-25 Richard Biener <rguenther@suse.de>
2+
3+ PR tree-optimization/89802
4+ * tree-ssa-math-opts.c (convert_mult_to_fma_1): Properly
5+ move EH data to folded stmt.
6+
17 2019-03-25 Andreas Krebbel <krebbel@linux.ibm.com>
28
39 * config/s390/s390-builtin-types.def: Remove few unused types and
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
1+2019-03-25 Richard Biener <rguenther@suse.de>
2+
3+ PR tree-optimization/89802
4+ * g++.dg/tree-ssa/pr89802.C: New testcase.
5+
16 2019-03-25 Jakub Jelinek <jakub@redhat.com>
27
38 PR c++/60702
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr89802.C
@@ -0,0 +1,28 @@
1+// { dg-do compile }
2+// { dg-options "-O2 -fnon-call-exceptions" }
3+// { dg-additional-options "-mfma" { target x86_64-*-* i?86-*-* } }
4+
5+struct ef
6+{
7+ ef (double xy) : m6 (xy)
8+ {
9+ }
10+
11+ ~ef ()
12+ {
13+ }
14+
15+ double m6;
16+};
17+
18+ef
19+operator- (ef &db, ef oa)
20+{
21+ return db.m6 - oa.m6;
22+}
23+
24+ef
25+vu (ef &db)
26+{
27+ return db - ef (db.m6 * 1.1);
28+}
--- a/gcc/tree-ssa-math-opts.c
+++ b/gcc/tree-ssa-math-opts.c
@@ -2917,8 +2917,13 @@ convert_mult_to_fma_1 (tree mul_result, tree op1, tree op2)
29172917 gsi_replace (&gsi, fma_stmt, true);
29182918 /* Follow all SSA edges so that we generate FMS, FNMA and FNMS
29192919 regardless of where the negation occurs. */
2920+ gimple *orig_stmt = gsi_stmt (gsi);
29202921 if (fold_stmt (&gsi, follow_all_ssa_edges))
2921- update_stmt (gsi_stmt (gsi));
2922+ {
2923+ if (maybe_clean_or_replace_eh_stmt (orig_stmt, gsi_stmt (gsi)))
2924+ gcc_unreachable ();
2925+ update_stmt (gsi_stmt (gsi));
2926+ }
29222927
29232928 if (dump_file && (dump_flags & TDF_DETAILS))
29242929 {