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
f4722b98
Commit
f4722b98
authored
Mar 20, 2015
by
Christoph Mallon
Browse files
constbits, iropt: Make computed_value_Confirm() monotone.
parent
07d810c6
Changes
2
Hide whitespace changes
Inline
Side-by-side
ir/ana/constbits.c
View file @
f4722b98
...
...
@@ -289,6 +289,8 @@ result_unknown_X:
if
(
tarval_is_constant
(
computed
))
{
z
=
o
=
computed
;
goto
set_info
;
}
else
if
(
computed
==
tarval_bad
)
{
goto
undefined
;
}
switch
(
get_irn_opcode
(
irn
))
{
...
...
ir/ir/iropt.c
View file @
f4722b98
...
...
@@ -645,11 +645,18 @@ static ir_tarval *computed_value_Confirm(const ir_node *n)
const
ir_relation
possible
=
ir_get_possible_cmp_relations
(
value
,
bound
);
const
ir_relation
relation
=
get_Confirm_relation
(
n
);
if
((
possible
&
relation
)
==
ir_relation_equal
)
{
switch
(
possible
&
relation
)
{
case
ir_relation_false
:
return
tarval_bad
;
case
ir_relation_equal
:
{
ir_tarval
*
tv
=
value_of
(
bound
);
if
(
tarval_is_constant
(
tv
))
return
tv
;
break
;
}
}
return
value_of
(
value
);
}
...
...
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