This is the mail archive of the gcc-patches@gcc.gnu.org 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]

[PATCH] Fix for mov<mode>_internal pattern


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.zolotukhin@gmail.com>

        * config/i386/sse.md (*mov<mode>_internal): Fix condition.

-- 
---
Best regards,
Michael V. Zolotukhin,
Software Engineer
Intel Corporation.

Attachment: mov_mode_internal.patch
Description: Binary data


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