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
d8a39b02
Commit
d8a39b02
authored
Aug 03, 2007
by
Christoph Mallon
Browse files
Do not deconv the right operand (shift count) of a Shl as it makes no sense.
[r15465]
parent
5288829f
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/opt/convopt.c
View file @
d8a39b02
...
...
@@ -142,7 +142,8 @@ int get_conv_costs(const ir_node *node, ir_mode *dest_mode)
}
costs
=
0
;
arity
=
get_irn_arity
(
node
);
// The shift count does not participate in the conv optimisation
arity
=
is_Shl
(
node
)
?
1
:
get_irn_arity
(
node
);
for
(
i
=
0
;
i
<
arity
;
++
i
)
{
ir_node
*
pred
=
get_irn_n
(
node
,
i
);
costs
+=
imin
(
get_conv_costs
(
pred
,
dest_mode
),
1
);
...
...
@@ -192,7 +193,8 @@ ir_node *conv_transform(ir_node *node, ir_mode *dest_mode)
return
place_conv
(
node
,
dest_mode
);
}
arity
=
get_irn_arity
(
node
);
// The shift count does not participate in the conv optimisation
arity
=
is_Shl
(
node
)
?
1
:
get_irn_arity
(
node
);
for
(
i
=
0
;
i
<
arity
;
i
++
)
{
ir_node
*
pred
=
get_irn_n
(
node
,
i
);
ir_node
*
transformed
;
...
...
Write
Preview
Supports
Markdown
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