[X86] Improved lowering of packed vector shifts to vpsllq/vpsrlq.
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Fri, 5 Dec 2014 20:02:22 +0000 (20:02 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Fri, 5 Dec 2014 20:02:22 +0000 (20:02 +0000)
commit3e425c8d199bd9522824c8d648333359385e090a
tree14cbb49a71e94497f1fcfb9f44e36a02d005b9bf
parenta4ab58101ac0a44af3d2260787a4bab06af38d94
[X86] Improved lowering of packed vector shifts to vpsllq/vpsrlq.

SSE2/AVX non-constant packed shift instructions only use the lower 64-bit of
the shift count.

This patch teaches function 'getTargetVShiftNode' how to deal with shifts
where the shift count node is of type MVT::i64.

Before this patch, function 'getTargetVShiftNode' only knew how to deal with
shift count nodes of type MVT::i32. This forced the backend to wrongly
truncate the shift count to MVT::i32, and then zero-extend it back to MVT::i64.

llvm-svn: 223505
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/lower-vec-shift-2.ll