aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Proper patterns for thumb2 shift and rotate instructions.Evan Cheng2009-06-231-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73987 91177308-0d34-0410-b5e6-96231b3b80d8
* The correct values here (as defined by gcc-4.2) areDale Johannesen2009-06-232-0/+15
| | | | | | | | different for ppc; add another version of the test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73983 91177308-0d34-0410-b5e6-96231b3b80d8
* This test only works on ppc32 if some optimization is done beforeDale Johannesen2009-06-231-1/+1
| | | | | | | | | | | | generating LLVM IR; it is correct in the code as written to use 8-byte-aligned operations to copy Key in bar. Formerly the gcc inliner was run, now it isn't. I don't think it's possible to preserve this as a pure FE test. Adding -O2 lets the llvm optimizers get rid of the 8-byte-aligned stores, at least. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73981 91177308-0d34-0410-b5e6-96231b3b80d8
* See test. Judging from PR 1278, at the time the test was committed, theDale Johannesen2009-06-231-1/+1
| | | | | | | | | | | | | | | | | generated code was apparently doing stores directly into the return value aggregate; now, it's doing a copy from a compiler-generated static object. That object is initialized using [4 x i8] which breaks the test. I believe this change preserves the original point of the test. Of course it would be better for the code to do stores directly into the return aggregate, but that is not what happens at -O0; the llvm optimizers seem to do that on x86 but not on ppc32, possibly because of the explicit padding (which is unavoidable). I think it must have been being done by a gcc optimizer pass before. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73972 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in the trip-count computation with And/Or. If either of theDan Gohman2009-06-221-0/+150
| | | | | | | sides is CouldNotCompute, the resulting exact count must be CouldNotCompute. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73920 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for ARM's Advanced SIMD (NEON) instruction set.Bob Wilson2009-06-2288-0/+6904
| | | | | | | | This is still a work in progress but most of the NEON instruction set is supported. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73919 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix llvm::ComputeNumSignBits to handle pointer typesDan Gohman2009-06-221-0/+220
| | | | | | | conservatively correctly, instead of aborting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73908 91177308-0d34-0410-b5e6-96231b3b80d8
* It's coalescer, not coaleser.Evan Cheng2009-06-221-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73902 91177308-0d34-0410-b5e6-96231b3b80d8
* For Darwin on ARMv6 and newer, make register r9 available for use as aBob Wilson2009-06-221-1/+4
| | | | | | | caller-saved register. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73901 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix another register coalescer crash: forgot to check if the instruction ↵Evan Cheng2009-06-221-0/+43
| | | | | | being updated has already been coalesced. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73898 91177308-0d34-0410-b5e6-96231b3b80d8
* hasFP should return true if frame address is taken.Evan Cheng2009-06-221-0/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73893 91177308-0d34-0410-b5e6-96231b3b80d8
* Testcase for (llvm-gcc) 73873. Usually Dale Johannesen2009-06-221-0/+32
| | | | | | | | | | std::pair<double, float*> is 16 bytes on darwin-powerpc, but not always. See testcase for full weirdness. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73874 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach ScalarEvolution how to analyze loops with multiple exitDan Gohman2009-06-221-0/+48
| | | | | | | | | | blocks, and also exit blocks with multiple conditions (combined with (bitwise) ands and ors). It's often infeasible to compute an exact trip count in such cases, but a useful upper bound can often be found. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73866 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix ScalarEvolution's backedge-taken count computations to check forDan Gohman2009-06-213-4/+15
| | | | | | | | | overflow when computing a integer division to round up. Thanks to Nick Lewycky for noticing this! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73862 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR4185.Rafael Espindola2009-06-211-0/+10
| | | | | | | | Handle FpSET_ST0_80 being used when ST0 is still alive. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73850 91177308-0d34-0410-b5e6-96231b3b80d8
* Expand this test to handle more cases (remainder and shifts) of zero.Nick Lewycky2009-06-211-0/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73839 91177308-0d34-0410-b5e6-96231b3b80d8
* implement PR4424: 0/x is always 0 for integer division.Chris Lattner2009-06-211-0/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73835 91177308-0d34-0410-b5e6-96231b3b80d8
* change TLS_ADDR lowering to lower to a real mem operand, instead of matching asChris Lattner2009-06-204-4/+4
| | | | | | | | | | | | | | a global with that gets printed with the :mem modifier. All operands to lea's should be handled with the lea32mem operand kind, and this allows the TLS stuff to do this. There are several better ways to do this, but I went for the minimal change since I can't really test this (beyond make check). This also makes the use of EBX explicit in the operand list in the 32-bit, instead of implicit in the instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73834 91177308-0d34-0410-b5e6-96231b3b80d8
* no need for unwind infoChris Lattner2009-06-201-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73832 91177308-0d34-0410-b5e6-96231b3b80d8
* no need for unwind info here.Chris Lattner2009-06-201-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73831 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR4419: handle defs of partial uses.Evan Cheng2009-06-201-0/+30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73816 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak this test to be a little less unusual.Dan Gohman2009-06-201-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73808 91177308-0d34-0410-b5e6-96231b3b80d8
* Generalize isLoopGuardedByCond's checking to consider twoDan Gohman2009-06-201-0/+107
| | | | | | | | | | | SCEVUnknowns with identical Instructions to be equal. This allows it to analze cases such as the attached testcase, where the front-end has cloned the loop controlling expression. Along with r73805, this lets IndVarSimplify eliminate all the sign-extend casts in the loop in the attached testcase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73807 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-apply r73718, now that the fix in r73787 is in, and add aDan Gohman2009-06-193-2/+30
| | | | | | | | hand-crafted testcase which demonstrates the bug that was exposed in 254.gap. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73793 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable arm pre-allocation load / store multiple optimization pass.Evan Cheng2009-06-192-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73791 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 73718. It's breaking 254.gap.Evan Cheng2009-06-192-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73783 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't (unconditionally) use getSCEVAtScope to simplify the stepDan Gohman2009-06-191-0/+18
| | | | | | | | | expression in IVUsers, because in the case of a use of a non-linear addrec outside of a loop, this causes the addrec to be evaluated as a linear addrec. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73774 91177308-0d34-0410-b5e6-96231b3b80d8
* make jump threading handle lexically identical compare instructionsChris Lattner2009-06-191-0/+30
| | | | | | | | | as if they were multiple uses of the same instruction. This interacts well with the existing loadpre that j-t does to open up many new jump threads earlier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73768 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for PR2484: add an SSE1 pattern for a shuffle we normally prefer to Eli Friedman2009-06-191-0/+9
| | | | | | | | handle with an SSE2 instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73760 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach jump threading to look at comparisons between phi nodes and non-constants.Nick Lewycky2009-06-191-0/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73755 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve tail call elim to move loads above readonly callsChris Lattner2009-06-192-0/+165
| | | | | | | | when it allows forming a tail call. Patch by Frits van Bommel. This implements PR4323. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73752 91177308-0d34-0410-b5e6-96231b3b80d8
* part of PR4405: disable a contentious optimization forChris Lattner2009-06-191-10/+0
| | | | | | | | | strcmp -> memcmp when the lengths of the strings are unknown. Patch by Nick Lewycky! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73751 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark a few Thumb instructions commutable; just happened to spot this Eli Friedman2009-06-191-0/+8
| | | | | | | | | | while experimenting. I'm reasonably sure this is correct, but please tell me if these instructions have some strange property which makes this change unsafe. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73746 91177308-0d34-0410-b5e6-96231b3b80d8
* new testcase for rdar://6983634Chris Lattner2009-06-181-0/+26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73729 91177308-0d34-0410-b5e6-96231b3b80d8
* On Darwin, ams printer should output a second label before a jump table so ↵Evan Cheng2009-06-181-0/+2
| | | | | | the linker knows it's a new atom. But this is only needed if the jump table is put in a separate section from the function body. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73720 91177308-0d34-0410-b5e6-96231b3b80d8
* Generalize LSR's OptimizeSMax to handle unsigned max tests as wellDan Gohman2009-06-182-2/+305
| | | | | | | | as signed max tests. Along with r73717, this helps CodeGen avoid emitting code for a maximum operation for this class of loop. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73718 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the code from IVUsers that attempted to handleDan Gohman2009-06-183-7/+10
| | | | | | | | | | | | casted induction variables in cases where the cast isn't foldable. It ended up being a pessimization in many cases. This could be fixed, but it would require a bunch of complicated code in IVUsers' clients. The advantages of this approach aren't visible enough to justify it at this time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73706 91177308-0d34-0410-b5e6-96231b3b80d8
* Generalize the zext(trunc(t) & C) instcombine to work even withDan Gohman2009-06-181-1/+16
| | | | | | | | C is not a low-bits mask, and add a similar instcombine for zext((trunc(t) & C) ^ C). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73705 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach ScalarEvolution how to recognize another xor(and(x, C), C) case.Dan Gohman2009-06-181-2/+3
| | | | | | | | If C is a single bit and the and gets analyzed as a truncate and zero-extend, the xor can be represnted as an add. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73664 91177308-0d34-0410-b5e6-96231b3b80d8
* Instcombine zext(trunc(x) & mask) to x&mask, even if the trunc hasDan Gohman2009-06-171-0/+23
| | | | | | | multiple users. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73656 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -disable-output to a bunch of tests that don't care about the output.Dan Gohman2009-06-1731-32/+32
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73633 91177308-0d34-0410-b5e6-96231b3b80d8
* This fixes a bug introduced in 72661, which canDale Johannesen2009-06-172-4/+77
| | | | | | | | | | | | | | | | | move loads back past a check that the load address is valid, see new testcase. The test that went in with 72661 has exactly this case, except that the conditional it's moving past is checking something else; I've settled for changing that test to reference a global, not a pointer. It may be possible to scan all the tests you pass and make sure none of them are checking any component of the address, but it's not trivial and I'm not trying to do that here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73632 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial support for some Thumb2 instructions.Anton Korobeynikov2009-06-174-0/+282
| | | | | | Patch by Viktor Kutuzov and Anton Korzh from Access Softek, Inc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73622 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct an accidental duplication of the test (patch doesn't handle Eli Friedman2009-06-171-9/+0
| | | | | | | | creating new files very well). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73599 91177308-0d34-0410-b5e6-96231b3b80d8
* PR3439: Correct a silly mistake in the SimplifyDemandedUseBits code for Eli Friedman2009-06-171-0/+18
| | | | | | | | SRem. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73598 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix ScalarEvolution's Xor handling to not assume that an AndDan Gohman2009-06-171-0/+11
| | | | | | | | that gets recognized with a SCEVZeroExtendExpr must be an And with a low-bits mask. With r73540, this is no longer the case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73594 91177308-0d34-0410-b5e6-96231b3b80d8
* Test for llvm-gcc patch 73564.Dale Johannesen2009-06-161-0/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73565 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the test target-neutralAnton Korobeynikov2009-06-161-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73547 91177308-0d34-0410-b5e6-96231b3b80d8
* Generalize a few more instcombines to be vector/scalar-independent.Dan Gohman2009-06-162-0/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73541 91177308-0d34-0410-b5e6-96231b3b80d8
* Instcombine's ShrinkDemandedConstant may strip bits out of constants,Dan Gohman2009-06-161-0/+14
| | | | | | | | | obscuring what would otherwise be a low-bits mask. Use ComputeMaskedBits to compute what ShrinkDemandedConstant knew about to reconstruct a low-bits mask value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73540 91177308-0d34-0410-b5e6-96231b3b80d8