summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* Add support for eliminating stores that store the same value that was just ↵Owen Anderson2008-07-281-0/+14
| | | | | | | | loaded. This fixes PR2599. llvm-svn: 54133
* Put the LICM of constant GlobalVariables, introduced in r53945, under aDan Gohman2008-07-241-1/+1
| | | | | | | command-line option, and disable it by default. It introduced performance regressions because CodeGen is currently not able to remat such loads. llvm-svn: 53997
* "Allow LICM to sink or lift loads from constant memory. Also add a testChris Lattner2008-07-231-0/+23
| | | | | | | | | | | case for this. This allows instructions like loads from global variables declared to be constant to be moved out of loops." Patch by Stefanus Du Toit! llvm-svn: 53945
* Enable first-class aggregates support.Dan Gohman2008-07-231-2/+5
| | | | | | | | | | | | Remove the GetResultInst instruction. It is still accepted in LLVM assembly and bitcode, where it is now auto-upgraded to ExtractValueInst. Also, remove support for return instructions with multiple values. These are auto-upgraded to use InsertValueInst instructions. The IRBuilder still accepts multiple-value returns, and auto-upgrades them to InsertValueInst instructions. llvm-svn: 53941
* Add the PR number to the test.Dan Gohman2008-07-211-0/+2
| | | | llvm-svn: 53880
* Fix a bug in LSR's dead-PHI cleanup. If a PHI has a def-use chain thatDan Gohman2008-07-211-0/+285
| | | | | | | | | leads into a cycle involving a different PHI, LSR got stuck running around that cycle looking for the original PHI. To avoid this, keep track of visited PHIs and stop searching if we see one more than once. This fixes PR2570. llvm-svn: 53879
* Make GlobalOpt preserve address spaces when scalar replacing aggregate globals.Matthijs Kooijman2008-07-171-0/+28
| | | | llvm-svn: 53716
* Fix PR2553Chris Lattner2008-07-171-0/+8
| | | | llvm-svn: 53715
* Add a few cases to instcombine's extractvalue testcase.Matthijs Kooijman2008-07-161-2/+16
| | | | llvm-svn: 53675
* Un-XFAIL multdeadretval, since instcombine now properly handles the mess ↵Matthijs Kooijman2008-07-161-1/+0
| | | | | | deadargelim leaves behind :-) llvm-svn: 53674
* Fix PR2296. Do not transform x86_sse2_storel_dq into a full-width store.Evan Cheng2008-07-161-0/+13
| | | | llvm-svn: 53666
* XFAIL the multdeadretval test for now, I will be fixing instcombine to make ↵Matthijs Kooijman2008-07-151-0/+1
| | | | | | it work again tomorrow. llvm-svn: 53614
* Remove a few tests which no longer hold for deadargelim (since it is nowMatthijs Kooijman2008-07-151-15/+7
| | | | | | | | allowed to canonicalize return values). Add a test that checks if return value and function attributes are not removed. llvm-svn: 53612
* Add a testcase for the canonicalizations now performed by deadargelim.Matthijs Kooijman2008-07-151-0/+24
| | | | llvm-svn: 53611
* Make deadargelim a bit less smart, so it doesn't choke on nested structs asMatthijs Kooijman2008-07-151-1/+14
| | | | | | | | | | | | return values that are still (partially) live. Instead of updating all uses of a call instruction after removing some elements, it now just rebuilds the original struct (With undef gaps where the unused values were) and leaves it to instcombine to clean this up. The added testcase still fails currently, but this is due to instcombine which isn't good enough yet. I will fix that part next. llvm-svn: 53608
* Fix typo.Matthijs Kooijman2008-07-151-1/+1
| | | | llvm-svn: 53605
* Fix PR2506 by being a bit more careful about reverse fact propagation whenChris Lattner2008-07-142-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | disproving a condition. This actually compiles the existing testcase (udiv_select_to_select_shift) to: define i64 @test(i64 %X, i1 %Cond) { entry: %divisor1.t = lshr i64 %X, 3 ; <i64> [#uses=1] %quotient2 = lshr i64 %X, 3 ; <i64> [#uses=1] %sum = add i64 %divisor1.t, %quotient2 ; <i64> [#uses=1] ret i64 %sum } instead of: define i64 @test(i64 %X, i1 %Cond) { entry: %quotient1.v = select i1 %Cond, i64 3, i64 4 ; <i64> [#uses=1] %quotient1 = lshr i64 %X, %quotient1.v ; <i64> [#uses=1] %quotient2 = lshr i64 %X, 3 ; <i64> [#uses=1] %sum = add i64 %quotient1, %quotient2 ; <i64> [#uses=1] ret i64 %sum } llvm-svn: 53534
* Fix mishandling of the infinite loop case when merging two blocks. ThisChris Lattner2008-07-131-0/+36
| | | | | | fixes PR2540. llvm-svn: 53533
* Enhance analysis of srem.Nick Lewycky2008-07-121-0/+9
| | | | | | | Remove dead code analyzing urem. 'urem' of power-of-2 is canonicalized to an 'and' instruction. llvm-svn: 53506
* Add another optimization from PR2330. Also catch some missing cases that areNick Lewycky2008-07-111-0/+19
| | | | | | similar. llvm-svn: 53451
* Fix folding of icmp's of i1 where the comparison is signed. The codeChris Lattner2008-07-111-1/+10
| | | | | | | was using the algorithm for folding unsigned comparisons which is completely wrong. This has been broken since the signless types change. llvm-svn: 53444
* Fix a bogus optimization: folding (slt (zext i1 A to i32), 1) -> (slt i1 A, ↵Chris Lattner2008-07-111-0/+8
| | | | | | | | | | | true) This cause a regression in InstCombine/JavaCompare, which was doing the right thing on accident. To handle the missed case, generalize the comparisons based on masked bits a little bit to handle comparisons against the max value. For example, we can now xform (slt i32 (and X, 4), 4) -> (setne i32 (and X, 4), 4) llvm-svn: 53443
* make this condition more precise.Chris Lattner2008-07-111-2/+1
| | | | llvm-svn: 53442
* Restructure dead argument elimination, try #3 :-)Matthijs Kooijman2008-07-101-2/+17
| | | | | | | | | | | | | | | | | Rewrite the DeadArgumentElimination pass, to use a more explicit tracking of dependencies between return values and/or arguments. Also make the handling of arguments and return values the same. The pass now looks properly inside returned structs, but only at the first level (ie, not inside nested structs). This version fixed a few more bugs and was cleaned up a bit. It now passes all of LLVM's testing, and should still pass SPEC2006. There is still a minor bug with regard to returning nested structs. Since there is currently nothing that emits such IR, I will fix that in a seperate commit (partly because it requires a non-trivial fix). llvm-svn: 53400
* Fix overzealous optimization. Thanks to Duncan Sands for pointing out my error!Nick Lewycky2008-07-101-0/+9
| | | | llvm-svn: 53393
* Fix a case where vector comparison constant folding would cause anChris Lattner2008-07-101-0/+6
| | | | | | infinite recursion. part of PR2529 llvm-svn: 53383
* elementwise comparison of vector constants was completely wrong. FixChris Lattner2008-07-101-1/+9
| | | | | | it for PR2529 llvm-svn: 53380
* Fold (a < 8) && (b < 8) into (a|b) < 8 for unsigned less or greater than.Nick Lewycky2008-07-091-0/+10
| | | | llvm-svn: 53282
* Fold ((1 << a) & 1) to (a == 0).Nick Lewycky2008-07-091-0/+10
| | | | llvm-svn: 53276
* Fix a broken test. Neither load is eliminable without changing the CFG.Chris Lattner2008-07-091-1/+1
| | | | llvm-svn: 53273
* Reduce x - y to -y when we know the 'x' part will get masked off anyways.Nick Lewycky2008-07-091-0/+9
| | | | llvm-svn: 53271
* If loop induction variable's start value is less then its exit value then do ↵Devang Patel2008-07-092-1/+26
| | | | | | not split the loop. llvm-svn: 53265
* 'Optimize' testChris Lattner2008-07-081-1/+1
| | | | llvm-svn: 53242
* new testcase for PR2496Chris Lattner2008-07-081-0/+26
| | | | llvm-svn: 53239
* Fix three bugs:Chris Lattner2008-07-081-0/+14
| | | | | | | | | | | 1) evaluate [v]fcmp true/false with undefs to true or false instead of undef. 2) fix vector comparisons with undef to return a vector result instead of i1 3) fix vector comparisons with evaluatable results to return vector true/false instead of i1 true/false (PR2529) llvm-svn: 53220
* Fix missed optimization opportunity when analyzing cast of mul and select.Nick Lewycky2008-07-051-0/+29
| | | | llvm-svn: 53151
* Remove the ability for ADCE to remove unreachable blocks in loop nests, ↵Owen Anderson2008-07-031-37/+0
| | | | | | because, as Eli pointed out, SimplifyCFG already does this. llvm-svn: 53104
* Add support to ADCE for pruning unreachable blocks. This addresses the finalOwen Anderson2008-07-021-0/+37
| | | | | | part of PR2509. llvm-svn: 53038
* A better fix for PR2503 that doesn't pessimize GVN in the presence of ↵Owen Anderson2008-07-021-0/+36
| | | | | | unreachable blocks. llvm-svn: 53032
* XFAIL for now.Evan Cheng2008-06-261-0/+1
| | | | llvm-svn: 52795
* Use the -enable-pre flag so this test doesn't fail.Owen Anderson2008-06-261-1/+1
| | | | llvm-svn: 52784
* Fix PR2488, a case where we deleted stack restores too aggressively.Chris Lattner2008-06-251-0/+39
| | | | llvm-svn: 52702
* Revert 52645, the loop unroller changes. It caused a regression in 252.eon.Dan Gohman2008-06-242-72/+0
| | | | llvm-svn: 52688
* Commit the new DeadArgElim pass again, this time with the gcc bootstrap ↵Matthijs Kooijman2008-06-243-1/+89
| | | | | | | | failures fixed. Also add a testcase to reproduce the gcc bootstrap failure in very much reduced form. llvm-svn: 52677
* Revamp the loop unroller, extending it to correctly update PHI nodesDan Gohman2008-06-232-0/+72
| | | | | | | | in the presence of out-of-loop users of in-loop values and the trip count is not a known multiple of the unroll count, and to be a bit simpler overall. This fixes PR2253. llvm-svn: 52645
* Improve LSR's dead-phi detection to handle use-def cyclesDan Gohman2008-06-221-0/+21
| | | | | | with more than two nodes. llvm-svn: 52617
* Fix PR2369 by making scalarrepl more careful about promoting Chris Lattner2008-06-221-0/+18
| | | | | | | | | structures. Its default threshold is to promote things that are smaller than 128 bytes, which is sane. However, it is not sane to do this for things that turn into 128 *registers*. Add a cap on the number of registers introduced, defaulting to 128/4=32. llvm-svn: 52611
* Fix for PR2479: correctly optimize expressions like (a > 13) & (a == Eli Friedman2008-06-211-0/+11
| | | | | | | | 15). See also PR1800, which is about the signed case. llvm-svn: 52608
* This file is empty.Duncan Sands2008-06-211-0/+0
| | | | llvm-svn: 52596
* Back out Matthijs' DAE patches. It's miscompiling gcc driver.Evan Cheng2008-06-211-39/+0
| | | | llvm-svn: 52570
OpenPOWER on IntegriCloud