aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* AVX-512: added arithmetic and logical operations.Elena Demikhovsky2013-08-195-30/+478
| | | | | | | | ADD, SUB, MUL integer and FP types. OR, AND, XOR. Added embeded broadcast form for these instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188673 91177308-0d34-0410-b5e6-96231b3b80d8
* [SystemZ] Add negative integer absolute (load negative)Richard Sandiford2013-08-196-6/+169
| | | | | | | | | For now this matches the equivalent of (neg (abs ...)), which did hit a few times in projects/test-suite. We should probably also match cases where absolute-like selects are used with reversed arguments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188671 91177308-0d34-0410-b5e6-96231b3b80d8
* [SystemZ] Add integer absolute (load positive)Richard Sandiford2013-08-195-1/+168
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188670 91177308-0d34-0410-b5e6-96231b3b80d8
* [SystemZ] Add support for sibling callsRichard Sandiford2013-08-199-175/+214
| | | | | | | | | | | | | | | | | | | This first cut is pretty conservative. The final argument register (R6) is call-saved, so we would need to make sure that the R6 argument to a sibling call is the same as the R6 argument to the calling function, which seems worth keeping as a separate patch. Saying that integer truncations are free means that we no longer use the extending instructions LGF and LLGF for spills in int-conv-09.ll and int-conv-10.ll. Instead we treat the registers as 64 bits wide and truncate them to 32-bits where necessary. I think it's unlikely we'd use LGF and LLGF for spills in other situations for the same reason, so I'm removing the tests rather than replacing them. The associated code is generic and applies to many more instructions than just LGF and LLGF, so there is no corresponding code removal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188669 91177308-0d34-0410-b5e6-96231b3b80d8
* Adds missing TLI check for library simplification ofMichael Kuperstein2013-08-193-3/+31
| | | | | | | * pow(x, 0.5) -> fabs(sqrt(x)) * pow(2.0, x) -> exp2(x) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188656 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ExpandFloatOp_FCOPYSIGN to handle ppcf128-related expansionsHal Finkel2013-08-193-0/+80
| | | | | | | | | | We had previously been asserting when faced with a FCOPYSIGN f64, ppcf128 node because there was no way to expand the FCOPYSIGN node. Because ppcf128 is the sum of two doubles, and the first double must have the larger magnitude, we can take the sign from the first double. As a result, in addition to fixing the crash, this is also an optimization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188655 91177308-0d34-0410-b5e6-96231b3b80d8
* AVX-512: compiler intrinsicsElena Demikhovsky2013-08-191-0/+263
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188654 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the PPC fcpsgn instructionHal Finkel2013-08-197-9/+101
| | | | | | | | | Modern PPC cores support a floating-point copysign instruction, and we can use this to lower the FCOPYSIGN node (which is created from calls to the libm copysign function). A couple of extra patterns are necessary because the operand types of FCOPYSIGN need not agree. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188653 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-dwarfdump: Do not include address offsets for attributes, only for tagsDavid Blaikie2013-08-198-21/+21
| | | | | | | | | This reduces the noise in diffs making it more likely that, at least for LLVM revision-over-revision, diffs will actually yield usable results. This is consistent with objdump's DWARF dumping behavior. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188650 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: don't emit zero-length names for parametersDavid Blaikie2013-08-192-4/+7
| | | | | | | | We check this in many/all other cases, just missed this one it seems. Perhaps it'd be worth unifying this so we never emit zero-length DW_AT_names. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188649 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove SpecialCaseList::findCategory.Peter Collingbourne2013-08-193-53/+0
| | | | | | It turned out that I didn't need this for DFSan. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188646 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: make sure we keep inline asm operands tied.Tim Northover2013-08-182-1/+13
| | | | | | | | When patching inlineasm nodes to use GPRPair for 64-bit values, we were dropping the information that two operands were tied, which effectively broke the live-interval of vregs affected. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188643 91177308-0d34-0410-b5e6-96231b3b80d8
* AVX-512: Added VMOVD, VMOVQ, VMOVSS, VMOVSD instructions.Elena Demikhovsky2013-08-187-44/+410
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188637 91177308-0d34-0410-b5e6-96231b3b80d8
* Make more of the lowering helpers static. Also use MVT instead of EVT in a ↵Craig Topper2013-08-182-24/+17
| | | | | | couple places. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188629 91177308-0d34-0410-b5e6-96231b3b80d8
* docs: command guide: cleanups, no text changesDmitri Gribenko2013-08-182-96/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188627 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused stdio.h includesDmitri Gribenko2013-08-186-8/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188626 91177308-0d34-0410-b5e6-96231b3b80d8
* Makefile.rules: Avoid -fomit-frame-pointer also on cygwin due to PR14646.NAKAMURA Takumi2013-08-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188620 91177308-0d34-0410-b5e6-96231b3b80d8
* Makefile.rules: Simplify nested if(s) on OmitFramePointer.NAKAMURA Takumi2013-08-181-5/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188619 91177308-0d34-0410-b5e6-96231b3b80d8
* Port the detection of zlib from the main autoconf system to the sampleChandler Carruth2013-08-182-2/+327
| | | | | | | | | project's autoconf. This is the last of the missing optional checks used by libSupport that seemed to be missing from the sample project, but I could easily have missed some as this was done by inspection when Craig asked me to add the terminfo support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188618 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for linking librt and using clock_gettime to the sampleChandler Carruth2013-08-182-0/+105
| | | | | | autoconf setup. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188617 91177308-0d34-0410-b5e6-96231b3b80d8
* Update the sample project autoconf setup to include support forChandler Carruth2013-08-182-1/+142
| | | | | | | detecting terminfo. Requested by Craig Topper, and probably should be done much more systematically. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188616 91177308-0d34-0410-b5e6-96231b3b80d8
* Go through the really awkward dance required to delete the memoryChandler Carruth2013-08-181-2/+12
| | | | | | | | allocated by setupterm. Without this, some folks are seeing leaked memory whenever this routine is called more than once. Thanks to Craig Topper for the report. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188615 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix SCEVExpander creating distinct duplicate PHI entriesHal Finkel2013-08-181-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes SCEVExpander so that it does not create multiple distinct induction variables for duplicate PHI entries. Specifically, given some code like this: do.body6: ; preds = %do.body6, %do.body6, %if.then5 %end.0 = phi i8* [ undef, %if.then5 ], [ %incdec.ptr, %do.body6 ], [ %incdec.ptr, %do.body6 ] ... Note that it is legal to have multiple entries for a basic block so long as the associated value is the same. So the above input is okay, but expanding an AddRec in this loop could produce code like this: do.body6: ; preds = %do.body6, %do.body6, %if.then5 %indvar = phi i64 [ %indvar.next, %do.body6 ], [ %indvar.next1, %do.body6 ], [ 0, %if.then5 ] %end.0 = phi i8* [ undef, %if.then5 ], [ %incdec.ptr, %do.body6 ], [ %incdec.ptr, %do.body6 ] ... %indvar.next = add i64 %indvar, 1 %indvar.next1 = add i64 %indvar, 1 And this is not legal because there are two PHI entries for %do.body6 each with a distinct value. Unfortunately, I don't have an in-tree test case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188614 91177308-0d34-0410-b5e6-96231b3b80d8
* The vbroadcastsi256 intrinsic does not exactly resemble the GCCJuergen Ributzka2013-08-171-1/+0
| | | | | | | | | builtin. The GCC builtin expects the arguments to be passed by val, whereas the LLVM intrinsic expects a pointer instead. This is related to PR 16581 and rdar:14747994. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188608 91177308-0d34-0410-b5e6-96231b3b80d8
* Recognize NetBSD's terminfo implementation.Joerg Sonnenberger2013-08-173-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188606 91177308-0d34-0410-b5e6-96231b3b80d8
* PR 16899: Do not modify the basic block using the iterator, but keep theJoerg Sonnenberger2013-08-171-4/+6
| | | | | | | | | next value. This avoids crashes due to invalidation. Patch by Joey Gouly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188605 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Fix possible use of an uninitialized variableTom Stellard2013-08-171-0/+1
| | | | | | Spotted by Nick Lewycky! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188599 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Expand vector FRINT opsTom Stellard2013-08-162-0/+55
| | | | | | Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188598 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Expand vector FFLOOR opsTom Stellard2013-08-162-0/+55
| | | | | | Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188597 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Expand vector float operations for both SI and R600Tom Stellard2013-08-166-88/+128
| | | | | | Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188596 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: Properly constrain comparison fastisel register classes.Jim Grosbach2013-08-162-6/+13
| | | | | | | | Ongoing 'make the verifier happy' improvements to ARM fast-isel. rdar://12594152 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188595 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: Fast-isel register class constrain for extends.Jim Grosbach2013-08-167-17/+18
| | | | | | | | | | Properly constrain the operand register class for instructions used in [sz]ext expansion. Update more tests to use the verifier now that we're getting the register classes correct. rdar://12594152 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188594 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: Fix more fast-isel verifier failures.Jim Grosbach2013-08-163-1/+48
| | | | | | | | | | | | | Teach the generic instruction selection helper functions to constrain the register classes of their input operands. For non-physical register references, the generic code needs to be careful not to mess that up when replacing references to result registers. As the comment indicates for MachineRegisterInfo::replaceRegWith(), it's important to call constrainRegClass() first. rdar://12594152 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188593 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: Clean up fast-isel machine verifier errors.Jim Grosbach2013-08-1610-42/+42
| | | | | | | | | | | | | Lots of machine verifier errors result from using a plain GPR regclass for incoming argument copies. A more restrictive rGPR class is more appropriate since it more accurately represents what's happening, plus it lines up better with isel later on so the verifier is happier. Reduces the number of ARM fast-isel tests not running with the verifier enabled by over half. rdar://12594152 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188592 91177308-0d34-0410-b5e6-96231b3b80d8
* [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188590 91177308-0d34-0410-b5e6-96231b3b80d8
* [typo] An LLVM.Daniel Dunbar2013-08-169-19/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188589 91177308-0d34-0410-b5e6-96231b3b80d8
* 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188586 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188584 91177308-0d34-0410-b5e6-96231b3b80d8
* I'm told that != is not ==Chris Lattner2013-08-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188583 91177308-0d34-0410-b5e6-96231b3b80d8
* allow != to compare PointerUnion, we already support ==.Chris Lattner2013-08-161-2/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188582 91177308-0d34-0410-b5e6-96231b3b80d8
* Add difference_type to ImmutableMap/Set iterators so they have a complete ↵Benjamin Kramer2013-08-162-0/+2
| | | | | | set of typedefs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188579 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188577 91177308-0d34-0410-b5e6-96231b3b80d8
* [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188573 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188572 91177308-0d34-0410-b5e6-96231b3b80d8
* Test commit.Richard Mitton2013-08-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188568 91177308-0d34-0410-b5e6-96231b3b80d8
* [tests] Another attempt to workaround broken misched-copy.s test on some ↵Daniel Dunbar2013-08-162-1/+9
| | | | | | buildbots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188567 91177308-0d34-0410-b5e6-96231b3b80d8
* Switching to using a helper function instead of manually converting the ↵Aaron Ballman2013-08-161-24/+1
| | | | | | string to UTF-8. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188566 91177308-0d34-0410-b5e6-96231b3b80d8
* Removing unused functionality.Aaron Ballman2013-08-163-28/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188565 91177308-0d34-0410-b5e6-96231b3b80d8
* FileCheck: Fix stray quote in CHECK-LABEL error message.Stephen Lin2013-08-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188564 91177308-0d34-0410-b5e6-96231b3b80d8
* InstCombine: Use isAllOnesValue() instead of explicit -1.Jim Grosbach2013-08-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188563 91177308-0d34-0410-b5e6-96231b3b80d8