aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Add EXTRA_OPTIONS on the llvmgcc command line.Devang Patel2008-04-241-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50216 91177308-0d34-0410-b5e6-96231b3b80d8
* Split some code out of the main SimplifyCFG loop into its own function.Chris Lattner2008-04-241-0/+43
| | | | | | | | Fix said code to handle merging return instructions together correctly when handling multiple return values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50199 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix tests due to llvm2cpp move to llc targetAnton Korobeynikov2008-04-232-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50191 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support to codegen for getresult instructions with undef operands.Dan Gohman2008-04-231-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50180 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable stack realignment for these testsAnton Korobeynikov2008-04-234-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50172 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix test becase ABI stack alignment dropped to 'normal' valueAnton Korobeynikov2008-04-231-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50171 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix test, instruction count is valid only if stack is not realignedAnton Korobeynikov2008-04-231-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50170 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite multiple return value handling in SCCP. Before, the -sccp passChris Lattner2008-04-231-0/+11
| | | | | | | | would turn every getresult instruction into undef. This helps with rdar://5778210 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50140 91177308-0d34-0410-b5e6-96231b3b80d8
* remove this testcase. It isn't testing loop rotate, it is testing allChris Lattner2008-04-231-127/+0
| | | | | | | | | of -std-compile-opts and is now failing because other passes are generating IR that looks different to input of loop rotate. Devang, please introduce a testcase that only runs loop rotate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50136 91177308-0d34-0410-b5e6-96231b3b80d8
* returning an empty multiple return list is not valid.Chris Lattner2008-04-231-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50135 91177308-0d34-0410-b5e6-96231b3b80d8
* make this test more interesting.Chris Lattner2008-04-231-4/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50128 91177308-0d34-0410-b5e6-96231b3b80d8
* distill down the essense of this test.Chris Lattner2008-04-231-7/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50125 91177308-0d34-0410-b5e6-96231b3b80d8
* new testDale Johannesen2008-04-231-0/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50123 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't do: "(X & 4) >> 1 == 2 --> (X & 4) == 4" if there are more than one ↵Evan Cheng2008-04-231-0/+29
| | | | | | uses of the shift result. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50118 91177308-0d34-0410-b5e6-96231b3b80d8
* Start doing the significantly useful part of jump threading: handle casesChris Lattner2008-04-221-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | where a comparison has a phi input and that phi is a constant. For example, stuff like: Threading edge through bool from 'bb2149' to 'bb2231' with cost: 1, across block: bb2237: ; preds = %bb2231, %bb2149 %tmp2328.rle = phi i32 [ %tmp2232, %bb2231 ], [ %tmp2232439, %bb2149 ] ; <i32> [#uses=2] %done.0 = phi i32 [ %done.2, %bb2231 ], [ 0, %bb2149 ] ; <i32> [#uses=1] %tmp2239 = icmp eq i32 %done.0, 0 ; <i1> [#uses=1] br i1 %tmp2239, label %bb2231, label %bb2327 or bb38.i298: ; preds = %bb33.i295, %bb1693 %tmp39.i296.rle = phi %struct.ibox* [ null, %bb1693 ], [ %tmp39.i296.rle1109, %bb33.i295 ] ; <%struct.ibox*> [#uses=2] %minspan.1.i291.reg2mem.1 = phi i32 [ 32000, %bb1693 ], [ %minspan.0.i288, %bb33.i295 ] ; <i32> [#uses=1] %tmp40.i297 = icmp eq %struct.ibox* %tmp39.i296.rle, null ; <i1> [#uses=1] br i1 %tmp40.i297, label %implfeeds.exit311, label %bb43.i301 This triggers thousands of times in spec. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50110 91177308-0d34-0410-b5e6-96231b3b80d8
* Dig through multiple levels of AND to thread jumps if needed.Chris Lattner2008-04-221-0/+33
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50106 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach jump threading to thread through blocks like:Chris Lattner2008-04-221-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | br (and X, phi(Y, Z, false)), label L1, label L2 This triggers once on 252.eon and 6 times on 176.gcc. Blocks in question often look like this: bb262: ; preds = %bb261, %bb248 %iftmp.251.0 = phi i1 [ true, %bb261 ], [ false, %bb248 ] ; <i1> [#uses=4] %tmp270 = icmp eq %struct.rtx_def* %tmp.0.i, null ; <i1> [#uses=1] %bothcond = or i1 %iftmp.251.0, %tmp270 ; <i1> [#uses=1] br i1 %bothcond, label %bb288, label %bb273 In this case, it is clear that it doesn't matter if tmp.0.i is null when coming from bb261. When coming from bb248, it is all that matters. Another random example: check_asm_operands.exit: ; preds = %check_asm_operands.exit.thr_comm, %bb30.i, %bb12.i, %bb6.i413 %tmp.0.i420 = phi i1 [ true, %bb6.i413 ], [ true, %bb12.i ], [ true, %bb30.i ], [ false, %check_asm_operands.exit.thr_comm ; <i1> [#uses=1] call void @llvm.stackrestore( i8* %savedstack ) nounwind %tmp4389 = icmp eq i32 %added_sets_1.0, 0 ; <i1> [#uses=1] %tmp4394 = icmp eq i32 %added_sets_2.0, 0 ; <i1> [#uses=1] %bothcond80 = and i1 %tmp4389, %tmp4394 ; <i1> [#uses=1] %bothcond81 = and i1 %bothcond80, %tmp.0.i420 ; <i1> [#uses=1] br i1 %bothcond81, label %bb4398, label %bb4397 Here is the case from 252.eon: bb290.i.i: ; preds = %bb23.i57.i.i, %bb8.i39.i.i, %bb100.i.i, %bb100.i.i, %bb85.i.i110 %myEOF.1.i.i = phi i1 [ true, %bb100.i.i ], [ true, %bb100.i.i ], [ true, %bb85.i.i110 ], [ true, %bb8.i39.i.i ], [ false, %bb23.i57.i.i ] ; <i1> [#uses=2] %i.4.i.i = phi i32 [ %i.1.i.i, %bb85.i.i110 ], [ %i.0.i.i, %bb100.i.i ], [ %i.0.i.i, %bb100.i.i ], [ %i.3.i.i, %bb8.i39.i.i ], [ %i.3.i.i, %bb23.i57.i.i ] ; <i32> [#uses=3] %tmp292.i.i = load i8* %tmp16.i.i100, align 1 ; <i8> [#uses=1] %tmp293.not.i.i = icmp ne i8 %tmp292.i.i, 0 ; <i1> [#uses=1] %bothcond.i.i = and i1 %tmp293.not.i.i, %myEOF.1.i.i ; <i1> [#uses=1] br i1 %bothcond.i.i, label %bb202.i.i, label %bb301.i.i Factoring out 3 common predecessors. On the path from any blocks other than bb23.i57.i.i, the load and compare are dead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50096 91177308-0d34-0410-b5e6-96231b3b80d8
* add a basic testcase.Chris Lattner2008-04-222-0/+34
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50093 91177308-0d34-0410-b5e6-96231b3b80d8
* Start removing 'unwinds to' support from mainline in preparation for 2.3.Nick Lewycky2008-04-221-67/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50086 91177308-0d34-0410-b5e6-96231b3b80d8
* optimize "p != gep p, ..." better. This allows us to compile Chris Lattner2008-04-221-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getelementptr-seteq.ll into: define i1 @test(i64 %X, %S* %P) { %C = icmp eq i64 %X, -1 ; <i1> [#uses=1] ret i1 %C } instead of: define i1 @test(i64 %X, %S* %P) { %A.idx.mask = and i64 %X, 4611686018427387903 ; <i64> [#uses=1] %C = icmp eq i64 %A.idx.mask, 4611686018427387903 ; <i1> [#uses=1] ret i1 %C } And fixes the second half of PR2235. This speeds up the insertion sort case by 45%, from 1.12s to 0.77s. In practice, this will significantly speed up for loops structured like: for (double *P = Base + N; P != Base; --P) ... Which happens frequently for C++ iterators. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50079 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement an x86-64 ABI detail of passing structs by hidden firstDan Gohman2008-04-211-0/+54
| | | | | | | | | | | | argument. The x86-64 ABI requires the incoming value of %rdi to be copied to %rax on exit from a function that is returning a large C struct. Also, add a README-X86-64 entry detailing the missed optimization opportunity and proposing an alternative approach. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50075 91177308-0d34-0410-b5e6-96231b3b80d8
* Make these structs larger to ensure that theyDuncan Sands2008-04-212-6/+6
| | | | | | | are returned by struct return. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50038 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the struct bigger, to ensure it is returnedDuncan Sands2008-04-211-1/+1
| | | | | | | by struct return. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50037 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor memcpyopt based on Chris' suggestions. Consolidate several functionsOwen Anderson2008-04-212-4/+4
| | | | | | | and simplify code that was fallout from the separation of memcpyopt and gvn. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50034 91177308-0d34-0410-b5e6-96231b3b80d8
* A better fix for my previous patch, MOVZQI2PQIrr just requires SSE2.Chris Lattner2008-04-201-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49986 91177308-0d34-0410-b5e6-96231b3b80d8
* Not all x86-64 machines have sse3 apparently.Chris Lattner2008-04-201-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49985 91177308-0d34-0410-b5e6-96231b3b80d8
* rename *.llx -> *.ll, last batch.Chris Lattner2008-04-1946-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49971 91177308-0d34-0410-b5e6-96231b3b80d8
* rename *.llx -> *.llChris Lattner2008-04-1929-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49970 91177308-0d34-0410-b5e6-96231b3b80d8
* rename *.llx -> *.llChris Lattner2008-04-1936-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49969 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement PR2206.Chris Lattner2008-04-191-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49967 91177308-0d34-0410-b5e6-96231b3b80d8
* refactor handling of symbolic constant folding, picking upChris Lattner2008-04-191-4/+4
| | | | | | | | a few new cases( see Integer/a1.ll), but not anything that would happen in practice. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49965 91177308-0d34-0410-b5e6-96231b3b80d8
* 64-bit atomic operations.Evan Cheng2008-04-192-0/+48
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49949 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach llvm-as to accept function types with multiple return types.Dan Gohman2008-04-191-0/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49945 91177308-0d34-0410-b5e6-96231b3b80d8
* Be more careful with insert_subreg and extract_subreg where either source or ↵Evan Cheng2008-04-171-0/+171
| | | | | | destination operand has already been coalesced with another register that's defined by a insert_subreg or extract_subreg. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49843 91177308-0d34-0410-b5e6-96231b3b80d8
* Make GVN able to remove unnecessary calls to read-only functions again.Owen Anderson2008-04-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49842 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a sub-register indice propagation bug.Evan Cheng2008-04-171-0/+33
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49832 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't forget about sub-register indices when rematting instructions.Evan Cheng2008-04-161-0/+46
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49830 91177308-0d34-0410-b5e6-96231b3b80d8
* After reading memory that's already freed.Evan Cheng2008-04-161-0/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49810 91177308-0d34-0410-b5e6-96231b3b80d8
* Really test what's intended.Evan Cheng2008-04-161-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49802 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite LiveVariable liveness computation. The new implementation is much ↵Evan Cheng2008-04-161-0/+48
| | | | | | | | | simplified. It eliminated the nasty recursive routines and removed the partial def / use bookkeeping. There is also potential for performance improvement by replacing the conservative handling of partial physical register definitions. The code is currently disabled until live interval analysis is taught of the name scheme. This patch also fixed a couple of nasty corner cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49784 91177308-0d34-0410-b5e6-96231b3b80d8
* XFAIL this test for the moment. The real solution is to prevent ADCEOwen Anderson2008-04-161-0/+1
| | | | | | | | from transforming loops and adding a separate loop pass for removing loops with know trip counts. Until that happens, ADCE is miscompiling this code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49769 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the form of the SSE41 extractps instruction thatDan Gohman2008-04-162-0/+31
| | | | | | | puts its result in a 32-bit GPR. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49762 91177308-0d34-0410-b5e6-96231b3b80d8
* Recreate the size SDNode instead of reusing the old one in the x86Dan Gohman2008-04-161-0/+13
| | | | | | | | | memcpy lowering code; this ensures that the size node has the desired result type. This fixes a regression from r49572 with @llvm.memcpy.i64 on x86-32. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49761 91177308-0d34-0410-b5e6-96231b3b80d8
* Add movd instructions to move from MMX registersDan Gohman2008-04-151-0/+26
| | | | | | | to 64-bit GPR registers on x86-64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49757 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't assume a tail call can't reference a byvalDale Johannesen2008-04-151-0/+18
| | | | | | | | argument to the outer function, this isn't correct. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49731 91177308-0d34-0410-b5e6-96231b3b80d8
* Treat EntryToken nodes as "passive" so that they aren't added to theDan Gohman2008-04-151-2/+2
| | | | | | | | | | | | | | | | | | ScheduleDAG; they don't correspond to any actual instructions so they don't need to be scheduled. This fixes a bug where the EntryToken was being scheduled multiple times in some cases, though it ended up not causing any trouble because EntryToken doesn't expand into anything. With this fixed the schedulers reliably schedule the expected number of units, so we can check this with an assertion. This requires a tweak to test/CodeGen/X86/loop-hoist.ll because it ends up getting scheduled differently in a trivial way, though it was enough to fool the prcontext+grep that the test does. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49701 91177308-0d34-0410-b5e6-96231b3b80d8
* Upgrade these tests for the current intrinsic prototypes.Dan Gohman2008-04-142-24/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49669 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove -unwind-tables-optional everywhere, sinceDale Johannesen2008-04-1416-21/+21
| | | | | | | | this is now the default. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49667 91177308-0d34-0410-b5e6-96231b3b80d8
* The functionality being tested was removed because it was horribly unsafe.Owen Anderson2008-04-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49610 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch corrects the handling of byval arguments for tailcallArnold Schwaighofer2008-04-122-1/+34
| | | | | | | | | | | | | | | | | | | | | | | | optimized x86-64 (and x86) calls so that they work (... at least for my test cases). Should fix the following problems: Problem 1: When i introduced the optimized handling of arguments for tail called functions (using a sequence of copyto/copyfrom virtual registers instead of always lowering to top of the stack) i did not handle byval arguments correctly e.g they did not work at all :). Problem 2: On x86-64 after the arguments of the tail called function are moved to their registers (which include ESI/RSI etc), tail call optimization performs byval lowering which causes xSI,xDI, xCX registers to be overwritten. This is handled in this patch by moving the arguments to virtual registers first and after the byval lowering the arguments are moved from those virtual registers back to RSI/RDI/RCX. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49584 91177308-0d34-0410-b5e6-96231b3b80d8