platform/upstream/llvm.git
8 years ago[AVX512] Replace masked AND/OR/XOR intrinsics with native code and remove the builtins.
Craig Topper [Mon, 11 Jul 2016 06:14:18 +0000 (06:14 +0000)]
[AVX512] Replace masked AND/OR/XOR intrinsics with native code and remove the builtins.

llvm-svn: 275049

8 years agoAVX-512: DAG lowering for scalar MIN/MAX commutable ops
Elena Demikhovsky [Mon, 11 Jul 2016 06:08:06 +0000 (06:08 +0000)]
AVX-512: DAG lowering for scalar MIN/MAX commutable ops

DAG lowering was missing for the scalar FMINC, FMAXC nodes.
The nodes are generated only in the "unsafe-fp-math" mode.
Added tests.

llvm-svn: 275048

8 years ago[Sema] Disallow __make_integer_seq from showing up in __make_integer_seq
David Majnemer [Mon, 11 Jul 2016 05:59:24 +0000 (05:59 +0000)]
[Sema] Disallow __make_integer_seq from showing up in __make_integer_seq

We hit over stringent asserts when trying to diagnose.  Loosen them as
appropriate.

This fixes PR28494.

llvm-svn: 275047

8 years ago[AVX512] Add support for 512-bit ANDN now that all ones build vectors survive long...
Craig Topper [Mon, 11 Jul 2016 05:36:53 +0000 (05:36 +0000)]
[AVX512] Add support for 512-bit ANDN now that all ones build vectors survive long enough to allow the matching.

llvm-svn: 275046

8 years ago[AVX512] Use vpternlog with an immediate of 0xff to create 512-bit all one vectors.
Craig Topper [Mon, 11 Jul 2016 05:36:48 +0000 (05:36 +0000)]
[AVX512] Use vpternlog with an immediate of 0xff to create 512-bit all one vectors.

llvm-svn: 275045

8 years ago[X86] Add the AVX512 SET0 pseudos to foldMemoryOperandImpl since they are marked...
Craig Topper [Mon, 11 Jul 2016 05:36:41 +0000 (05:36 +0000)]
[X86] Add the AVX512 SET0 pseudos to foldMemoryOperandImpl since they are marked for CanFoldAsLoad.

I don't really know how to test this.

llvm-svn: 275044

8 years agoRevert r275029 - Update Clang tests after adding inference for the returned argument...
Hal Finkel [Mon, 11 Jul 2016 04:52:07 +0000 (04:52 +0000)]
Revert r275029 - Update Clang tests after adding inference for the returned argument attribute

The associated backend change is causing miscompiles from the AArch64 backend.

llvm-svn: 275043

8 years agoRevert r275027 - Let FuncAttrs infer the 'returned' argument attribute
Hal Finkel [Mon, 11 Jul 2016 04:51:23 +0000 (04:51 +0000)]
Revert r275027 - Let FuncAttrs infer the 'returned' argument attribute

Reverting r275027 and r275033. These seem to cause miscompiles on the AArch64 buildbot.

llvm-svn: 275042

8 years agoAllow BasicBlockEdge to be used in DenseMap
Daniel Berlin [Mon, 11 Jul 2016 04:37:53 +0000 (04:37 +0000)]
Allow BasicBlockEdge to be used in DenseMap

Summary: Add a DenseMapInfo specialization for BasicBlockEdge

Reviewers: hfinkel, chandlerc, majnemer

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

llvm-svn: 275041

8 years ago[CodeGen] Treat imported static local variables as declarations
David Majnemer [Mon, 11 Jul 2016 04:28:21 +0000 (04:28 +0000)]
[CodeGen] Treat imported static local variables as declarations

Imported variables cannot really be definitions for the purposes of
IR generation.

llvm-svn: 275040

8 years agoPointer-comparison folding should look through returned-argument functions
Hal Finkel [Mon, 11 Jul 2016 03:37:59 +0000 (03:37 +0000)]
Pointer-comparison folding should look through returned-argument functions

For functions which are known to return a specific argument, pointer-comparison
folding can look through the function calls as part of its analysis.

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

llvm-svn: 275039

8 years agoTeach isDereferenceablePointer to look through returned-argument functions
Hal Finkel [Mon, 11 Jul 2016 03:08:49 +0000 (03:08 +0000)]
Teach isDereferenceablePointer to look through returned-argument functions

For functions which are known to return their argument,
isDereferenceableAndAlignedPointer can examine the argument value.

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

llvm-svn: 275038

