summaryrefslogtreecommitdiffstats
path: root/llvm/test
Commit message (Collapse)AuthorAgeFilesLines
* Fix off-by-one error in traversing an array; this fixes a test.Misha Brukman2009-01-071-2/+0
| | | | | | The error was reported by gcc-4.3.0 during compilation. llvm-svn: 61896
* Remove alloca tracking from nocapture analysis. Not onlyDuncan Sands2009-01-071-18/+9
| | | | | | | | | | was it not very helpful, it was also wrong! The problem is shown in the testcase: the alloca might be passed to a nocapture callee which dereferences it and returns the original pointer. But because it was a nocapture call we think we don't need to track its uses, but we do. llvm-svn: 61876
* Implement the first half of PR3290: if there is a store of an Chris Lattner2009-01-071-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | integer to a (transitive) bitcast the alloca and if that integer has the full size of the alloca, then it clobbers the whole thing. Handle this by extracting pieces out of the stored integer and filing them away in the SROA'd elements. This triggers fairly frequently because the CFE uses integers to pass small structs by value and the inliner exposes these. For example, in kimwitu++, I see a bunch of these with i64 stores to "%struct.std::pair<std::_Rb_tree_const_iterator<kc::impl_abstract_phylum*>,bool>" In 176.gcc I see a few i32 stores to "%struct..0anon". In the testcase, this is a difference between compiling test1 to: _test1: subl $12, %esp movl 20(%esp), %eax movl %eax, 4(%esp) movl 16(%esp), %eax movl %eax, (%esp) movl (%esp), %eax addl 4(%esp), %eax addl $12, %esp ret vs: _test1: movl 8(%esp), %eax addl 4(%esp), %eax ret The second half of this will be to handle loads of the same form. llvm-svn: 61853
* The coalescer does not coalesce a virtual register to a physical register if ↵Evan Cheng2009-01-071-0/+24
| | | | | | | | | | | | | | any of the physical register's sub-register live intervals overlaps with the virtual register. This is overly conservative. It prevents a extract_subreg from being coalesced away: v1024 = EDI // not killed = = EDI One possible solution is for the coalescer to examine the sub-register live intervals in the same manner as the physical register. Another possibility is to examine defs and uses (when needed) of sub-registers. Both solutions are too expensive. For now, look for "short virtual intervals" and scan instructions to look for conflict instead. This is a small win on x86-64. e.g. It shaves 403.gcc by ~80 instructions. llvm-svn: 61847
* add a testcase.Chris Lattner2009-01-071-0/+56
| | | | llvm-svn: 61845
* Add patterns to match conditional moves with loads foldedDan Gohman2009-01-071-0/+10
| | | | | | | into their left operand, rather than their right. Do this by commuting the operands and inverting the condition. llvm-svn: 61842
* X86_COND_C and X86_COND_NC are alternate mnemonics forDan Gohman2009-01-072-3/+3
| | | | | | X86_COND_B and X86_COND_AE, respectively. llvm-svn: 61835
* Now that fold-pcmpeqd-0.ll is effectively testing that scheduling helpsDan Gohman2009-01-061-0/+83
| | | | | | | | avoid the need for spilling, add a new testcase that tests that the pcmpeqd used for V_SETALLONES is changed to a constant-pool load as needed. llvm-svn: 61831
* Revert r42653 and forward-port the code that lets INC64_32r beDan Gohman2009-01-061-0/+21
| | | | | | | | | | | | converted to LEA64_32r in x86's convertToThreeAddress. This replaces code like this: movl %esi, %edi inc %edi with this: lea 1(%rsi), %edi which appears to be beneficial. llvm-svn: 61830
* Fix a bug in ComputeLinearIndex computation handling multi-levelDan Gohman2009-01-061-0/+67
| | | | | | | | aggregate types. Don't increment the current index after reaching the end of a struct, as it will already be pointing at one-past-the end. This fixes PR3288. llvm-svn: 61828
* CellSPU:Scott Michel2009-01-063-102/+345
| | | | | | | | | | | | - Fix bugs 3194, 3195: i128 load/stores produce correct code (although, we need to ensure that i128 is 16-byte aligned in real life), and 128 zero- extends are supported. - New td file: SPU128InstrInfo.td: this is where all new i128 support should be put in the future. - Continue to hammer on i64 operations and test cases; ensure that the only remaining problem will be i64 mul. llvm-svn: 61784
* Delete this test; it's a duplicate of 2006-07-03-schedulers.ll.Dan Gohman2009-01-061-27/+0
| | | | llvm-svn: 61781
* Use a latency value of 0 for the artificial edges inserted byDan Gohman2009-01-061-1/+1
| | | | | | | | | | | | AddPseudoTwoAddrDeps. This lets the scheduling infrastructure avoid recalculating node heights. In very large testcases this was a major bottleneck. Thanks to Roman Levenstein for finding this! As a side effect, fold-pcmpeqd-0.ll is now scheduled better and it no longer requires spilling on x86-32. llvm-svn: 61778
* make m_ConstantInt(int64_t) safely match ConstantInt's that are larger than i64.Chris Lattner2009-01-051-0/+27
| | | | | | This fixes an instcombine crash on PR3235. llvm-svn: 61775
* Strength test.Bill Wendling2009-01-051-1/+3
| | | | llvm-svn: 61755
* Teach the internalize pass to also internalizeDuncan Sands2009-01-051-0/+10
| | | | | | global aliases. llvm-svn: 61754
* Find loop back edges only after empty blocks are eliminated.Evan Cheng2009-01-051-1/+1
| | | | llvm-svn: 61752
* testcase for bill's patch.Chris Lattner2009-01-051-0/+26
| | | | llvm-svn: 61751
* Delete unused global aliases with internal linkage.Duncan Sands2009-01-051-0/+8
| | | | | | | | In fact this also deletes those with linkonce linkage, however this is currently dead because for the moment aliases aren't allowed to have this linkage type. llvm-svn: 61742
* Don't spew bitcode to standard out if this testDuncan Sands2009-01-051-1/+1
| | | | | | fails, like it is right now. llvm-svn: 61690
* This test passes again, unXFAIL.Torok Edwin2009-01-051-1/+0
| | | | llvm-svn: 61688
* alignment of 0 is not valid.Chris Lattner2009-01-051-2/+2
| | | | llvm-svn: 61682
* CellSPU:Scott Michel2009-01-052-172/+307
| | | | | | | - Teach SPU64InstrInfo.td about the remaining signed comparisons, update tests accordingly. llvm-svn: 61672
* CellSPU:Scott Michel2009-01-051-0/+25
| | | | | | - Add an 8-bit operation test, which doesn't do much at this point. llvm-svn: 61665
* CellSPU:Scott Michel2009-01-052-59/+289
| | | | | | | | | | - Fix (brcond (setq ...)) bug, where BRNZ should have been used vice BRZ. - Kill unused/unnecessary nodes in SPUNodes.td - Beef out the i64operations.c test harness to use a lot of unaligned loads, test loops and LLVM loop/basic block optimizations; run the test harness successfully on real Cell hardware. llvm-svn: 61664
* Run a post-pass that marks known function declarations by name.Nick Lewycky2009-01-041-0/+12
| | | | llvm-svn: 61632
* XFAIL this test. The xform was removed.Bill Wendling2009-01-041-0/+1
| | | | llvm-svn: 61624
* Fix a DAGCombiner abort on an invalid shift count constant. This fixes PR3250.Dan Gohman2009-01-031-0/+17
| | | | llvm-svn: 61613
* CellSPU:Scott Michel2009-01-031-1/+1
| | | | | | | | | - Remove custom lowering for BRCOND - Add remaining functionality for branches in SPUInstrInfo, such as branch condition reversal and load/store folding. Updated BrCond test to reflect branch reversal. llvm-svn: 61597
* Don't try to analyze this "backward" case. This is overly conservative Nick Lewycky2009-01-021-0/+40
| | | | | | pending a correct solution. llvm-svn: 61589
* When calculating 'nocapture' argument attributes, allowDuncan Sands2009-01-021-0/+23
| | | | | | | | | | | | the argument to be stored to an alloca by tracking uses of the alloca. This occurs 4 times (out of 7121, 0.05%) in MultiSource/Applications, so may not be worth it. On the other hand, it is easy to do and fairly cheap. The functions it helps are: W_addcom and W_addlit in spiff; process_args (argv) in d (make_dparser); ercPixConcealIMB in JM/ldecod. llvm-svn: 61570
* Reimplement the old and horrible bison parser for .ll files with a niceChris Lattner2009-01-0222-34/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and clean recursive descent parser. This change has a couple of ramifications: 1. The parser code is about 400 lines shorter (in what we maintain, not including what is autogenerated). 2. The code should be significantly faster than the old code because we don't have to work around bison's poor handling of datatypes with ctors/dtors. This also makes the code much more resistant to memory leaks. 3. We now get caret diagnostics from the .ll parser, woo. 4. The actual diagnostics emited from the parser are completely different so a bunch of testcases had to be updated. 5. I now disallow "%ty = type opaque %ty = type i32". There was no good reason to support this, it was just an accident of the old implementation. I have no reason to think that anyone is actually using this. 6. The syntax for sticking a global variable has changed to make it unambiguous. I don't think anyone is depending on this since only clang supports this and it is not solid yet, so I'm not worried about anything breaking. 7. This gets rid of the last use of bison, and along with it the .cvs files. I'll prune this from the makefiles as a subsequent commit. There are a few minor cleanups that can be done after this commit (suggestions welcome!) but this passes dejagnu testing and is ready for its time in the limelight. llvm-svn: 61558
* Do not isel load folding bt instructions for pentium m, core, core2, and AMD ↵Evan Cheng2009-01-021-0/+2
| | | | | | processors. These are significantly slower than a load followed by a bt of a register. llvm-svn: 61557
* Use movaps / movd to extract vector element 0 even with sse4.1. It's still ↵Evan Cheng2009-01-027-15/+15
| | | | | | cheaper than pextrw especially if the value is in memory. llvm-svn: 61555
* Remove the cyclic part of this test, it was passing for the wrong Nick Lewycky2009-01-021-11/+1
| | | | | | | reason. Two functions which mutually require each other to be nocapture are not currently supported. llvm-svn: 61553
* Make adding nocapture a bit stronger. FreeInst is nocapture. Also, Nick Lewycky2009-01-021-1/+23
| | | | | | | | | | functions that don't write can't leak a pointer except through the return value, so a void readonly function is implicitly nocapture. Test these, and add a test that verifies that f1 calling f2 with an otherwise dead pointer gets both of them marked nocapture. llvm-svn: 61552
* rename a file to follow naming conventions.Chris Lattner2009-01-021-0/+0
| | | | llvm-svn: 61550
* Add tests for two types of traps that escape analysisDuncan Sands2009-01-021-0/+23
| | | | | | might one day fall into. llvm-svn: 61549
* * Quoted the executable 'runtest' to emphasize the binary needed;Misha Brukman2009-01-011-1/+1
| | | | | | | otherwise, some unlucky souls start looking for a 'dejagnu' binary... * Properly capitalized LLVM. llvm-svn: 61546
* Fix PR3274: when promoting the condition of a BRCOND node,Duncan Sands2009-01-011-0/+31
| | | | | | | | | | promote from i1 all the way up to the canonical SetCC type. In order to discover an appropriate type to use, pass MVT::Other to getSetCCResultType. In order to be able to do this, change getSetCCResultType to take a type as an argument, not a value (this is also more logical). llvm-svn: 61542
* Add transformation:Bill Wendling2009-01-011-0/+11
| | | | | | | | xor (or (icmp, icmp), true) -> and(icmp, icmp) This is possible because of De Morgan's law. llvm-svn: 61537
* Look through phi nodes and select instructions whenDuncan Sands2008-12-311-15/+22
| | | | | | calculating nocapture attributes. llvm-svn: 61535
* This is not failing on Darwin for some reason. XFAIL for other platforms.Bill Wendling2008-12-311-1/+1
| | | | llvm-svn: 61533
* Removed extra spaces.Misha Brukman2008-12-311-2/+2
| | | | llvm-svn: 61527
* Rename AddReadAttrs to FunctionAttrs, and teach it howDuncan Sands2008-12-318-6/+40
| | | | | | | | to work out (in a very simplistic way) which function arguments (pointer arguments only) are only dereferenced and so do not escape. Mark such arguments 'nocapture'. llvm-svn: 61525
* XFAIL test caused by r61493. Apparently, this is expected?Bill Wendling2008-12-311-0/+4
| | | | llvm-svn: 61516
* XFAIL this for now until I can figure out what's going on.Scott Michel2008-12-311-1/+3
| | | | llvm-svn: 61512
* Fix test erratum (which is wierd: works locally for me?)Scott Michel2008-12-301-1/+1
| | | | llvm-svn: 61511
* - Start moving target-dependent nodes that could be represented by anScott Michel2008-12-305-18/+126
| | | | | | | | | | | | | instruction sequence and cannot ordinarily be simplified by DAGcombine into the various target description files or SPUDAGToDAGISel.cpp. This makes some 64-bit operations legal. - Eliminate target-dependent ISD enums. - Update tests. llvm-svn: 61508
* Allow readnone functions to read (and write!) globalDuncan Sands2008-12-291-0/+8
| | | | | | | | | | | | | | | | constants, since doing so is irrelevant for aliasing purposes. While this doesn't increase the total number of functions marked readonly or readnone in MultiSource/ Applications (3089), it does result in 12 functions being marked readnone rather than readonly. Before: readnone: 820 readonly: 2269 After: readnone: 832 readonly: 2257 llvm-svn: 61469
OpenPOWER on IntegriCloud