platform/upstream/llvm.git
7 years ago[asan] relax strstr tests.
Tim Northover [Mon, 24 Oct 2016 19:07:27 +0000 (19:07 +0000)]
[asan] relax strstr tests.

Darwin's implementation of strstr seems to trigger slightly different failure
modes from Linux since it calls strncmp. All messages seem about equally useful
and correct, so I relaxed the tests so Darwin can pass.

llvm-svn: 285004

7 years ago[llvm] Remove redundant --check-prefix=CHECK from tests
Mandeep Singh Grang [Mon, 24 Oct 2016 18:57:55 +0000 (18:57 +0000)]
[llvm] Remove redundant --check-prefix=CHECK from tests

Reviewers: MatzeB, mcrosier, rengolin

Differential Revision: https://reviews.llvm.org/D25894

llvm-svn: 285003

7 years agoCodeGen: Do not add a global's address space to the folding set profile.
Peter Collingbourne [Mon, 24 Oct 2016 18:56:09 +0000 (18:56 +0000)]
CodeGen: Do not add a global's address space to the folding set profile.

It is already part of the type (which is part of the global, which is already
being added), so there's no need to do it.

llvm-svn: 285002

7 years ago[clang] Remove redundant --check-prefix=CHECK from tests
Mandeep Singh Grang [Mon, 24 Oct 2016 18:53:43 +0000 (18:53 +0000)]
[clang] Remove redundant --check-prefix=CHECK from tests

Reviewers: mkuper, rengolin, hans

Subscribers: cfe-commits

Tags: #clang-c

Differential Revision: https://reviews.llvm.org/D25893

llvm-svn: 285001

7 years ago[analyzer] Use unsigned integers to rely on well-defined overflow semantics.
Artem Dergachev [Mon, 24 Oct 2016 18:49:04 +0000 (18:49 +0000)]
[analyzer] Use unsigned integers to rely on well-defined overflow semantics.

Found by the UBSan buildbot.

llvm-svn: 285000

7 years agoFix crash if StmtProfile finds a type-dependent member access for which we have
Richard Smith [Mon, 24 Oct 2016 18:47:04 +0000 (18:47 +0000)]
Fix crash if StmtProfile finds a type-dependent member access for which we have
resolved the -> to a call to a specific operator-> function. The particular
test case added here is actually being mishandled: the implicit member access
should not be type-dependent (because it's accessing a non-type-dependent
member of the current instantiation), but calls to a type-dependent operator->
that is a member of the current instantiation would be liable to hit the same
codepath.

llvm-svn: 284999

7 years agoadd-discriminators: Fix handling of lexical scopes.
Adrian Prantl [Mon, 24 Oct 2016 18:23:51 +0000 (18:23 +0000)]
add-discriminators: Fix handling of lexical scopes.

This fixes a bug in the handling of lexical scopes, when more than one
scope is defined on the same line or functions are inlined into call
sites that are on the same line as the function definition. This
situation can easily happen in macro expansions.

The problem is solved by introducing a SmallDenseMap<DIScope *,
DILexicalBlockFile *, 1> that keeps track of all the different lexical
scopes that share a line/file location.

Fixes PR30681.

llvm-svn: 284998

7 years agoClarify that MSVC is not the issue here anymore.
Benjamin Kramer [Mon, 24 Oct 2016 18:11:05 +0000 (18:11 +0000)]
Clarify that MSVC is not the issue here anymore.

llvm-svn: 284997

7 years agoRevert r284972 and remove other defaulted copy/move constructors/=
Krzysztof Parzyszek [Mon, 24 Oct 2016 17:40:46 +0000 (17:40 +0000)]
Revert r284972 and remove other defaulted copy/move constructors/=

David Blaikie pointed out that we get them for free without having to
write anything.

llvm-svn: 284996

7 years ago[PPC] Generate positive FP zero using xor insn instead of loading from constant area
Ehsan Amiri [Mon, 24 Oct 2016 17:31:09 +0000 (17:31 +0000)]
[PPC] Generate positive FP zero using xor insn instead of loading from constant area

https://reviews.llvm.org/D23614

Currently we load +0.0 from constant area. That can change to be generated using
XOR instruction.

llvm-svn: 284995

7 years agoReleaseNotes: mention new compiler requirements
Hans Wennborg [Mon, 24 Oct 2016 17:29:52 +0000 (17:29 +0000)]
ReleaseNotes: mention new compiler requirements

llvm-svn: 284994

7 years agoRevert r284580+r284917. ("Synthesize TBB/TBH instructions")
Eli Friedman [Mon, 24 Oct 2016 17:20:50 +0000 (17:20 +0000)]
Revert r284580+r284917. ("Synthesize TBB/TBH instructions")

The optimization has correctness issues, so reverting for now to fix tests
on thumb1 targets.

llvm-svn: 284993

7 years ago[clang-tidy] Fix identifier naming in macro args.
Jason Henline [Mon, 24 Oct 2016 17:20:32 +0000 (17:20 +0000)]
[clang-tidy] Fix identifier naming in macro args.

Summary:
clang-tidy should fix identifier naming even when the identifier is
referenced inside a macro expansion, provided that the identifier enters
the macro expansion completely within a macro argument.

