Commit 95c03b36 by Joern Rennecke Committed by Joern Rennecke

re PR tree-optimization/57027 (ICE in gimple_assign_rhs_code, at gimple.h:2022)

2013-05-03  Joern Rennecke <joern.rennecke@embecosm.com>

        PR tree-optimization/57027
        * tree-ssa-math-opts.c (convert_mult_to_fma): When checking for
        fnms opportunity, check we got the prerequisite kind of tree / gimple
        before using accessor functions.

From-SVN: r198577
parent 07bfc9ec
2013-05-03 Joern Rennecke <joern.rennecke@embecosm.com>
PR tree-optimization/57027
* tree-ssa-math-opts.c (convert_mult_to_fma): When checking
for fnms opportunity, check we got the prerequisite kind
of tree / gimple before using accessor functions.
2013-05-03 Richard Biener <rguenther@suse.de> 2013-05-03 Richard Biener <rguenther@suse.de>
* double-int.h (lshift): New overload without precision * double-int.h (lshift): New overload without precision
......
...@@ -2581,11 +2581,15 @@ convert_mult_to_fma (gimple mul_stmt, tree op1, tree op2) ...@@ -2581,11 +2581,15 @@ convert_mult_to_fma (gimple mul_stmt, tree op1, tree op2)
&& optab_handler (fnma_optab, TYPE_MODE (type)) != CODE_FOR_nothing) && optab_handler (fnma_optab, TYPE_MODE (type)) != CODE_FOR_nothing)
{ {
tree rhs2 = gimple_assign_rhs2 (use_stmt); tree rhs2 = gimple_assign_rhs2 (use_stmt);
gimple stmt2 = SSA_NAME_DEF_STMT (rhs2);
if (has_single_use (rhs2) if (TREE_CODE (rhs2) == SSA_NAME)
&& gimple_assign_rhs_code (stmt2) == MULT_EXPR) {
return false; gimple stmt2 = SSA_NAME_DEF_STMT (rhs2);
if (has_single_use (rhs2)
&& is_gimple_assign (stmt2)
&& gimple_assign_rhs_code (stmt2) == MULT_EXPR)
return false;
}
} }
/* We can't handle a * b + a * b. */ /* We can't handle a * b + a * b. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment