aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* PR7853: fix a silly mistake introduced in r101899, and add a test to make sureEli Friedman2010-08-091-12/+22
| | | | | | | | it doesn't regress again. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110597 91177308-0d34-0410-b5e6-96231b3b80d8
* Move x86-specific tests out of test/Transforms/LoopStrengthReduce andDan Gohman2010-08-057-241/+0
| | | | | | | | | | into test/CodeGen/X86, so that they aren't run when the x86 target is not enabled. Fix uglygep.ll to not be x86-specific. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110343 91177308-0d34-0410-b5e6-96231b3b80d8
* Make instcombine set explicit alignments on load or storeDan Gohman2010-08-032-14/+31
| | | | | | | | instructions with alignment 0, so that subsequent passes don't need to bother checking the TargetData ABI size manually. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110128 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an atomic lowering passPeter Collingbourne2010-08-034-0/+79
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110113 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-apply the infamous r108614, with a fix pointed out by Dirk Steinke.Owen Anderson2010-08-021-0/+26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110036 91177308-0d34-0410-b5e6-96231b3b80d8
* Speculatively revert r108614, "Another attempt at getting the clang self-host toDaniel Dunbar2010-07-311-26/+0
| | | | | | | like my instcombine patch.", in an attempt to fix Clang i386 bootstrap. - Also PR7719. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109953 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a test with malformed IR. Not sure why this didn't fail before.Owen Anderson2010-07-261-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109422 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix SCEVExpander::visitAddRecExpr so that it remembers the induction variableDan Gohman2010-07-261-0/+36
| | | | | | | | | it inserted rather than using LoopInfo::getCanonicalInductionVariable to rediscover it, since that doesn't work on non-canonical loops. This fixes infinite recurrsion on such loops; PR7562. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109419 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid depending on LCSSA implicitly pulling in LoopSimplify.Dan Gohman2010-07-261-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109410 91177308-0d34-0410-b5e6-96231b3b80d8
* Testcase for r108687.Owen Anderson2010-07-191-0/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108689 91177308-0d34-0410-b5e6-96231b3b80d8
* Another attempt at getting the clang self-host to like my instcombine patch.Owen Anderson2010-07-171-0/+26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108614 91177308-0d34-0410-b5e6-96231b3b80d8
* Arrays and vectors with different numbers of elements are not equivalent.Nick Lewycky2010-07-161-0/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108517 91177308-0d34-0410-b5e6-96231b3b80d8
* LoopSimplify does not update domfrontier correctly.Tobias Grosser2010-07-161-0/+20
| | | | | | This fixes PR7649. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108513 91177308-0d34-0410-b5e6-96231b3b80d8
* Also revert 108422, it's causing some test failures.Eric Christopher2010-07-161-15/+0
| | | | | | | Working on testcases for Owen. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108494 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix this test.Dan Gohman2010-07-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108491 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the order that SCEVExpander considers add operands in so thatDan Gohman2010-07-151-0/+40
| | | | | | | | it doesn't miss an opportunity to form a GEP, regardless of the relative loop depths of the operands. This fixes rdar://8197217. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108475 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r108378, with bugfixes, testcase, and improved comment formatting.Owen Anderson2010-07-151-0/+15
| | | | | | | This now passes LIT, nighty test, and llvm-gcc bootstrap on my machine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108422 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR7647, handling the case when 'To' ends up being Chris Lattner2010-07-151-0/+47
| | | | | | | | | | | mutated by recursive simplification. This also enhances ReplaceAndSimplifyAllUses to actually do a real RAUW at the end of it, which updates any value handles pointing to "From" to start pointing to "To". This seems useful for debug info and random other VH users. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108415 91177308-0d34-0410-b5e6-96231b3b80d8
* revert r108320, I see the failures now...Chris Lattner2010-07-141-13/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108322 91177308-0d34-0410-b5e6-96231b3b80d8
* reapply benjamin's instcombine patch, I don't see anything wrong with it and ↵Chris Lattner2010-07-141-0/+13
| | | | | | can't repro any problems with a manual self-host. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108320 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle the case of a tail recursion in which the tail call is followedDuncan Sands2010-07-131-1/+4
| | | | | | | | | | by a return that returns a constant, while elsewhere in the function another return instruction returns a different constant. This is a special case of accumulator recursion, so just generalize the existing logic a bit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108241 91177308-0d34-0410-b5e6-96231b3b80d8
* Nope, still breaks the release selfhost bots :(Benjamin Kramer2010-07-121-13/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108153 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply the "or" half of r108136, which seems to be less problematic.Benjamin Kramer2010-07-121-0/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108152 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r108141 again, sigh.Benjamin Kramer2010-07-122-27/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108148 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply 108136 with an ugly pasto fixed.Benjamin Kramer2010-07-122-0/+27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108141 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r108136 until I figure out why it broke selfhost.Benjamin Kramer2010-07-122-28/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108139 91177308-0d34-0410-b5e6-96231b3b80d8
* instcombine: fold (x & y) | (~x & z) and (x & y) ^ (~x & z) into ((y ^ z) & ↵Benjamin Kramer2010-07-122-0/+28
| | | | | | | | | | | | | | | | | | x) ^ z which is one instruction shorter. (PR6773) before: %and = and i32 %y, %x %neg = xor i32 %x, -1 %and4 = and i32 %z, %neg %xor = xor i32 %and4, %and after: %xor1 = xor i32 %z, %y %and2 = and i32 %xor1, %x %xor = xor i32 %and2, %z git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108136 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR7311 by avoiding breaking casts when a bitcast from scalar->vectorChris Lattner2010-07-121-0/+11
| | | | | | | is involved. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108117 91177308-0d34-0410-b5e6-96231b3b80d8
* if jump threading is able to infer interesting values on bothChris Lattner2010-07-121-0/+24
| | | | | | | | | the LHS and RHS of an and/or instruction, don't multiply add known predecessor values. This fixes the crash on testcase from PR7498 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108114 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR7429, a crash turning a load from a string into a float.Chris Lattner2010-07-121-0/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108113 91177308-0d34-0410-b5e6-96231b3b80d8
* convert to filechecconvert to filecheckkChris Lattner2010-07-121-10/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108112 91177308-0d34-0410-b5e6-96231b3b80d8
* merge two tests.Chris Lattner2010-07-122-11/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108111 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach instcombine to transformBenjamin Kramer2010-07-081-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | (X >s -1) ? C1 : C2 and (X <s 0) ? C2 : C1 into ((X >>s 31) & (C2 - C1)) + C1, avoiding the conditional. This optimization could be extended to take non-const C1 and C2 but we better stay conservative to avoid code size bloat for now. for int sel(int n) { return n >= 0 ? 60 : 100; } we now generate sarl $31, %edi andl $40, %edi leal 60(%rdi), %eax instead of testl %edi, %edi movl $60, %ecx movl $100, %eax cmovnsl %ecx, %eax git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107866 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the second half of PR7437: scalarrepl wasn't preservingChris Lattner2010-07-081-0/+35
| | | | | | | address spaces when SRoA'ing memcpy's. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107846 91177308-0d34-0410-b5e6-96231b3b80d8
* Prevent test from hanging waiting for input.Dale Johannesen2010-07-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107446 91177308-0d34-0410-b5e6-96231b3b80d8
* Debugging infomration is encoded in llvm IR using metadata. This is designedDevang Patel2010-07-011-0/+47
| | | | | | | | | | | such a way that debug info for symbols preserved even if symbols are optimized away by the optimizer. Add new special pass to remove debug info for such symbols. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107416 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove all debug info related named mdnodes.Devang Patel2010-06-301-0/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107323 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix ScalarEvolution's tripcount computation for chains of loopsDan Gohman2010-06-291-2/+64
| | | | | | | | where each loop's induction variable's start value is the exit value of a preceding loop. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107224 91177308-0d34-0410-b5e6-96231b3b80d8
* Constant fold x == undef to undef.Dan Gohman2010-06-281-0/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107074 91177308-0d34-0410-b5e6-96231b3b80d8
* this test is failing nondeterministically and blaming me, just disableChris Lattner2010-06-261-1/+2
| | | | | | | it for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106960 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix test weirdness.Benjamin Kramer2010-06-261-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106959 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some tests that didn't test anything.Benjamin Kramer2010-06-261-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106954 91177308-0d34-0410-b5e6-96231b3b80d8
* Partial specialization test should not depend on the order of specialization ↵Kenneth Uildriks2010-06-261-8/+8
| | | | | | operations or the names assigned to the specialized functions git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106953 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR7328: when turning a tail recursion into a loop, need to preserveDuncan Sands2010-06-261-0/+17
| | | | | | | | | the returned value after the tail call if it differs from other return values. The optimal thing to do would be to introduce a phi node for the return value, but for the moment just fix the miscompile. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106947 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable indvars on loops when LoopSimplify form is not available.Dan Gohman2010-06-181-1/+18
| | | | | | | This fixes PR7333. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106267 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove arm_apcscc from the test files. It is the default and doing thisRafael Espindola2010-06-177-11/+11
| | | | | | matches what llvm-gcc and clang now produce. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106221 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure that simplify libcalls does not replace a call with one callingRafael Espindola2010-06-161-0/+16
| | | | | | convention with a new call with a different calling convention. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106134 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify-libcalls: fold strncmp(x, y, 1) -> memcmp(x, y, 1)Benjamin Kramer2010-06-161-0/+7
| | | | | | | | The memcmp will be optimized further and even the pathological case 'strstr(x, "x") == x' generates optimal code now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106097 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify-libcalls: fold strstr(a, b) == a -> strncmp(a, b, strlen(b)) == 0Benjamin Kramer2010-06-151-0/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106047 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the arm_aapcscc marker from the tests. It is the defaultRafael Espindola2010-06-151-1/+1
| | | | | | for the linux targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106029 91177308-0d34-0410-b5e6-96231b3b80d8