[llvm-bugs] [Bug 28461] New: cvttpd2dq is not generated for <2 x double> to <2 x i32> casts

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jul 7 11:54:11 PDT 2016


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

            Bug ID: 28461
           Summary: cvttpd2dq is not generated for <2 x double> to <2 x
                    i32> casts
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: mkuper at google.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

For:

define <2 x i32> @foo(<2 x double> %arg) {
  %ret = fptosi <2 x double> %arg to <2 x i32>
  ret <2 x i32> %ret
}

We produce, with llc -matr=+sse4.2:
    cvttsd2si    %xmm0, %rax
    movd    %rax, %xmm1
    shufpd    $1, %xmm0, %xmm0        # xmm0 = xmm0[1,0]
    cvttsd2si    %xmm0, %rax
    movd    %rax, %xmm0
    punpcklqdq    %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
    movdqa    %xmm1, %xmm0
    retq

-- 
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/20160707/a0879231/attachment-0001.html>


More information about the llvm-bugs mailing list