For example, this will allow fixes to the naming of the identifier
'global' when it is declared and used as follows:

  int global;
  #define USE_IN_MACRO(m) auto use_##m = m
  USE_IN_MACRO(global);

Reviewers: alexfh

Subscribers: jlebar, cfe-commits

Differential Revision: https://reviews.llvm.org/D25450

llvm-svn: 284992

7 years agoRemoved FIXME from include ordering comment
Simon Pilgrim [Mon, 24 Oct 2016 17:15:05 +0000 (17:15 +0000)]
Removed FIXME from include ordering comment

Nothing to fix, it's just the way it has to be.

llvm-svn: 284991

7 years agoAdd support for __builtin_os_log_format[_buffer_size]
Mehdi Amini [Mon, 24 Oct 2016 16:56:23 +0000 (16:56 +0000)]
Add support for __builtin_os_log_format[_buffer_size]

These new builtins support a mechanism for logging OS events, using a
printf-like format string to specify the layout of data in a buffer.
The _buffer_size version of the builtin can be used to determine the size
of the buffer to allocate to hold the data, and then __builtin_os_log_format
can write data into that buffer. This implements format checking to report
mismatches between the format string and the data arguments. Most of this
code was written by Chris Willmore.

Differential Revision: https://reviews.llvm.org/D25888

llvm-svn: 284990

7 years agoCheck the number of Args in LibCallsShrinkWrap.
Rong Xu [Mon, 24 Oct 2016 16:50:12 +0000 (16:50 +0000)]
Check the number of Args in LibCallsShrinkWrap.

Some library fucntions can have no argument.

llvm-svn: 284989

7 years agoFix clang-format vim integration issue with non-ascii characters
Alexander Kornienko [Mon, 24 Oct 2016 16:31:26 +0000 (16:31 +0000)]
Fix clang-format vim integration issue with non-ascii characters

clang-format.py currently seems to treat vim.current.buf as ascii-encoded data,
which leads to an UnicodeDecodeError when trying to format any text containing
non-ascii characters:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File ".../tools/clang/tools/clang-format/clang-format.py", line 110, in <module>
    main()
  File ".../tools/clang/tools/clang-format/clang-format.py", line 87, in main
    stdout, stderr = p.communicate(input=text.encode(encoding))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 3996: ordinal not in range(128)

llvm-svn: 284988

7 years agoUse shorter names in TestConcurrentEvents tests
Pavel Labath [Mon, 24 Oct 2016 16:20:43 +0000 (16:20 +0000)]
Use shorter names in TestConcurrentEvents tests

Otherwise, they tend to generate filename too long errors.

They already contain the same test name in the directory, file, and class names,
so no information is really lost here.

llvm-svn: 284987

7 years ago[AArch64] Optionally use the Newton series for reciprocal estimation
Evandro Menezes [Mon, 24 Oct 2016 16:14:58 +0000 (16:14 +0000)]
[AArch64] Optionally use the Newton series for reciprocal estimation

Add support for estimating the square root or its reciprocal and division or
reciprocal using the combiner generic Newton series.

Differential revision: https://reviews.llvm.org/D25291

llvm-svn: 284986

7 years ago[ADT] static_assert that SmallDenseMap is instantiated with a power-of-two number...
Justin Lebar [Mon, 24 Oct 2016 16:06:53 +0000 (16:06 +0000)]
[ADT] static_assert that SmallDenseMap is instantiated with a power-of-two number of inline buckets.

Summary:
If you try to instantiate it with a non-power-of-two buckets, DenseMap
will assert at runtime (!) if we ever outgrow our inline storage.

I believe using a constexpr function inside of a static_assert is safe
now that we've unsupported MSVC 2013 and GCC < 4.8.

Reviewers: bkramer, qcolombet, escha

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25900

llvm-svn: 284985

7 years ago[EarlyCSE] Optimize MemoryPhis and reduce memory clobber queries w/ MemorySSA
Geoff Berry [Mon, 24 Oct 2016 15:54:00 +0000 (15:54 +0000)]
[EarlyCSE] Optimize MemoryPhis and reduce memory clobber queries w/ MemorySSA

Summary:
When using MemorySSA, re-optimize MemoryPhis when removing a store since
this may create MemoryPhis with all identical arguments.

Also, when using MemorySSA to check if two MemoryUses are reading from
the same version of the heap, use the defining access instead of calling
getClobberingAccess, since the latter can currently result in many more
AA calls.  Once the MemorySSA use optimization tracking changes are
done, we can remove this limitation, which should result in more loads
being CSE'd.

Reviewers: dberlin

Subscribers: mcrosier, llvm-commits

Differential Revision: https://reviews.llvm.org/D25881

llvm-svn: 284984

7 years ago[PPC] Better codegen for AND, ANY_EXT, SRL sequence
Ehsan Amiri [Mon, 24 Oct 2016 15:46:58 +0000 (15:46 +0000)]
[PPC] Better codegen for AND, ANY_EXT, SRL sequence

https://reviews.llvm.org/D24924

This improves the code generated for a sequence of AND, ANY_EXT, SRL instructions. This is a targetted fix for this special pattern. The pattern is generated by target independet dag combiner and so a more general fix may not be necessary. If we come across other similar cases, some ideas for handling it are discussed on the code review.

