133996 Commits

Author SHA1 Message Date
David Majnemer
e611161c87 Address Eli's post-commit comments
Use an APInt to handle pointers of arbitrary width, let
accumulateConstantOffset handle overflow issues.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273126 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-19 21:36:35 +00:00
Simon Pilgrim
2ae3b0ad11 [X86][AVX512] Added 512-bit BITREVERSE tests and enabled AVX512BW lowering support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273125 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-19 20:59:19 +00:00
Simon Pilgrim
2582014377 Strip trailing whitespace. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273124 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-19 20:22:43 +00:00
Simon Pilgrim
1056025c7f Fixed signed/unsigned warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273120 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-19 18:20:44 +00:00
Simon Pilgrim
979f1bb4eb [X86][SSE] Allow target shuffle combining to match masks with SM_Sentinel values
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273119 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-19 18:03:52 +00:00
Sanjay Patel
e5e5a82f84 fix formatting, typo; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273118 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-19 17:20:27 +00:00
Craig Topper
33f8e1571a [X86] Add an assert to ensure that a routine is only used with 128-bit vectors. Reduce SmallVector size accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273117 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-19 15:37:39 +00:00
Craig Topper
b495ce5618 [X86] Make is128BitLaneRepeatedShuffleMask correct the indices of the second vector for the smaller mask. This removes some custom correction code and can potentially provide other benefits in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273116 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-19 15:37:37 +00:00
Craig Topper
eb31e1663e [X86] Remove a dead path through one of the shuffle lowering routines. It's only called on single input shuffles masks already. Add an assert instead to verify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273115 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-19 15:37:35 +00:00
Craig Topper
437e16fc51 [X86] Pre-allocate a SmallVector instead of using push_back in a loop. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273114 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-19 15:37:33 +00:00
Craig Topper
06be9d5f08 [X86] Use SmallVector::assign instead of resize to ensure we really start 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273113 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-19 15:37:30 +00:00
Vassil Vassilev
da8a463f86 Add the corresponding modulemap entry, following up r273066.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273112 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-19 15:31:12 +00:00
Chris Dewhurst
8de2ba15c1 [SPARC] Additional condition required for DelaySlot fixing erratum in revision r273108.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273111 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-19 12:56:42 +00:00
Chris Dewhurst
cfa5f917dc [SPARC[ Correcting out-of-date unit tests checked in as part of r273108
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273110 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-19 12:52:39 +00:00
Joerg Sonnenberger
808b3e0416 Indent consistently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273109 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-19 12:37:52 +00:00
Chris Dewhurst
2ac3a338b2 [SPARC] Fixes for hardware errata on LEON processor.
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273108 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-19 11:03:28 +00:00
David Majnemer
099f7f2187 [LoadCombine] Combine Loads formed from GEPS with negative indexes
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273105 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-19 06:14:56 +00:00
Joerg Sonnenberger
847e77d817 doesSetDirectiveSuppressesReloc -> doesSetDirectiveSuppressReloc, the
former is grammatically incorrect.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273100 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-18 23:25:37 +00:00
Joerg Sonnenberger
4c59f0ca01 If the revision number starts with r, drop it. It will get added back
later and we don't want to use it twice.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273099 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-18 23:23:38 +00:00
Simon Pilgrim
ea92c154e4 [X86][AVX] Added test case for PR28136
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273098 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-18 22:59:08 +00:00
Simon Pilgrim
a5c0d0faed [X86][SSSE3] Added examples of target shuffle combining failing to match undefs in shuffle masks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273097 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-18 21:18:21 +00:00
Simon Pilgrim
fb9f8925c7 [X86][XOP] Added fast-isel tests matching tools/clang/test/CodeGen/xop-builtins.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273096 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-18 21:07:31 +00:00
Zvi Rackover
a72116dbfd test commit: remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273094 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-18 19:13:38 +00:00
Simon Pilgrim
f8db082af9 [X86][TBM] Added fast-isel tests matching tools/clang/test/CodeGen/tbm-builtins.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273087 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-18 17:20:52 +00:00
Vasileios Kalintiris
76bbc90afa [mips] Emit a JALR with $rd equal to $zero, instead of a JR in MIPS32R6.
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273085 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-18 15:39:43 +00:00
Amjad Aboud
5ee364ff3a [codeview] Emit non-virtual method type.
Differential Revision: http://reviews.llvm.org/D21011


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273084 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-18 10:25:07 +00:00
Marcin Koscielnicki
ccb3bb979e [sanitizers] Disable target-specific lowering of string functions.
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273083 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-18 10:10:37 +00:00
Sean Silva
5e494bc177 Add a super basic LazyCallGraph DOT printer.
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273082 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-18 09:17:32 +00:00
Matt Arsenault
129e730548 Add looping testcase that broke in r272987
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273081 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-18 05:15:58 +00:00
Matt Arsenault
115244a728 AMDGPU: Fix kernel argument alignment impacting stack size
Don't use AllocateStack because kernel arguments have nothing
to do with the stack. The ensureMaxAlignment call was still
changing the stack alignment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273080 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-18 05:15:53 +00:00
Sanjoy Das
bac5341e94 [SCEV] Fix incorrect trip count computation
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273079 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-18 04:38:31 +00:00
Simon Pilgrim
e2e7d46a44 [X86][SSE4A] Autoupgrade and remove MOVNTSD/MOVNTSS intrinsics
Required better annotation of the instruction defs upon removal of the builtin intrinsic pattern.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273077 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-18 02:38:26 +00:00
Rafael Espindola
e56626f946 Add a test for r273022.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273073 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-18 00:24:49 +00:00
Davide Italiano
af8f40da2b [X86Subtarget] Use isPositionIndependent(). NFC.
Differential Revision:  http://reviews.llvm.org/D21480


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273071 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-18 00:03:20 +00:00
Matt Arsenault
5c31d141a8 Revert "Revert "Revert "InstCombine: Reduce trunc (shl x, K) width."""
This seems to be causing an infinite loop / crash in instcombine
on some bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273069 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17 23:36:38 +00:00
Kyle Butt
8d68f04026 Codegen: [MBP] Add assert strings. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273067 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17 22:40:19 +00:00
Tom Stellard
7dc79e5898 Support/ELF: Add AMDGPU relocation definitions to match documentation
Reviewers: arsenm, kzhuravl, rafael

Subscribers: llvm-commits, kzhuravl

Differential Revision: http://reviews.llvm.org/D21443

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273066 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17 22:38:08 +00:00
Adam Nemet
b7720e0f14 [LAA] Enable symbolic stride speculation for all LAA clients
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273064 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17 22:35:41 +00:00
Matt Arsenault
863cff46f2 AMDGPU: Temporarily select trap to s_endpgm
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273062 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17 22:27:03 +00:00
Matt Arsenault
bfa4d786a1 DiagnosticInfo: Allow unsupported be a warning
Some unsupported features can be ignored, so don't force
this to be a hard error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273061 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17 22:26:56 +00:00
Tom Stellard
0243f6a0db AMDGPU/SI: Simplify code in SITargetLowering::LowerGlobalAddress()
This change were suggested in http://reviews.llvm.org/D21154.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273059 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17 22:22:09 +00:00
Kevin Enderby
68806ff6b6 Add support for Darwin’s static library table of contents with 64-bit 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273058 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17 22:16:06 +00:00
Reid Kleckner
3523a282f6 [codeview] Emit incomplete member pointer types with the unknown model
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273057 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17 22:14:39 +00:00
Vedant Kumar
520a8298d8 [Coverage] Move logic to encode filenames and mappings into llvm (NFC)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273055 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17 21:53:31 +00:00
Reid Kleckner
a450edf8b9 [codeview] Add DIFlags for pointer to member representations
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273053 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17 21:31:33 +00:00
Vedant Kumar
49f93f75af [Coverage] Get rid of an input/output parameter (NFC)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273052 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17 21:31:03 +00:00
Matt Arsenault
310a3752c0 AMDGPU: Remove llvm.SI.tid intrinsic
Mesa doesn't emit this for llvm >= 3.8 anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273050 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17 21:18:41 +00:00
Benjamin Kramer
e5eb673413 Apply another batch of fixes from clang-tidy's performance-unnecessary-value-param.
Contains some manual fixes. No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273047 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17 20:41:14 +00:00
Reid Kleckner
7abe77ab98 [pdb] Don't error on missing FPO streams
64-bit PDBs never have FPO data. They have xdata instead.

Also improve error recovery of stream summary dumping while I'm here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273046 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17 20:38:01 +00:00
Matt Arsenault
769e73bcce Revert "Revert "InstCombine: Reduce trunc (shl x, K) width.""
Reapply r272987. Condition should be in terms of the destination type,
and the flags should not be copied.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273045 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-17 20:33:53 +00:00