This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/46346] [4.6 regression] fma testsuite failures
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 7 Nov 2010 16:16:02 +0000
- Subject: [Bug target/46346] [4.6 regression] fma testsuite failures
- Auto-submitted: auto-generated
- References: <bug-46346-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46346
--- Comment #2 from Uros Bizjak <ubizjak at gmail dot com> 2010-11-07 16:15:39 UTC ---
A trivial attempt that fixes builtin-attr-1.c for x86 with -mfma:
Index: tree-ssa-forwprop.c
===================================================================
--- tree-ssa-forwprop.c (revision 166415)
+++ tree-ssa-forwprop.c (working copy)
@@ -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)