summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Avoid output indeterminism between GCC and Clang builds.Patrik Hagglund2016-06-201-2/+6
| | | | | | | | | Remove dependency of the evalution order of function arguments, which is unspecified. Patch by David Stenberg. llvm-svn: 273145
* Avoid output indeterminism between GCC and Clang builds.Patrik Hagglund2016-06-201-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove dependency of the evalution order of function arguments, which is unspecified. The following test previously failed when built with GCC (but succeded when built with Clang): ; RUN: opt -sroa -S < %s | FileCheck %s target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" %A = type {i16} @a = global %A* null @b = global i16 0 ; CHECK-LABEL: @f1( ; CHECK: alloca %A ; CHECK-NEXT: extractvalue %A ; CHECK-NEXT: getelementptr inbounds %A define void @f1 (%A %a) { %1 = alloca %A store %A %a, %A* %1 %2 = load i16, i16* @b %3 = icmp ne i16 %2, 0 br i1 %3, label %bb1, label %bb2 bb1: store %A* %1, %A** @a br label %bb2 bb2: ret void } Patch by David Stenberg. Differential Revision: http://reviews.llvm.org/D21226 llvm-svn: 273144
* Fix for PR27940Patrik Hagglund2016-06-201-2/+3
| | | | | | | | | | | | | | After a store has been eliminated, when making sure that the instruction iterator points to a valid instruction, dbg intrinsics are now ignored as a new instruction. Patch by Henric Karlsson. Reviewed by Daniel Berlin. Differential Revision: http://reviews.llvm.org/D21076 llvm-svn: 273141
* [codeview] Add an extra check for TPI hash values.Rui Ueyama2016-06-201-2/+10
| | | | | | | This patch adds a function that corresponds to `fUDTAnon` and use that to compute TPI hash values as the reference does. llvm-svn: 273139
* [AVX512] [AVX512/AVX][Intrinsics] Fix Variable Bit Shift Right Arithmetic ↵Igor Breger2016-06-207-11/+28
| | | | | | | | intrinsic lowering. Differential Revision: http://reviews.llvm.org/D20897 llvm-svn: 273138
* [X86] Pass the SDLoc and Mask ArrayRef down from lowerVectorShuffle through ↵Craig Topper2016-06-201-127/+78
| | | | | | all of the other routines instead of recreating them in the handlers for each type. NFC llvm-svn: 273137
* [X86] Use existing ArrayRef variable instead of calling SVOp->getMask() ↵Craig Topper2016-06-201-12/+12
| | | | | | repeatedly. Remove nearby else after return as well. NFC llvm-svn: 273136
* [X86] Avoid making a copy of a shuffle mask until we're sure we really need ↵Craig Topper2016-06-201-7/+7
| | | | | | to. And just use a SmallVector to do the copy because its easy. llvm-svn: 273135
* Fix dynamically linked debug builds.Eli Friedman2016-06-201-0/+1
| | | | | | | | | | On the surface, this might not look like it does anything... but actually it brings in the declaration "extern template class AnalysisManager<Loop>;", which suppresses the instantiation of the constructor, which avoids the funny interaction between "extern template" and -fvisibility-inlines-hidden. llvm-svn: 273133
* [LoopIdiom] Don't remove dead operands manuallyDavid Majnemer2016-06-201-2/+1
| | | | | | | | | | Removing dead instructions requires remembering which operands have already been removed. RecursivelyDeleteTriviallyDeadInstructions has this logic, don't partially reimplement it in LoopIdiomRecognize. This fixes PR28196. llvm-svn: 273132
* Reformat blank lines.NAKAMURA Takumi2016-06-205-14/+1
| | | | llvm-svn: 273131
* Trailing whitespace.NAKAMURA Takumi2016-06-202-6/+6
| | | | llvm-svn: 273130
* Untabify.NAKAMURA Takumi2016-06-209-29/+27
| | | | llvm-svn: 273129
* Address Eli's post-commit commentsDavid Majnemer2016-06-191-16/+19
| | | | | | | Use an APInt to handle pointers of arbitrary width, let accumulateConstantOffset handle overflow issues. llvm-svn: 273126
* [X86][AVX512] Added 512-bit BITREVERSE tests and enabled AVX512BW lowering ↵Simon Pilgrim2016-06-191-0/+1
| | | | | | support llvm-svn: 273125
* Strip trailing whitespace. NFCI.Simon Pilgrim2016-06-191-2/+2
| | | | llvm-svn: 273124
* Fixed signed/unsigned warning.Simon Pilgrim2016-06-191-1/+1
| | | | llvm-svn: 273120
* [X86][SSE] Allow target shuffle combining to match masks with SM_Sentinel valuesSimon Pilgrim2016-06-191-22/+48
| | | | | | | | | | | | We currently only allow exact matches of shuffle mask patterns during target shuffle combining. This patch relaxes this to permit SM_SentinelUndef in the combined shuffle to always be accepted as well as allowing exact matching of the SM_SentinelZero value. I've adjusted some tests that were requiring exact shuffle masks to now include undef values. Differential Revision: http://reviews.llvm.org/D21495 llvm-svn: 273119
* fix formatting, typo; NFCSanjay Patel2016-06-193-55/+55
| | | | llvm-svn: 273118
* [X86] Add an assert to ensure that a routine is only used with 128-bit ↵Craig Topper2016-06-191-2/+4
| | | | | | vectors. Reduce SmallVector size accordingly. llvm-svn: 273117
* [X86] Make is128BitLaneRepeatedShuffleMask correct the indices of the second ↵Craig Topper2016-06-191-15/+12
| | | | | | vector for the smaller mask. This removes some custom correction code and can potentially provide other benefits in the future. llvm-svn: 273116
* [X86] Remove a dead path through one of the shuffle lowering routines. It's ↵Craig Topper2016-06-191-24/+20
| | | | | | only called on single input shuffles masks already. Add an assert instead to verify. llvm-svn: 273115
* [X86] Pre-allocate a SmallVector instead of using push_back in a loop. NFCCraig Topper2016-06-191-6/+7
| | | | llvm-svn: 273114
* [X86] Use SmallVector::assign instead of resize to ensure we really start ↵Craig Topper2016-06-191-1/+1
| | | | | | | | with a vector of all -1s. Otherwise we're trusting the caller to pass the right thing. This should be no functional change with current code. llvm-svn: 273113
* [SPARC] Additional condition required for DelaySlot fixing erratum in ↵Chris Dewhurst2016-06-191-0/+7
| | | | | | revision r273108. llvm-svn: 273111
* Indent consistently.Joerg Sonnenberger2016-06-191-1/+1
| | | | llvm-svn: 273109
* [SPARC] Fixes for hardware errata on LEON processor.Chris Dewhurst2016-06-199-1/+449
| | | | | | | | | | Passes to fix three hardware errata that appear on some LEON processor variants. The instructions FSMULD, FMULS and FDIVS do not work as expected on some LEON processors. This change allows those instructions to be substituted for alternatives instruction sequences that are known to work. These passes only run when selected individually, or as part of a processor defintion. They are not included in general SPARC processor compilations for non-LEON processors or for those LEON processors that do not have these hardware errata. llvm-svn: 273108
* [LoadCombine] Combine Loads formed from GEPS with negative indexesDavid Majnemer2016-06-191-7/+10
| | | | | | | | | | | Change the underlying offset and comparisons to use int64_t instead of uint64_t. Patch by River Riddle! Differential Revision: http://reviews.llvm.org/D21499 llvm-svn: 273105
* doesSetDirectiveSuppressesReloc -> doesSetDirectiveSuppressReloc, theJoerg Sonnenberger2016-06-183-4/+4
| | | | | | former is grammatically incorrect. llvm-svn: 273100
* test commit: remove trailing whitespaceZvi Rackover2016-06-181-1/+1
| | | | llvm-svn: 273094
* [mips] Emit a JALR with $rd equal to $zero, instead of a JR in MIPS32R6.Vasileios Kalintiris2016-06-181-15/+23
| | | | | | | | | | | | | | Summary: JR is an alias of JALR with $rd=0 in the R6 ISA. Also, this fixes recursive builds in MIPS32R6. Reviewers: dsanders, sdardis Subscribers: jfb, dschuff, dsanders, sdardis, llvm-commits Differential Revision: http://reviews.llvm.org/D21370 llvm-svn: 273085
* [codeview] Emit non-virtual method type.Amjad Aboud2016-06-182-85/+312
| | | | | | Differential Revision: http://reviews.llvm.org/D21011 llvm-svn: 273084
* [sanitizers] Disable target-specific lowering of string functions.Marcin Koscielnicki2016-06-185-8/+80
| | | | | | | | | | | | CodeGen has hooks that allow targets to emit specialized code instead of calls to memcmp, memchr, strcpy, stpcpy, strcmp, strlen, strnlen. When ASan/MSan/TSan/ESan is in use, this sidesteps its interceptors, resulting in uninstrumented memory accesses. To avoid that, make these sanitizers mark the calls as nobuiltin. Differential Revision: http://reviews.llvm.org/D19781 llvm-svn: 273083
* Add a super basic LazyCallGraph DOT printer.Sean Silva2016-06-182-0/+33
| | | | | | | | | Access it through -passes=print-lcg-dot Let me know any suggestions for changing the rendering; I'm not particularly attached to what is implemented here. llvm-svn: 273082
* AMDGPU: Fix kernel argument alignment impacting stack sizeMatt Arsenault2016-06-184-14/+29
| | | | | | | | Don't use AllocateStack because kernel arguments have nothing to do with the stack. The ensureMaxAlignment call was still changing the stack alignment. llvm-svn: 273080
* [SCEV] Fix incorrect trip count computationSanjoy Das2016-06-181-24/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way we elide max expressions when computing trip counts is incorrect -- it breaks cases like this: ``` static int wrapping_add(int a, int b) { return (int)((unsigned)a + (unsigned)b); } void test() { volatile int end_buf = 2147483548; // INT_MIN - 100 int end = end_buf; unsigned counter = 0; for (int start = wrapping_add(end, 200); start < end; start++) counter++; print(counter); } ``` Note: the `NoWrap` variable that was being tested has little to do with the values flowing into the max expression; it is a property of the induction variable. test/Transforms/LoopUnroll/nsw-tripcount.ll was added to solely test functionality I'm reverting in this change, so I've deleted the test fully. llvm-svn: 273079
* [X86][SSE4A] Autoupgrade and remove MOVNTSD/MOVNTSS intrinsicsSimon Pilgrim2016-06-182-4/+29
| | | | | | Required better annotation of the instruction defs upon removal of the builtin intrinsic pattern. llvm-svn: 273077
* [X86Subtarget] Use isPositionIndependent(). NFC.Davide Italiano2016-06-182-3/+7
| | | | | | Differential Revision: http://reviews.llvm.org/D21480 llvm-svn: 273071
* Revert "Revert "Revert "InstCombine: Reduce trunc (shl x, K) width."""Matt Arsenault2016-06-171-22/+5
| | | | | | | This seems to be causing an infinite loop / crash in instcombine on some bots. llvm-svn: 273069
* Codegen: [MBP] Add assert strings. NFCKyle Butt2016-06-171-2/+2
| | | | llvm-svn: 273067
* Support/ELF: Add AMDGPU relocation definitions to match documentationTom Stellard2016-06-172-0/+10
| | | | | | | | | | Reviewers: arsenm, kzhuravl, rafael Subscribers: llvm-commits, kzhuravl Differential Revision: http://reviews.llvm.org/D21443 llvm-svn: 273066
* [LAA] Enable symbolic stride speculation for all LAA clientsAdam Nemet2016-06-173-33/+24
| | | | | | | | | | | | | | | This is a functional change for LLE and LDist. The other clients (LV, LVerLICM) already had this explicitly enabled. The temporary boolean parameter to LAA is removed that allowed turning off speculation of symbolic strides. This makes LAA's caching interface LAA::getInfo only take the loop as the parameter. This makes the interface more friendly to the new Pass Manager. The flag -enable-mem-access-versioning is moved from LV to a LAA which now allows turning off speculation globally. llvm-svn: 273064
* AMDGPU: Temporarily select trap to s_endpgmMatt Arsenault2016-06-173-0/+21
| | | | | | | | | | | | This should select to s_trap, but that requires additonal work to setup and enable the trap handler. For now emit s_endpgm so bugpoint stops getting stuck on the unsupported call to abort. Emit a warning that this will only terminate the wave and not really trap. llvm-svn: 273062
* AMDGPU/SI: Simplify code in SITargetLowering::LowerGlobalAddress()Tom Stellard2016-06-171-1/+1
| | | | | | This change were suggested in http://reviews.llvm.org/D21154. llvm-svn: 273059
* Add support for Darwin’s static library table of contents with 64-bit ↵Kevin Enderby2016-06-171-3/+40
| | | | | | | | | | | | | | offsets to the archive members. Darwin added support in its Xcode 8.0 tools (released in the beta) for static library table of contents with 64-bit offsets to the archive members. The change is very straight forward. The table of contents member is named ___.SYMDEF_64 or "___.SYMDEF_64 SORTED" and same layout is used but with fields using 64 bit values instead of 32 bit values. rdar://26869808 llvm-svn: 273058
* [codeview] Emit incomplete member pointer types with the unknown modelReid Kleckner2016-06-171-7/+13
| | | | | | | An incomplete member pointer type will always have a size of zero, so we don't need an extra flag. Credit to David Majnemer for the idea. llvm-svn: 273057
* [Coverage] Move logic to encode filenames and mappings into llvm (NFC)Vedant Kumar2016-06-171-8/+49
| | | | | | | | | | | | | | | Currently, frontends which emit source-based code coverage have to duplicate logic to encode filenames and raw coverage mappings properly. This violates an abstraction layer and forces frontends to copy tricky code. Introduce llvm::coverage::encodeFilenamesAndRawMappings() to take care of this. This will help us experiment with zlib-compressing coverage mapping data. llvm-svn: 273055
* [codeview] Add DIFlags for pointer to member representationsReid Kleckner2016-06-174-11/+50
| | | | | | | | | | | | | | | | Summary: This seems like the least intrusive way to pass this information through. Fixes PR28151 Reviewers: majnemer, aprantl, dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D21444 llvm-svn: 273053
* [Coverage] Get rid of an input/output parameter (NFC)Vedant Kumar2016-06-171-10/+17
| | | | | | | | | | | | readFunctionRecords is used to iterate through the entries of the coverage mapping section. Instead of expecting the function to update the iterator through a `const char *&` parameter, just return the updated iterator. This will help us experiment with zlib-compressing coverage mapping data. llvm-svn: 273052
* AMDGPU: Remove llvm.SI.tid intrinsicMatt Arsenault2016-06-173-9/+0
| | | | | | Mesa doesn't emit this for llvm >= 3.8 anymore. llvm-svn: 273050
OpenPOWER on IntegriCloud