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
c686387f
Commit
c686387f
authored
Aug 15, 2014
by
yb9976
Browse files
Ensure that user has condition code.
parent
7f49d242
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/ia32/ia32_optimize.c
View file @
c686387f
...
...
@@ -206,14 +206,17 @@ static void peephole_ia32_Test(ir_node *node)
/* make sure users only look at the sign/zero flag */
foreach_out_edge
(
node
,
edge
)
{
ir_node
*
user
=
get_edge_src_irn
(
edge
);
x86_condition_code_t
cc
=
get_ia32_condcode
(
user
);
ir_node
*
user
=
get_edge_src_irn
(
edge
);
if
(
is_ia32_CMovcc
(
user
)
||
is_ia32_Jcc
(
user
)
||
is_ia32_Setcc
(
user
)
||
is_ia32_SetccMem
(
user
))
{
x86_condition_code_t
cc
=
get_ia32_condcode
(
user
);
if
(
cc
==
x86_cc_equal
||
cc
==
x86_cc_not_equal
)
continue
;
if
(
produced
==
produces_zero_sign
&&
(
cc
==
x86_cc_sign
||
cc
==
x86_cc_not_sign
))
{
continue
;
if
(
cc
==
x86_cc_equal
||
cc
==
x86_cc_not_equal
)
continue
;
if
(
produced
==
produces_zero_sign
&&
(
cc
==
x86_cc_sign
||
cc
==
x86_cc_not_sign
))
{
continue
;
}
}
return
;
}
...
...
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