aboutsummaryrefslogtreecommitdiffhomepage
path: root/ir/optmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'ir/optmem.c')
-rw-r--r--ir/optmem.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ir/optmem.c b/ir/optmem.c
index df0cabf..f70a281 100644
--- a/ir/optmem.c
+++ b/ir/optmem.c
@@ -196,6 +196,8 @@ cmpuse(const void *a, const void *b)
const struct use *ua = a, *ub = b;
struct block *blk = ua->blk;
if (ua->blk != ub->blk) return ua->blk->id - ub->blk->id;
+ if (ua->u == USERJUMP) return ub->u != USERJUMP;
+ if (ub->u == USERJUMP) return -(ua->u != USERJUMP);
return blkfindins(blk, ua->u) - blkfindins(blk, ub->u);
}