Sanjay Patel 2bce431402 [InstCombine] fold bitcasts around an extractelement (3rd try)
This is a redo of r255137 (reverted at r255227) which was a redo of 
r255124 (reverted at r255126) with a fixed check for a scalar source 
type and an added test for the failure that caused the revert.

Original commit message:

Example:
  bitcast (extractelement (bitcast <2 x float> %X to <2 x i32>), 1) to float
    --->
  extractelement <2 x float> %X, i32 1

This is part of fixing PR25543:
https://llvm.org/bugs/show_bug.cgi?id=25543

The next step will be to generalize this fold:
trunc ( lshr ( bitcast X) ) -> extractelement (X)

Ie, I'm hoping to replace the existing transform of:
bitcast ( trunc ( lshr ( bitcast X)))
added by:
http://reviews.llvm.org/rL112232

with 2 less specific transforms to catch the case in the bug report.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255261 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10 17:09:28 +00:00
..
2013-08-28 23:04:41 +00:00
2012-02-29 01:53:13 +00:00
2014-06-02 21:23:54 +00:00
2013-07-09 07:50:59 +00:00
2013-08-28 23:04:41 +00:00
2014-03-06 05:32:52 +00:00
2013-07-09 22:01:22 +00:00
2014-11-04 05:17:58 +00:00
2013-02-16 23:41:36 +00:00
2014-10-21 23:00:20 +00:00
2015-01-06 23:00:33 +00:00
2015-09-08 17:58:22 +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
2014-06-02 22:01:04 +00:00
2014-06-02 22:01:04 +00:00
2015-05-11 05:33:27 +00:00
2013-08-28 23:04:41 +00:00
2013-08-28 23:04:41 +00:00
2013-03-28 19:34:14 +00:00
2014-06-02 22:01:04 +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.