summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bepeephole.c
diff options
context:
space:
mode:
authorChristoph Mallon <mallon@cs.uni-saarland.de>2015-07-27 21:52:04 +0200
committerChristoph Mallon <mallon@cs.uni-saarland.de>2015-07-28 10:36:31 +0200
commit9a6b8525e9916f0b0448468defd150413814ecfe (patch)
tree8560176b7b598b84c47f88efd0f6dbaff2cb5679 /ir/be/bepeephole.c
parent6a3abbe420b99019efd3e8a51bfce4e3cf713d5b (diff)
be: Add and use be_new_Proj().
It is like new_r_Proj(), but the mode is determined automatically from the out requirement of the predecessor. This probably resolves some mode mismatches in untested code paths -- AMD64 backend and SPARC hard float, I'm looking at you!
Diffstat (limited to 'ir/be/bepeephole.c')
-rw-r--r--ir/be/bepeephole.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ir/be/bepeephole.c b/ir/be/bepeephole.c
index 8b9af27..895444c 100644
--- a/ir/be/bepeephole.c
+++ b/ir/be/bepeephole.c
@@ -140,9 +140,8 @@ void be_peephole_exchange(ir_node *old, ir_node *nw)
ir_node *be_peephole_to_tuple(ir_node *const node)
{
be_liveness_remove(lv, node);
- ir_mode *const mode = get_irn_mode(node);
set_irn_mode(node, mode_T);
- ir_node *const res = new_r_Proj(node, mode, 0);
+ ir_node *const res = be_new_Proj(node, 0);
edges_reroute_except(node, res, res);
be_liveness_introduce(lv, res);
return res;