From 3b7718957d840de642745275607f2e24f8b33f02 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Wed, 5 May 2010 09:20:14 +0000 Subject: [PATCH] guard against multiple users when skipping convs for AM [r27486] --- ir/be/ia32/ia32_transform.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ir/be/ia32/ia32_transform.c b/ir/be/ia32/ia32_transform.c index bc5a38156..9ece016c2 100644 --- a/ir/be/ia32/ia32_transform.c +++ b/ir/be/ia32/ia32_transform.c @@ -709,8 +709,8 @@ static int is_downconv(const ir_node *node) return 0; /* we only want to skip the conv when we're the only user - * (not optimal but for now...) - */ + * (because this test is used in the context of address-mode selection + * and we don't want to use address mode for multiple users) */ if (get_irn_n_edges(node) > 1) return 0; @@ -739,6 +739,12 @@ static bool is_sameconv(ir_node *node) if (!is_Conv(node)) return 0; + /* we only want to skip the conv when we're the only user + * (because this test is used in the context of address-mode selection + * and we don't want to use address mode for multiple users) */ + if (get_irn_n_edges(node) > 1) + return 0; + src_mode = get_irn_mode(get_Conv_op(node)); dest_mode = get_irn_mode(node); return -- 2.20.1