These were responsible for ~20% of the time
spent in instruction selection.
Reduces overall compile times by ~0.5%.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11879>
Operand op1(src1);
for (int i = 0; i < 2; i++) {
- uint32_t src_ub = get_alu_src_ub(ctx, instr, swap_srcs ? !i : i);
if (uses_ub & (1 << i)) {
+ uint32_t src_ub = get_alu_src_ub(ctx, instr, swap_srcs ? !i : i);
if (src_ub <= 0xffff)
bld.set16bit(i ? op1 : op0);
else if (src_ub <= 0xffffff)