Commit 21d755d0 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

ia32: Only get the Proj for the flags result, if the node has mode_T.

Otherwise the node directly produces the flags result.
This fixes backend/destam_flags4.c.
parent b7a5fc14
......@@ -584,7 +584,7 @@ static bool ia32_try_replace_flags(ir_node *consumers, ir_node *flags, ir_node *
/* We can use available if we reverse the consumers' condition codes. */
arch_set_irn_register_out(available, pn, &ia32_registers[REG_EFLAGS]);
ir_node *const proj = be_get_or_make_Proj_for_pn(available, pn);
ir_node *const proj = get_irn_mode(available) == mode_T ? be_get_or_make_Proj_for_pn(available, pn) : available;
ir_mode *const flag_mode = ia32_reg_classes[CLASS_ia32_flags].mode;
for (ir_node *c = consumers; c != NULL; c = get_irn_link(c)) {
x86_condition_code_t cc = get_ia32_condcode(c);
......
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