https://llvm.org/bugs/show_bug.cgi?id=31287
Bug ID: 31287 Summary: x86 backend should prefer pinsrw over movzwl + movd? Product: libraries Version: trunk Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P Component: Backend: X86 Assignee: unassignedb...@nondot.org Reporter: efrie...@codeaurora.org CC: llvm-bugs@lists.llvm.org Classification: Unclassified Take a testcase like the following: define <16 x i8> @f(<2 x i8> *%p) { %t = load <2 x i8>, <2 x i8> *%p %r = shufflevector <2 x i8> %t, <2 x i8> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2> ret <16 x i8> %r } Using "llc -mtriple=x86_64-pc-linux-gnu -mattr=+avx", we generate: movzwl (%rdi), %eax vmovd %eax, %xmm0 retq Potential alternate sequence, which I expect is a little faster (not tested): vpxor %xmm0, %xmm0, %xmm0 vpinsrw $0, (%rdi), %xmm0, %xmm0 retq -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs