summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-05 09:00:50 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-05 09:00:50 +0000
commit156f51b905c85ae24f01d486925363d7f5fa95d3 (patch)
treefbd7c6a0a871f00e3113cb593c9a548ba7aa2ec2 /gcc
parentcd75dd39158d57ed3fbc61335668d1447bbb9577 (diff)
downloadgcc-156f51b905c85ae24f01d486925363d7f5fa95d3.tar.gz
PR debug/46307
* tree-ssa-operands.c (get_expr_operands): Handle FMA_EXPR. * tree-pretty-print.c (dump_generic_node): Likewise. (op_code_prio): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * gcc.dg/pr46307.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166351 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/cfgexpand.c4
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/pr46307.c14
-rw-r--r--gcc/tree-pretty-print.c11
-rw-r--r--gcc/tree-ssa-operands.c1
6 files changed, 43 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 84ff3043053..a752a51797a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2010-11-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/46307
+ * tree-ssa-operands.c (get_expr_operands): Handle FMA_EXPR.
+ * tree-pretty-print.c (dump_generic_node): Likewise.
+ (op_code_prio): Likewise.
+ * cfgexpand.c (expand_debug_expr): Likewise.
+
2010-11-04 Paul Koning <ni1d@arrl.net>
* doc/md.texi (Machine Constraints): Correct formatting in PDP-11
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index f02a8cd2ba0..b302591e66e 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -2360,6 +2360,7 @@ expand_debug_expr (tree exp)
case DOT_PROD_EXPR:
case WIDEN_MULT_PLUS_EXPR:
case WIDEN_MULT_MINUS_EXPR:
+ case FMA_EXPR:
goto ternary;
case TRUTH_ANDIF_EXPR:
@@ -3201,6 +3202,9 @@ expand_debug_expr (tree exp)
}
return NULL;
+ case FMA_EXPR:
+ return gen_rtx_FMA (mode, op0, op1, op2);
+
default:
flag_unsupported:
#ifdef ENABLE_CHECKING
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 90e13ddfb1b..6ef03bdac94 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2010-11-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/46307
+ * gcc.dg/pr46307.c: New test.
+
2010-11-05 Jason Merrill <jason@redhat.com>
PR c++/46304
diff --git a/gcc/testsuite/gcc.dg/pr46307.c b/gcc/testsuite/gcc.dg/pr46307.c
new file mode 100644
index 00000000000..c308b5669f2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr46307.c
@@ -0,0 +1,14 @@
+/* PR debug/46307 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -g" } */
+
+double fma (double, double, double);
+
+double
+foo (double x, double y, double z)
+{
+ double a = x * y + z;
+ double b = __builtin_fma (x, y, z);
+ double c = fma (x, y, z);
+ return x / y / z;
+}
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c
index 8ec2dedbb1e..12ef38817eb 100644
--- a/gcc/tree-pretty-print.c
+++ b/gcc/tree-pretty-print.c
@@ -2040,6 +2040,16 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
pp_string (buffer, " > ");
break;
+ case FMA_EXPR:
+ pp_string (buffer, " FMA_EXPR < ");
+ dump_generic_node (buffer, TREE_OPERAND (node, 0), spc, flags, false);
+ pp_string (buffer, ", ");
+ dump_generic_node (buffer, TREE_OPERAND (node, 1), spc, flags, false);
+ pp_string (buffer, ", ");
+ dump_generic_node (buffer, TREE_OPERAND (node, 2), spc, flags, false);
+ pp_string (buffer, " > ");
+ break;
+
case OMP_PARALLEL:
pp_string (buffer, "#pragma omp parallel");
dump_omp_clauses (buffer, OMP_PARALLEL_CLAUSES (node), spc, flags);
@@ -2546,6 +2556,7 @@ op_code_prio (enum tree_code code)
case CEIL_MOD_EXPR:
case FLOOR_MOD_EXPR:
case ROUND_MOD_EXPR:
+ case FMA_EXPR:
return 13;
case TRUTH_NOT_EXPR:
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c
index 4256af07c35..c83267d54dd 100644
--- a/gcc/tree-ssa-operands.c
+++ b/gcc/tree-ssa-operands.c
@@ -999,6 +999,7 @@ get_expr_operands (gimple stmt, tree *expr_p, int flags)
case REALIGN_LOAD_EXPR:
case WIDEN_MULT_PLUS_EXPR:
case WIDEN_MULT_MINUS_EXPR:
+ case FMA_EXPR:
{
get_expr_operands (stmt, &TREE_OPERAND (expr, 0), flags);
get_expr_operands (stmt, &TREE_OPERAND (expr, 1), flags);