Revisión | 43a607ba1d6cd80eeb5dadade1ef5bebee614cf6 (tree) |
---|---|
Tiempo | 2019-03-25 21:15:59 |
Autor | rguenth <rguenth@138b...> |
Commiter | rguenth |
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
@@ -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 | + | |
1 | 7 | 2019-03-25 Andreas Krebbel <krebbel@linux.ibm.com> |
2 | 8 | |
3 | 9 | * config/s390/s390-builtin-types.def: Remove few unused types and |
@@ -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 | + | |
1 | 6 | 2019-03-25 Jakub Jelinek <jakub@redhat.com> |
2 | 7 | |
3 | 8 | PR c++/60702 |
@@ -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 | +} |
@@ -2917,8 +2917,13 @@ convert_mult_to_fma_1 (tree mul_result, tree op1, tree op2) | ||
2917 | 2917 | gsi_replace (&gsi, fma_stmt, true); |
2918 | 2918 | /* Follow all SSA edges so that we generate FMS, FNMA and FNMS |
2919 | 2919 | regardless of where the negation occurs. */ |
2920 | + gimple *orig_stmt = gsi_stmt (gsi); | |
2920 | 2921 | 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 | + } | |
2922 | 2927 | |
2923 | 2928 | if (dump_file && (dump_flags & TDF_DETAILS)) |
2924 | 2929 | { |