Simon Pilgrim c9bc1a4d8d [InstCombine][AVX2] Add support for simplifying AVX2 per-element shifts to native shifts
Unlike native shifts, the AVX2 per-element shift instructions VPSRAV/VPSRLV/VPSLLV handle out of range shift values (logical shifts set the result to zero, arithmetic shifts splat the sign bit).

If the shift amount is constant we can sometimes convert these instructions to native shifts:

1 - if all shift amounts are in range then the conversion is trivial.
2 - out of range arithmetic shifts can be clamped to the (bitwidth - 1) (a legal shift amount) before conversion.
3 - logical shifts just return zero if all elements have out of range shift amounts.

In addition, UNDEF shift amounts are handled - either as an UNDEF shift amount in a native shift or as an UNDEF in the logical 'all out of range' zero constant special case for logical shifts.

Differential Revision: http://reviews.llvm.org/D19675

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271996 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-07 10:27:15 +00:00
..
2016-05-28 15:34:05 +00:00
2016-04-05 17:24:54 +00:00
2016-05-06 22:17:01 +00:00
2016-04-29 16:39:37 +00:00
2016-05-02 15:06:55 +00:00
2016-06-06 15:55:00 +00:00
2016-06-05 17:29:45 +00:00
2014-11-04 05:17:58 +00:00
2016-05-02 15:21:41 +00:00
2014-10-21 23:00:20 +00:00
2016-04-17 04:30:43 +00:00
2016-05-02 15:25:49 +00:00
2015-01-06 23:00:33 +00:00
2016-04-05 17:24:54 +00:00
2015-09-08 17:58:22 +00:00
2016-05-13 18:02:16 +00:00
2015-06-05 18:04:42 +00:00
2015-08-11 21:33:55 +00:00
2015-08-28 19:09:31 +00:00
2016-01-07 19:27:16 +00:00
2016-06-05 17:54:56 +00:00
2016-05-01 20:33:25 +00:00
2016-04-05 17:24:54 +00:00

This directory contains test cases for the instcombine transformation.  The
dated tests are actual bug tests, whereas the named tests are used to test
for features that the this pass should be capable of performing.