8 years agoTeach SCEV to look through returned-argument functions
Hal Finkel [Mon, 11 Jul 2016 02:48:23 +0000 (02:48 +0000)]
Teach SCEV to look through returned-argument functions

When building SCEVs, if a function is known to return its argument, then we can
build the SCEV using the corresponding argument value.

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

llvm-svn: 275037

8 years agoTeach computeKnownBits to look through returned-argument functions
Hal Finkel [Mon, 11 Jul 2016 02:25:14 +0000 (02:25 +0000)]
Teach computeKnownBits to look through returned-argument functions

If a function is known to return one of its arguments, we can use that in order
to compute known bits of the return value.

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

llvm-svn: 275036

8 years agoBasicAA should look through functions with returned arguments
Hal Finkel [Mon, 11 Jul 2016 01:32:20 +0000 (01:32 +0000)]
BasicAA should look through functions with returned arguments

Motivated by the work on the llvm.noalias intrinsic, teach BasicAA to look
through returned-argument functions when answering queries. This is essential
so that we don't loose all other AA information when supplementing with
llvm.noalias.

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

llvm-svn: 275035

8 years agoAdd a 'Returned' intrinsic property corresponding to the 'returned' argument attribute
Hal Finkel [Mon, 11 Jul 2016 01:28:42 +0000 (01:28 +0000)]
Add a 'Returned' intrinsic property corresponding to the 'returned' argument attribute

This will be used by the upcoming llvm.noalias intrinsic.

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

llvm-svn: 275034

8 years agoDon't use a SmallSet for returned attribute inference
Hal Finkel [Mon, 11 Jul 2016 01:14:21 +0000 (01:14 +0000)]
Don't use a SmallSet for returned attribute inference

Suggested post-commit by David Majnemer on IRC (following-up on a pre-commit
review comment).

llvm-svn: 275033

8 years agoReapply SVN r274797.
Saleem Abdulrasool [Sun, 10 Jul 2016 23:24:36 +0000 (23:24 +0000)]
Reapply SVN r274797.

Original Commit Message

    Driver: Stop linking to C++ when using sanitizers on Darwin

    Sanitizers on Darwin are built as dynamic libraries, not static libraries.
    Sanitizers will have their C++ dependency satisfied internally (LC_LOAD_DYLIB)
    in the libclang_rt dylib. As long as the sanitizers stay dynamic and not static,
    linking against C++ when enabling a sanitizer becomes over linkage.

    Patch by Dave Lee!

llvm-svn: 275032

8 years agoAdd getReturnedArgOperand to Call/InvokeInst, CallSite
Hal Finkel [Sun, 10 Jul 2016 23:01:32 +0000 (23:01 +0000)]
Add getReturnedArgOperand to Call/InvokeInst, CallSite

In order to make the optimizer smarter about using the 'returned' argument
attribute (generally, but motivated by my llvm.noalias intrinsic work), add a
utility function to Call/InvokeInst, and CallSite, to make it easy to get the
returned call argument (when one exists).

P.S. There is already an unfortunate amount of code duplication between
CallInst and InvokeInst, and this adds to it. We should probably clean that up
separately.

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

llvm-svn: 275031

8 years agoAMDGPU: Export workitem builtins
Jan Vesely [Sun, 10 Jul 2016 22:38:04 +0000 (22:38 +0000)]
AMDGPU: Export workitem builtins

Reviewers: tstellardAMD

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

llvm-svn: 275030

8 years agoUpdate Clang tests after adding inference for the returned argument attribute
Hal Finkel [Sun, 10 Jul 2016 22:26:52 +0000 (22:26 +0000)]
Update Clang tests after adding inference for the returned argument attribute

Adjusting tests after r275027.

llvm-svn: 275029

8 years ago[X86][SSE] Relax type assertions for matchVectorShuffleAsInsertPS
Simon Pilgrim [Sun, 10 Jul 2016 22:26:05 +0000 (22:26 +0000)]
[X86][SSE] Relax type assertions for matchVectorShuffleAsInsertPS

Calls to matchVectorShuffleAsInsertPS only need to ensure the inputs are 128-bit vectors. Only lowerVectorShuffleAsInsertPS needs to ensure that they are v4f32.

llvm-svn: 275028

8 years agoLet FuncAttrs infer the 'returned' argument attribute
Hal Finkel [Sun, 10 Jul 2016 22:02:55 +0000 (22:02 +0000)]
Let FuncAttrs infer the 'returned' argument attribute

A function can have one argument with the 'returned' attribute, indicating that
the associated argument is always the return value of the function. Add
FuncAttrs inference logic.

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

llvm-svn: 275027

