On 10/16/2013 09:47 AM, Uros Bizjak wrote: > On Wed, Oct 16, 2013 at 6:06 PM, Kirill Yukhin <kirill.yuk...@gmail.com> > wrote: > >> It seems that gang of AVX* patterns were copy and >> pasted from SSE, however as far as they are NDD, >> we may remove corresponding expands which sort operands. > > OTOH, I have some second thoughts on removing AVX2 expanders. > > Please consider the situation, where we have *both* operands in > memory, and the insn is inside the loop. When reload comes around, it > will fixup one of the operands with a load from memory. However, > having insn in the loop, I suspect the load won't be moved out of > loop. > > So, I guess even AVX/AVX2 insn patterns should call > ix86_fixup_binary_operands_*, and this fixup function should be > improved to load one of the operands into register, in case both > operands are in memory. > > This also means, that you still need expanders for AVX512 commutative > multiplies. > > Uros. >
Fair enough. r~