On 8/23/17 5:22 PM, Segher Boessenkool wrote: > On Wed, Aug 23, 2017 at 05:15:03PM +0000, Wilco Dijkstra wrote: >> What is a preferred alternative? The current register allocator simply >> ignores >> any combination of "0r", "r0", ("r", "0") and ("0", "r") and just picks the >> most >> generic alternative. So we need a new way to specify a move preference >> which won't constrain the allocation ("0" would always force the preference >> but >> will also insert redundant moves which then cannot be removed later). > > "0,r" might work, or "0,?r", or similar (alternatives have commas > between them).
Right and alternatives that come first in the string are preferred over alternatives that come later in the string, so in Segher's example above, if both '0' and 'r' (or '?r') constraints are "ok", then '0' is preferred over 'r' (or '?r'). Peter