8 years agoUpdate the LangRef description of the 'returned' attribute
Hal Finkel [Sun, 10 Jul 2016 21:52:39 +0000 (21:52 +0000)]
Update the LangRef description of the 'returned' attribute

The description of the 'returned' attribute says that it is only used when
code-generating the caller. I'd like to make the optimizer smarter about
looking through functions with returned arguments (generally, but motivated by
my llvm.noalias work). As David pointed out in the review of D22202, the
LangRef should be updated to make its expanded uses clearer.

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

llvm-svn: 275026

8 years ago[DAG] make isConstantSplatVector() available to the rest of lowering
Sanjay Patel [Sun, 10 Jul 2016 21:27:06 +0000 (21:27 +0000)]
[DAG] make isConstantSplatVector() available to the rest of lowering

llvm-svn: 275025

8 years agoAMDGPU/R600: Add implicitarg.ptr intrinsic
Jan Vesely [Sun, 10 Jul 2016 21:20:29 +0000 (21:20 +0000)]
AMDGPU/R600: Add implicitarg.ptr intrinsic

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

llvm-svn: 275024

8 years agowhitespaces + re-indent
Etienne Bergeron [Sun, 10 Jul 2016 21:06:06 +0000 (21:06 +0000)]
whitespaces + re-indent

llvm-svn: 275023

8 years ago[X86][SSE] Add support for target shuffle combining to PSHUFLW/PSHUFHW
Simon Pilgrim [Sun, 10 Jul 2016 21:02:47 +0000 (21:02 +0000)]
[X86][SSE] Add support for target shuffle combining to PSHUFLW/PSHUFHW

llvm-svn: 275022

8 years agofix documentation comments; NFC
Sanjay Patel [Sun, 10 Jul 2016 21:02:16 +0000 (21:02 +0000)]
fix documentation comments; NFC

llvm-svn: 275021

8 years ago[x86, SSE, AVX] add tests for icmp+zext (PR28484)
Sanjay Patel [Sun, 10 Jul 2016 20:45:14 +0000 (20:45 +0000)]
[x86, SSE, AVX] add tests for icmp+zext (PR28484)

Note the inconsistent vpbroadcast generation for AVX2; another bug.

llvm-svn: 275020

8 years ago[X86][SSE] Added tests for combining shuffles to PSHUFLW/PSHUFHW
Simon Pilgrim [Sun, 10 Jul 2016 20:19:56 +0000 (20:19 +0000)]
[X86][SSE] Added tests for combining shuffles to PSHUFLW/PSHUFHW

llvm-svn: 275019

8 years ago[AVX512] Remove masked shufps/shudpd builtins. These are all handled with __builtin_s...
Craig Topper [Sun, 10 Jul 2016 16:35:54 +0000 (16:35 +0000)]
[AVX512] Remove masked shufps/shudpd builtins. These are all handled with __builtin_shufflevector.

llvm-svn: 275018

8 years ago[Support] Make helper function static. NFC.
Benjamin Kramer [Sun, 10 Jul 2016 16:11:53 +0000 (16:11 +0000)]
[Support] Make helper function static. NFC.

llvm-svn: 275017

8 years ago[SystemZ] Utilize Test Data Class instructions.
Marcin Koscielnicki [Sun, 10 Jul 2016 14:41:22 +0000 (14:41 +0000)]
[SystemZ] Utilize Test Data Class instructions.

This adds a new SystemZ-specific intrinsic, llvm.s390.tdc.f(32|64|128),
which maps straight to the test data class instructions.  A new IR pass
is added to recognize instructions that can be converted to TDC and
perform the necessary replacements.

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

llvm-svn: 275016

8 years agoreformat, fix comments/names; NFCI
Sanjay Patel [Sun, 10 Jul 2016 13:05:57 +0000 (13:05 +0000)]
reformat, fix comments/names; NFCI

llvm-svn: 275015

8 years agoGive helper classes/functions internal linkage. NFC.
Benjamin Kramer [Sun, 10 Jul 2016 11:28:51 +0000 (11:28 +0000)]
Give helper classes/functions internal linkage. NFC.

llvm-svn: 275014

8 years ago[codeview] Drop unused private inheritance.
Benjamin Kramer [Sun, 10 Jul 2016 10:17:36 +0000 (10:17 +0000)]
[codeview] Drop unused private inheritance.

There is no polymorphism here, and StreamRef already contains a
StreamInterface pointer. Dropping the base class makes StreamRef more
transparent to the compiler, for example it can find unused variables.

llvm-svn: 275013

8 years ago[X86] Use __butilin_shufflevector for 512-bit shufps intrinsics.
Craig Topper [Sun, 10 Jul 2016 05:57:21 +0000 (05:57 +0000)]
[X86] Use __butilin_shufflevector for 512-bit shufps intrinsics.

llvm-svn: 275012

8 years ago[AVX512] Add support for lowering to 512-bit SHUFPS.
Craig Topper [Sun, 10 Jul 2016 05:55:53 +0000 (05:55 +0000)]
[AVX512] Add support for lowering to 512-bit SHUFPS.

llvm-svn: 275011

8 years ago[pdb] Sanity check the stream map
David Majnemer [Sun, 10 Jul 2016 05:32:05 +0000 (05:32 +0000)]
[pdb] Sanity check the stream map

Some abstractions in LLVM "know" that they are reading in-bounds,
FixedStreamArray, and provide a simple result.  This breaks down if the
stream map is bogus.

llvm-svn: 275010

8 years ago[llvm-pdbdump] Propagate errors a little more consistently
David Majnemer [Sun, 10 Jul 2016 03:34:47 +0000 (03:34 +0000)]
[llvm-pdbdump] Propagate errors a little more consistently

PDBFile::getBlockData didn't really return any indication that it
failed.  It merely returned an empty buffer.

llvm-svn: 275009

8 years ago[cmake] Change lli-child-target to use add_llvm_utility instead of add_llvm_executable.
Michael Gottesman [Sun, 10 Jul 2016 02:43:50 +0000 (02:43 +0000)]
[cmake] Change lli-child-target to use add_llvm_utility instead of add_llvm_executable.

We are currently using add_llvm_utility for executable targets that:

1. Are built by default.
2. Used for testing.
3. Are not installed by default.

Originally, lli-child-target used add_llvm_tool instead of add_llvm_executable
directly. This was changed so that lli-child-target would not be installed. This
was good since this is only used for testing and should never be installed for
users. This also had the unfortunate side effect that one can never turn off the
building of lli-child-target by default, a regression for projects that by
default do not want to compile any LLVM tools beyond tablegen/llvm-config.

This patch changes lli-child-target to use add_llvm_utility. This makes sense
since:

1. lli-child-target matches the semantics of executables created with
add_llvm_utility.
2. We fix the regression since now one can use the flag LLVM_BUILD_UTILS to
eliminate default compilation.

llvm-svn: 275008

8 years ago[cmake] Create the LLVM_BUILD_UTILS option.
Michael Gottesman [Sun, 10 Jul 2016 02:43:47 +0000 (02:43 +0000)]
[cmake] Create the LLVM_BUILD_UTILS option.

This option is the equivalent option to LLVM_BUILD_TOOLS but for executables
created via add_llvm_utility.

This is a useful tool for improving compile time in situations where LLVM is
used as a library and no testing tools are needed.

It follows the exact same implemention model as LLVM_BUILD_TOOLS.

Since the option is by default set to on, no behavior is changed unless one sets
it from the command line to be false.

llvm-svn: 275007

8 years agoAdd CLANG_BUILD_TOOLS as a clang counterpart for LLVM_BUILD_TOOLS
Michael Gottesman [Sun, 10 Jul 2016 01:44:00 +0000 (01:44 +0000)]
Add CLANG_BUILD_TOOLS as a clang counterpart for LLVM_BUILD_TOOLS

LLVM_BUILD_TOOLS is a boolean variable that controls whether or not generated
targets for llvm tools are built by the "all" target. CLANG_BUILD_TOOLS is an
analogous variable for clang targets.

This is useful functionality for selectively disabling the building of clang
targets by default to speed up builds.

In terms of implementation, I just followed the model of LLVM's implementation
of this functionality.

llvm-svn: 275006

8 years agoDelete dead code.
Sean Silva [Sun, 10 Jul 2016 00:57:52 +0000 (00:57 +0000)]
Delete dead code.

We were just setting DisableUnitAtATime to its default value.

llvm-svn: 275005

8 years ago[SCCP] Rename undefined -> unknown.
Davide Italiano [Sun, 10 Jul 2016 00:35:15 +0000 (00:35 +0000)]
[SCCP] Rename undefined -> unknown.

In the solver, isUndefined() does really mean "we don't know the
value yet" rather than "this is an UndefinedValue". Discussed with
Eli Friedman.

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

llvm-svn: 275004

8 years agoUpdate comments.
Rui Ueyama [Sat, 9 Jul 2016 23:16:00 +0000 (23:16 +0000)]
Update comments.

llvm-svn: 275003

8 years ago[docs] Fix up a broken link.
Sean Silva [Sat, 9 Jul 2016 23:08:14 +0000 (23:08 +0000)]
[docs] Fix up a broken link.

llvm-svn: 275002

8 years agoAttempt to fix buildbots.
Rui Ueyama [Sat, 9 Jul 2016 23:02:37 +0000 (23:02 +0000)]
Attempt to fix buildbots.

llvm-svn: 275001

8 years ago[PM] Port LoopVectorize to the new PM.
Sean Silva [Sat, 9 Jul 2016 22:56:50 +0000 (22:56 +0000)]
[PM] Port LoopVectorize to the new PM.

llvm-svn: 275000

8 years agoFix up an include guard.
Sean Silva [Sat, 9 Jul 2016 22:56:39 +0000 (22:56 +0000)]
Fix up an include guard.

This should have been done as part of the move in r274960.

llvm-svn: 274999

8 years agoRemove unused forward declarations.
Rui Ueyama [Sat, 9 Jul 2016 22:54:27 +0000 (22:54 +0000)]
Remove unused forward declarations.

llvm-svn: 274998

8 years agoRemove Target::writeThunk.
Rui Ueyama [Sat, 9 Jul 2016 22:52:32 +0000 (22:52 +0000)]
Remove Target::writeThunk.

Only MipsThunk were using the function, and the way how it wrote
thunk contents was different from ARM thunks. This patch makes
them consistent.

llvm-svn: 274997

8 years agoMake ARM thunks consistent with MIPS in coding style.
Rui Ueyama [Sat, 9 Jul 2016 22:52:30 +0000 (22:52 +0000)]
Make ARM thunks consistent with MIPS in coding style.

Although they are in the same .cpp file, the way they were written
were slightly different, so they looked more different than they were.
This patch makes their styles consistent.

llvm-svn: 274996

8 years ago[SCCP] Remove wrong and misleading vector handling code.
Davide Italiano [Sat, 9 Jul 2016 22:49:35 +0000 (22:49 +0000)]
[SCCP] Remove wrong and misleading vector handling code.

This code was already commented out and it made some weird assumptions,
e.g. using isUndefined() as "this value is UndefValue" instead of
"we haven't computed this value is yet". Thanks to Eli Friedman for
pointing out where I was wrong (and where this code was wrong).

llvm-svn: 274995

8 years agoInstantiate Thunk classes instead of the class member functions.
Rui Ueyama [Sat, 9 Jul 2016 22:06:47 +0000 (22:06 +0000)]
Instantiate Thunk classes instead of the class member functions.

llvm-svn: 274994

8 years agoSplit addThunkARM. NFC.
Rui Ueyama [Sat, 9 Jul 2016 22:03:51 +0000 (22:03 +0000)]
Split addThunkARM. NFC.

llvm-svn: 274993

8 years agoMove add_clang_* entry points from the main clang CMakeLists.txt to cmake/modules...
Michael Gottesman [Sat, 9 Jul 2016 21:58:40 +0000 (21:58 +0000)]
Move add_clang_* entry points from the main clang CMakeLists.txt to cmake/modules/AddClang.cmake.

This matches how LLVM has its cmake files organized and is cleaner than just
shoving this business logic into the main CMakeLists.txt.

llvm-svn: 274992

8 years ago[clang-cl] Add support for /Zd
David Majnemer [Sat, 9 Jul 2016 21:49:16 +0000 (21:49 +0000)]
[clang-cl] Add support for /Zd

MASM (ML.exe and ML64.exe) and older versions of MSVC (CL.exe) support a
flag called /Zd which is more-or-less -gline-tables-only.

It seems nicer to support this flag instead of exposing
-gline-tables-only.

llvm-svn: 274991

8 years ago[X86][SSE] Add support for target shuffle combining to INSERTPS
Simon Pilgrim [Sat, 9 Jul 2016 21:47:55 +0000 (21:47 +0000)]
[X86][SSE] Add support for target shuffle combining to INSERTPS

llvm-svn: 274990

8 years agotest: Use %clangxx in objc++ test files
Saleem Abdulrasool [Sat, 9 Jul 2016 21:14:36 +0000 (21:14 +0000)]
test: Use %clangxx in objc++ test files

These test in this change are objc++, but are built using %clang, not %clangxx.
The reason this works is the driver has been adding -lc++ for sanitizer enabled
builds. By making these tests use %clangxx, they no longer depend on the driver
linking to c++.  Doing so will allow us to prevent overlinking of libc++ for
applications.

llvm-svn: 274989

8 years ago[X86][SSE] Use scaleShuffleMask helper. NFCI.
Simon Pilgrim [Sat, 9 Jul 2016 21:12:03 +0000 (21:12 +0000)]
[X86][SSE] Use scaleShuffleMask helper. NFCI.

llvm-svn: 274988

8 years ago[X86][SSE] Regenerate vector shift tests
Simon Pilgrim [Sat, 9 Jul 2016 20:55:20 +0000 (20:55 +0000)]
[X86][SSE] Regenerate vector shift tests

llvm-svn: 274987

8 years ago[COFF, Dwarf] Don't emit DW_AT_location for dllimported entities
David Majnemer [Sat, 9 Jul 2016 20:47:48 +0000 (20:47 +0000)]
[COFF, Dwarf] Don't emit DW_AT_location for dllimported entities

There exists no relocation which can describe the address of a
dllimported variable: do not try to describe their location.

llvm-svn: 274986

8 years agoclang-tidy/readability-identifier-naming: crash on DependentTemplateSpecializationType
Matthias Gehre [Sat, 9 Jul 2016 20:09:28 +0000 (20:09 +0000)]
clang-tidy/readability-identifier-naming: crash on DependentTemplateSpecializationType

Summary:
Previously, the added test cases crashed because the passed a null Decl
to addUsage().

Reviewers: alexfh

Subscribers: cfe-commits

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

llvm-svn: 274985

8 years ago[MS ABI] Some code cleanups
David Majnemer [Sat, 9 Jul 2016 19:26:25 +0000 (19:26 +0000)]
[MS ABI] Some code cleanups

Don't create unnecessary truncations if the result will not be used.
Also prefer preforming math before the truncation, it makes it a little
easier to reason about.

llvm-svn: 274984

8 years ago[AST] Tighten up some bitfields
David Majnemer [Sat, 9 Jul 2016 19:26:19 +0000 (19:26 +0000)]
[AST] Tighten up some bitfields

Optimize the bitfield types to conserve space for the MSVC ABI.

llvm-svn: 274983

8 years ago[SLSR] Fix crash on handling 128-bit integers.
Jingyue Wu [Sat, 9 Jul 2016 19:13:18 +0000 (19:13 +0000)]
[SLSR] Fix crash on handling 128-bit integers.

ConstantInt::getSExtValue may fail on >64-bit integers. Add checks to call
getSExtValue only on narrow integers.

As a minor aside, simplify slsr-gep.ll to remove unnecessary load instructions.

llvm-svn: 274982

8 years agofix documentation comments; NFC
Sanjay Patel [Sat, 9 Jul 2016 18:52:07 +0000 (18:52 +0000)]
fix documentation comments; NFC

llvm-svn: 274981

8 years ago[lanai] Treat .t as optional in assembly parser for RR operands and add predicate...
Jacques Pienaar [Sat, 9 Jul 2016 18:26:04 +0000 (18:26 +0000)]
[lanai] Treat .t as optional in assembly parser for RR operands and add predicate operand to ShiftRR

llvm-svn: 274980

8 years agoAMDGPU: Move R600 only pieces into R600 classes
Matt Arsenault [Sat, 9 Jul 2016 18:11:15 +0000 (18:11 +0000)]
AMDGPU: Move R600 only pieces into R600 classes

llvm-svn: 274979

8 years agoRevert "AMDGPU: Remove unused control flow intrinsic"
Matt Arsenault [Sat, 9 Jul 2016 17:18:39 +0000 (17:18 +0000)]
Revert "AMDGPU: Remove unused control flow intrinsic"

llvm-svn: 274978

8 years agoclang-format: [JS] Sort imports case insensitive.
Martin Probst [Sat, 9 Jul 2016 15:11:18 +0000 (15:11 +0000)]
clang-format: [JS] Sort imports case insensitive.

Summary: ASCII case sorting does not help finding imported symbols quickly, and it is common to have e.g. class Foo and function fooFactory exported/imported from the same file.

Reviewers: djasper

Subscribers: klimek, cfe-commits

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

llvm-svn: 274977

8 years agoclang-format: [JS] support trailing commas in imports.
Martin Probst [Sat, 9 Jul 2016 15:09:22 +0000 (15:09 +0000)]
clang-format: [JS] support trailing commas in imports.

Reviewers: djasper

Subscribers: cfe-commits, klimek

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

llvm-svn: 274976

8 years ago[analyzer] Older version of GCC 4.7 crash on lambdas in default arguments.
Benjamin Kramer [Sat, 9 Jul 2016 12:16:58 +0000 (12:16 +0000)]
[analyzer] Older version of GCC 4.7 crash on lambdas in default arguments.

llvm-svn: 274975

8 years ago[analyzer] Rewrite manual erase loop using remove_if.
Benjamin Kramer [Sat, 9 Jul 2016 11:16:56 +0000 (11:16 +0000)]
[analyzer] Rewrite manual erase loop using remove_if.

No functionality change intended.

llvm-svn: 274974

8 years ago[ArgPromote] Use function_ref and for-range loops.
Benjamin Kramer [Sat, 9 Jul 2016 10:36:36 +0000 (10:36 +0000)]
[ArgPromote] Use function_ref and for-range loops.

No functionality change intended.

llvm-svn: 274973

8 years agoAMDGPU: Merge / reorganize tests
Matt Arsenault [Sat, 9 Jul 2016 08:02:28 +0000 (08:02 +0000)]
AMDGPU: Merge / reorganize tests

llvm-svn: 274972

8 years agoAMDGPU: Simplify tests with per function subtargets
Matt Arsenault [Sat, 9 Jul 2016 07:55:03 +0000 (07:55 +0000)]
AMDGPU: Simplify tests with per function subtargets

llvm-svn: 274971

8 years agoAMDGPU: Prune AMDGPUAsmParser in libdeps.
NAKAMURA Takumi [Sat, 9 Jul 2016 07:54:27 +0000 (07:54 +0000)]
AMDGPU: Prune AMDGPUAsmParser in libdeps.

llvm-svn: 274970

8 years agoAMDGPU: Fix fdiv lowering when f32 denormals supported
Matt Arsenault [Sat, 9 Jul 2016 07:48:11 +0000 (07:48 +0000)]
AMDGPU: Fix fdiv lowering when f32 denormals supported

Also fix test not actually using function labels.

llvm-svn: 274969

8 years ago[X86] Use __builtin_ia32_vec_ext_v4hi and __builtin_ia32_vec_set_v4hi to implement...
Craig Topper [Sat, 9 Jul 2016 05:30:41 +0000 (05:30 +0000)]
[X86] Use __builtin_ia32_vec_ext_v4hi and __builtin_ia32_vec_set_v4hi to implement pextrw/pinsertw MMX intrinsics instead of trying to use native IR.

Without this we end up generating code that doesn't use mmx registers and probably doesn't work well with other mmx intrinsics.

llvm-svn: 274968

8 years ago[X86] Remove sse41 extract intrinsics. They are not used by clang and are not impleme...
Craig Topper [Sat, 9 Jul 2016 04:38:30 +0000 (04:38 +0000)]
[X86] Remove sse41 extract intrinsics. They are not used by clang and are not implemented by the x86 backend.

llvm-svn: 274967

8 years ago[X86] Remove and autoupgrade 512-bit non-temporal store intrinsics.
Craig Topper [Sat, 9 Jul 2016 04:38:27 +0000 (04:38 +0000)]
[X86] Remove and autoupgrade 512-bit non-temporal store intrinsics.

llvm-svn: 274966

8 years ago[X86] Uncomment the _mm_extract_ps test and add checks.
Craig Topper [Sat, 9 Jul 2016 04:38:17 +0000 (04:38 +0000)]
[X86] Uncomment the _mm_extract_ps test and add checks.

llvm-svn: 274965

8 years ago[esan] Add __esan_report for mid-run data
Derek Bruening [Sat, 9 Jul 2016 04:13:25 +0000 (04:13 +0000)]
[esan] Add __esan_report for mid-run data

Summary:
Adds a new public interface routine __esan_report() which can be used to
request profiling results prior to abnormal termination (e.g., for a server
process killed by its parent where the normal exit does not allow for
normal result reporting).

Implements this for the working-set tool.  The cache frag tool is left
unimplemented as it requires missing iteration capabilities.

Adds a new test.

Reviewers: aizatsky

Subscribers: vitalybuka, zhaoqin, kcc, eugenis, llvm-commits, kubabrecka

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

llvm-svn: 274964

8 years ago[LoopSimplify] Remove a comment which is unlikely to age well.
Davide Italiano [Sat, 9 Jul 2016 03:27:24 +0000 (03:27 +0000)]
[LoopSimplify] Remove a comment which is unlikely to age well.

Chandler pointed out in his review but I forgot to remove before
committing, my bad.

llvm-svn: 274963

8 years ago[PM] Port CrossDSOCFI to the new pass manager.
Davide Italiano [Sat, 9 Jul 2016 03:25:35 +0000 (03:25 +0000)]
[PM] Port CrossDSOCFI to the new pass manager.

