mirror of
git://c9x.me/qbe.git
synced 2026-04-05 18:09:47 +00:00
fix wrong assertion in load elimination
The assertion fails incorrectly on a block right after the end of a loop.
This commit is contained in:
parent
96f0711dac
commit
d04ba5eae8
2
load.c
2
load.c
@ -260,7 +260,7 @@ def(Slice sl, bits msk, Blk *b, Ins *i, Loc *il)
|
|||||||
goto Load;
|
goto Load;
|
||||||
if (b->npred == 1) {
|
if (b->npred == 1) {
|
||||||
bp = b->pred[0];
|
bp = b->pred[0];
|
||||||
assert(bp->loop == il->blk->loop);
|
assert(bp->s2 || bp->loop == il->blk->loop);
|
||||||
l = *il;
|
l = *il;
|
||||||
if (bp->s2)
|
if (bp->s2)
|
||||||
l.type = LNoLoad;
|
l.type = LNoLoad;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user