BugFix: ls_mode must be set to Iu when transforming float stores to int stores
[libfirm] / ir / be / ia32 / ia32_address_mode.c
index b186b55..1a7a693 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
  *
@@ -483,7 +483,11 @@ static void mark_non_address_nodes(ir_node *node, void *env)
                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;
                }