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
bb85d176
Commit
bb85d176
authored
Jan 18, 2015
by
Christoph Mallon
Browse files
iropt: Further improve complement_values(): Consider Eor(x, y) and Eor(x, ~y).
parent
621a85c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/ir/iropt.c
View file @
bb85d176
...
...
@@ -283,13 +283,13 @@ static ir_tarval *computed_value_Size(const ir_node *n)
static
bool
complement_values
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
if
((
is_Not
(
a
)
&&
get_Not_op
(
a
)
==
b
)
||
(
is_Not
(
b
)
&&
get_Not_op
(
b
)
==
a
))
return
true
;
if
(
is_Eor
(
a
)
&&
is_Eor
(
b
)
&&
get_Eor_left
(
a
)
==
get_Eor_left
(
b
))
{
a
=
get_Eor_right
(
a
);
b
=
get_Eor_right
(
b
);
}
if
((
is_Not
(
a
)
&&
get_Not_op
(
a
)
==
b
)
||
(
is_Not
(
b
)
&&
get_Not_op
(
b
)
==
a
))
return
true
;
if
(
is_Const
(
a
)
&&
is_Const
(
b
))
{
ir_tarval
*
const
tv_a
=
get_Const_tarval
(
a
);
ir_tarval
*
const
tv_b
=
get_Const_tarval
(
b
);
...
...
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