summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beuses.c
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2018-06-09 20:43:33 +0200
committerChristoph Mallon <christoph.mallon@gmx.de>2018-06-09 20:43:33 +0200
commitda0293abd337717ecb63bfb71bc6dee83d048087 (patch)
tree9fc86a162f557227bc010cf600daedfcc0225aa3 /ir/be/beuses.c
parentfc02cafd2cf4d9401ea60cf184115443a2d17cc4 (diff)
beuses: Fix typo in calculation of next use.
The 'timestep' of 'from' should be subtracted, because a distance from this location to the end of the block is calculated.
Diffstat (limited to 'ir/be/beuses.c')
-rw-r--r--ir/be/beuses.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ir/be/beuses.c b/ir/be/beuses.c
index 460e7a8..8e73c04 100644
--- a/ir/be/beuses.c
+++ b/ir/be/beuses.c
@@ -204,7 +204,7 @@ static be_next_use_t get_next_use(be_uses_t *env, ir_node *from,
}
ir_node *node = sched_last(block);
- unsigned step = get_step(node) + 1 + timestep + skip_from_uses;
+ unsigned step = get_step(node) + 1 - timestep + skip_from_uses;
if (be_is_phi_argument(block, def)) {
// TODO we really should continue searching the uses of the phi,