R600: Permute operands when selecting legacy min/max