From bb3684703d50c0d84978135438eba3fb8780b2ac Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Sun, 7 Nov 2010 18:49:11 +0100 Subject: re PR tree-optimization/46346 (fma testsuite failures) PR tree-optimization/46346 * tree-ssa-forwprop.c (rhs_to_tree): Handle GIMPLE_TERNARY_RHS. From-SVN: r166419 --- gcc/tree-ssa-forwprop.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gcc/tree-ssa-forwprop.c') diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index a828408..7e7e2b1 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -341,7 +341,11 @@ rhs_to_tree (tree type, gimple stmt) { location_t loc = gimple_location (stmt); enum tree_code code = gimple_assign_rhs_code (stmt); - if (get_gimple_rhs_class (code) == GIMPLE_BINARY_RHS) + if (get_gimple_rhs_class (code) == GIMPLE_TERNARY_RHS) + return fold_build3_loc (loc, code, type, gimple_assign_rhs1 (stmt), + gimple_assign_rhs2 (stmt), + gimple_assign_rhs3 (stmt)); + else if (get_gimple_rhs_class (code) == GIMPLE_BINARY_RHS) return fold_build2_loc (loc, code, type, gimple_assign_rhs1 (stmt), gimple_assign_rhs2 (stmt)); else if (get_gimple_rhs_class (code) == GIMPLE_UNARY_RHS) -- cgit v1.1