@@ -259,11 +259,6 @@ avail_exprs_stack::lookup_avail_expr (gimple *stmt, bool insert, bool tbaa_p,
}
else if (*slot == NULL)
{
- /* If we did not find the expression in the hash table, we may still
- be able to produce a result for some expressions. */
- tree retval = avail_exprs_stack::simplify_binary_operation (stmt,
- element);
-
/* We have, in effect, allocated *SLOT for ELEMENT at this point.
We must initialize *SLOT to a real entry, even if we found a
way to prove ELEMENT was a constant after not finding ELEMENT
@@ -277,6 +272,11 @@ avail_exprs_stack::lookup_avail_expr (gimple *stmt, bool insert, bool tbaa_p,
class expr_hash_elt *element2 = new expr_hash_elt (element);
*slot = element2;
+ /* If we did not find the expression in the hash table, we may still
+ be able to produce a result for some expressions. */
+ tree retval = avail_exprs_stack::simplify_binary_operation (stmt,
+ element);
+
record_expr (element2, NULL, '2');
return retval;
}