Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
92a9b489
Commit
92a9b489
authored
Feb 13, 2014
by
Christoph Mallon
Browse files
Use get_tarval_popcount() instead of get_tarval_bitpattern().
parent
87ea9fed
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/ia32/ia32_architecture.c
View file @
92a9b489
...
...
@@ -465,17 +465,8 @@ int ia32_evaluate_insn(insn_kind kind, const ir_mode *mode, ir_tarval *tv)
switch
(
kind
)
{
case
MUL
:
cost
=
arch_costs
->
cost_mul_start
;
if
(
arch_costs
->
cost_mul_bit
>
0
)
{
char
*
bitstr
=
get_tarval_bitpattern
(
tv
);
int
i
;
for
(
i
=
0
;
bitstr
[
i
]
!=
'\0'
;
++
i
)
{
if
(
bitstr
[
i
]
==
'1'
)
{
cost
+=
arch_costs
->
cost_mul_bit
;
}
}
free
(
bitstr
);
}
if
(
arch_costs
->
cost_mul_bit
>
0
)
cost
+=
get_tarval_popcount
(
tv
)
*
arch_costs
->
cost_mul_bit
;
if
(
get_mode_size_bits
(
mode
)
<=
32
)
return
cost
;
/* 64bit mul supported, approx 4times of a 32bit mul*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment