Commit 34fbd533 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

amd64: Use 'mov_imm' instead of 'xor_0' to make a constant 0 during instruction selection.

Using 'xor' instead is better left to the peephole optimization pass later on.
parent 4da3e0e1
......@@ -1186,8 +1186,7 @@ static ir_node *create_div(ir_node *const node, ir_mode *const mode,
}
constructor = new_bd_amd64_idiv;
} else {
ir_node *const xor0 = new_bd_amd64_xor_0(dbgi, new_block, X86_SIZE_32);
upper_value = be_new_Proj(xor0, pn_amd64_xor_0_res);
upper_value = make_const(dbgi, new_block, 0);
constructor = new_bd_amd64_div;
}
......@@ -2700,8 +2699,7 @@ static ir_node *gen_Unknown(ir_node *const node)
if (mode_is_float(get_irn_mode(node))) {
return new_bd_amd64_xorp_0(NULL, block, X86_SIZE_64);
} else {
ir_node *res = new_bd_amd64_xor_0(NULL, block, X86_SIZE_32);
return be_new_Proj(res, pn_amd64_xor_0_res);
return make_const(NULL, block, 0);
}
}
......
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