This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/49749] Reassociation rank algorithm does not include all non-NULL operands
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 21 Jul 2011 12:07:26 +0000
- Subject: [Bug tree-optimization/49749] Reassociation rank algorithm does not include all non-NULL operands
- Auto-submitted: auto-generated
- References: <bug-49749-4@http.gcc.gnu.org/bugzilla/>
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.