mirror of
https://github.com/danog/ir.git
synced 2025-01-21 05:07:47 +01:00
Better use placement
This commit is contained in:
parent
6b0c4435c2
commit
2c2f2dabab
2
ir_ra.c
2
ir_ra.c
@ -329,7 +329,7 @@ int ir_compute_live_ranges(ir_ctx *ctx)
|
||||
} else {
|
||||
reg = ctx->rules ? ir_uses_fixed_reg(ctx, i, j) : IR_REG_NONE;
|
||||
if (reg != IR_REG_NONE) {
|
||||
use_pos = IR_GAP_LIVE_POS_FROM_REF(i);
|
||||
use_pos = IR_START_LIVE_POS_FROM_REF(i); // TODO: ???
|
||||
ir_add_fixed_live_range(ctx, reg,
|
||||
IR_USE_LIVE_POS_FROM_REF(i), IR_DEF_LIVE_POS_FROM_REF(i));
|
||||
} else {
|
||||
|
@ -13,3 +13,13 @@
|
||||
l_4 = RETURN(l_1, x_3);
|
||||
}
|
||||
--EXPECT--
|
||||
test:
|
||||
movl %edx, %ecx
|
||||
movl %edi, %eax
|
||||
xorl %edx, %edx
|
||||
divl %esi
|
||||
movl %edx, %eax
|
||||
xorl %edx, %edx
|
||||
divl %ecx
|
||||
movl %edx, %eax
|
||||
retq
|
||||
|
Loading…
x
Reference in New Issue
Block a user