projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab604dc
)
check the opcode again after an optimize_node()
author
Michael Beck
<beck@ipd.info.uni-karlsruhe.de>
Wed, 24 Oct 2007 20:44:41 +0000
(20:44 +0000)
committer
Michael Beck
<beck@ipd.info.uni-karlsruhe.de>
Wed, 24 Oct 2007 20:44:41 +0000
(20:44 +0000)
[r16335]
ir/opt/reassoc.c
patch
|
blob
|
history
diff --git
a/ir/opt/reassoc.c
b/ir/opt/reassoc.c
index
de5b6dd
..
d18719a
100644
(file)
--- a/
ir/opt/reassoc.c
+++ b/
ir/opt/reassoc.c
@@
-688,9
+688,10
@@
transform:
in[1] = b;
mode = get_mode_from_ops(a, b);
- in[0] = optimize_node(new_ir_node(dbg, current_ir_graph, blk, op, mode, 2, in));
+ in[0] =
irn =
optimize_node(new_ir_node(dbg, current_ir_graph, blk, op, mode, 2, in));
- if (op == op_Add || op == op_Sub) {
+ /* beware: optimize_node might have changed the opcode, check again */
+ if (is_Add(irn) || is_Sub(irn)) {
reverse_rule_distributive(&in[0]);
}
in[1] = c;