Dylan Cuthbert wrote: > asm( "some_instruction %0,%1,%2,%3" : "=&j" (blob): "j" (vec1), "j" > (vec2), "j" (frog) ); > asm( "some_instruction2 %0,%1" : "=&j" (frog) : "j" (blob) );
It is the goal of the register allocator to use as few registers as possible, which means that we will try to use the same register for input and output here. Until we get to reload, where we see the early clobber (&), and then are forced to add a copy so that the instruction has separate input and output registers. Early clobbers are bad. Don't ever use them unless you have to. Just because the instruction operates on pieces of the input does not mean & is necessary. You only add the & if the input and output operands must be in different non-overlapping registers. This is just a guess. Try compiling with -da and looking at the register assignments in the .lreg and .greg files, and also at what reload did. It is possible that there could be something else going on. -- Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com