1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
llvm-mirror/lib/Transforms/InstCombine
Sanjay Patel de6f59d487 [InstCombine] fold bitcasts around an extractelement (2nd try)
This is a redo of r255124 (reverted at r255126) with an added check for a
scalar destination type and an added test for the failure seen in Clang's
test/CodeGen/vector.c. The extra test shows a different missing optimization.

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: 255137
2015-12-09 18:57:16 +00:00
..
CMakeLists.txt Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
InstCombineAddSub.cpp Fix some Clang-tidy modernize warnings, other minor fixes. 2015-11-04 22:32:32 +00:00
InstCombineAndOrXor.cpp Do (A == C1 || A == C2) -> (A & ~(C1 ^ C2)) == C1 rather than (A == C1 || A == C2) -> (A | (C1 ^ C2)) == C2 when C1 ^ C2 is a power of 2. 2015-12-02 16:15:07 +00:00
InstCombineCalls.cpp [AttributeSet] Overload AttributeSet::addAttribute to reduce compile 2015-12-02 06:58:49 +00:00
InstCombineCasts.cpp [InstCombine] fold bitcasts around an extractelement (2nd try) 2015-12-09 18:57:16 +00:00
InstCombineCompares.cpp [InstCombine] Optimize icmp of inc/dec at RHS 2015-10-19 22:08:14 +00:00
InstCombineInternal.h Revert "Change memcpy/memset/memmove to have dest and source alignments." 2015-11-19 05:56:52 +00:00
InstCombineLoadStoreAlloca.cpp Preserve load alignment and dereferenceable metadata during some transformations 2015-11-02 17:53:51 +00:00
InstCombineMulDivRem.cpp InstCombine: Remove ilist iterator implicit conversions, NFC 2015-10-13 16:59:33 +00:00
InstCombinePHI.cpp [InstCombine] Teach FoldPHIArgZextsIntoPHI about EHPads 2015-11-07 00:52:53 +00:00
InstCombineSelect.cpp [InstCombine] Call getCmpPredicateForMinMax only with a valid SPF 2015-12-05 23:44:22 +00:00
InstCombineShifts.cpp don't repeat function names in comments; NFC 2015-11-02 22:34:55 +00:00
InstCombineSimplifyDemanded.cpp [InstCombine] Teach SimplifyDemandedVectorElts how to handle ConstantVector select masks with ConstantExpr elements (PR24922) 2015-10-06 10:34:53 +00:00
InstCombineVectorOps.cpp fix typos in comments; NFC 2015-11-29 22:09:34 +00:00
InstructionCombining.cpp Move EH-specific helper functions to a more appropriate place 2015-12-02 23:06:39 +00:00
LLVMBuild.txt Update libdeps since TLI was moved from Target to Analysis in r226078. 2015-01-15 05:21:00 +00:00
Makefile