OSDN Git Service

[X86] Optimize vector shifts with variable but uniform shift amounts
authorZvi Rackover <zvi.rackover@intel.com>
Thu, 5 Jan 2017 15:11:43 +0000 (15:11 +0000)
committerZvi Rackover <zvi.rackover@intel.com>
Thu, 5 Jan 2017 15:11:43 +0000 (15:11 +0000)
commitb021632bce8d8e6485118a67c982f64e9fcf0839
treeb7733173c0af89b92492aef5887b26039e97aaab
parentf6f4d232fd23d3d2de7ec0e6d0497abdedbc6396
[X86] Optimize vector shifts with variable but uniform shift amounts

Summary:
For instructions such as PSLLW/PSLLD/PSLLQ a variable shift amount may be passed in an XMM register.
The lower 64-bits of the register are evaluated to determine the shift amount.
This patch improves the construction of the vector containing the shift amount.

Reviewers: craig.topper, delena, RKSimon

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D28353

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291120 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/lower-vec-shift-2.ll
test/CodeGen/X86/vector-rotate-128.ll
test/CodeGen/X86/vector-shift-ashr-128.ll
test/CodeGen/X86/vector-shift-ashr-256.ll
test/CodeGen/X86/vector-shift-ashr-512.ll
test/CodeGen/X86/vector-shift-lshr-128.ll
test/CodeGen/X86/vector-shift-lshr-256.ll
test/CodeGen/X86/vector-shift-lshr-512.ll
test/CodeGen/X86/vector-shift-shl-128.ll
test/CodeGen/X86/vector-shift-shl-256.ll
test/CodeGen/X86/vector-shift-shl-512.ll
test/CodeGen/X86/vshift-4.ll