1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
llvm-mirror/lib/Transforms
Sanjay Patel 25a4b4195f [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

llvm-svn: 255261
2015-12-10 17:09:28 +00:00
..
Hello Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
InstCombine [InstCombine] fold bitcasts around an extractelement (3rd try) 2015-12-10 17:09:28 +00:00
Instrumentation [PGO] Resubmit "MST based PGO instrumentation infrastructure" (r254021) 2015-12-09 18:08:16 +00:00
IPO [ThinLTO] Debug message cleanup (NFC) 2015-12-10 16:39:07 +00:00
ObjCARC ObjCARC: Remove implicit ilist iterator conversions, NFC 2015-10-19 23:20:14 +00:00
Scalar [DeadStoreElimination] Add support for non-local DSE. 2015-12-10 13:51:43 +00:00
Utils Add arg_begin() and arg_end() to CallInst and InvokeInst; NFCI 2015-12-10 06:39:02 +00:00
Vectorize Re-commit r255115, with the PredicatedScalarEvolution class moved to 2015-12-09 16:06:28 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile