On Tue, Dec 22, 2009 at 12:09:55PM +0000, Paul Brook wrote: > i.e. the following will work as expected: > > (define_insn "*my_movsi" > (set (match_operand:SI "..." "=a,b") > (match_operand:SI "..." "ab,ab"))) > > However the following will not. Once gcc has picked a particular insn > (_a or _b), it will tend to stick with it and not try other patterns.
This is my understanding too - but it's a real nuisance. Suppose you have two optional ISA extensions that have their own move instructions. For the sake of conversation I'll call them Alice and Bob... no, I'll call them TARGET_MAVERICK and TARGET_NEON. Now you need a minimum of three copies of the mov<mode> pattern that are mostly the same. It'd be nice if there was a way to compose instruction patterns :-( -- Daniel Jacobowitz CodeSourcery