i965: add assert to while_jumps_before_offset()

jip should always be negative here as its the result of
do instruction - while instruction.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Timothy Arceri 2017-01-26 13:50:42 +11:00
parent 77a6597bb7
commit 2842dea310

View file

@ -2714,6 +2714,7 @@ while_jumps_before_offset(const struct gen_device_info *devinfo,
int scale = 16 / brw_jump_scale(devinfo);
int jip = devinfo->gen == 6 ? brw_inst_gen6_jump_count(devinfo, insn)
: brw_inst_jip(devinfo, insn);
assert(jip < 0);
return while_offset + jip * scale <= start_offset;
}