Commit 15edc2de authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Only deactivate AM support for a node with an immediate, if the match flags do...

Only deactivate AM support for a node with an immediate, if the match flags do not include match_am_and_immediates.  This allows folding reloads into IMul with immediate.

[r22470]
parent 651967a8
......@@ -818,7 +818,8 @@ static ir_node *gen_binop(ir_node *node, ir_node *op1, ir_node *op2,
am.new_op1, am.new_op2);
set_am_attributes(new_node, &am);
/* we can't use source address mode anymore when using immediates */
if (is_ia32_Immediate(am.new_op1) || is_ia32_Immediate(am.new_op2))
if (!(flags & match_am_and_immediates) &&
(is_ia32_Immediate(am.new_op1) || is_ia32_Immediate(am.new_op2)))
set_ia32_am_support(new_node, ia32_am_none);
SET_IA32_ORIG_NODE(new_node, ia32_get_old_node_name(env_cg, node));
......@@ -868,7 +869,8 @@ static ir_node *gen_binop_flags(ir_node *node, construct_binop_flags_func *func,
addr->mem, am.new_op1, am.new_op2, new_eflags);
set_am_attributes(new_node, &am);
/* we can't use source address mode anymore when using immediates */
if(is_ia32_Immediate(am.new_op1) || is_ia32_Immediate(am.new_op2))
if (!(flags & match_am_and_immediates) &&
(is_ia32_Immediate(am.new_op1) || is_ia32_Immediate(am.new_op2)))
set_ia32_am_support(new_node, ia32_am_none);
SET_IA32_ORIG_NODE(new_node, ia32_get_old_node_name(env_cg, node));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment