llvm-6502/lib
Andrea Di Biagio ae16ff1c42 [X86] Improved lowering of packed v8i16 vector shifts by non-constant count.
Before this patch, the backend sub-optimally expanded the non-constant shift
count of a v8i16 shift into a sequence of two 'movd' plus 'movzwl'.

With this patch the backend checks if the target features sse4.1. If so, then
it lets the shuffle legalizer deal with the expansion of the shift amount.

Example:
;;
define <8 x i16> @test(<8 x i16> %A, <8 x i16> %B) {
  %shamt = shufflevector <8 x i16> %B, <8 x i16> undef, <8 x i32> zeroinitializer
  %shl = shl <8 x i16> %A, %shamt
  ret <8 x i16> %shl
}
;;

Before (with -mattr=+avx):
  vmovd  %xmm1, %eax
  movzwl  %ax, %eax
  vmovd  %eax, %xmm1
  vpsllw  %xmm1, %xmm0, %xmm0
  retq

Now:
  vpxor  %xmm2, %xmm2, %xmm2
  vpblendw  $1, %xmm1, %xmm2, %xmm1
  vpsllw  %xmm1, %xmm0, %xmm0
  retq


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223660 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-08 14:36:51 +00:00
..
Analysis Revert a part of r223583, for now. It seems causing different emission between stage2(gcc-clang) and stage3 clang. Investigating. 2014-12-08 02:07:22 +00:00
AsmParser IR: Add missing tests for function-local metadata 2014-12-07 17:56:16 +00:00
Bitcode
CodeGen
DebugInfo
ExecutionEngine
IR IR: Revert r223618 behaviour of MDNode::concatenate() 2014-12-07 20:32:11 +00:00
IRReader
LineEditor
Linker Move the ValueMap lookup inside linkFunctionBody. NFC. 2014-12-08 14:25:26 +00:00
LTO
MC
Object
Option
ProfileData
Support
TableGen
Target [X86] Improved lowering of packed v8i16 vector shifts by non-constant count. 2014-12-08 14:36:51 +00:00
Transforms
CMakeLists.txt
LLVMBuild.txt
Makefile