if ((instr->opc == OPC_BARY_F) && (instr->regs[0]->flags & IR3_REG_EI))
                                info->last_baryf = info->instrs_count;
 
-                       info->instrs_count += 1 + instr->repeat + instr->nop;
-                       info->nops_count += instr->nop;
-                       if (instr->opc == OPC_NOP)
-                               info->nops_count += 1 + instr->repeat;
+                       unsigned instrs_count = 1 + instr->repeat + instr->nop;
+                       unsigned nops_count = instr->nop;
+
+                       if (instr->opc == OPC_NOP) {
+                               nops_count = 1 + instr->repeat;
+                               info->instrs_per_cat[0] += nops_count;
+                       } else {
+                               info->instrs_per_cat[opc_cat(instr->opc)] += instrs_count;
+                               info->instrs_per_cat[0] += nops_count;
+                       }
+
                        if (instr->opc == OPC_MOV) {
                                if (instr->cat1.src_type == instr->cat1.dst_type) {
                                        info->mov_count += 1 + instr->repeat;
                                        info->cov_count += 1 + instr->repeat;
                                }
                        }
+
+                       info->instrs_count += instrs_count;
+                       info->nops_count += nops_count;
+
                        dwords += 2;
 
                        if (instr->flags & IR3_INSTR_SS) {
 
        uint16_t sstall;
 
        uint16_t last_baryf;     /* instruction # of last varying fetch */
+
+       /* Number of instructions of a given category: */
+       uint16_t instrs_per_cat[8];
 };
 
 struct ir3_register {
 
                        so->info.max_reg + 1,
                        so->constlen);
 
+       fprintf(out, "; %s prog %d/%d: %u cat0, %u cat1, %u cat2, %u cat3, %u cat4, %u cat5, %u cat6, %u cat7, \n",
+                       type, so->shader->id, so->id,
+                       so->info.instrs_per_cat[0],
+                       so->info.instrs_per_cat[1],
+                       so->info.instrs_per_cat[2],
+                       so->info.instrs_per_cat[3],
+                       so->info.instrs_per_cat[4],
+                       so->info.instrs_per_cat[5],
+                       so->info.instrs_per_cat[6],
+                       so->info.instrs_per_cat[7]);
+
        fprintf(out, "; %s prog %d/%d: %u sstall, %u (ss), %u (sy), %d max_sun, %d loops\n",
                        type, so->shader->id, so->id,
                        so->info.sstall,
 
        pipe_debug_message(debug, SHADER_INFO,
                        "%s shader: %u inst, %u nops, %u non-nops, %u mov, %u cov, "
                        "%u dwords, %u last-baryf, %u half, %u full, %u constlen, "
+                       "%u cat0, %u cat1, %u cat2, %u cat3, %u cat4, %u cat5, %u cat6, %u cat7, "
                        "%u sstall, %u (ss), %u (sy), %d max_sun, %d loops\n",
                        ir3_shader_stage(v),
                        v->info.instrs_count,
                        v->info.max_half_reg + 1,
                        v->info.max_reg + 1,
                        v->constlen,
+                       v->info.instrs_per_cat[0],
+                       v->info.instrs_per_cat[1],
+                       v->info.instrs_per_cat[2],
+                       v->info.instrs_per_cat[3],
+                       v->info.instrs_per_cat[4],
+                       v->info.instrs_per_cat[5],
+                       v->info.instrs_per_cat[6],
+                       v->info.instrs_per_cat[7],
                        v->info.sstall,
                        v->info.ss, v->info.sy,
                        v->max_sun, v->loops);