mirror of
https://github.com/danog/ir.git
synced 2024-11-26 20:34:53 +01:00
Avoid zero extension to the same register
This commit is contained in:
parent
95729f76bf
commit
e884e045de
@ -4308,7 +4308,10 @@ static void ir_emit_zext(ir_ctx *ctx, ir_ref def, ir_insn *insn)
|
||||
IR_ASSERT(ir_type_size[dst_type] == 8);
|
||||
IR_ASSERT(sizeof(void*) == 8);
|
||||
|.if X64
|
||||
| mov Rd(def_reg), Rd(op1_reg)
|
||||
/* Avoid zero extension to the same register. This may be not always safe ??? */
|
||||
if (op1_reg != def_reg) {
|
||||
| mov Rd(def_reg), Rd(op1_reg)
|
||||
}
|
||||
|.endif
|
||||
}
|
||||
} else if (IR_IS_CONST_REF(insn->op1)) {
|
||||
|
Loading…
Reference in New Issue
Block a user