R600: Rewrite an awkward loop in R600MachineScheduler