Commit c6778d63 authored by Michael Beck's avatar Michael Beck
Browse files

Allow 64bit Leas (2 shifts and 1 add)

[r28085]
parent d17a517b
...@@ -464,7 +464,8 @@ int ia32_evaluate_insn(insn_kind kind, const ir_mode *mode, ir_tarval *tv) ...@@ -464,7 +464,8 @@ int ia32_evaluate_insn(insn_kind kind, const ir_mode *mode, ir_tarval *tv)
/* lea is only supported for 32 bit */ /* lea is only supported for 32 bit */
if (get_mode_size_bits(mode) <= 32) if (get_mode_size_bits(mode) <= 32)
return arch_costs->lea_cost; return arch_costs->lea_cost;
return 0x10000; /* in 64bit mode, the Lea cost are at wort 2 shifts and one add */
return 2 * arch_costs->add_cost + 2 * (2 * arch_costs->const_shf_cost);
case ADD: case ADD:
case SUB: case SUB:
if (get_mode_size_bits(mode) <= 32) if (get_mode_size_bits(mode) <= 32)
......
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