summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Check for less than 0 in shuffle mask instead of -1. It's more consistent ↵Craig Topper2013-01-181-1/+1
| | | | | | with other code related to shuffles and easier to implement in compiled code. llvm-svn: 172788
* Remove trailing whitespace. Remove new lines between closing brace and 'else'Craig Topper2013-01-181-7/+5
| | | | llvm-svn: 172784
* Teach InstCombine to optimize extract of a value from a vector add operation ↵Nadav Rotem2013-01-151-0/+9
| | | | | | with a constant zero. llvm-svn: 172576
* [InstCombine] Teach InstCombine how to handle an obfuscated splat.Michael Gottesman2012-10-161-2/+5
| | | | | | | | | | | | An obfuscated splat is where the frontend poorly generates code for a splat using several different shuffles to create the splat, i.e., %A = load <4 x float>* %in_ptr, align 16 %B = shufflevector <4 x float> %A, <4 x float> undef, <4 x i32> <i32 0, i32 0, i32 undef, i32 undef> %C = shufflevector <4 x float> %B, <4 x float> %A, <4 x i32> <i32 0, i32 1, i32 4, i32 undef> %D = shufflevector <4 x float> %C, <4 x float> %A, <4 x i32> <i32 0, i32 1, i32 2, i32 4> llvm-svn: 166061
* continue making the world safe for ConstantDataVector. At this point,Chris Lattner2012-01-271-15/+16
| | | | | | | we should (theoretically optimize and codegen ConstantDataVector as well as ConstantVector. llvm-svn: 149116
* some general cleanup, using new methods and tidying up old code.Chris Lattner2012-01-261-69/+26
| | | | llvm-svn: 149006
* basic instcombine support for CDS.Chris Lattner2012-01-241-3/+8
| | | | llvm-svn: 148806
* Minor simplification: use ShuffleVectorInst::getMaskValue instead of a more ↵Eli Friedman2011-10-211-2/+2
| | | | | | expensive helper. llvm-svn: 142672
* Extend instcombine's shufflevector simplification to handle more cases where ↵Eli Friedman2011-10-211-61/+195
| | | | | | the input and output vectors have different sizes. Patch by Xiaoyi Guo. llvm-svn: 142671
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-181-4/+4
| | | | llvm-svn: 135375
* Instcombile optimization: extractelement(cast) -> cast(extractelement)Nadav Rotem2011-03-311-1/+9
| | | | llvm-svn: 128683
* PR9218: SimplifyDemandedVectorElts can return a non-null value that is notEli Friedman2011-02-191-2/+7
| | | | | | | the instruction passed in. Make sure to account for this correctly, instead of looping infinitely. llvm-svn: 126058
* PR5207: Rename overloaded APInt methods set(), clear(), flip() toJay Foad2010-12-011-1/+1
| | | | | | setAllBits(), setBit(unsigned), etc. llvm-svn: 120564
* Clean up indentation and other whitespace.Bob Wilson2010-10-291-11/+9
| | | | llvm-svn: 117728
* Remove trailing whitespace.Bob Wilson2010-10-291-70/+69
| | | | llvm-svn: 117727
* Fix 80-column violation.Bob Wilson2010-10-291-1/+2
| | | | llvm-svn: 117722
* Change instcombine's getShuffleMask to represent undef with negative values.Bob Wilson2010-10-291-40/+36
| | | | | | | | This code had previously used 2*N, where N is the mask length, to represent undef. That is not safe because the shufflevector operands may have more than N elements -- they don't have to match the result type. llvm-svn: 117721
* Make instcombine a little more aggressive in combining vector shuffles.Bob Wilson2010-10-291-15/+22
| | | | | | | | Allow splats even if they don't match either of the original shuffles, possibly due to undef entries in the shuffles masks. Radar 8597790. Also fix some 80-column violations. llvm-svn: 117719
* Temporarily revert r110987 as it's causing some miscompares inEric Christopher2010-08-171-123/+64
| | | | | | vector heavy code. I'll re-enable when we've tracked down the problem. llvm-svn: 111318
* Reapply this transformation now that it is passing the external test which ↵Nate Begeman2010-08-131-64/+123
| | | | | | it previously failed. llvm-svn: 110987
* Temporarily revert 110737 and 110734, they were causing failuresEric Christopher2010-08-121-141/+64
| | | | | | in an external testsuite. llvm-svn: 110905
* Add the minimal amount of smarts necessary to instcombine of shufflevectors ↵Nate Begeman2010-08-101-64/+141
| | | | | | | | | | | | | | to recognize patterns generated by clang for transpose of a matrix in generic vectors. This is made of two parts: 1) Propagating vector extracts of hi/lo half into their users 2) Recognizing an insertion of even elements followed by the odd elements as an unpack. Testcase to come, but this shrinks the # of shuffle instructions generated on x86 from ~40 to the minimal 8. llvm-svn: 110734
* There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands2010-02-161-2/+2
| | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. llvm-svn: 96344
* fix some problems handling large vectors reported in PR6230Chris Lattner2010-02-081-1/+2
| | | | llvm-svn: 95616
* reduce indentationChris Lattner2010-01-051-4/+7
| | | | llvm-svn: 92684
* split vector stuff out to InstCombineVectorOps.cppChris Lattner2010-01-051-0/+557
llvm-svn: 92683
OpenPOWER on IntegriCloud