projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e7347e5
)
same fix again on another place
author
Michael Beck
<beck@ipd.info.uni-karlsruhe.de>
Wed, 24 Oct 2007 20:48:48 +0000
(20:48 +0000)
committer
Michael Beck
<beck@ipd.info.uni-karlsruhe.de>
Wed, 24 Oct 2007 20:48:48 +0000
(20:48 +0000)
[r16337]
ir/opt/reassoc.c
patch
|
blob
|
history
diff --git
a/ir/opt/reassoc.c
b/ir/opt/reassoc.c
index
d18719a
..
606b534
100644
(file)
--- a/
ir/opt/reassoc.c
+++ b/
ir/opt/reassoc.c
@@
-723,7
+723,8
@@
static void reverse_rules(ir_node *node, void *env) {
if (is_op_commutative(op)) {
wenv->changes |= res = move_consts_up(&node);
}
if (is_op_commutative(op)) {
wenv->changes |= res = move_consts_up(&node);
}
- if (op == op_Add || op == op_Sub) {
+ /* beware: move_consts_up might have changed the opcode, check again */
+ if (is_Add(node) || is_Sub(node)) {
wenv->changes |= res = reverse_rule_distributive(&node);
}
} while (res);
wenv->changes |= res = reverse_rule_distributive(&node);
}
} while (res);