summary refs log tree commit diff
path: root/load.c
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-12-21 09:54:50 -0500
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-12-21 09:54:50 -0500
commitd04ba5eae886ce4e5407ccd711fb1c9846dcf1f7 (patch)
tree360ae48c954bb432b814a7e46c7c4ae677d32326 /load.c
parent96f0711dac07cd124843bb773228c98de2d5d914 (diff)
downloadroux-d04ba5eae886ce4e5407ccd711fb1c9846dcf1f7.tar.gz
fix wrong assertion in load elimination
The assertion fails incorrectly on a block right
after the end of a loop.
Diffstat (limited to 'load.c')
-rw-r--r--load.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/load.c b/load.c
index a6bd68e..26bc2ca 100644
--- a/load.c
+++ b/load.c
@@ -260,7 +260,7 @@ def(Slice sl, bits msk, Blk *b, Ins *i, Loc *il)
 		goto Load;
 	if (b->npred == 1) {
 		bp = b->pred[0];
-		assert(bp->loop == il->blk->loop);
+		assert(bp->s2 || bp->loop == il->blk->loop);
 		l = *il;
 		if (bp->s2)
 			l.type = LNoLoad;