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
075a2c56
Commit
075a2c56
authored
Oct 29, 2013
by
Matthias Braun
Browse files
inline: fix invalid usage of get_type_mode on aggregate return
parent
8374c9f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/opt/opt_inline.c
View file @
075a2c56
...
...
@@ -550,16 +550,15 @@ static int inline_method(ir_node *const call, ir_graph *called_graph)
if
(
n_res
>
0
)
{
for
(
int
j
=
0
;
j
<
n_res
;
j
++
)
{
ir_type
*
res_type
=
get_method_res_type
(
ctp
,
j
);
ir_mode
*
res_mode
=
get_type_mode
(
res_type
);
bool
is_aggregate
=
is_aggregate_type
(
res_type
);
ir_mode
*
res_mode
=
is_aggregate
?
mode_P_data
:
get_type_mode
(
res_type
);
int
n_ret
=
0
;
for
(
int
i
=
0
;
i
<
arity
;
i
++
)
{
ir_node
*
ret
=
get_Block_cfgpred
(
end_bl
,
i
);
if
(
is_Return
(
ret
))
{
ir_node
*
res
=
get_Return_res
(
ret
,
j
);
if
(
is_aggregate
)
{
res_mode
=
get_irn_mode
(
res
);
}
else
if
(
get_irn_mode
(
res
)
!=
res_mode
)
{
if
(
get_irn_mode
(
res
)
!=
res_mode
)
{
ir_node
*
block
=
get_nodes_block
(
res
);
res
=
new_r_Conv
(
block
,
res
,
res_mode
);
}
...
...
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