summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* Finish adding support for lifetime intrinsics to SROA. Fixes PR10121!Nick Lewycky2011-07-251-0/+139
| | | | llvm-svn: 136008
* Move the last uses of RetainFunc etc. over to using getRetainCallee() etc.Dan Gohman2011-07-221-6/+42
| | | | | | | so that a declaration for objc_retain is created when needed if it doesn't already exist. rdar://9825114. llvm-svn: 135821
* Fix MergeInVectorType to check for vector types with the same allocDan Gohman2011-07-211-0/+27
| | | | | | | size but different element types, so that it filters out the cases that CreateShuffleVectorCast doesn't handle. This fixes rdar://9786827. llvm-svn: 135721
* LSR, correct fix for rdar://9786536. Silly casting bug.Andrew Trick2011-07-211-1/+1
| | | | llvm-svn: 135654
* LSR must sometimes sign-extend before generating double constants.Andrew Trick2011-07-211-1/+20
| | | | | | rdar://9786536 llvm-svn: 135650
* LSR crashes on an empty IVUsers list.Andrew Trick2011-07-211-0/+24
| | | | | | rdar://9786536 llvm-svn: 135644
* Bring LICM into compliance with the new "Memory Model for Concurrent ↵Eli Friedman2011-07-201-0/+37
| | | | | | Operations" in LangRef. llvm-svn: 135625
* indvars: Added getInsertPointForUses to find a valid place to truncate the IV.Andrew Trick2011-07-201-0/+39
| | | | llvm-svn: 135568
* indvars test case for r135558.Andrew Trick2011-07-201-0/+7
| | | | llvm-svn: 135559
* indvars -disable-iv-rewrite fix: derived GEP IVsAndrew Trick2011-07-201-6/+29
| | | | llvm-svn: 135558
* PR10386: Don't try to split an edge from an indirectbr.Eli Friedman2011-07-191-0/+52
| | | | llvm-svn: 135534
* Remove bogus test: for all possible inputs of %X, the 'sub nsw' is guaranteedNick Lewycky2011-07-191-11/+0
| | | | | | to perform a signed wrap. Don't rely on any particular handling of that case. llvm-svn: 135471
* indvars: LinearFunctionTestReplace for non-canonical IVs.Andrew Trick2011-07-182-3/+232
| | | | | | | | | | For -disable-iv-rewrite, perform LFTR without generating a new "canonical" induction variable. Instead find the "best" existing induction variable for use in the loop exit test and compute the final value of that IV for use in the new loop exit test. In short, convert to a simple eq/ne exit test as long as it's cheap to do so. llvm-svn: 135420
* A real testcase for r135286.Chad Rosier2011-07-151-36/+19
| | | | llvm-svn: 135299
* Add testcase for r135286.Chad Rosier2011-07-151-0/+47
| | | | llvm-svn: 135291
* Change test case, one that actually failed before my commit.Evan Cheng2011-07-131-1/+6
| | | | llvm-svn: 135064
* It's not safe to fold (fptrunc (sqrt (fpext x))) to (sqrtf x) if there is ↵Evan Cheng2011-07-131-2/+19
| | | | | | another use of sqrt. rdar://9763193 llvm-svn: 135058
* Don't duplicate the work done by a gep into a "bitcast" if the gep hasRafael Espindola2011-07-111-0/+16
| | | | | | | | more than one use. Fixes PR10322. llvm-svn: 134883
* Land the long talked about "type system rewrite" patch. ThisChris Lattner2011-07-0917-103/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | patch brings numerous advantages to LLVM. One way to look at it is through diffstat: 109 files changed, 3005 insertions(+), 5906 deletions(-) Removing almost 3K lines of code is a good thing. Other advantages include: 1. Value::getType() is a simple load that can be CSE'd, not a mutating union-find operation. 2. Types a uniqued and never move once created, defining away PATypeHolder. 3. Structs can be "named" now, and their name is part of the identity that uniques them. This means that the compiler doesn't merge them structurally which makes the IR much less confusing. 4. Now that there is no way to get a cycle in a type graph without a named struct type, "upreferences" go away. 5. Type refinement is completely gone, which should make LTO much MUCH faster in some common cases with C++ code. 6. Types are now generally immutable, so we can use "Type *" instead "const Type *" everywhere. Downsides of this patch are that it removes some functions from the C API, so people using those will have to upgrade to (not yet added) new API. "LLVM 3.0" is the right time to do this. There are still some cleanups pending after this, this patch is large enough as-is. llvm-svn: 134829
* more tests not making the jump into the brave new world.Chris Lattner2011-07-092-183/+0
| | | | llvm-svn: 134820
* Added test cases for GVN signed intrinsics recognition, r134777.Lang Hames2011-07-091-0/+38
| | | | llvm-svn: 134778
* Make GVN look through extractvalues for recognised intrinsics. GVN can then ↵Lang Hames2011-07-081-0/+47
| | | | | | CSE ops that match values produced by the intrinsics. llvm-svn: 134677
* indvars -disable-iv-rewrite: Added SimplifyCongruentIVs.Andrew Trick2011-07-062-4/+55
| | | | llvm-svn: 134530
* LICM: Do not loose alignment on promotionTobias Grosser2011-07-061-0/+26
| | | | | | | | The promotion code lost any alignment information, when hoisting loads and stores out of the loop. This lead to incorrect aligned memory accesses. We now use the largest alignment we can prove to be correct. llvm-svn: 134520
* Introduce "expect" intrinsic instructions.Jakub Staszak2011-07-062-0/+254
| | | | llvm-svn: 134516
* PR10267: Don't combine an equality compare with an AND into an inequality ↵Benjamin Kramer2011-07-041-0/+12
| | | | | | | | compare when the AND has more than one use. This can pessimize code, inequalities are generally more expensive. llvm-svn: 134379
* indvars -disable-iv-rewrite: bug fix involving weird geps and related cleanup.Andrew Trick2011-07-022-4/+30
| | | | llvm-svn: 134306
* Improve constant folding of undef for cmp and select operators.Dan Gohman2011-07-011-0/+28
| | | | llvm-svn: 134223
* Improve constant folding of undef for binary operators.Dan Gohman2011-07-011-0/+99
| | | | llvm-svn: 134221
* Add r134057 back, but splice the predecessor after the successors phiRafael Espindola2011-06-301-0/+29
| | | | | | | | | nodes. Original message: Let simplify cfg simplify bb with only debug and lifetime intrinsics. llvm-svn: 134182
* indvars -disable-iv-rewrite: handle cloning binary operators that cannot ↵Andrew Trick2011-06-301-4/+38
| | | | | | overflow. llvm-svn: 134177
* indvars -disable-iv-rewrite: handle an edge case involving identity phis.Andrew Trick2011-06-301-7/+32
| | | | llvm-svn: 134124
* indvars -disable-iv-rewrite: insert new trunc instructions carefully.Andrew Trick2011-06-291-2/+31
| | | | llvm-svn: 134112
* Temporarily revert r134057: "Let simplify cfg simplify bb with only debug and Chad Rosier2011-06-291-29/+0
| | | | | | lifetime intrinsics" due to buildbot failures. llvm-svn: 134071
* Let simplify cfg simplify bb with only debug and lifetime intrinsics.Rafael Espindola2011-06-291-0/+29
| | | | llvm-svn: 134057
* indvars -disable-iv-rewrite: just because SCEV ignores casts doesn'tAndrew Trick2011-06-291-0/+37
| | | | | | mean they can be removed. llvm-svn: 134054
* FileCheckify and prepare for -disable-iv-rewrite.Andrew Trick2011-06-281-7/+11
| | | | llvm-svn: 133998
* Teach one piece of scalarrepl to handle lifetime markers. When transforming anNick Lewycky2011-06-271-0/+14
| | | | | | | | alloca that only holds a copy of a global and we're going to replace the users of the alloca with that global, just nuke the lifetime intrinsics. Part of PR10121. llvm-svn: 133905
* PR10180: Fix a instcombine crash with FP vectors.Eli Friedman2011-06-231-0/+12
| | | | llvm-svn: 133756
* Add a reduced test case for the buildbot failure (clang self-hostedJay Foad2011-06-211-0/+182
| | | | | | build) caused by r133435. llvm-svn: 133509
* indvars -disable-iv-rewrite: Adds support for eliminating identityAndrew Trick2011-06-211-0/+1
| | | | | | | | | | | | | | | | | | | ops. This is a rewrite of the IV simplification algorithm used by -disable-iv-rewrite. To avoid perturbing the default mode, I temporarily split the driver and created SimplifyIVUsersNoRewrite. The idea is to avoid doing opcode/pattern matching inside IndVarSimplify. SCEV already does it. We want to optimize with the full generality of SCEV, but optimize def-use chains top down on-demand rather than rewriting the entire expression bottom-up. This was easy to do for operations that SCEV can prove are identity function. So we're now eliminating bitmasks and zero extends this way. A result of this rewrite is that indvars -disable-iv-rewrite no longer requires IVUsers. llvm-svn: 133502
* This is an automatically reduced test case that crashed in GVN, at someJay Foad2011-06-201-0/+106
| | | | | | point during the development of the phi operand changes. llvm-svn: 133436
* Remove support for parsing the "type i32" syntax for defining a numberedChris Lattner2011-06-192-6/+6
| | | | | | | top level type without a specified number. This syntax isn't documented and blocks forward progress. llvm-svn: 133371
* Fix PR10103: Less code for enum type translation.Hans Wennborg2011-06-182-1/+37
| | | | | | | | | | | In cases such as the attached test, where the case value for a switch destination is used in a phi node that follows the destination, it might be better to replace that value with the condition value of the switch, so that more blocks can be folded away with TryToSimplifyUncondBranchFromEmptyBlock because there are less conflicts in the phi node. llvm-svn: 133344
* Add test for r133251.Nick Lewycky2011-06-181-0/+26
| | | | llvm-svn: 133339
* When scalar replacement returns a vector type, only accept it if the vectorCameron Zwarich2011-06-182-2/+19
| | | | | | | | | | | | type's bitwidth matches the (allocated) size of the alloca. This severely pessimizes vector scalar replacement when the only vector type being used is something like <3 x float> on x86 or ARM whose allocated size matches a <4 x float>. I hope to fix some of the flawed assumptions about allocated size throughout scalar replacement and reenable this in most cases. llvm-svn: 133338
* rip out a ton of intrinsic modernization logic from AutoUpgrade.cpp, which isChris Lattner2011-06-1837-795/+588
| | | | | | | | | for pre-2.9 bitcode files. We keep x86 unaligned loads, movnt, crc32, and the target indep prefetch change. As usual, updating the testsuite is a PITA. llvm-svn: 133337
* Fix an invalid bitcast crash that occurs when doing a partial memset of a vectorCameron Zwarich2011-06-181-0/+22
| | | | | | alloca. Fixes part of <rdar://problem/9580800>. llvm-svn: 133336
* Stop accepting and ignoring attributes in function types. Attributes are ↵Chris Lattner2011-06-173-3/+3
| | | | | | | | applied to functions and call/invokes, not to types. llvm-svn: 133266
* make the asmparser reject function and type redefinitions. 'Merging' hasn't ↵Chris Lattner2011-06-175-9/+0
| | | | | | | | been needed since llvm-gcc 3.4 days. llvm-svn: 133248
OpenPOWER on IntegriCloud