projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9105df0
)
Remove the potentially existing Proj when replacing a Cmp() by a Test().
author
Christoph Mallon
<christoph.mallon@gmx.de>
Thu, 14 Aug 2008 19:43:04 +0000
(19:43 +0000)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Thu, 14 Aug 2008 19:43:04 +0000
(19:43 +0000)
[r21183]
ir/be/ia32/ia32_optimize.c
patch
|
blob
|
history
diff --git
a/ir/be/ia32/ia32_optimize.c
b/ir/be/ia32/ia32_optimize.c
index
d42eb01
..
341437c
100644
(file)
--- a/
ir/be/ia32/ia32_optimize.c
+++ b/
ir/be/ia32/ia32_optimize.c
@@
-178,6
+178,8
@@
static void peephole_ia32_Cmp(ir_node *const node)
int cmp_unsigned;
ir_node *test;
arch_register_t const *reg;
+ ir_edge_t const *edge;
+ ir_edge_t const *tmp;
if (get_ia32_op_type(node) != ia32_Normal)
return;
@@
-212,6
+214,13
@@
static void peephole_ia32_Cmp(ir_node *const node)
reg = arch_get_irn_register(arch_env, node);
arch_set_irn_register(arch_env, test, reg);
+ foreach_out_edge_safe(node, edge, tmp) {
+ ir_node *const user = get_edge_src_irn(edge);
+
+ if (is_Proj(user))
+ exchange(user, test);
+ }
+
sched_add_before(node, test);
be_peephole_exchange(node, test);
}