summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineModuleInfo.cpp
diff options
context:
space:
mode:
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2014-02-12 23:42:28 +0000
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2014-02-12 23:42:28 +0000
commit386d566395d90b01ddddf3d0ab219097cca8c37c (patch)
treef53452ea49b41ace09a4e3a5ace515f7f9b49f87 /llvm/lib/CodeGen/MachineModuleInfo.cpp
parentfdde7ccf376c0269929541573650df5075f201b1 (diff)
downloadbcm5719-llvm-386d566395d90b01ddddf3d0ab219097cca8c37c.tar.gz
bcm5719-llvm-386d566395d90b01ddddf3d0ab219097cca8c37c.zip
[X86] Teach the backend how to lower vector shift left into multiply rather than scalarizing it.
Instead of expanding a packed shift into a sequence of scalar shifts, the backend now tries (when possible) to convert the vector shift into a vector multiply. Before this change, a shift of a MVT::v8i16 vector by a build_vector of constants was always scalarized into a long sequence of "vector extracts + scalar shifts + vector insert". With this change, if there is SSE2 support, we emit a single vector multiply. This change also affects SSE4.1, AVX, AVX2 shifts: - A shift of a MVT::v4i32 vector by a build_vector of non uniform constants is now lowered when possible into a single SSE4.1 vector multiply. - Packed v16i16 shift left by constant build_vector are now expanded when possible into a single AVX2 vpmullw. This change also improves the lowering of AVX512f vector shifts. Added test CodeGen/X86/vec_shift6.ll with some code examples that are affected by this change. llvm-svn: 201271
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud