Fix the detection of instruction pattern with multiple emits followed
by TX. Once detected, this is one of the instruction patterns that is
internally replaced with a single optimized instruction, as long as
none of the instructions to be replaced is referenced by a jump
instruction. The fix enforces this check for the TX instruction of
the pattern.
Fixes:
31035e87b207 ("pipeline: add SWX instruction optimizer")
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
if (instr[i].type != INSTR_TX)
return 0;
+ if (data[i].n_users)
+ return 0;
+
i++;
*n_pattern_instr = i;