http://llvm.org/bugs/show_bug.cgi?id=15524

Simon Pilgrim <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|---                         |FIXED

--- Comment #1 from Simon Pilgrim <[email protected]> ---
Fixed in ToT:

define i64 @trunc(<4 x i32> %inval) {
entry:
  %0 = trunc <4 x i32> %inval to <4 x i16>
  %1 = bitcast <4 x i16> %0 to i64
  ret i64 %1
}

generates
    pshuflw    $-24, %xmm0, %xmm0      ## xmm0 = xmm0[0,2,2,3,4,5,6,7]
    pshufhw    $-24, %xmm0, %xmm0      ## xmm0 = xmm0[0,1,2,3,4,6,6,7]
    pshufd    $-24, %xmm0, %xmm0      ## xmm0 = xmm0[0,2,2,3]
    movd    %xmm0, %rax
    retq

define i64 @trunc(<8 x i16> %inval) {
entry:
  %0 = trunc <8 x i16> %inval to <8 x i8>
  %1 = bitcast <8 x i8> %0 to i64
  ret i64 %1
}

generates
    pand    LCPI1_0(%rip), %xmm0
    packuswb    %xmm0, %xmm0
    movd    %xmm0, %rax
    retq

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to