summaryrefslogtreecommitdiffstats
path: root/llvm/test
Commit message (Collapse)AuthorAgeFilesLines
* Remove explicit uses of -emit-llvm, the test infrastructure adds itDuncan Sands2010-11-2588-121/+121
| | | | | | | | automatically. Use -S with llvm-gcc rather than -c, so tests can work when llvm-gcc is really dragonegg (which can output IR with -S but not -c). llvm-svn: 120158
* Dragonegg cannot output bitcode, only human readable IR, so use -S ratherDuncan Sands2010-11-2521-22/+22
| | | | | | than -c. llvm-svn: 120157
* Use LLVMCC_EMITIR_FLAG rather than hard-coding "-emit-llvm".Duncan Sands2010-11-253-5/+6
| | | | llvm-svn: 120156
* Use multiple 0x66 prefixes so that all nops up to 15 bytes are a single ↵Rafael Espindola2010-11-251-1/+1
| | | | | | instruction. llvm-svn: 120147
* Factor some code to parseSectionFlags and fix the default type of a section.Rafael Espindola2010-11-251-0/+13
| | | | llvm-svn: 120145
* Treat a call of function pointer like a load of the pointer when consideringNick Lewycky2010-11-241-0/+13
| | | | | | | whether the pointer can be replaced with the global variable it is a copy of. Fixes PR8680. llvm-svn: 120126
* Behave a bit more like gnu as and use the symbol (instead of the section)Rafael Espindola2010-11-241-1/+64
| | | | | | for any relocation to a symbol defined in a tls section. llvm-svn: 120121
* Relocate with the symbol if the relocation is of kind NTPOFF.Rafael Espindola2010-11-241-13/+34
| | | | | | Patch by David Meyer, I added the test. llvm-svn: 120104
* Fix and add tests for all cases in x86 and x86_64 where gnu as implicitlyRafael Espindola2010-11-242-11/+96
| | | | | | sets the type of a symbol to STT_TLS. llvm-svn: 120100
* Testcase for r120017.Rafael Espindola2010-11-241-0/+1
| | | | llvm-svn: 120099
* Allow for 'fcmp ogt' in SPU.Kalle Raiskila2010-11-241-6/+19
| | | | | | Fix by Visa Putkinen! llvm-svn: 120090
* If a symbol is used as tls, mark it as tls even if not declare as so. ProbablyRafael Espindola2010-11-241-2/+14
| | | | | | fixes PR8659. llvm-svn: 120076
* The srem -> urem transform is not safe for any divisor that's not a power of ↵Benjamin Kramer2010-11-231-3/+3
| | | | | | | | | | two. E.g. -5 % 5 is 0 with srem and 1 with urem. Also addresses Frits van Bommel's comments. llvm-svn: 120049
* Recognize sign/zero-extended constant BUILD_VECTORs for VMULL operations.Bob Wilson2010-11-231-0/+72
| | | | | | | We need to check if the individual vector elements are sign/zero-extended values. For now this only handles constants values. Radar 8687140. llvm-svn: 120034
* InstCombine: Reduce "X shift (A srem B)" to "X shift (A urem B)" iff B is ↵Benjamin Kramer2010-11-231-0/+11
| | | | | | | | positive. This allows to transform the rem in "1 << ((int)x % 8);" to an and. llvm-svn: 120028
* Exploit distributive laws (eg: And distributes over Or, Mul over Add, etc) in aDuncan Sands2010-11-231-0/+11
| | | | | | | | | | | | fairly systematic way in instcombine. Some of these cases were already dealt with, in which case I removed the existing code. The case of Add has a bunch of funky logic which covers some of this plus a few variants (considers shifts to be a form of multiplication), which I didn't touch. The simplification performed is: A*B+A*C -> A*(B+C). The improvement is to do this in cases that were not already handled [such as A*B-A*C -> A*(B-C), which was reported on the mailing list], and also to do it more often by not checking for "only one use" if "B+C" simplifies. llvm-svn: 120024
* Division by pow-of-2 is not cheap on SPU, do it with Kalle Raiskila2010-11-231-0/+22
| | | | | | shifts. llvm-svn: 120022
* Produce a relocation for pcrel absolute values. Based on a patch by David Meyer.Rafael Espindola2010-11-231-0/+16
| | | | llvm-svn: 120006
* duncan's spider sense was right, I completely reversed the conditionChris Lattner2010-11-231-4/+4
| | | | | | on this instcombine xform. This fixes a miscompilation of 403.gcc. llvm-svn: 119988
* filecheckizeChris Lattner2010-11-232-17/+22
| | | | llvm-svn: 119987
* InstCombine: Implement X - A*-B -> X + A*B.Benjamin Kramer2010-11-221-0/+20
| | | | llvm-svn: 119984
* Fix epilogue codegen to avoid leaving the stack pointer in an invalidEvan Cheng2010-11-226-14/+74
| | | | | | | | | | | | | | | | | state. Previously Thumb2 would restore sp from fp like this: mov sp, r7 sub, sp, #4 If an interrupt is taken after the 'mov' but before the 'sub', callee-saved registers might be clobbered by the interrupt handler. Instead, try restoring directly from sp: add sp, #4 Or, if necessary (with VLA, etc.) use a scratch register to compute sp and then restore it: sub.w r4, r7, #8 mov sp, r7 rdar://8465407 llvm-svn: 119977
* If a GEP index simply advances by multiples of a type of zero size,Duncan Sands2010-11-221-1/+10
| | | | | | then replace the index with zero. llvm-svn: 119974
* Fix a bug with extractelement on SPU.Kalle Raiskila2010-11-221-1/+13
| | | | | | | In the attached testcase, the element was never extracted (missing rotate). llvm-svn: 119973
* Implement the "if (X == 6 || X == 4)" -> "if ((X|2) == 6)" optimization.Benjamin Kramer2010-11-221-0/+22
| | | | | | | This currently only catches the most basic case, a two-case switch, but can be extended later. llvm-svn: 119964
* Implement branch analysis in the MBlaze backend.Wesley Peck2010-11-211-1/+1
| | | | llvm-svn: 119951
* Add a rather pointless InstructionSimplify transform, inspired by recent ↵Duncan Sands2010-11-211-0/+8
| | | | | | | | | | constant folding improvements: if P points to a type of size zero, turn "gep P, N" into "P". More generally, if a gep index type has size zero, instcombine could replace the index with zero, but that is not done here. llvm-svn: 119942
* Add encoding for ARM "trap" instruction.Bill Wendling2010-11-213-1/+8
| | | | llvm-svn: 119938
* implement PR8524, apparently mainline gas accepts movq as an alias for movdChris Lattner2010-11-211-0/+7
| | | | | | when transfering between i64 gprs and mmx regs. llvm-svn: 119931
* implement PR8576, deleting dead stores with intervening may-alias stores.Chris Lattner2010-11-211-0/+9
| | | | llvm-svn: 119927
* file checkizeChris Lattner2010-11-211-3/+6
| | | | llvm-svn: 119926
* optimize:Chris Lattner2010-11-211-0/+38
| | | | | | | | | void a(int x) { if (((1<<x)&8)==0) b(); } into "x != 3", which occurs over 100 times in 403.gcc but in no other program in llvm-test. llvm-svn: 119922
* Handle PCRel relocations with absolute values. Fixes PR8656.Rafael Espindola2010-11-211-0/+7
| | | | llvm-svn: 119917
* Implement PR8644: forwarding a memcpy value to a byval,Chris Lattner2010-11-212-2/+17
| | | | | | | | | | | | allowing the memcpy to be eliminated. Unfortunately, the requirements on byval's without explicit alignment are really weak and impossible to predict in the mid-level optimizer, so this doesn't kick in much with current frontends. The fix is to change clang to set alignment on all byval arguments. llvm-svn: 119916
* Removing the useless test that I added recently. It was meant as an example, ↵Andrew Trick2010-11-201-32/+0
| | | | | | but not complicated enough to merit another test. llvm-svn: 119898
* Add a test for CodeGenPrepare's ability to look through PHI nodes when ↵Owen Anderson2010-11-191-0/+23
| | | | | | | | performing addressing mode folding, introduced in r119853. llvm-svn: 119857
* Prefetch has a MemOperand now. FileCheckize a test.Dale Johannesen2010-11-191-5/+5
| | | | | | This finishes up 8460971. llvm-svn: 119848
* Make isScalarToVector to return false if the node is a scalar. This will preventMon P Wang2010-11-191-0/+27
| | | | | | | DAGCombine from making an illegal transformation of bitcast of a scalar to a vector into a scalar_to_vector. llvm-svn: 119819
* Added support for the Mach-O .symbol_resolver directive. rdar://8673046Kevin Enderby2010-11-191-23/+34
| | | | llvm-svn: 119816
* Add MC encodings for some Thumb instructions. Test for a few of them. The "bxBill Wendling2010-11-191-0/+8
| | | | | | | lr" instruction cannot be tested just yet. It requires matching a "condition code", but adding one of those makes things go south quickly... llvm-svn: 119774
* Add support for parsing the writeback ("!") token.Bill Wendling2010-11-181-0/+18
| | | | llvm-svn: 119761
* More tests.Owen Anderson2010-11-181-0/+1
| | | | llvm-svn: 119756
* Fix encodings for pkhbt, and fix some tests where I accidentally tested ARM ↵Owen Anderson2010-11-181-14/+20
| | | | | | mode instead of Thumb2. llvm-svn: 119755
* Fix bug in DAGCombiner for ARM that was trying to do a ShiftCombine on ↵Tanya Lattner2010-11-181-0/+8
| | | | | | | | illegal types (vector should be split first). Added test case. llvm-svn: 119749
* More Thumb2 encodings.Owen Anderson2010-11-181-0/+24
| | | | llvm-svn: 119737
* Fill out the set of Thumb2 multiplication operator encodings.Owen Anderson2010-11-181-0/+3
| | | | llvm-svn: 119733
* The DAGCombiner was threading select over pairs of extending loads evenDuncan Sands2010-11-181-0/+15
| | | | | | | | | | if the extension types were not the same. The result was that if you fed a select with sext and zext loads, as in the testcase, then it would get turned into a zext (or sext) of the select, which is wrong in the cases when it should have been an sext (resp. zext). Reported and diagnosed by Sebastien Deldon. llvm-svn: 119728
* Factor code for testing whether replacing one value with anotherDuncan Sands2010-11-181-0/+28
| | | | | | | | preserves LCSSA form out of ScalarEvolution and into the LoopInfo class. Use it to check that SimplifyInstruction simplifications are not breaking LCSSA form. Fixes PR8622. llvm-svn: 119727
* Rewrite stack callee saved spills and restores to use push/pop instructions.Eric Christopher2010-11-183-4/+4
| | | | | | | | | Remove movePastCSLoadStoreOps and associated code for simple pointer increments. Update routines that depended upon other opcodes for save/restore. Adjust all testcases accordingly. llvm-svn: 119725
* Completely rework the datastructure GVN uses to represent the value number ↵Owen Anderson2010-11-181-52/+0
| | | | | | | | | | | | | | | | | | | | | | | to leader mapping. Previously, this was a tree of hashtables, and a query recursed into the table for the immediate dominator ad infinitum if the initial lookup failed. This led to really bad performance on tall, narrow CFGs. We can instead replace it with what is conceptually a multimap of value numbers to leaders (actually represented by a hashtable with a list of Value*'s as the value type), and then determine which leader from that set to use very cheaply thanks to the DFS numberings maintained by DominatorTree. Because there are typically few duplicates of a given value, this scan tends to be quite fast. Additionally, we use a custom linked list and BumpPtr allocation to avoid any unnecessary allocation in representing the value-side of the multimap. This change brings with it a 15% (!) improvement in the total running time of GVN on 403.gcc, which I think is pretty good considering that includes all the "real work" being done by MemDep as well. The one downside to this approach is that we can no longer use GVN to perform simple conditional progation, but that seems like an acceptable loss since we now have LVI and CorrelatedValuePropagation to pick up the slack. If you see conditional propagation that's not happening, please file bugs against LVI or CVP. llvm-svn: 119714
OpenPOWER on IntegriCloud