[llvm-bugs] [Bug 27265] New: [X86] Failure to fold v8i16 extractelement 0'th element to (v)pextrw

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Apr 7 11:11:27 PDT 2016


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

            Bug ID: 27265
           Summary: [X86] Failure to fold v8i16 extractelement 0'th
                    element to (v)pextrw
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: llvm-dev at redking.me.uk
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Attempting to store the 0'th element of a v8i16 fails to fold the store:

define void @str0_8i16(<8 x i16> %v, i16* %p) {
  %1 = extractelement <8 x i16> %v, i32 0
  store i16 %1, i16* %p
  ret void
}

llc -march=btver2:

str0_8i16:
    vmovd    %xmm0, %eax
    movw    %ax, (%rdi)
    retq

Storing other elements works fine:

define void @str1_8i16(<8 x i16> %v, i16* %p) {
  %1 = extractelement <8 x i16> %v, i32 1
  store i16 %1, i16* %p
  ret void
}

llc -march=btver2:

str1_8i16:
    vpextrw    $1, %xmm0, (%rdi)
    retq

And other types (4i32 / 16i8) don't exhibit this.

-- 
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/20160407/20eb9c28/attachment.html>


More information about the llvm-bugs mailing list