Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
bool alu = tag == TAG_ALU_4;
unsigned unit = predicate->unit;
bool branch = alu && (unit == ALU_ENAB_BR_COMPACT);
+ bool scalar = (unit != ~0) && (unit & UNITS_SCALAR);
/* Iterate to find the best instruction satisfying the predicate */
unsigned i;
if (branch && !instructions[i]->compact_branch)
continue;
+ if (alu && scalar && !mir_is_scalar(instructions[i]))
+ continue;
+
if (alu && !mir_adjust_constants(instructions[i], predicate, false))
continue;