[llvm-bugs] [Bug 30926] New: [X86] cvtsi2ss, cvtsi2sd, and cvtss2sd intrinsic sequences from clang produce unnecessary vmovss/vmovsd instructions

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Nov 6 16:34:40 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=30926

            Bug ID: 30926
           Summary: [X86] cvtsi2ss, cvtsi2sd, and cvtss2sd intrinsic
                    sequences from clang produce unnecessary vmovss/vmovsd
                    instructions
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: craig.topper at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

The code emitted by clang's intrinsics for cvtsi2ss, cvtsi2sd, and cvtss2sd is
lowered to a code sequence that involves and extra movss/movsd or a blend.

For example:

_test_mm_cvtsi32_sd:
    vcvtsi2sdl    %edi, %xmm1, %xmm1
    vblendpd    $1, %xmm1, %xmm0, %xmm0
    retq

To fix this we need to add more patterns for detecting X86ISD::MOVSS/SD or
blend and emit the intrinsic version of the instruction instead. Similar to
what is being done for ADD/SUB/MUL/DIV.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20161107/0f505999/attachment.html>


More information about the llvm-bugs mailing list