summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [lit] Rewrite TODO list, and elaborate on some things.Daniel Dunbar2013-08-161-12/+129
| | | | | | | - If anyone is interested in lit's feature set, I'd appreciate any comments on the elaborated items. llvm-svn: 188590
* [typo] An LLVM.Daniel Dunbar2013-08-169-19/+19
| | | | llvm-svn: 188589
* Fix a subtle difference between running clang vs llc for mips16.Reed Kotler2013-08-162-0/+30
| | | | | | | | | | | | | | | | This regards how mips16 is viewed. It's not really a target type but there has always been a target for it in the td files. It's more properly -mcpu=mips32 -mattr=+mips16 . This is how clang treats it but we have always had the -mcpu=mips16 which I probably should delete now but it will require updating all the .ll test cases for mips16. In this case it changed how we decide if we have a count bits instruction and whether instruction lowering should then expand ctlz. Now that we have dual mode compilation, -mattr=+mips16 really just indicates the inital processor mode that we are compiling for. (It is also possible to have -mcpu=64 -mattr=+mips16 but as far as I know, nobody has even built such a processor, though there is an architecture manual for this). llvm-svn: 188586
* Actually, use GNU inline asm for cpuid with clangReid Kleckner2013-08-161-10/+10
| | | | | | | Clang doesn't support the MSVC __cpuid intrinsic yet, and fixing that is blocked on some fairly complicated issues. llvm-svn: 188584
* I'm told that != is not ==Chris Lattner2013-08-161-1/+1
| | | | llvm-svn: 188583
* allow != to compare PointerUnion, we already support ==.Chris Lattner2013-08-161-2/+9
| | | | llvm-svn: 188582
* Add difference_type to ImmutableMap/Set iterators so they have a complete ↵Benjamin Kramer2013-08-162-0/+2
| | | | | | set of typedefs. llvm-svn: 188579
* DebugInfo: Allow the addition of other (such as static data) members to a ↵David Blaikie2013-08-165-13/+13
| | | | | | | | record type after construction Plus a type cleanup & minor fix to enumerate members of declarations. llvm-svn: 188577
* [PowerPC] Preparatory refactoring for making prologue and epilogueBill Schmidt2013-08-161-85/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | safe on PPC32 SVR4 ABI [Patch and following text by Mark Minich; committing on his behalf.] There are FIXME's in PowerPC/PPCFrameLowering.cpp, method PPCFrameLowering::emitPrologue() related to "negative offsets of R1" on PPC32 SVR4. They're true, but the real issue is that on PPC32 SVR4 (and any ABI without a Red Zone), no spills may be made until after the stackframe is claimed, which also includes the LR spill which is at a positive offset. The same problem exists in emitEpilogue(), though there's no FIXME for it. I intend to fix this issue, making LLVM-compiled code finally safe for use on SVR4/EABI/e500 32-bit platforms (including in particular, OS-free embedded systems & kernel code, where interrupts may share the same stack as user code). In preparation for making these changes, to make the diffs for the functional changes less cluttered, I am providing the non-functional refactorings in two stages: Stage 1 does some minor fluffy refactorings to pull multiple method calls up into a single bool, creating named bools for repeated uses of obscure logic, moving some code up earlier because either stage 2 or my final version will require it earlier, and rewording/adding some comments. My stage 1 changes can be characterized as primarily fluffy cleanup, the purpose of which may be unclear until the stage 2 or final changes are made. My stage 2 refactorings combine the separate PPC32 & PPC64 logic, which is currently performed by largely duplicate code, into a single flow, with the differences handled by a group of constants initialized early in the methods. This submission is for my stage 1 changes. There should be no functional changes whatsoever; this is a pure refactoring. llvm-svn: 188573
* Fixed RuntimeDyldELF absolute relocations.Richard Mitton2013-08-161-1/+11
| | | | | | | | | If an ELF relocation is pointed at an absolute address, it will have a symbol ID of zero. RuntimeDyldELF::processRelocationRef was not previously handling this case, and was instead trying to handle it as a section-relative fixup. I think this is the right fix here, but my elf-fu is poor on some of the more exotic platforms, so I'd appreciate it if anyone with greater knowledge could verify this. llvm-svn: 188572
* Test commit.Richard Mitton2013-08-161-1/+1
| | | | llvm-svn: 188568
* [tests] Another attempt to workaround broken misched-copy.s test on some ↵Daniel Dunbar2013-08-162-1/+9
| | | | | | buildbots. llvm-svn: 188567
* Switching to using a helper function instead of manually converting the ↵Aaron Ballman2013-08-161-24/+1
| | | | | | string to UTF-8. llvm-svn: 188566
* Removing unused functionality.Aaron Ballman2013-08-163-28/+0
| | | | llvm-svn: 188565
* FileCheck: Fix stray quote in CHECK-LABEL error message.Stephen Lin2013-08-161-1/+1
| | | | llvm-svn: 188564
* InstCombine: Use isAllOnesValue() instead of explicit -1.Jim Grosbach2013-08-161-1/+1
| | | | llvm-svn: 188563
* R600/SI: Add pattern for xor of i1Michel Danzer2013-08-162-1/+20
| | | | | | | Fixes two recent piglit regressions with radeonsi. Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 188559
* R600/SI: Fix broken encoding of DS_WRITE_B32Michel Danzer2013-08-166-11/+25
| | | | | | | | | | | | | | The logic in SIInsertWaits::getHwCounts() only really made sense for SMRD instructions, and trying to shoehorn it into handling DS_WRITE_B32 caused it to corrupt the encoding of that by clobbering the first operand with the second one. Undo that damage and only apply the SMRD logic to that. Fixes some derivates related piglit regressions with radeonsi. Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 188558
* Reverted test commit (r188556)Daniel Sanders2013-08-161-1/+0
| | | | llvm-svn: 188557
* Test commit. Just a blank lineDaniel Sanders2013-08-161-0/+1
| | | | llvm-svn: 188556
* R600: Allocate memoperand in the MachienFunction so it doesn't leak.Benjamin Kramer2013-08-161-3/+4
| | | | llvm-svn: 188555
* Updating function comments; no functional changes intended.Aaron Ballman2013-08-161-5/+12
| | | | llvm-svn: 188554
* When initializing the PIC global base register on ARM/ELF add pc to fix the ↵Benjamin Kramer2013-08-162-0/+8
| | | | | | | | | | address. This unbreaks PIC with fast isel on ELF targets (PR16717). The output matches what GCC and SDag do for PIC but may not cover all of the many flavors of PIC that exist. llvm-svn: 188551
* Add support for Thumb2 literal loads with negative zero offsetMihai Popa2013-08-163-4/+16
| | | | | | | | Thumb2 literal loads use an offset encoding which allows for negative zero. This fixes parsing and encoding so that #-0 is correctly processed. The parser represents #-0 as INT32_MIN. llvm-svn: 188549
* Fix Thumb2 aliasing complementary instructions taking modified immediatesMihai Popa2013-08-163-6/+14
| | | | | | | | | | | | | | | | | | | | | There are many Thumb instructions which take 12-bit immediates encoded in a special 8-byte value + 4-byte rotator form. Not all numbers are represented, and it's legal to transform an assembly instruction to be able to encode the immediate. For example: AND and BIC are complementary instructions; one can switch the AND to a BIC as long as the immediate is complemented. The intent is to switch one instruction into its complementary one when the immediate cannot be encoded in the form requested in the original assembly and when the complementary immediate is encodable. The patch addresses two issues: 1. definition of t2SOImmNot immediate - it has to check that the orignal value is not encoded naturally 2. t2AND and t2BIC instruction aliases which should use the Thumb2 SOImm operand rather than the ARM one. llvm-svn: 188548
* [SystemZ] Use SRST to implement strlen and strnlenRichard Sandiford2013-08-1614-1/+236
| | | | | | It would also make sense to use it for memchr; I'm working on that now. llvm-svn: 188547
* [SystemZ] Use MVST to implement strcpy and stpcpyRichard Sandiford2013-08-1613-1/+157
| | | | llvm-svn: 188546
* [SystemZ] Use CLST to implement strcmpRichard Sandiford2013-08-1615-11/+347
| | | | llvm-svn: 188544
* [SystemZ] Fix handling of 64-bit memcmp resultsRichard Sandiford2013-08-165-20/+174
| | | | | | | | | | | | | Generalize r188163 to cope with return types other than MVT::i32, just as the existing visitMemCmpCall code did. I've split this out into a subroutine so that it can be used for other upcoming patches. I also noticed that I'd used the wrong API to record the out chain. It's a load that uses DAG.getRoot() rather than getRoot(), so the out chain should go on PendingLoads. I don't have a testcase for that because we don't do any interesting scheduling on z yet. llvm-svn: 188540
* [SystemZ] Fix sign of integer memcmp resultRichard Sandiford2013-08-163-44/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r188163 used CLC to implement memcmp. Code that compares the result directly against zero can test the CC value produced by CLC, but code that needs an integer result must use IPM. The sequence I'd used was: ipm <reg> sll <reg>, 2 sra <reg>, 30 but I'd forgotten that this inverts the order, so that CC==1 ("less") becomes an integer greater than zero, and CC==2 ("greater") becomes an integer less than zero. This sequence should only be used if the CLC arguments are reversed to compensate. The problem then is that the branch condition must also be reversed when testing the CLC result directly. Rather than do that, I went for a different sequence that works with the natural CLC order: ipm <reg> srl <reg>, 28 rll <reg>, <reg>, 31 One advantage of this is that it doesn't clobber CC. A disadvantage is that any sign extension to 64 bits must be done separately, rather than being folded into the shifts. llvm-svn: 188538
* This patch implements wait instruction for mips. Examples are added in test ↵Vladimir Medic2013-08-162-0/+15
| | | | | | files. llvm-svn: 188537
* Don't use v16i32 for load pattern matching. All 512-bit loads are cated to ↵Craig Topper2013-08-163-12/+53
| | | | | | v8i64. llvm-svn: 188534
* Re-disabling C4291 warnings for MSVC because AttributeList.h requires it. ↵Aaron Ballman2013-08-161-0/+1
| | | | | | This was accidentally removed in r187279. llvm-svn: 188530
* Add missing test for GEP + bitcast transformationMatt Arsenault2013-08-161-0/+24
| | | | llvm-svn: 188529
* Calling the base class constructor from the derived class' initializer list. ↵Aaron Ballman2013-08-161-2/+2
| | | | | | This matches DenseMap's behavior, and silences some warnings. llvm-svn: 188528
* [tests] Add a hack to eliminate some dangling .s files on buildbots.Daniel Dunbar2013-08-161-0/+8
| | | | | | | | - Benjamin fixed the emission of this file in r179937, but it still lives on a few buildbots. We should probably clean up the build dirs once in a while, eh? llvm-svn: 188527
* [tests] Remove an out-dated failing test.Daniel Dunbar2013-08-162-41/+0
| | | | llvm-svn: 188526
* Removing a spurious semi-colon; this macro expands into a namespace.Aaron Ballman2013-08-161-1/+1
| | | | llvm-svn: 188525
* Fixing a warning about control reaching the end of a non-void function.Aaron Ballman2013-08-161-0/+1
| | | | llvm-svn: 188524
* Revert "R600/SI: Fix incorrect encoding of DS_WRITE_B32 instructions"Tom Stellard2013-08-164-10/+12
| | | | | | | This reverts commit a6a39ced095c2f453624ce62c4aead25db41a18f. This is the wrong version of this fix. llvm-svn: 188523
* R600/SI: Fix incorrect encoding of DS_WRITE_B32 instructionsTom Stellard2013-08-164-12/+10
| | | | | | | | | The SIInsertWaits pass was overwriting the first operand (gds bit) of DS_WRITE_B32 with the second operand (value to write). This meant that any time the value to write was stored in an odd number VGPR, the gds bit would be set causing the instruction to write to GDS instead of LDS. llvm-svn: 188522
* R600: Add support for global vector loads with element types less than 32-bitsTom Stellard2013-08-162-0/+189
| | | | | Tested-by: Aaron Watry <awatry@gmail.com> llvm-svn: 188521
* R600: Add support for global vector stores with elements less than 32-bitsTom Stellard2013-08-164-1/+134
| | | | | Tested-by: Aaron Watry <awatry@gmail.com> llvm-svn: 188520
* R600: Add support for i16 and i8 global storesTom Stellard2013-08-1610-29/+167
| | | | | Tested-by: Aaron Watry <awatry@gmail.com> llvm-svn: 188519
* R600: Add support for v4i32 stores on CaymanTom Stellard2013-08-163-1/+16
| | | | | Tested-by: Aaron Watry <awatry@gmail.com> llvm-svn: 188518
* R600: Enable folding of inline literals into REQ_SEQUENCE instructionsTom Stellard2013-08-163-17/+36
| | | | | Tested-by: Aaron Watry <awatry@gmail.com> llvm-svn: 188517
* R600: Add IsExport bit to TableGen instruction definitionsTom Stellard2013-08-166-10/+16
| | | | | Tested-by: Aaron Watry <awatry@gmail.com> llvm-svn: 188516
* R600: Change the RAT instruction assembly names so they match the docsTom Stellard2013-08-167-57/+60
| | | | | Tested-by: Aaron Watry <awatry@gmail.com> llvm-svn: 188515
* [tests] Cleanup initialization of test suffixes.Daniel Dunbar2013-08-16157-275/+16
| | | | | | | | | | | | | | | | | - Instead of setting the suffixes in a bunch of places, just set one master list in the top-level config. We now only modify the suffix list in a few suites that have one particular unique suffix (.ml, .mc, .yaml, .td, .py). - Aside from removing the need for a bunch of lit.local.cfg files, this enables 4 tests that were inadvertently being skipped (one in Transforms/BranchFolding, a .s file each in DebugInfo/AArch64 and CodeGen/PowerPC, and one in CodeGen/SI which is now failing and has been XFAILED). - This commit also fixes a bunch of config files to use config.root instead of older copy-pasted code. llvm-svn: 188513
* InstCombine: Simplify if(x!=0 && x!=-1).Jim Grosbach2013-08-162-1/+18
| | | | | | | | | | | When both constants are positive or both constants are negative, InstCombine already simplifies comparisons like this, but when it's exactly zero and -1, the operand sorting ends up reversed and the pattern fails to match. Handle that special case. Follow up for rdar://14689217 llvm-svn: 188512
OpenPOWER on IntegriCloud