llvm-svn: 284983

7 years ago[x86] regenerate checks
Sanjay Patel [Mon, 24 Oct 2016 15:43:40 +0000 (15:43 +0000)]
[x86] regenerate checks

llvm-svn: 284982

7 years agoFix arm64 sub-register definitions
Pavel Labath [Mon, 24 Oct 2016 14:57:50 +0000 (14:57 +0000)]
Fix arm64 sub-register definitions

The "value regs" field was filled incorrectly. It is supposed to list the
registers that *this* register is a sub-register of, not the other way around.
This manifested itself in "register read" showing only the smaller sub-registers
(and a bunch of tests not passing). I am not sure if the "invalidates" field is
correct either, but it's usage seems to be inconsistent, so I'll leave that as-is
for now.

llvm-svn: 284981

7 years agoAMDGPU: Fix Two Address problems with v_movreld
Nicolai Haehnle [Mon, 24 Oct 2016 14:56:02 +0000 (14:56 +0000)]
AMDGPU: Fix Two Address problems with v_movreld

Summary:
The v_movreld machine instruction is used with three operands that are
in a sense tied to each other (the explicit VGPR_32 def and the implicit
VGPR_NN def and use). There is no way to express that using the currently
available operand bits, and indeed there are cases where the Two Address
instructions pass does the wrong thing.

This patch introduces a new set of pseudo instructions that are identical
in intended semantics as v_movreld, but they only have two tied operands.

Having to add a new set of pseudo instructions is admittedly annoying, but
it's a fairly straightforward and solid approach. The only alternative I
see is to try to teach the Two Address instructions pass about Three Address
instructions, and I'm afraid that's trickier and is going to end up more
fragile.

Note that v_movrels does not suffer from this problem, and so this patch
does not touch it.

This fixes several GL45-CTS.shaders.indexing.* tests.

Reviewers: tstellarAMD, arsenm

Subscribers: kzhuravl, wdng, yaxunl, llvm-commits, tony-tye

Differential Revision: https://reviews.llvm.org/D25633

llvm-svn: 284980

7 years agoRevert 284971.
Nico Weber [Mon, 24 Oct 2016 14:52:04 +0000 (14:52 +0000)]
Revert 284971.

It seems to break selfhost on some bots, see e.g.
http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/21
http://lab.llvm.org:8011/builders/clang-ppc64be-linux-multistage/builds/20
http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/22

llvm-svn: 284979

7 years ago[MC] Fix Various End Of Line Comment checkings
Nirav Dave [Mon, 24 Oct 2016 14:35:29 +0000 (14:35 +0000)]
[MC] Fix Various End Of Line Comment checkings

Fix AsmParser lines to correctly handle end-of-line pre-processor
comments parsing when '#' is not the assembly line comment prefix.

Reviewers: rnk

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25567

llvm-svn: 284978

7 years ago[Chrono] Fix !HAVE_FUTIMENS build
Pavel Labath [Mon, 24 Oct 2016 14:19:28 +0000 (14:19 +0000)]
[Chrono] Fix !HAVE_FUTIMENS build

If we don't have futimens(), we fall back to futimes(), which only supports
microsecond timestamps. In that case, we need to explicitly cast away the extra
precision in setLastModificationAndAccessTime().

llvm-svn: 284977

7 years agoReformat RegisterInfos_arm64 into a table. NFC
Pavel Labath [Mon, 24 Oct 2016 14:01:52 +0000 (14:01 +0000)]
Reformat RegisterInfos_arm64 into a table. NFC

llvm-svn: 284976

7 years agoRemove unused #includes of TimeValue.h. NFC.
Pavel Labath [Mon, 24 Oct 2016 14:00:26 +0000 (14:00 +0000)]
Remove unused #includes of TimeValue.h. NFC.

llvm-svn: 284975

7 years ago[Object] Replace TimeValue with std::chrono
Pavel Labath [Mon, 24 Oct 2016 13:38:27 +0000 (13:38 +0000)]
[Object] Replace TimeValue with std::chrono

Summary:
Most of the changes are very straight-forward. The only choice I had to make was
to use second-precision time points in the Archive classes. I did this because
the archive files use that precision in the on-disk representation anyway.

Reviewers: rafael, zturner

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25773

llvm-svn: 284974

7 years agoAArch64 ILP32 relocations for assembly and ELF
Joel Jones [Mon, 24 Oct 2016 13:37:13 +0000 (13:37 +0000)]
AArch64 ILP32 relocations for assembly and ELF

Summary:
Add relocations for AArch64 ILP32. Includes:
  - Addition of definitions for R_AARCH32_*
  - Definition of new -target-abi: ilp32
  - Definition of data layout string
  - Tests for added relocations. Not comprehensive, but matches
    existing tests for 64-bit. Renames "CHECK-OBJ" to "CHECK-OBJ-LP64".
  - Tests for llvm-readobj

Reviewers: zatrazz, peter.smith, echristo, t.p.northover

Subscribers: aemerson, rengolin, mehdi_amini

Differential Revision: https://reviews.llvm.org/D25159

llvm-svn: 284973

7 years ago[RDF] Add default move constructors/assignment operators
Krzysztof Parzyszek [Mon, 24 Oct 2016 13:15:20 +0000 (13:15 +0000)]
[RDF] Add default move constructors/assignment operators

llvm-svn: 284972

7 years ago[JumpThreading] Unfold selects that depend on the same condition
Pablo Barrio [Mon, 24 Oct 2016 13:04:45 +0000 (13:04 +0000)]
[JumpThreading] Unfold selects that depend on the same condition

Summary:
These are good candidates for jump threading. This enables later opts
(such as InstCombine) to combine instructions from the selects with
instructions out of the selects. SimplifyCFG will fold the select
again if unfolding wasn't worth it.

Patch by James Molloy and Pablo Barrio.

Reviewers: reames, bkramer, mcrosier, gberry, haicheng, jmolloy, sebpop

Subscribers: jojo, rengolin, llvm-commits

Differential Revision: https://reviews.llvm.org/D25477

llvm-svn: 284971

7 years agoAdd the new arm64 sub-register definitions to NativeRegisterContextLinux
Pavel Labath [Mon, 24 Oct 2016 12:59:20 +0000 (12:59 +0000)]
Add the new arm64 sub-register definitions to NativeRegisterContextLinux

It's quite sad that we have to edit so many files just to add a register. I am
going to investigate how to merge these definitions somehow, but for now this
should at least get arm64 linux working again.

llvm-svn: 284970

7 years ago[analyzer] Fix an ARM buildbot after r284960.
Artem Dergachev [Mon, 24 Oct 2016 12:54:27 +0000 (12:54 +0000)]
[analyzer] Fix an ARM buildbot after r284960.

I guess we should always specify triples in all analyzer tests, regardless.

llvm-svn: 284969

7 years agoFix windows builds by swapping windows.h and wincrypt.h ordering.
Simon Pilgrim [Mon, 24 Oct 2016 12:39:23 +0000 (12:39 +0000)]
Fix windows builds by swapping windows.h and wincrypt.h ordering.

We need to include windows.h first even though it breaks default include ordering rules

llvm-svn: 284968

7 years agorevert r284963
Michael Zuckerman [Mon, 24 Oct 2016 11:30:23 +0000 (11:30 +0000)]
revert r284963

because new test file is failing in some OS.
test/CodeGen/avx512-reduceIntrin.c

llvm-svn: 284967

7 years agoRemove TimeValue usage from llvm/Support
Pavel Labath [Mon, 24 Oct 2016 10:59:17 +0000 (10:59 +0000)]
Remove TimeValue usage from llvm/Support

Summary:
This is a follow-up to D25416. It removes all usages of TimeValue from
llvm/Support library (except for the actual TimeValue declaration), and replaces
them with appropriate usages of std::chrono. To facilitate this, I have added
small utility functions for converting time points and durations into appropriate
OS-specific types (FILETIME, struct timespec, ...).

Reviewers: zturner, mehdi_amini

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25730

llvm-svn: 284966

7 years agoAdjust for TimePoint interface change in llvm: D25730. NFC
Pavel Labath [Mon, 24 Oct 2016 10:59:14 +0000 (10:59 +0000)]
Adjust for TimePoint interface change in llvm: D25730. NFC

llvm-svn: 284965

7 years agoAdjust for TimePoint interface change in llvm: D25730. NFC
Pavel Labath [Mon, 24 Oct 2016 10:59:13 +0000 (10:59 +0000)]
Adjust for TimePoint interface change in llvm: D25730. NFC

llvm-svn: 284964

