[LLVMbugs] [Bug 21791] New: shuffling instead of moving high element directly (x86)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Dec 9 10:07:39 PST 2014


            Bug ID: 21791
           Summary: shuffling instead of moving high element directly
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: spatel+llvm at rotateright.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

In this test case, we want to store the high element of the vector:

$ cat get_high.ll 
define void @get_high(<2 x double> %v, double* %ptr) {
  %vecext1 = extractelement <2 x double> %v, i32 1
  store double %vecext1, double* %ptr, align 8
  ret void

With plain SSE2:
$ ./llc get_high.ll -o -
    shufpd    $1, %xmm0, %xmm0        ## xmm0 = xmm0[1,0]
    movlpd    %xmm0, (%rdi)

With AVX:
$ ./llc -mcpu=btver2 get_high.ll -o -
    vpermilpd    $1, %xmm0, %xmm0 ## xmm0 = xmm0[1,0]
    vmovlpd    %xmm0, (%rdi)


I think we should be generating '(v)movhpd' instead; no shuffles needed.

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/20141209/cbbcf4e1/attachment.html>

More information about the llvm-bugs mailing list