Commit 46b1210e authored by Christoph Mallon's avatar Christoph Mallon
Browse files

ia32: Fix calculation bug in ia32_get_op_estimated_cost() of the latency of CopyB_i.

4 / 3 * x is x, so use x * 4 / 3.
parent ea49f59b
......@@ -12,9 +12,6 @@
#include "lc_opts.h"
#include "lc_opts_enum.h"
#include <math.h>
#include "irarch.h"
#include "irgwalk.h"
#include "irprog.h"
......@@ -309,7 +306,7 @@ static int ia32_get_op_estimated_cost(const ir_node *irn)
if (is_ia32_CopyB_i(irn)) {
int size = get_ia32_copyb_size(irn);
cost = 20 + (int)ceil((4/3) * size);
cost = 20 + size * 4 / 3;
}
/* in case of address mode operations add additional cycles */
else if (op_tp == ia32_AddrModeD || op_tp == ia32_AddrModeS) {
......
Markdown is supported
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