This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix for mov<mode>_internal pattern

On Thu, Mar 21, 2013 at 9:36 AM, Michael Zolotukhin
<> wrote:
> Hi,
> I've found a little bit strange code in "mov<mode>_internal"
> RTL-pattern from config/i386/
>         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  <>
>         * config/i386/ (*mov<mode>_internal): Fix condition.
> --

Do you have a testcase to show there is a problem?
The misaligned case should only be generated from


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]