diff options
| author | Quentin Carbonneaux <[email protected]> | 2016-04-08 08:33:37 -0400 |
|---|---|---|
| committer | Quentin Carbonneaux <[email protected]> | 2016-04-08 08:33:37 -0400 |
| commit | 238bc89271c08093ffa83e0bb7fb9f6f647b5ab0 (patch) | |
| tree | 13e75c42b5416c744a7c582f86eae03c80753e47 | |
| parent | 8c92b1248596d3ad70a8dcdbd6b6548641bc09a9 (diff) | |
fix loop header detection bug in spill
| -rw-r--r-- | spill.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -352,9 +352,9 @@ spill(Fn *fn) s1 = b->s1; s2 = b->s2; hd = 0; - if (s1 && s1->id <= n) + if (s1 && s1->id <= b->id) hd = s1; - if (s2 && s2->id <= n) + if (s2 && s2->id <= b->id) if (!hd || s2->id >= hd->id) hd = s2; r = 0; |
