mirror of
https://github.com/danog/ir.git
synced 2025-01-22 05:31:32 +01:00
Ignore dead TLS loads
This commit is contained in:
parent
a1361d77ba
commit
fdaa0cea54
@ -4313,6 +4313,11 @@ static void ir_emit_tls(ir_ctx *ctx, ir_ref def, ir_insn *insn)
|
||||
uint32_t code;
|
||||
ir_reg reg = IR_REG_NUM(ctx->regs[def][0]);
|
||||
|
||||
if (ctx->use_lists[def].count == 1) {
|
||||
/* dead load */
|
||||
return;
|
||||
}
|
||||
|
||||
||#ifdef __APPLE__
|
||||
|| code = 0xd53bd060 | reg; // TODO: hard-coded: mrs reg, tpidrro_el0
|
||||
| .long code
|
||||
|
@ -6842,6 +6842,11 @@ static void ir_emit_tls(ir_ctx *ctx, ir_ref def, ir_insn *insn)
|
||||
dasm_State **Dst = &data->dasm_state;
|
||||
ir_reg reg = IR_REG_NUM(ctx->regs[def][0]);
|
||||
|
||||
if (ctx->use_lists[def].count == 1) {
|
||||
/* dead load */
|
||||
return;
|
||||
}
|
||||
|
||||
|.if X64
|
||||
| fs
|
||||
|| if (!insn->op3) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user