diff --git a/src/intel/compiler/elk/elk_eu.h b/src/intel/compiler/elk/elk_eu.h index c003258830f..15f868fd9de 100644 --- a/src/intel/compiler/elk/elk_eu.h +++ b/src/intel/compiler/elk/elk_eu.h @@ -1918,6 +1918,7 @@ static inline int next_offset(struct elk_codegen *p, void *store, int offset) { const struct intel_device_info *devinfo = p->devinfo; + assert((char *)store + offset < (char *)p->store + p->next_insn_offset); elk_inst *insn = (elk_inst *)((char *)store + offset); if (elk_inst_cmpt_control(devinfo, insn))