*/
const unsigned entry_stride = (entry->src.file == FIXED_GRF ? 1 :
entry->src.stride);
- if (instruction_requires_packed_data(inst) && entry_stride > 1)
+ if (instruction_requires_packed_data(inst) && entry_stride != 1)
return false;
/* Bail if the result of composing both strides would exceed the
if (i == 1) {
inst->src[i] = val;
progress = true;
- } else if (i == 0 && inst->src[1].file != IMM) {
+ } else if (i == 0 && inst->src[1].file != IMM &&
+ (inst->conditional_mod == BRW_CONDITIONAL_NONE ||
+ /* Only GE and L are commutative. */
+ inst->conditional_mod == BRW_CONDITIONAL_GE ||
+ inst->conditional_mod == BRW_CONDITIONAL_L)) {
inst->src[0] = inst->src[1];
inst->src[1] = val;