aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* Teach masked value is zero about add and sub, and use MVIZ toChris Lattner2008-03-211-0/+7
| | | | | | | | | | simplify things like (X & 4) >> 1 == 2 --> (X & 4) == 4. since it is obvious that the shift doesn't remove any bits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48631 91177308-0d34-0410-b5e6-96231b3b80d8
* Upgrade tests.Tanya Lattner2008-03-1948-2357/+2209
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48538 91177308-0d34-0410-b5e6-96231b3b80d8
* Upgrade tests.Tanya Lattner2008-03-1926-723/+610
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48536 91177308-0d34-0410-b5e6-96231b3b80d8
* Upgrade tests to not use llvm-upgrade.Tanya Lattner2008-03-1923-273/+288
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48530 91177308-0d34-0410-b5e6-96231b3b80d8
* Upgrade tests to not use llvm-upgrade.Tanya Lattner2008-03-1923-480/+421
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48529 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove llvm-upgrade and update tests.Tanya Lattner2008-03-1925-434/+333
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48527 91177308-0d34-0410-b5e6-96231b3b80d8
* Upgrade tests to not use llvm-upgrade.Tanya Lattner2008-03-1823-377/+336
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48484 91177308-0d34-0410-b5e6-96231b3b80d8
* Upgrade tests to not use llvm-upgrade.Tanya Lattner2008-03-1826-605/+564
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48483 91177308-0d34-0410-b5e6-96231b3b80d8
* The inst combining of inttoptr into GEP with one index was using the bit size ofBill Wendling2008-03-141-0/+9
| | | | | | | | | the type instead of the byte size. This was causing troublesome mis-compilations. True to form, this took 2 days to find and is a one-line fix. :-P git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48354 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in GVN that Duncan noticed, where we potentially need to insert a Owen Anderson2008-03-131-0/+19
| | | | | | | pointer bitcast when performing return slot optimization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48343 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve the return slot optimization to be both more aggressive (not limited ↵Owen Anderson2008-03-121-2/+4
| | | | | | | | | | to sret parameters), and safer (when the passed pointer might be invalid). Thanks to Duncan and Chris for the idea behind this, and extra thanks to Duncan for helping me work out the trap-safety. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48280 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix attribute handling.Devang Patel2008-03-121-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48262 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle multiple ret values.Devang Patel2008-03-111-0/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48254 91177308-0d34-0410-b5e6-96231b3b80d8
* Check to see if a two-entry PHI block can be simplifiedDan Gohman2008-03-111-0/+15
| | | | | | | | | before trying to merge the block into its predecessors. This allows two-entry-phi-return.ll to be simplified into a single basic block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48252 91177308-0d34-0410-b5e6-96231b3b80d8
* Make this test more challenging to help it avoid beingDan Gohman2008-03-111-2/+8
| | | | | | | optimized away before it tests what it is intended to test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48251 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial multiple return values support.Devang Patel2008-03-111-0/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48210 91177308-0d34-0410-b5e6-96231b3b80d8
* Upgrade this test.Dan Gohman2008-03-111-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48207 91177308-0d34-0410-b5e6-96231b3b80d8
* SimplifyDevang Patel2008-03-102-33/+51
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48163 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove llvm-upgrade and update tests.Tanya Lattner2008-03-1060-2070/+1594
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48137 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn unwind_to into "unwinds to".Nick Lewycky2008-03-103-15/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48123 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove llvm-upgrade and update tests.Tanya Lattner2008-03-0949-726/+800
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48103 91177308-0d34-0410-b5e6-96231b3b80d8
* Firstly, having a BranchInst isn't exclusive with having an unwind_to.Nick Lewycky2008-03-091-0/+18
| | | | | | | | Secondly, we have to check whether the branch is actually pointing to the block with the unwind in it. We could have gotten here because of the unwind_to alone. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48099 91177308-0d34-0410-b5e6-96231b3b80d8
* A BB that unwind_to an "unwind" inst is that same as one that doesn't unwind_toNick Lewycky2008-03-091-0/+8
| | | | | | | at all. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48096 91177308-0d34-0410-b5e6-96231b3b80d8
* Update the inliner and simplifycfg to handle unwind_to.Nick Lewycky2008-03-092-0/+48
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48086 91177308-0d34-0410-b5e6-96231b3b80d8
* Prune the unwind_to labels on BBs that don't need them. Another step in theNick Lewycky2008-03-091-0/+15
| | | | | | | removal of invoke, PR1269. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48084 91177308-0d34-0410-b5e6-96231b3b80d8
* Update inliner to handle functions that return multiple values.Devang Patel2008-03-072-0/+92
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48020 91177308-0d34-0410-b5e6-96231b3b80d8
* Place for sret promotion tests.Devang Patel2008-03-071-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48016 91177308-0d34-0410-b5e6-96231b3b80d8
* Commit the testcase too.Nick Lewycky2008-03-061-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47988 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't try to simplify urem and srem using arithmetic rules that don't workNick Lewycky2008-03-061-26/+33
| | | | | | | under modulo (overflow). Fixes PR1933. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47987 91177308-0d34-0410-b5e6-96231b3b80d8
* Use cast instead of dyn_cast.Devang Patel2008-03-041-9/+11
| | | | | | | Update test to use multiple return value directly, instead of relying on -sretpromotion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47907 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle multiple return values.Devang Patel2008-03-041-0/+26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47904 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove llvm-upgrade and update test cases.Tanya Lattner2008-03-01258-7456/+7573
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47793 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a bug Anders ran into where scalarrepl would crash when promotingChris Lattner2008-02-291-0/+16
| | | | | | | | | a union containing a vector and an array whose elements were smaller than the vector elements. this means we need to compile the load of the array elements into an extract element plus a truncate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47752 91177308-0d34-0410-b5e6-96231b3b80d8
* Folding or(fcmp,fcmp) only works if the operands of the fcmps are the same ↵Chris Lattner2008-02-291-0/+16
| | | | | | fp type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47750 91177308-0d34-0410-b5e6-96231b3b80d8
* Add PR number to testcase.Owen Anderson2008-02-261-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47640 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an issue where GVN had the sizes of the two memcpy's reverse, resultingOwen Anderson2008-02-261-0/+45
| | | | | | | in an invalid transformation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47639 91177308-0d34-0410-b5e6-96231b3b80d8
* fix this test so that the fn name doesn't match the regexChris Lattner2008-02-261-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47608 91177308-0d34-0410-b5e6-96231b3b80d8
* Really feed llvm-as with the testcase, do not let it read from stdin. This ↵Gabor Greif2008-02-261-1/+1
| | | | | | fixes the hangs seen on solaris10. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47604 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an issue where GVN was performing the return slot optimization when it wasOwen Anderson2008-02-251-0/+32
| | | | | | | | not safe. This is fixed by more aggressively checking that the return slot is not used elsewhere in the function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47544 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an issue where GVN would try to use an instruction before its definition ↵Owen Anderson2008-02-252-1/+26
| | | | | | when performing return slot optimization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47541 91177308-0d34-0410-b5e6-96231b3b80d8
* Testcase for Revision 47478.Zhou Sheng2008-02-231-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47531 91177308-0d34-0410-b5e6-96231b3b80d8
* Correctly fold divide-by-constant, even when faced with overflow.Nick Lewycky2008-02-182-0/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47287 91177308-0d34-0410-b5e6-96231b3b80d8
* make this just a bit more strict.Chris Lattner2008-02-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47274 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support to GVN for performing sret return slot optimization. This means ↵Owen Anderson2008-02-181-0/+28
| | | | | | | | | | | | that, if an sret function tail calls another sret function, it should pass its own sret parameter to the tail callee, allowing it to fill in the correct return value. llvm-gcc does not emit this by default. Instead, it allocates space in the caller for the sret of the tail call and then uses memcpy to copy the result into the caller's sret parameter. This optimization detects and optimizes that case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47265 91177308-0d34-0410-b5e6-96231b3b80d8
* optimize away stackrestore calls that have no intervening alloca or call.Chris Lattner2008-02-181-3/+40
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47258 91177308-0d34-0410-b5e6-96231b3b80d8
* upgrade this test.Chris Lattner2008-02-181-11/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47257 91177308-0d34-0410-b5e6-96231b3b80d8
* Fold (-x + -y) -> -(x+y) which promotes better association, fixingChris Lattner2008-02-171-0/+12
| | | | | | | the second half of PR2047 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47244 91177308-0d34-0410-b5e6-96231b3b80d8
* Split up subtracts into add+negate if they have a reassociable use or operandChris Lattner2008-02-171-0/+13
| | | | | | | that is also a subtract. This implements PR2047 and Transforms/Reassociate/subtest2.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47241 91177308-0d34-0410-b5e6-96231b3b80d8
* upgrade and simplify this test.Chris Lattner2008-02-171-6/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47240 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove any 'nest' parameter attributes if the functionDuncan Sands2008-02-161-0/+57
| | | | | | | is not passed as an argument to a trampoline intrinsic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47220 91177308-0d34-0410-b5e6-96231b3b80d8