Commit c686387f authored by yb9976's avatar yb9976
Browse files

Ensure that user has condition code.

parent 7f49d242
...@@ -206,14 +206,17 @@ static void peephole_ia32_Test(ir_node *node) ...@@ -206,14 +206,17 @@ static void peephole_ia32_Test(ir_node *node)
/* make sure users only look at the sign/zero flag */ /* make sure users only look at the sign/zero flag */
foreach_out_edge(node, edge) { foreach_out_edge(node, edge) {
ir_node *user = get_edge_src_irn(edge); ir_node *user = get_edge_src_irn(edge);
x86_condition_code_t cc = get_ia32_condcode(user); if (is_ia32_CMovcc(user) || is_ia32_Jcc(user) ||
is_ia32_Setcc(user) || is_ia32_SetccMem(user)) {
x86_condition_code_t cc = get_ia32_condcode(user);
if (cc == x86_cc_equal || cc == x86_cc_not_equal) if (cc == x86_cc_equal || cc == x86_cc_not_equal)
continue; continue;
if (produced == produces_zero_sign if (produced == produces_zero_sign
&& (cc == x86_cc_sign || cc == x86_cc_not_sign)) { && (cc == x86_cc_sign || cc == x86_cc_not_sign)) {
continue; continue;
}
} }
return; return;
} }
......
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