summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* Add a testcase for the current llvm-gcc build failure.Nick Lewycky2009-11-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90112 91177308-0d34-0410-b5e6-96231b3b80d8
* Add test case for r90108Mon P Wang2009-11-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90109 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix this test on 64-bit systems which seem to use i64 for gep indices sometimesNick Lewycky2009-11-30
| | | | | | | while 32-bit gcc uses i32. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90106 91177308-0d34-0410-b5e6-96231b3b80d8
* Commit r90099 made LLVM simplify one of these constant expressions a littleNick Lewycky2009-11-30
| | | | | | | | | | more. Update the syntax we're checking for and filecheckize it too. This will fix the selfhost buildbots but will 'break' the others (sigh) because they're still linked against older LLVM which is emitting less optimized IR. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90104 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach ConstantFolding to do a better job when folding gep(bitcast).Nick Lewycky2009-11-29
| | | | | | | This permits the devirtualization of llvm.org/PR3100#c9 when compiled by clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90099 91177308-0d34-0410-b5e6-96231b3b80d8
* add testcases for the foo_with_overflow op xforms added recently andChris Lattner2009-11-29
| | | | | | | | fix bugs exposed by the tests. Testcases from Alastair Lynn! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90056 91177308-0d34-0410-b5e6-96231b3b80d8
* add PR#Chris Lattner2009-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90049 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a testcase for:Chris Lattner2009-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | void test(int N, double* G) { long j; for (j = 1; j < N - 1; j++) G[j] = G[j] + G[j+1] + G[j-1]; } which we now compile to one load in the loop: LBB1_2: ## %bb movsd 16(%rsi,%rax,8), %xmm2 incq %rdx addsd %xmm2, %xmm1 addsd %xmm1, %xmm0 movapd %xmm2, %xmm1 movsd %xmm0, 8(%rsi,%rax,8) incq %rax cmpq %rcx, %rax jne LBB1_2 instead of: LBB1_2: ## %bb movsd 8(%rsi,%rax,8), %xmm0 addsd 16(%rsi,%rax,8), %xmm0 addsd (%rsi,%rax,8), %xmm0 movsd %xmm0, 8(%rsi,%rax,8) incq %rax cmpq %rcx, %rax jne LBB1_2 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90048 91177308-0d34-0410-b5e6-96231b3b80d8
* add a testcase forChris Lattner2009-11-29
| | | | | | | | | | | | void test9(int N, double* G) { long j; for (j = 1; j < N - 1; j++) G[j+1] = G[j] + G[j+1]; } git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90047 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement PR5634.Chris Lattner2009-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90046 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach memdep to look for memory use intrinsics during dependency queries. FixesNick Lewycky2009-11-28
| | | | | | | PR5574. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90045 91177308-0d34-0410-b5e6-96231b3b80d8
* reenable load address insertion in load pre. This allows us toChris Lattner2009-11-28
| | | | | | | | | | | | | | | handle cases like this: void test(int N, double* G) { long j; for (j = 1; j < N - 1; j++) G[j+1] = G[j] + G[j+1]; } where G[1] isn't live into the loop. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90041 91177308-0d34-0410-b5e6-96231b3b80d8
* implement a FIXME: limit the depth that DecomposeGEPExpression goes the sameChris Lattner2009-11-28
| | | | | | | | | | | way that getUnderlyingObject does it. This fixes the 'DecomposeGEPExpression and getUnderlyingObject disagree!' assertion on sqlite3. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90038 91177308-0d34-0410-b5e6-96231b3b80d8
* disable value insertion for now, I need to figure out howChris Lattner2009-11-27
| | | | | | | | to inform GVN about the newly inserted values. This fixes PR5631. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90022 91177308-0d34-0410-b5e6-96231b3b80d8
* I accidentally implemented this :)Chris Lattner2009-11-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90014 91177308-0d34-0410-b5e6-96231b3b80d8
* add support for recursive phi translation and phi Chris Lattner2009-11-27
| | | | | | | | | | | | | | | | | | translation of add with immediate. This allows us to optimize this function: void test(int N, double* G) { long j; G[1] = 1; for (j = 1; j < N - 1; j++) G[j+1] = G[j] + G[j+1]; } to only do one load every iteration of the loop. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90013 91177308-0d34-0410-b5e6-96231b3b80d8
* add two simple test cases we now optimize (to one load in the loop each) and ↵Chris Lattner2009-11-27
| | | | | | one we don't (corresponding to the fixme I added yesterday). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90012 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR5436 by making the 'simple' case of SRoA not promote out of range Chris Lattner2009-11-27
| | | | | | | | | | | array indexes. The "complex" case of SRoA still handles them, and correctly. This fixes a weirdness where we'd correctly avoid transforming A[0][42] if the 42 was too large, but we'd only do it if it was one gep, not two separate ones. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90007 91177308-0d34-0410-b5e6-96231b3b80d8
* filecheckizeChris Lattner2009-11-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90006 91177308-0d34-0410-b5e6-96231b3b80d8
* While this test is testing a problem in the generic part of codegen,Duncan Sands2009-11-27
| | | | | | | | | | the problem only shows for msp430 and pic16 which is why it specifies them using -march. But it is wrong to put such tests in CodeGen/Generic, since not everyone builds these targets. Put a copy of the test in each of the target test directories. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90005 91177308-0d34-0410-b5e6-96231b3b80d8
* teach GVN's load PRE to insert computations of the address in predecessorsChris Lattner2009-11-27
| | | | | | | | where it is not available. It's unclear how to get this inserted computation into GVN's scalar availability sets, Owen, help? :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89997 91177308-0d34-0410-b5e6-96231b3b80d8
* add some tests for memdep phi translation + PRE.Chris Lattner2009-11-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89996 91177308-0d34-0410-b5e6-96231b3b80d8
* this test is failing, and is expected to.Chris Lattner2009-11-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89995 91177308-0d34-0410-b5e6-96231b3b80d8
* filecheckizeChris Lattner2009-11-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89994 91177308-0d34-0410-b5e6-96231b3b80d8
* rename test.Chris Lattner2009-11-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89993 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix phi translation in load PRE to agree with the phi Chris Lattner2009-11-27
| | | | | | | | translation done by memdep, and reenable gep translation again. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89992 91177308-0d34-0410-b5e6-96231b3b80d8
* redisable this, my bootstrap worked because it wasn't an optimized build, ↵Chris Lattner2009-11-27
| | | | | | whoops. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89991 91177308-0d34-0410-b5e6-96231b3b80d8
* try again.Chris Lattner2009-11-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89990 91177308-0d34-0410-b5e6-96231b3b80d8
* this is causing buildbot failures, disable for now.Chris Lattner2009-11-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89985 91177308-0d34-0410-b5e6-96231b3b80d8
* teach phi translation of GEPs to simplify geps like 'gep x, 0'.Chris Lattner2009-11-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to compile the example from PR5313 into: LBB1_2: ## %bb incl %ecx movb %al, (%rsi) movslq %ecx, %rax movb (%rdi,%rax), %al testb %al, %al jne LBB1_2 instead of: LBB1_2: ## %bb movslq %eax, %rcx incl %eax movb (%rdi,%rcx), %cl movb %cl, (%rsi) movslq %eax, %rcx cmpb $0, (%rdi,%rcx) jne LBB1_2 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89981 91177308-0d34-0410-b5e6-96231b3b80d8
* teach memdep to do trivial PHI translation of GEPs. More toChris Lattner2009-11-27
| | | | | | | come. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89979 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach memdep to phi translate bitcasts. This allows us to compileChris Lattner2009-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | the example in GCC PR16799 to: LBB1_2: ## %bb1 movl %eax, %eax subq %rax, %rdi movq %rdi, (%rcx) movl (%rdi), %eax testl %eax, %eax je LBB1_2 instead of: LBB1_2: ## %bb1 movl (%rdi), %ecx subq %rcx, %rdi movq %rdi, (%rax) cmpl $0, (%rdi) je LBB1_2 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89978 91177308-0d34-0410-b5e6-96231b3b80d8
* convert to filecheckChris Lattner2009-11-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89977 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR5471 by removing an instcombine xform. Some pieces of the codeChris Lattner2009-11-26
| | | | | | | | | generates store to undef and some generates store to null as the idiom for undefined behavior. Since simplifycfg zaps both, don't remove the undefined behavior in instcombine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89971 91177308-0d34-0410-b5e6-96231b3b80d8
* @test9 is a testcase for r89958. Before 89958, we misanalyzed theChris Lattner2009-11-26
| | | | | | | | | | | first expression as P+4+4*i which we considered to possibly alias P+4*j. Now we correctly analyze the former one as P+1+4*i. @test10 is a sanity test that verfies that we know that P+4+4*i != P+4*i. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89960 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement PR1143 (at -m64) by making basicaa look through extensions. WeChris Lattner2009-11-26
| | | | | | | | previously already handled it at -m32 because there were no i32->i64 extensions for addressing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89959 91177308-0d34-0410-b5e6-96231b3b80d8
* teach GetLinearExpression to be a bit more aggressive.Chris Lattner2009-11-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89955 91177308-0d34-0410-b5e6-96231b3b80d8
* update status of this. basicaa is much improved now,Chris Lattner2009-11-26
| | | | | | | | | only missing the one form (in this testcase). Dan, do you consider this example to be important? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89953 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach basicaa that x|c == x+c when the c bits of x are clear. ThisChris Lattner2009-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | allows us to compile the example in readme.txt into: LBB1_1: ## %bb movl 4(%rdx,%rax), %ecx movl %ecx, %esi imull (%rdx,%rax), %esi imull %esi, %ecx movl %esi, 8(%rdx,%rax) imull %ecx, %esi movl %ecx, 12(%rdx,%rax) movl %esi, 16(%rdx,%rax) imull %ecx, %esi movl %esi, 20(%rdx,%rax) addq $16, %rax cmpq $4000, %rax jne LBB1_1 instead of: LBB1_1: movl (%rdx,%rax), %ecx imull 4(%rdx,%rax), %ecx movl %ecx, 8(%rdx,%rax) imull 4(%rdx,%rax), %ecx movl %ecx, 12(%rdx,%rax) imull 8(%rdx,%rax), %ecx movl %ecx, 16(%rdx,%rax) imull 12(%rdx,%rax), %ecx movl %ecx, 20(%rdx,%rax) addq $16, %rax cmpq $4000, %rax jne LBB1_1 GCC (4.2) doesn't seem to be able to eliminate the loads in this testcase either, it generates: L2: movl (%rdx), %eax imull 4(%rdx), %eax movl %eax, 8(%rdx) imull 4(%rdx), %eax movl %eax, 12(%rdx) imull 8(%rdx), %eax movl %eax, 16(%rdx) imull 12(%rdx), %eax movl %eax, 20(%rdx) addl $4, %ecx addq $16, %rdx cmpl $1002, %ecx jne L2 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89952 91177308-0d34-0410-b5e6-96231b3b80d8
* teach basicaa that A[i] != A[i+1].Chris Lattner2009-11-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89951 91177308-0d34-0410-b5e6-96231b3b80d8
* rename testChris Lattner2009-11-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89950 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the other half of aliasGEP (which handles GEP differencing) to use ↵Chris Lattner2009-11-26
| | | | | | DecomposeGEPExpression. This dramatically simplifies and shrinks the code by eliminating the horrible CheckGEPInstructions method, fixes a miscompilation (@test3) and makes the code more aggressive. In particular, we now handle the @test4 case, which is reduced from the SmallPtrSet constructor. Missing this caused us to emit a variable length memset instead of a fixed size one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89922 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new random feature testChris Lattner2009-11-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89921 91177308-0d34-0410-b5e6-96231b3b80d8
* Test for 89905.Evan Cheng2009-11-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89906 91177308-0d34-0410-b5e6-96231b3b80d8
* Test for llvm-gcc checkin 89898.Dale Johannesen2009-11-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89899 91177308-0d34-0410-b5e6-96231b3b80d8
* ProcessImplicitDefs should watch out for invalidated iterator and extra ↵Evan Cheng2009-11-25
| | | | | | implicit operands on copies. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89880 91177308-0d34-0410-b5e6-96231b3b80d8
* Support PIC loading of constant pool entriesBruno Cardoso Lopes2009-11-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89863 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverting patch in revision 89758, initial attempt at fixing PR5373 has ↵Edward O'Callaghan2009-11-25
| | | | | | proven to be bogus. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89844 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not store R31 into the caller's link area on PPC.Dale Johannesen2009-11-24
| | | | | | | | | | | | | | This violates the ABI (that area is "reserved"), and while it is safe if all code is generated with current compilers, there is some very old code around that uses that slot for something else, and breaks if it is stored into. Adjust testcases looking for current behavior. I've verified that the stack frame size is right in all testcases, whether it changed or not. 7311323. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89811 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for PR5373, Credit to Jakub Staszak.Edward O'Callaghan2009-11-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89758 91177308-0d34-0410-b5e6-96231b3b80d8