Commit 23832c1a authored by Christoph Mallon's avatar Christoph Mallon
Browse files

ia32: Remove pointless check.

IncSP can only have %esp assigned.
parent 89688f61
...@@ -644,8 +644,6 @@ static ir_node *create_pop(dbg_info *dbgi, ir_node *block, ...@@ -644,8 +644,6 @@ static ir_node *create_pop(dbg_info *dbgi, ir_node *block,
*/ */
static void peephole_be_IncSP(ir_node *node) static void peephole_be_IncSP(ir_node *node)
{ {
const arch_register_t *esp = &ia32_registers[REG_ESP];
/* first optimize incsp->incsp combinations */ /* first optimize incsp->incsp combinations */
if (be_peephole_IncSP_IncSP(node)) if (be_peephole_IncSP_IncSP(node))
return; return;
...@@ -656,9 +654,6 @@ static void peephole_be_IncSP(ir_node *node) ...@@ -656,9 +654,6 @@ static void peephole_be_IncSP(ir_node *node)
/* transform Load->IncSP combinations to Pop where possible */ /* transform Load->IncSP combinations to Pop where possible */
peephole_Load_IncSP_to_pop(node); peephole_Load_IncSP_to_pop(node);
if (arch_get_irn_register(node) != esp)
return;
/* replace IncSP -4 by Pop freereg when possible */ /* replace IncSP -4 by Pop freereg when possible */
int offset = be_get_IncSP_offset(node); int offset = be_get_IncSP_offset(node);
if ((offset != -8 || ia32_cg_config.use_add_esp_8) && if ((offset != -8 || ia32_cg_config.use_add_esp_8) &&
...@@ -685,6 +680,8 @@ static void peephole_be_IncSP(ir_node *node) ...@@ -685,6 +680,8 @@ static void peephole_be_IncSP(ir_node *node)
stack = create_pop(dbgi, block, stack, node, reg); stack = create_pop(dbgi, block, stack, node, reg);
} }
} else { } else {
arch_register_t const *const esp = &ia32_registers[REG_ESP];
dbg_info *dbgi = get_irn_dbg_info(node); dbg_info *dbgi = get_irn_dbg_info(node);
ir_node *block = get_nodes_block(node); ir_node *block = get_nodes_block(node);
......
Supports Markdown
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