/*
- * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
return 1;
case iro_Add:
case iro_Sub:
- /* Add's and Sub's are typically supported as long as both operands are immediates */
+ /* Add's and Sub's are typically supported as long as both operands are
+ * immediates */
if(bitset_is_set(non_address_mode_nodes, get_irn_idx(node)))
return 0;
left = get_binop_left(node);
right = get_binop_right(node);
- if (!value_last_used_here(node, left) &&
+ /* Fold AM if any of the two operands does not die here. This duplicates
+ * an addition and has the same register pressure for the case that only
+ * one operand dies, but is faster (on Pentium 4).
+ * && instead of || only folds AM if both operands do not die here */
+ if (!value_last_used_here(node, left) ||
!value_last_used_here(node, right)) {
return;
}