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
52f2a1d6
Commit
52f2a1d6
authored
Jul 08, 2015
by
yb9976
Browse files
Handle corner case in reassociation.
This fixes opt/reassoc035.c.
parent
5c8df19f
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/opt/reassoc.c
View file @
52f2a1d6
...
...
@@ -808,6 +808,13 @@ static void do_shannon(ir_graph *irg)
get_irn_node_nr
(
top_node
),
get_irn_node_nr
(
other_node
)));
/* This case can be handled by local optimizations.
* We skip the case, because we would otherwise
* simplify a & a to -1 & -1, or need to track edges
* instead of nodes in the optimization environment. */
if
(
base_node
==
other_node
)
continue
;
/* check if optimization is still valid */
if
(
middle_node
)
{
if
(
!
has_operand
(
middle_node
,
top_node
)
||
!
has_operand
(
base_node
,
middle_node
))
{
...
...
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