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: unassignedb...@nondot.org
          Reporter: craig.top...@gmail.com
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to