aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Fix PR3124: overly strict assert.Evan Cheng2008-12-021-0/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60392 91177308-0d34-0410-b5e6-96231b3b80d8
* Second stab at target-dependent lowering of everyone's favorite nodes: [SU]ADDOBill Wendling2008-12-021-1/+0
| | | | | | | | | | | | - LowerXADDO lowers [SU]ADDO into an ADD with an implicit EFLAGS define. The EFLAGS are fed into a SETCC node which has the conditional COND_O or COND_C, depending on the type of ADDO requested. - LowerBRCOND now recognizes if it's coming from a SETCC node with COND_O or COND_C set. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60388 91177308-0d34-0410-b5e6-96231b3b80d8
* Add rdar reference, make this actually fail when the patch isn't applied.Chris Lattner2008-12-011-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60376 91177308-0d34-0410-b5e6-96231b3b80d8
* Consider only references to an IV within the loop whenDale Johannesen2008-12-011-0/+28
| | | | | | | | | | | figuring out the base of the IV. This produces better code in the example. (Addresses use (IV) instead of (BASE,IV) - a significant improvement on low-register machines like x86). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60374 91177308-0d34-0410-b5e6-96231b3b80d8
* CellSPU:Scott Michel2008-12-011-7/+74
| | | | | | | | | | - Fix v2[if]64 vector insertion code before IBM files a bug report. - Ensure that zero (0) offsets relative to $sp don't trip an assert (add $sp, 0 gets legalized to $sp alone, tripping an assert) - Shuffle masks passed to SPUISD::SHUFB are now v16i8 or v4i32 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60358 91177308-0d34-0410-b5e6-96231b3b80d8
* Use m_Specific() instead of double matching.Bill Wendling2008-12-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60341 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify these patterns using m_Specific. No need to grep for Chris Lattner2008-12-011-3/+1
| | | | | | | xor in testcase (or is a substring). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60328 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach inst combine to merge GEPs through PHIs. This is reallyChris Lattner2008-12-011-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | important because it is sinking the loads using the GEPs, but not the GEPs themselves. This triggers 647 times on 403.gcc and makes the .s file much much nicer. For example before: je LBB1_87 ## bb78 LBB1_62: ## bb77 leal 84(%esi), %eax LBB1_63: ## bb79 movl (%eax), %eax ... LBB1_87: ## bb78 movl $0, 4(%esp) movl %esi, (%esp) call L_make_decl_rtl$stub jmp LBB1_62 ## bb77 after: jne LBB1_63 ## bb79 LBB1_62: ## bb78 movl $0, 4(%esp) movl %esi, (%esp) call L_make_decl_rtl$stub LBB1_63: ## bb79 movl 84(%esi), %eax The input code was (and the GEPs are merged and the PHI is now eliminated by instcombine): br i1 %tmp233, label %bb78, label %bb77 bb77: %tmp234 = getelementptr %struct.tree_node* %t_addr.3, i32 0, i32 0, i32 22 br label %bb79 bb78: call void @make_decl_rtl(%struct.tree_node* %t_addr.3, i8* null) nounwind %tmp235 = getelementptr %struct.tree_node* %t_addr.3, i32 0, i32 0, i32 22 br label %bb79 bb79: %iftmp.12.0.in = phi %struct.rtx_def** [ %tmp235, %bb78 ], [ %tmp234, %bb77 ] %iftmp.12.0 = load %struct.rtx_def** %iftmp.12.0.in git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60322 91177308-0d34-0410-b5e6-96231b3b80d8
* testcase for my previous commit.Chris Lattner2008-12-011-0/+42
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60315 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement ((A|B)&1)|(B&-2) -> (A&1) | B transformation. This also takes care ofBill Wendling2008-12-011-0/+39
| | | | | | | permutations of this pattern. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60312 91177308-0d34-0410-b5e6-96231b3b80d8
* Add instruction combining for ((A&~B)|(~A&B)) -> A^B and all permutations.Bill Wendling2008-11-301-0/+42
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60291 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement (A&((~A)|B)) -> A&B transformation in the instruction combiner. ThisBill Wendling2008-11-301-0/+36
| | | | | | | takes care of all permutations of this pattern. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60290 91177308-0d34-0410-b5e6-96231b3b80d8
* getSExtValue() doesn't work for ConstantInts with bitwidth > 64 bits. Use allBill Wendling2008-11-301-0/+28
| | | | | | | | | APInt calls instead. This fixes PR3144. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60288 91177308-0d34-0410-b5e6-96231b3b80d8
* Optimize memmove and memset into the LLVM builtins. Note that these Eli Friedman2008-11-302-0/+24
| | | | | | | | only show up in code from front-ends besides llvm-gcc, like clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60287 91177308-0d34-0410-b5e6-96231b3b80d8
* Followup to r60283: optimize arbitrary width signed divisions as well Eli Friedman2008-11-301-0/+10
| | | | | | | | as unsigned divisions. Same caveats as before. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60284 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for PR2164: allow transforming arbitrary-width unsigned divides intoEli Friedman2008-11-302-1/+11
| | | | | | | | | | | | | multiplies. Some more cleverness would be nice, though. It would be nice if we could do this transformation on illegal types. Also, we would prefer a narrower constant when possible so that we can use a narrower multiply, which can be cheaper. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60283 91177308-0d34-0410-b5e6-96231b3b80d8
* APIntify a test which is potentially unsafe otherwise, and fix the Eli Friedman2008-11-302-1/+23
| | | | | | | | | | | nearby FIXME. I'm not sure what the right way to fix the Cell test was; if the approach I used isn't okay, please let me know. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60277 91177308-0d34-0410-b5e6-96231b3b80d8
* Strengthen check for div inst-combining.Bill Wendling2008-11-301-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60276 91177308-0d34-0410-b5e6-96231b3b80d8
* Instcombine was illegally transforming -X/C into X/-C when either X or CBill Wendling2008-11-303-6/+32
| | | | | | | | | overflowed on negation. This commit checks to make sure that neithe C nor X overflows. This requires that the RHS of X (a subtract instruction) be a constant integer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60275 91177308-0d34-0410-b5e6-96231b3b80d8
* don't require GVN to work on dead values, just make the Chris Lattner2008-11-291-5/+4
| | | | | | | test return the loaded value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60252 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a thinko that manifested as a crash on clamav last night.Chris Lattner2008-11-291-0/+27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60251 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR3141 by ensuring that MemoryDependenceAnalysis::removeInstructionChris Lattner2008-11-281-0/+16
| | | | | | | | | properly updates the reverse dependency map when it installs updated dependencies for instructions that depend on the removed instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60222 91177308-0d34-0410-b5e6-96231b3b80d8
* don't call MergeBasicBlockIntoOnlyPred on a block whose onlyChris Lattner2008-11-281-0/+17
| | | | | | | | | predecessor is itself. This doesn't make sense, and this is a dead infinite loop anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60210 91177308-0d34-0410-b5e6-96231b3b80d8
* Chris prefers icmp/select over udiv!Nick Lewycky2008-11-272-7/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60187 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a couple of missed optimizations on integer vectors. Multiply and divideNick Lewycky2008-11-272-0/+22
| | | | | | | by 1, as well as multiply by -1. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60182 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR3138: if we merge the entry block into another block, make sure toChris Lattner2008-11-271-0/+13
| | | | | | | | move the other block back up into the entry position! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60179 91177308-0d34-0410-b5e6-96231b3b80d8
* XFAil test due to reverting of patch.Bill Wendling2008-11-271-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60161 91177308-0d34-0410-b5e6-96231b3b80d8
* Make jump threading substantially more powerful, in the following ways:Chris Lattner2008-11-271-0/+34
| | | | | | | | | | | | | | | | | | | 1. Make it fold blocks separated by an unconditional branch. This enables jump threading to see a broader scope. 2. Make jump threading able to eliminate locally redundant loads when they feed the branch condition of a block. This frequently occurs due to reg2mem running. 3. Make jump threading able to eliminate *partially redundant* loads when they feed the branch condition of a block. This is common in code with lots of loads and stores like C++ code and 255.vortex. This implements thread-loads.ll and rdar://6402033. Per the fixme's, several pieces of this should be moved into Transforms/Utils. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60148 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid inserting noop's in the middle of a loop.Evan Cheng2008-11-271-0/+32
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60141 91177308-0d34-0410-b5e6-96231b3b80d8
* On x86 favors folding short immediate into some arithmetic operations (e.g. ↵Evan Cheng2008-11-272-1/+15
| | | | | | | | | | | | | | | | add, and, xor, etc.) because materializing an immediate in a register is expensive in turns of code size. e.g. movl 4(%esp), %eax addl $4, %eax is 2 bytes shorter than movl $4, %eax addl 4(%esp), %eax git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60139 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -march=x86.Evan Cheng2008-11-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60135 91177308-0d34-0410-b5e6-96231b3b80d8
* Add x86-specific test for add-with-overflow intrinsics.Bill Wendling2008-11-261-0/+41
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60125 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn on my codegen prepare heuristic by default. It doesn't affect Chris Lattner2008-11-261-2/+2
| | | | | | | | | | | performance in most cases on the Grawp tester, but does speed some things up (like shootout/hash by 15%). This also doesn't impact compile time in a noticable way on the Grawp tester. It also, of course, gets the testcase it was designed for right :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60120 91177308-0d34-0410-b5e6-96231b3b80d8
* Check that running the DAG combiner between typeDuncan Sands2008-11-261-0/+1
| | | | | | | and operation legalization does something useful. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60108 91177308-0d34-0410-b5e6-96231b3b80d8
* Add test for rdar://6394879.Bill Wendling2008-11-261-0/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60079 91177308-0d34-0410-b5e6-96231b3b80d8
* This adds in some code (currently disabled unless you pass Chris Lattner2008-11-261-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | -enable-smarter-addr-folding to llc) that gives CGP a better cost model for when to sink computations into addressing modes. The basic observation is that sinking increases register pressure when part of the addr computation has to be available for other reasons, such as having a use that is a non-memory operation. In cases where it works, it can substantially reduce register pressure. This code is currently an overall win on 403.gcc and 255.vortex (the two things I've been looking at), but there are several things I want to do before enabling it by default: 1. This isn't doing any caching of results, so it is much slower than it could be. It currently slows down release-asserts llc by 1.7% on 176.gcc: 27.12s -> 27.60s. 2. This doesn't think about inline asm memory operands yet. 3. The cost model botches the case when the needed value is live across the computation for other reasons. I'll continue poking at this, and eventually turn it on as llcbeta. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60074 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach CodeGenPrepare to look through Bitcast instructions when attempting toChris Lattner2008-11-262-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | optimize addressing modes. This allows us to optimize things like isel-sink2.ll into: movl 4(%esp), %eax cmpb $0, 4(%eax) jne LBB1_2 ## F LBB1_1: ## TB movl $4, %eax ret LBB1_2: ## F movzbl 7(%eax), %eax ret instead of: _test: movl 4(%esp), %eax cmpb $0, 4(%eax) leal 4(%eax), %eax jne LBB1_2 ## F LBB1_1: ## TB movl $4, %eax ret LBB1_2: ## F movzbl 3(%eax), %eax ret This shrinks (e.g.) 403.gcc from 1133510 to 1128345 lines of .s. Note that the 2008-10-16-SpillerBug.ll testcase is dubious at best, I doubt it is really testing what it thinks it is. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60068 91177308-0d34-0410-b5e6-96231b3b80d8
* fix an over-reduced test.Chris Lattner2008-11-261-7/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60067 91177308-0d34-0410-b5e6-96231b3b80d8
* this doesn't need EHChris Lattner2008-11-261-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60066 91177308-0d34-0410-b5e6-96231b3b80d8
* Since the old llvmc was removed, rename llvmc2 to llvmc.Mikhail Glushenkov2008-11-2511-11/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60048 91177308-0d34-0410-b5e6-96231b3b80d8
* convertToSignExtendedInteger should return opInvalidOp instead of asserting ↵Evan Cheng2008-11-251-0/+11
| | | | | | if sematics of float does not allow arithmetics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60042 91177308-0d34-0410-b5e6-96231b3b80d8
* CellSPU:Scott Michel2008-11-251-4/+73
| | | | | | | | | | (a) Remove conditionally removed code in SelectXAddr. Basically, hope for the best that the A-form and D-form address predicates catch everything before the code decides to emit a X-form address. (b) Expand vector store test cases to include the usual suspects. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60034 91177308-0d34-0410-b5e6-96231b3b80d8
* CellSPU: test should use shlqby, not shlqbyiScott Michel2008-11-251-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60001 91177308-0d34-0410-b5e6-96231b3b80d8
* XFAIL this test. A recent CellSPU check-in broke it.Bill Wendling2008-11-251-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60000 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial support for anti-dependence breaking. Currently this code does notDan Gohman2008-11-251-0/+33
| | | | | | | | | | introduce any new spilling; it just uses unused registers. Refactor the SUnit topological sort code out of the RRList scheduler and make use of it to help with the post-pass scheduler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59999 91177308-0d34-0410-b5e6-96231b3b80d8
* Testcase for constant CFStrings.Bill Wendling2008-11-241-0/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59992 91177308-0d34-0410-b5e6-96231b3b80d8
* reenable testChris Lattner2008-11-241-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59986 91177308-0d34-0410-b5e6-96231b3b80d8
* Temporarily XFAIL this test. r59976 and r59972 broke it.Bill Wendling2008-11-241-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59981 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix 3113: If we have a dead cyclic PHI, replace the whole thingChris Lattner2008-11-242-0/+514
| | | | | | | with an undef. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59972 91177308-0d34-0410-b5e6-96231b3b80d8
* CellSPU:Scott Michel2008-11-241-0/+27
| | | | | | | | | | (a) Slight rethink on i64 zero/sign/any extend code - use a shuffle to directly zero-extend i32 to i64, but use rotates and shifts for sign extension. Also ensure unified register consistency. (b) Add new test harness for i64 operations: i64ops.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59970 91177308-0d34-0410-b5e6-96231b3b80d8