[LLVMbugs] [Bug 15524] vector truncation generates pretty terrible code without ssse3
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Dec 17 14:18:58 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=15524
Simon Pilgrim <llvm-dev at redking.me.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |llvm-dev at redking.me.uk
Resolution|--- |FIXED
--- Comment #1 from Simon Pilgrim <llvm-dev at redking.me.uk> ---
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141217/9c5f1bac/attachment.html>
More information about the llvm-bugs
mailing list