From c7194024c1f9f32396a9e201816424438fc2ee9a Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Wed, 24 Oct 2007 13:49:02 +0000 Subject: [PATCH] Restore the AM fold behavior of prior to r16324. It is faster. *shrug* [r16327] --- ir/be/ia32/ia32_address_mode.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ir/be/ia32/ia32_address_mode.c b/ir/be/ia32/ia32_address_mode.c index b186b55c3..6ab862b7c 100644 --- a/ir/be/ia32/ia32_address_mode.c +++ b/ir/be/ia32/ia32_address_mode.c @@ -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; } -- 2.20.1