bool ir3_a6xx_fixup_atomic_dests(struct ir3 *ir, struct ir3_shader_variant *so);
 
 /* register assignment: */
-struct ir3_ra_reg_set * ir3_ra_alloc_reg_set(struct ir3_compiler *compiler);
+struct ir3_ra_reg_set * ir3_ra_alloc_reg_set(struct ir3_compiler *compiler, bool mergedregs);
 int ir3_ra(struct ir3_shader_variant *v, struct ir3_instruction **precolor, unsigned nprecolor);
 
 /* legalize: */
 
 
        compiler->dev = dev;
        compiler->gpu_id = gpu_id;
-       compiler->set = ir3_ra_alloc_reg_set(compiler);
+       compiler->set = ir3_ra_alloc_reg_set(compiler, false);
 
        if (compiler->gpu_id >= 600) {
+               compiler->mergedregs_set = ir3_ra_alloc_reg_set(compiler, true);
                compiler->samgq_workaround = true;
        }
 
 
        struct fd_device *dev;
        uint32_t gpu_id;
        struct ir3_ra_reg_set *set;
+       struct ir3_ra_reg_set *mergedregs_set;
        uint32_t shader_count;
 
        /*
 
        struct ir3_ra_ctx ctx = {
                        .v = v,
                        .ir = v->ir,
-                       .set = v->ir->compiler->set,
+                       .set = (v->ir->compiler->gpu_id >= 600) ?
+                               v->ir->compiler->mergedregs_set : v->ir->compiler->set,
                        .scalar_pass = scalar_pass,
        };
        int ret;
 
  * really just four scalar registers.  Don't let that confuse you.)
  */
 struct ir3_ra_reg_set *
-ir3_ra_alloc_reg_set(struct ir3_compiler *compiler)
+ir3_ra_alloc_reg_set(struct ir3_compiler *compiler, bool mergedregs)
 {
        struct ir3_ra_reg_set *set = rzalloc(compiler, struct ir3_ra_reg_set);
        unsigned ra_reg_count, reg, base;
         * And finally setup conflicts.  Starting a6xx, half precision regs
         * conflict w/ full precision regs (when using MERGEDREGS):
         */
-       if (compiler->gpu_id >= 600) {
+       if (mergedregs) {
                for (unsigned i = 0; i < CLASS_REGS(0) / 2; i++) {
                        unsigned freg  = set->gpr_to_ra_reg[0][i];
                        unsigned hreg0 = set->gpr_to_ra_reg[0 + HALF_OFFSET][(i * 2) + 0];