if (TREE_CODE (def) == SSA_NAME
&& (!backedges_varying_p || !(e->flags & EDGE_DFS_BACK)))
{
- if (ssa_undefined_value_p (def, false))
+ if (!virtual_operand_p (def)
+ && ssa_undefined_value_p (def, false))
def = VN_TOP;
else
def = SSA_VAL (def);
if (TREE_CODE (def) == SSA_NAME
&& (!backedges_varying_p || !(e->flags & EDGE_DFS_BACK)))
{
- if (ssa_undefined_value_p (def, false))
+ if (!virtual_operand_p (def)
+ && ssa_undefined_value_p (def, false))
def = VN_TOP;
else
def = SSA_VAL (def);
}
curr_invariant = is_gimple_min_invariant (currval);
curr_undefined = (TREE_CODE (currval) == SSA_NAME
+ && !virtual_operand_p (currval)
&& ssa_undefined_value_p (currval, false));
if (currval != VN_TOP
&& !curr_invariant
else if (currval != VN_TOP
&& !curr_undefined
&& TREE_CODE (to) == SSA_NAME
+ && !virtual_operand_p (to)
&& ssa_undefined_value_p (to, false))
{
if (dump_file && (dump_flags & TDF_DETAILS))
PR82320 for a testcase were we'd otherwise not terminate iteration. */
&& !(curr_undefined
&& TREE_CODE (to) == SSA_NAME
+ && !virtual_operand_p (to)
&& ssa_undefined_value_p (to, false))
/* ??? For addresses involving volatile objects or types operand_equal_p
does not reliably detect ADDR_EXPRs as equal. We know we are only
sameval = def;
sameval_e = e;
}
- else if (!expressions_equal_p (def, sameval))
+ else if (expressions_equal_p (def, sameval))
+ sameval_e = NULL;
+ else if (virtual_operand_p (def))
+ {
+ sameval = NULL_TREE;
+ break;
+ }
+ else
{
/* We know we're arriving only with invariant addresses here,
try harder comparing them. We can do some caching here
sameval = NULL_TREE;
break;
}
- else
- sameval_e = NULL;
}
/* If the value we want to use is flowing over the backedge and we