summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bepeephole.c
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2012-08-31 13:33:07 +0200
committerMatthias Braun <matze@braunis.de>2012-08-31 13:33:25 +0200
commitbabe0f4cc35d4b25e34e62a07324e2dd061e7cc8 (patch)
tree34844fc4c42abe636346ba8afcb3f3780477b685 /ir/be/bepeephole.c
parent4cecb7fd8a439ef07707adc43607d4f717319220 (diff)
sparc: be more conservative when moving memops around
Diffstat (limited to 'ir/be/bepeephole.c')
-rw-r--r--ir/be/bepeephole.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ir/be/bepeephole.c b/ir/be/bepeephole.c
index d58171d..cc26a63 100644
--- a/ir/be/bepeephole.c
+++ b/ir/be/bepeephole.c
@@ -303,6 +303,14 @@ bool be_can_move_up(ir_heights_t *heights, const ir_node *node,
/* currently we can move up exactly 1 block */
assert(get_Block_cfgpred_block(node_block, 0) == after_block);
ir_node *first = sched_first(node_block);
+
+ /* do not move nodes changing memory */
+ if (is_memop(node)) {
+ ir_node *meminput = get_memop_mem(node);
+ if (!is_NoMem(meminput))
+ return false;
+ }
+
/* make sure we can move to the beginning of the succ block */
if (node != first && !be_can_move_up(heights, node, sched_prev(first)))
return false;