On Thu, Mar 21, 2013 at 9:36 AM, Michael Zolotukhin <michael.v.zolotuk...@gmail.com> wrote: > Hi, > I've found a little bit strange code in "mov<mode>_internal" > RTL-pattern from config/i386/sse.md: > case MODE_V2DF: > if (TARGET_AVX > && (misaligned_operand (operands[0], <MODE>mode) > || misaligned_operand (operands[1], <MODE>mode))) > return "vmovupd\t{%1, %0|%0, %1}"; > else > return "%vmovapd\t{%1, %0|%0, %1}"; > > That could lead to generation of vmovapd for misaligned operands. Was > there any special intention behind that, or is that just a bug? > Attached is a patch that removes TARGET_AVX from the condition, thus > preventing generation of movapd for misaligned operands and enabling > generation of movupd for them. > > If the patch is ok, could anyone please commit it? Of course, that > could wait until 4.8 is released. > > Bootstrapped and tested on x86_64-unknown-linux-gnu and i686-linux. > > Changelog: > 2013-03-21 Michael Zolotukhin <michael.v.zolotuk...@gmail.com> > > * config/i386/sse.md (*mov<mode>_internal): Fix condition. > > --
Do you have a testcase to show there is a problem? The misaligned case should only be generated from ix86_avx256_split_vector_move_misalign. -- H.J.