7 years ago[X86][AVX512][Clang][Intrinsics][reduce] Adding missing reduce (Operators: +,*,&...
Michael Zuckerman [Mon, 24 Oct 2016 10:53:20 +0000 (10:53 +0000)]
[X86][AVX512][Clang][Intrinsics][reduce] Adding missing reduce (Operators: +,*,&&,||) intrinsics to Clang

Committed after LGTM and check-all

Vector-reduction arithmetic accepts vectors as inputs and produces scalars as outputs.
This class of vector operation forms the basis of many scientific computations.
In vector-reduction arithmetic, the evaluation off is independent of the order of the input elements of V.

Used bisection method. At each step, we partition the vector with previous
step in half, and the operation is performed on its two halves.
This takes log2(n) steps where n is the number of elements in the vector.

Differential Revision: https://reviews.llvm.org/D25527

llvm-svn: 284963

7 years ago[mips] synci microMIPS instruction definition.
Simon Dardis [Mon, 24 Oct 2016 10:23:59 +0000 (10:23 +0000)]
[mips] synci microMIPS instruction definition.

Add synci to the microMIPS instruction definitions, mark the MIPS sync & synci
as not being part of microMIPS. This does not cover the sync instruction alias,
as that will be handled with a different patch. Add sync to the valid tests for
microMIPS.

Reviewers: vkalintiris

Differential Revision: https://reviews.llvm.org/D25795

llvm-svn: 284962

7 years ago[Sema] Formatting warnings should see through Objective-C message sends
Alex Lorenz [Mon, 24 Oct 2016 09:42:34 +0000 (09:42 +0000)]
[Sema] Formatting warnings should see through Objective-C message sends

This commit improves the '-Wformat' warnings by ensuring that the formatting
checker can see through Objective-C message sends when we are calling an
Objective-C method with an appropriate format_arg attribute.

rdar://23622446

Differential Revision: https://reviews.llvm.org/D25820

llvm-svn: 284961

7 years ago[analyzer] Add StdLibraryFunctions checker.
Artem Dergachev [Mon, 24 Oct 2016 09:41:38 +0000 (09:41 +0000)]
[analyzer] Add StdLibraryFunctions checker.

This checker does not emit reports, however it influences the analysis
by providing complete summaries for, or otherwise improving modeling of,
various standard library functions.

This should reduce the number of infeasible paths explored during analysis.
The custom function summary format used in this checker is superior to
body farms by causing less unnecessary state splits,
which would result in better analysis performance.

Differential Revision: https://reviews.llvm.org/D20811

llvm-svn: 284960

7 years ago[Sema][TreeTransform] Re-create DesignatedInitExpr when a field designator
Alex Lorenz [Mon, 24 Oct 2016 09:33:32 +0000 (09:33 +0000)]
[Sema][TreeTransform] Re-create DesignatedInitExpr when a field designator
has no field declaration.

This commit fixes an invalid Winitializer-overrides warning that's shown
when analyzing a second (or any after the first) instantiation of a designated
initializer. This invalid warning is fixed by making sure that a
DesignatedInitExpr is rebuilt by the tree transformer when it has a field
designator whose FieldDecl* hasn't been yet initialized. This ensures that a
different DesignatedInitExpr is processed by Sema for every instantiation, and
thus the invalid warning is avoided.

rdar://28768441

Differential Revision: https://reviews.llvm.org/D25777

llvm-svn: 284959

7 years agoFix myriad test with CLANG_DEFAULT_CXX_STDLIB
Jonas Hahnfeld [Mon, 24 Oct 2016 08:04:17 +0000 (08:04 +0000)]
Fix myriad test with CLANG_DEFAULT_CXX_STDLIB

llvm-svn: 284958

7 years ago[llvm-opt-report] Fix unroll-count reporting
Hal Finkel [Mon, 24 Oct 2016 05:07:18 +0000 (05:07 +0000)]
[llvm-opt-report] Fix unroll-count reporting

Fix the implementation of OptReportLocationInfo's operator < so that contexts
with different unroll counts are reported separately.

llvm-svn: 284957

7 years ago[AVX-512] Replace 64-bit element and 512-bit vector pmin/pmax builtins with native...
Craig Topper [Mon, 24 Oct 2016 04:04:24 +0000 (04:04 +0000)]
[AVX-512] Replace 64-bit element and 512-bit vector pmin/pmax builtins with native IR like we do for 128/256-bit, but with the addition of masking.

llvm-svn: 284956

7 years ago[AVX-512] Remove masked pmin/pmax intrinsics and autoupgrade to native IR.
Craig Topper [Mon, 24 Oct 2016 04:04:16 +0000 (04:04 +0000)]
[AVX-512] Remove masked pmin/pmax intrinsics and autoupgrade to native IR.

Clang patch to replace 512-bit vector and 64-bit element versions with native IR will follow.

llvm-svn: 284955

7 years ago[AVX-512] Replace masked 128/256-bit byte, word, and dword min/max builtins with...
Craig Topper [Sun, 23 Oct 2016 23:57:30 +0000 (23:57 +0000)]
[AVX-512] Replace masked 128/256-bit byte, word, and dword min/max builtins with selects and the older unmasked builtins.

llvm-svn: 284954

7 years ago[DAG] enhance computeKnownBits to handle SRL/SRA with vector splat constant
Sanjay Patel [Sun, 23 Oct 2016 23:13:31 +0000 (23:13 +0000)]
[DAG] enhance computeKnownBits to handle SRL/SRA with vector splat constant

llvm-svn: 284953

7 years agoBackout enabling -Wshadow until I have time to fix the breakage
Eric Fiselier [Sun, 23 Oct 2016 22:24:11 +0000 (22:24 +0000)]
Backout enabling -Wshadow until I have time to fix the breakage

llvm-svn: 284952

7 years ago[libunwind] Add support for Fuchsia
Petr Hosek [Sun, 23 Oct 2016 21:48:47 +0000 (21:48 +0000)]
[libunwind] Add support for Fuchsia

Fuchsia is a new operating system which uses libunwind as unwinder.

Differential Revision: https://reviews.llvm.org/D25899

llvm-svn: 284951

7 years ago[libcxx] Use C++14 when building libc++ with musl
Petr Hosek [Sun, 23 Oct 2016 21:48:27 +0000 (21:48 +0000)]
[libcxx] Use C++14 when building libc++ with musl

musl's pthread implementations use volatile types in their structs
which is not being constexpr in C++11 but is in C++14.

Differential Revision: https://reviews.llvm.org/D25491

llvm-svn: 284950

7 years agoUse SDValue::getConstantOperandVal() helper. NFCI.
Simon Pilgrim [Sun, 23 Oct 2016 20:17:21 +0000 (20:17 +0000)]
Use SDValue::getConstantOperandVal() helper. NFCI.

llvm-svn: 284949

7 years agoRemove LLVM_CONSTEXPR.
Justin Lebar [Sun, 23 Oct 2016 19:39:16 +0000 (19:39 +0000)]
Remove LLVM_CONSTEXPR.

Summary: With MSVC 2013 and GCC < 4.8 gone, we can use the "constexpr" keyword.

Reviewers: bkramer, mehdi_amini

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25901

llvm-svn: 284947

7 years agoFix breakage introduced by adding -Wshadow.
Eric Fiselier [Sun, 23 Oct 2016 19:26:39 +0000 (19:26 +0000)]
Fix breakage introduced by adding -Wshadow.

llvm-svn: 284946

7 years agoFix libc++ specific assertion in permissions(...) tests
Eric Fiselier [Sun, 23 Oct 2016 19:14:58 +0000 (19:14 +0000)]
Fix libc++ specific assertion in permissions(...) tests

llvm-svn: 284945

7 years agoTurn on -Wshadow so I find occurances before STL does
Eric Fiselier [Sun, 23 Oct 2016 19:01:10 +0000 (19:01 +0000)]
Turn on -Wshadow so I find occurances before STL does

llvm-svn: 284944

7 years agoMake make_from_tuple tests more portable. Patch from STL@microsoft.com
Eric Fiselier [Sun, 23 Oct 2016 18:55:51 +0000 (18:55 +0000)]
Make make_from_tuple tests more portable. Patch from STL@microsoft.com

llvm-svn: 284943

7 years agoFix unreferenced parameters. Patch from STL@microsoft.com
Eric Fiselier [Sun, 23 Oct 2016 18:52:58 +0000 (18:52 +0000)]
Fix unreferenced parameters. Patch from STL@microsoft.com

llvm-svn: 284942

7 years agoFix shadowing warning. Patch from STL@microsoft.com
Eric Fiselier [Sun, 23 Oct 2016 18:47:58 +0000 (18:47 +0000)]
Fix shadowing warning. Patch from STL@microsoft.com

llvm-svn: 284941

7 years ago[CostModel][X86] Added tests for current integer signed/unsigned remainder costs
Simon Pilgrim [Sun, 23 Oct 2016 18:35:02 +0000 (18:35 +0000)]
[CostModel][X86] Added tests for current integer signed/unsigned remainder costs

llvm-svn: 284940

7 years ago[X86][SSE] Add SSE41/AVX1 costs for vector shifts.
Simon Pilgrim [Sun, 23 Oct 2016 16:49:04 +0000 (16:49 +0000)]
[X86][SSE] Add SSE41/AVX1 costs for vector shifts.

We were defaulting to SSE2 costs which weren't taking into account the availability of PBLENDW/PBLENDVB to improve merging of per-element shift results.

llvm-svn: 284939

7 years ago[CostModel][X86] Added tests for current integer trunc costs
Simon Pilgrim [Sun, 23 Oct 2016 15:17:52 +0000 (15:17 +0000)]
[CostModel][X86] Added tests for current integer trunc costs

llvm-svn: 284938

7 years agoUse APInt::isAllOnesValue instead of popcnt. NFCI.
Simon Pilgrim [Sun, 23 Oct 2016 15:09:44 +0000 (15:09 +0000)]
Use APInt::isAllOnesValue instead of popcnt. NFCI.

More obvious implementation and faster too.

llvm-svn: 284937

7 years ago[AVX-512] Replace 512-bit pmovzx/sx builtins with native IR.
Craig Topper [Sun, 23 Oct 2016 07:35:47 +0000 (07:35 +0000)]
[AVX-512] Replace 512-bit pmovzx/sx builtins with native IR.

llvm-svn: 284936

7 years ago[AVX-512] Remove masked 128/256-bit packss/packus builtins and replace with selects...
Craig Topper [Sun, 23 Oct 2016 07:35:39 +0000 (07:35 +0000)]
[AVX-512] Remove masked 128/256-bit packss/packus builtins and replace with selects and the older unmasked builtins.

llvm-svn: 284935

7 years agoAdd more doxygen comments to emmintrin.h's intrinsics.
Ekaterina Romanova [Sun, 23 Oct 2016 07:30:50 +0000 (07:30 +0000)]
Add more doxygen comments to emmintrin.h's intrinsics.

With this patch, all intrinsics in this file (with an exception of a handful of a recently added ones) will be documented. I will send out a patch for 4 missining intrisics later.

The doxygen comments are automatically generated based on Sony's intrinsics document.

I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream. This patch was internally reviewed by Yunzhong Gao.

llvm-svn: 284934

7 years agoFix mangling numbers for varargs lambdas; varargs and non-varargs lambdas get
Richard Smith [Sun, 23 Oct 2016 04:53:03 +0000 (04:53 +0000)]
Fix mangling numbers for varargs lambdas; varargs and non-varargs lambdas get
different lambda-sigs, so they should have different counters.

llvm-svn: 284933

7 years ago[compiler-rt] Remove redundant --check-prefix=CHECK from test
Mandeep Singh Grang [Sun, 23 Oct 2016 00:55:12 +0000 (00:55 +0000)]
[compiler-rt] Remove redundant --check-prefix=CHECK from test

Reviewers: eugenis, rengolin

Subscribers: dberris

Differential Revision: https://reviews.llvm.org/D25892

llvm-svn: 284932

7 years ago[clang] Limit clang test to ARM and AArch64 only
Mandeep Singh Grang [Sun, 23 Oct 2016 00:53:03 +0000 (00:53 +0000)]
[clang] Limit clang test to ARM and AArch64 only

Summary: Limit clang/test/Frontend/gnu-mcount.c to ARM and AArch64 only.

Reviewers: abdulras, honggyu.kim, rengolin

Subscribers: aemerson, rengolin, cfe-commits

Tags: #clang-c

Differential Revision: https://reviews.llvm.org/D25842

llvm-svn: 284931

7 years ago[AVR] Add the machine code disassembler
Dylan McKay [Sat, 22 Oct 2016 23:57:59 +0000 (23:57 +0000)]
[AVR] Add the machine code disassembler

This adds a super basic implementation of a machine code disassembler.

It doesn't support any operands with custom encoding.

llvm-svn: 284930

7 years ago[AVX-512] Replace masked 128/256-bit pavg builtins and replace with select and older...
Craig Topper [Sat, 22 Oct 2016 21:24:56 +0000 (21:24 +0000)]
[AVX-512] Replace masked 128/256-bit pavg builtins and replace with select and older unmasked builtins.

llvm-svn: 284929

7 years ago[AVX-512] Replace masked 128/256-bit saturating add/sub builtins with select and...
Craig Topper [Sat, 22 Oct 2016 21:24:52 +0000 (21:24 +0000)]
[AVX-512] Replace masked 128/256-bit saturating add/sub builtins with select and older unmasked builtins.

llvm-svn: 284928

7 years ago[AVX-512] Replace masked 128/256-bit vpmovzx/vpmovsx builtins with native IR.
Craig Topper [Sat, 22 Oct 2016 21:24:48 +0000 (21:24 +0000)]
[AVX-512] Replace masked 128/256-bit vpmovzx/vpmovsx builtins with native IR.

llvm-svn: 284927

7 years ago[AVX-512] Remove duplicate test cases from the avx512vlbw intrinsic test. These tests...
Craig Topper [Sat, 22 Oct 2016 21:24:44 +0000 (21:24 +0000)]
[AVX-512] Remove duplicate test cases from the avx512vlbw intrinsic test. These tests already exist in the avx512vl test and represent avx512vl instructions.

llvm-svn: 284926

7 years ago[AVX-512] Remove masked 128/256-bit pshufb builtins. Replace with a select and the...
Craig Topper [Sat, 22 Oct 2016 21:24:42 +0000 (21:24 +0000)]
[AVX-512] Remove masked 128/256-bit pshufb builtins. Replace with a select and the older unmaksed builtins.

llvm-svn: 284925

7 years ago[AVX-512] Remove builtins for 128/256-bit pabsb/pabsw. We can use a select and the...
Craig Topper [Sat, 22 Oct 2016 21:24:38 +0000 (21:24 +0000)]
[AVX-512] Remove builtins for 128/256-bit pabsb/pabsw. We can use a select and the older non-masked versions instead.

llvm-svn: 284924

7 years ago[AVX-512] Add typecasts to alignr intrinsics that were modified in r284920.
Craig Topper [Sat, 22 Oct 2016 21:24:34 +0000 (21:24 +0000)]
[AVX-512] Add typecasts to alignr intrinsics that were modified in r284920.

llvm-svn: 284923

7 years ago[X86][AVX512VL] Added support for combining target 256-bit shuffles to AVX512VL VPERMV3
Simon Pilgrim [Sat, 22 Oct 2016 20:15:39 +0000 (20:15 +0000)]
[X86][AVX512VL] Added support for combining target 256-bit shuffles to AVX512VL VPERMV3

llvm-svn: 284922

7 years ago[X86][AVX512] Added support for combining target shuffles to AVX512 VPERMV3
Simon Pilgrim [Sat, 22 Oct 2016 19:53:59 +0000 (19:53 +0000)]
[X86][AVX512] Added support for combining target shuffles to AVX512 VPERMV3

llvm-svn: 284921

7 years ago[AVX-512] Remove masked 128/256-bit palignr builtins. We can just use a select in...
Craig Topper [Sat, 22 Oct 2016 18:32:33 +0000 (18:32 +0000)]
[AVX-512] Remove masked 128/256-bit palignr builtins. We can just use a select in the header file with the older unmasked versions instead.

llvm-svn: 284920

7 years ago[lit] Add more testing instructions to README
Brian Gesiak [Sat, 22 Oct 2016 17:27:31 +0000 (17:27 +0000)]
[lit] Add more testing instructions to README

Summary:
r283710 introduced two regressions, one to llvm-lit, and the other to
lit executables that were installed via setuptools. Add instructions on
how to test for these regressions in the future.

Reviewers: ddunbar, delcypher, beanz, chapuni, cmatthews, echristo

Subscribers: llvm-commits, mehdi_amini

Differential Revision: https://reviews.llvm.org/D25459

llvm-svn: 284919

7 years ago[ARM] Fix crash in ConstantIslands
James Molloy [Sat, 22 Oct 2016 09:58:37 +0000 (09:58 +0000)]
[ARM] Fix crash in ConstantIslands

tPCRelJT may not be the first instruction in a block. Check that instead of dereferencing a broken iterator.

llvm-svn: 284917

7 years ago[X86] Apply the Update LLC Test Checks tool on the mmx-bitcast test
Zvi Rackover [Sat, 22 Oct 2016 07:15:00 +0000 (07:15 +0000)]
[X86] Apply the Update LLC Test Checks tool on the mmx-bitcast test

llvm-svn: 284916

7 years ago[X86] Add support for printing shuffle comments for VALIGN instructions.
Craig Topper [Sat, 22 Oct 2016 06:51:56 +0000 (06:51 +0000)]
[X86] Add support for printing shuffle comments for VALIGN instructions.

llvm-svn: 284915

7 years ago[X86] Add support for lowering v4i64 and v8i64 shuffles directly to PALIGNR. I think...
Craig Topper [Sat, 22 Oct 2016 06:51:52 +0000 (06:51 +0000)]
[X86] Add support for lowering v4i64 and v8i64 shuffles directly to PALIGNR. I think shuffle combine can figure it out later, but we should try to get it right up front.

llvm-svn: 284914

7 years ago[X86] Remove unnecessary AVX2 check that was already covered by an assertion earlier...
Craig Topper [Sat, 22 Oct 2016 06:51:49 +0000 (06:51 +0000)]
[X86] Remove unnecessary AVX2 check that was already covered by an assertion earlier in the function. NFC

llvm-svn: 284913

7 years ago[X86] Remove 128-bit lane handling from the main loop of matchVectorShuffleAsByteRota...
Craig Topper [Sat, 22 Oct 2016 06:51:44 +0000 (06:51 +0000)]
[X86] Remove 128-bit lane handling from the main loop of matchVectorShuffleAsByteRotate. Instead check for is128LaneRepeatedSuffleMask before the loop and just loop over the repeated mask.

I plan to use the loop to support VALIGND/Q shuffles so this makes it easier to reuse.

llvm-svn: 284912

7 years ago[X86][SSE] Use getConstVector helper for VPERMV mask generation. NFCI.
Simon Pilgrim [Sat, 22 Oct 2016 06:18:36 +0000 (06:18 +0000)]
[X86][SSE] Use getConstVector helper for VPERMV mask generation. NFCI.

llvm-svn: 284911

7 years agoNow that VS2013 is gone, make a memoryssa structure an anonymous union again
Daniel Berlin [Sat, 22 Oct 2016 04:15:41 +0000 (04:15 +0000)]
Now that VS2013 is gone, make a memoryssa structure an anonymous union again

llvm-svn: 284910

7 years ago[libFuzzer] mutation: insert the size of the input in bytes as one of the ways to...
Kostya Serebryany [Sat, 22 Oct 2016 03:48:53 +0000 (03:48 +0000)]
[libFuzzer] mutation: insert the size of the input in bytes as one of the ways to mutate a binary integer

llvm-svn: 284909

7 years ago[BasicAA] Fix - missed alias in GEP expressions
Gerolf Hoflehner [Sat, 22 Oct 2016 02:41:39 +0000 (02:41 +0000)]
[BasicAA] Fix -  missed alias in GEP expressions

In BasicAA GEP operand values get adjusted ("wrap-around") based on the
pointersize. Otherwise, in non-64b modes, AA could report false negatives.
However, a wrap-around is valid only for a fully evaluated expression.
It had been introduced to fix an alias problem in
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160118/326163.html.
This commit restricts the wrap-around to constant gep operands only where the
value is known at compile-time.

llvm-svn: 284908

7 years agoMark P0012R1 as "Partial" since it's now substantially complete.
Richard Smith [Sat, 22 Oct 2016 01:35:34 +0000 (01:35 +0000)]
Mark P0012R1 as "Partial" since it's now substantially complete.

llvm-svn: 284907

7 years agoAdd another testcase missed from r284905.
Richard Smith [Sat, 22 Oct 2016 01:32:45 +0000 (01:32 +0000)]
Add another testcase missed from r284905.

llvm-svn: 284906

7 years ago[c++1z] P0012R1: Implement a few remaining pieces: downgrade diagnostic for
Richard Smith [Sat, 22 Oct 2016 01:32:19 +0000 (01:32 +0000)]
[c++1z] P0012R1: Implement a few remaining pieces: downgrade diagnostic for
mismatched dynamic exception specifications in expressions from an error to a
warning, since this is no longer ill-formed in C++1z.

Allow reference binding of a reference-to-non-noexcept function to a noexcept
function lvalue. As defect resolutions, also allow a conditional between
noexcept and non-noexcept function lvalues to produce a non-noexcept function
lvalue (rather than decaying to a function pointer), and allow function
template argument deduction to deduce a reference to non-noexcept function when
binding to a noexcept function type.

llvm-svn: 284905

7 years ago[CtorUtils] Modernize. No functional changes intended.
Davide Italiano [Sat, 22 Oct 2016 01:21:24 +0000 (01:21 +0000)]
[CtorUtils] Modernize. No functional changes intended.

llvm-svn: 284904

7 years ago[libFuzzer] typo in a test
Kostya Serebryany [Sat, 22 Oct 2016 01:07:38 +0000 (01:07 +0000)]
[libFuzzer] typo in a test

llvm-svn: 284903