[Bug middle-end/40259] New: Unintended code in find_givs_in_stmt_scev (gcc/tree-ssa-loop-ivopts.c)?
sergei_lus at yahoo dot com
gcc-bugzilla@gcc.gnu.org
Tue May 26 15:44:00 GMT 2009
The code for find_givs_in_stmt_scev (gcc/tree-ssa-loop-ivopts.c) used to be
(in 4.3.2) this:
lhs = GIMPLE_STMT_OPERAND (stmt, 0);
if (TREE_CODE (lhs) != SSA_NAME)
return false;
if (!simple_iv (loop, stmt, GIMPLE_STMT_OPERAND (stmt, 1), iv, true))
return false;
...which has changed in 4.4.0 (or on trunk - 147831) to this:
lhs = gimple_assign_lhs (stmt);
if (TREE_CODE (lhs) != SSA_NAME)
return false;
if (!simple_iv (loop, loop_containing_stmt (stmt), lhs, iv, true))
return false;
The gimple_assign_lhs is not the same as GIMPLE_STMT_OPERAND (stmt, 1).
Was it intended to be something like this:
if (!simple_iv (loop, loop_containing_stmt (stmt), gimple_assign_rhs_to_tree
(stmt), iv, true))
return false;
--
Summary: Unintended code in find_givs_in_stmt_scev (gcc/tree-ssa-
loop-ivopts.c)?
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sergei_lus at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40259
More information about the Gcc-bugs
mailing list