Andrea Di Biagio 749e8fee34 [X86] Improve the lowering of packed shifts by constant build_vector.
This patch teaches the backend how to efficiently lower logical and
arithmetic packed shifts on both SSE and AVX/AVX2 machines.

When possible, instead of scalarizing a vector shift, the backend should try
to expand the shift into a sequence of two packed shifts by immedate count
followed by a MOVSS/MOVSD.

Example
  (v4i32 (srl A, (build_vector < X, Y, Y, Y>)))

Can be rewritten as:
  (v4i32 (MOVSS (srl A, <Y,Y,Y,Y>), (srl A, <X,X,X,X>)))

[with X and Y ConstantInt]

The advantage is that the two new shifts from the example would be lowered into
X86ISD::VSRLI nodes. This is always cheaper than scalarizing the vector into
four scalar shifts plus four pairs of vector insert/extract.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206316 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-15 19:30:48 +00:00
..
2014-02-16 07:31:05 +00:00
2014-01-16 06:31:20 +00:00
2014-01-24 17:20:08 +00:00
2013-12-11 08:38:42 +00:00
2013-12-11 08:38:42 +00:00
2014-01-24 17:20:08 +00:00
2013-11-14 06:05:49 +00:00
2014-03-21 00:30:24 +00:00
2013-12-11 04:10:41 +00:00
2014-02-25 20:01:08 +00:00
2013-12-03 09:17:32 +00:00
2013-11-22 17:56:57 +00:00
2013-11-25 18:05:22 +00:00
2013-11-26 20:31:31 +00:00
2014-01-24 17:20:08 +00:00
2013-11-17 10:53:19 +00:00
2014-01-11 21:06:00 +00:00
2014-02-28 18:44:39 +00:00
2014-02-16 07:31:05 +00:00
2013-12-05 05:44:44 +00:00