llvm-svn: 274962

8 years ago[CFLAA] Make a constant variable `const`. NFC.
George Burgess IV [Sat, 9 Jul 2016 03:21:25 +0000 (03:21 +0000)]
[CFLAA] Make a constant variable `const`. NFC.

`const` was dropped by r274958, and the lack of `const` makes GCC6
(correctly) complain.

llvm-svn: 274961

8 years ago[PM] Fix a think-o. mv {Scalar,Vectorize}/SLPVectorize.h
Sean Silva [Sat, 9 Jul 2016 03:11:29 +0000 (03:11 +0000)]
[PM] Fix a think-o. mv {Scalar,Vectorize}/SLPVectorize.h

llvm-svn: 274960

8 years ago[PM] Port LoopSimplify to the new pass manager.
Davide Italiano [Sat, 9 Jul 2016 03:03:01 +0000 (03:03 +0000)]
[PM] Port LoopSimplify to the new pass manager.

While here move simplifyLoop() function to the new header, as
suggested by Chandler in the review.

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

llvm-svn: 274959

8 years ago[CFLAA] Move the graph builder out from CFLSteens. NFC.
George Burgess IV [Sat, 9 Jul 2016 02:54:42 +0000 (02:54 +0000)]
[CFLAA] Move the graph builder out from CFLSteens. NFC.

Patch by Jia Chen.

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

llvm-svn: 274958

8 years ago[CFLAA] Simplify CFLGraphBuilder. NFC.
George Burgess IV [Sat, 9 Jul 2016 02:48:56 +0000 (02:48 +0000)]
[CFLAA] Simplify CFLGraphBuilder. NFC.

This removes a few fields from the graph builder by making us compute
things (that we'd always compute anyway) more eagerly.

Patch by Jia Chen.

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

llvm-svn: 274957

8 years agoCodeGen: tweak CFString section for COFF, ELF
Saleem Abdulrasool [Sat, 9 Jul 2016 01:59:51 +0000 (01:59 +0000)]
CodeGen: tweak CFString section for COFF, ELF

Place the structure data into `cfstring`.  This both isolates the structures to
permit coalescing in the future (by the linker) as well as ensures that it
doesnt get marked as read-only data.  The structures themselves are not
read-only, only the string contents.

llvm-svn: 274956

8 years agoLivePhysRegs: addLiveOuts() can skip addPristines() in ret block
Matthias Braun [Sat, 9 Jul 2016 01:31:36 +0000 (01:31 +0000)]
LivePhysRegs: addLiveOuts() can skip addPristines() in ret block

Drive-by improvement: We would 1) add CSRs, 2) remove callee saved CSRs
and 3) add all CSRs again for the return block.  Just adding CSRs once
obviously gives the same results.

llvm-svn: 274955

8 years agoAMDGPU: Improve offset folding for register indexing
Matt Arsenault [Sat, 9 Jul 2016 01:13:56 +0000 (01:13 +0000)]
AMDGPU: Improve offset folding for register indexing

llvm-svn: 274954

8 years agoAMDGPU: Simplify isSchedulingBoundary
Matt Arsenault [Sat, 9 Jul 2016 01:13:51 +0000 (01:13 +0000)]
AMDGPU: Simplify isSchedulingBoundary

llvm-svn: 274953

8 years agoVirtRegMap: Replace some identity copies with KILL instructions.
Matthias Braun [Sat, 9 Jul 2016 00:19:07 +0000 (00:19 +0000)]
VirtRegMap: Replace some identity copies with KILL instructions.

An identity COPY like this:
   %AL = COPY %AL, %EAX<imp-def>
has no semantic effect, but encodes liveness information: Further users
of %EAX only depend on this instruction even though it does not define
the full register.

Replace the COPY with a KILL instruction in those cases to maintain this
liveness information. (This reverts a small part of r238588 but this
time adds a comment explaining why a KILL instruction is useful).

llvm-svn: 274952

8 years agoAsmPrinter: Fix emitKill() not flush()ing a raw_string_ostream
Matthias Braun [Sat, 9 Jul 2016 00:18:43 +0000 (00:18 +0000)]
AsmPrinter: Fix emitKill() not flush()ing a raw_string_ostream

llvm-svn: 274951

8 years agoAdded REQUIRES to TestingGuide documentation
Piotr Padlewski [Fri, 8 Jul 2016 23:47:29 +0000 (23:47 +0000)]
Added REQUIRES to TestingGuide  documentation

Reviewers: alexfh, wolfgangp, rengolin

Subscribers: llvm-commits

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

llvm-svn: 274949