ir_value_life_merge_into: fix a possible underflow

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-08-24 15:06:30 +02:00
parent 7cfb9425a0
commit f042068aab

4
ir.c
View file

@ -925,8 +925,8 @@ bool ir_value_life_merge_into(ir_value *self, const ir_value *other)
entry->start = life->start;
}
if (life->end > entry->end &&
life->start-1 <= entry->end)
if (life->end > entry->end &&
life->start <= entry->end+1)
{
/* ends later and overlaps */
entry->end = life->end;