Commit dc9ff719 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

mips: Avoid unnecessary sign/zero extension right after Load.

parent 7e62988f
......@@ -131,6 +131,13 @@ static ir_node *make_extension(dbg_info *const dbgi, ir_node *const op, unsigned
if (op_size >= to_size)
return new_op;
/* Check whether the value is correctly extended already. */
if (is_Proj(op)) {
ir_node *const pred = get_Proj_pred(op);
if (is_Load(pred))
return new_op;
assert(op_size <= 16);
ir_node *const block = get_nodes_block(new_op);
if (mode_is_signed(op_mode)) {
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