Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
03dcab7e
Commit
03dcab7e
authored
Apr 07, 2016
by
Christoph Mallon
Browse files
ia32: Simplify check in optimize_conv_conv().
parent
35d1b8bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/ia32/ia32_optimize.c
View file @
03dcab7e
...
...
@@ -1210,18 +1210,12 @@ static void optimize_conv_conv(ir_node *node)
arch_set_irn_register_reqs_in
(
result_conv
,
reqs
);
}
}
}
else
if
(
mode_is_signed
(
conv_mode
)
||
!
mode_is_signed
(
pred_mode
))
{
/* Use the smaller conv, if it does zero-extension or if both do
* sign-extension. */
result_conv
=
pred_proj
;
}
else
{
/* if both convs have the same sign, then we can take the smaller one */
if
(
mode_is_signed
(
conv_mode
)
==
mode_is_signed
(
pred_mode
))
{
result_conv
=
pred_proj
;
}
else
{
/* no optimization possible if smaller conv is sign-extend */
if
(
mode_is_signed
(
pred_mode
))
{
return
;
}
/* we can take the smaller conv if it is unsigned */
result_conv
=
pred_proj
;
}
return
;
}
be_warningf
(
node
,
"unoptimized ia32 Conv(Conv)"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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