[Bug tree-optimization/49749] Reassociation rank algorithm does not include all non-NULL operands
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jul 21 12:07:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49749
--- Comment #12 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-07-21 12:04:01 UTC ---
+ tree arg = gimple_phi_arg (stmt, i)->def;
+ if (TREE_CODE (arg) == SSA_NAME)
+ {
+ gimple def_stmt = SSA_NAME_DEF_STMT (arg);
+ if (def_stmt
+ && gimple_bb (def_stmt)
arg = gimple_phi_arg_def (stmt, i);
if (TREE_CODE (arg) == SSA_NAME
&& !SSA_NAME_IS_DEFAULT_DEF (arg))
{
gimple def_stmt = SSA_NAME_DEF_STMT (arg);
...
without the def_stmt != NULL and gimple_bb != NULL check.
More information about the Gcc-bugs
mailing list