135555 Commits

Author SHA1 Message Date
Craig Topper
44eb5c2928 [AVX512] Fix the ExeDomain for some packed fp instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276392 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 05:00:42 +00:00
Craig Topper
55cd727608 [AVX512] Add load folding for some AVX512VL logic and arithmetic instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276391 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 05:00:39 +00:00
Craig Topper
71a0540303 [AVX512] Update X86InstrInfo::foldMemoryOperandCustom to handle the EVEX encoded instructions too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276390 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 05:00:35 +00:00
David Majnemer
14834723b0 Don't remove side effecting instructions due to ConstantFoldInstruction
Just because we can constant fold the result of an instruction does not
imply that we can delete the instruction.  It may have side effects.

This fixes PR28655.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276389 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 04:54:44 +00:00
Xinliang David Li
9fb35fc1cc Sync up InstrProfData.inc with compiler-rt with fixes to references
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276388 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 04:46:56 +00:00
Xinliang David Li
ffdd4801d1 Revert 276386
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276387 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 04:31:26 +00:00
Xinliang David Li
4e19f6e23a Sync up InstrProfData.inc with compiler-rt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276386 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 04:18:17 +00:00
Pete Cooper
632eb5388b Fix r276380 for targets without REALPATH.
This was a mistake in the layout of the code from r276380.  I moved the appropriate lines out of the #ifdef to fix it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276382 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 01:52:58 +00:00
Pete Cooper
59023bf389 Avoid dsymutil calls to getFileNameByIndex.
This change adds a hasFileAtIndex method. getChildDeclContext can first call this method, and if it returns true it knows it can then lookup the resolved path cache for the given file index. If we hit that cache then we don't even have to call getFileNameByIndex.

Running dsymutil against the swift executable built from github gives a 20% performance improvement without any change in the binary.

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

Reviewed by friss.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276380 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 01:41:32 +00:00
Vitaly Buka
cb5c574105 Fix detection of stack-use-after scope for char arrays.
Summary:
Clang inserts GetElementPtrInst so findAllocaForValue was not
able to find allocas.

PR27453

Reviewers: kcc, eugenis

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276374 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 00:56:17 +00:00
Sanjoy Das
b00a4057b3 [IRCE] Don't misuse CHECK-LABEL; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276373 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 00:41:02 +00:00
Sanjoy Das
304682fc9c [IRCE] Add an option to skip profitability checks
If `-irce-skip-profitability-checks` is passed in, IRCE will kick in in
all cases where it is legal for it to kick in.  This flag is intended to
help diagnose and analyse performance issues.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276372 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 00:40:56 +00:00
Sebastian Pop
09d947ac61 GVN-hoist: move check before mutating the IR
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276368 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 00:07:01 +00:00
David Majnemer
a8d06bee41 [AArch64] Cleanup sign extend in genAlternativeCodeSequence
Use the machinery in MathExtras instead of rolling it by hand.

This fixes PR28624.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276366 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 23:46:56 +00:00
Sebastian Pop
96c53f4696 GVN-hoist: add missing check for all GEP operands available
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276364 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 23:32:39 +00:00
Vedant Kumar
23553e9b24 [llvm-cov] Strengthen a test case
Check that stylesheets work when we're not using -output-dir.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276363 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 23:31:26 +00:00
Douglas Katzman
4f9c571a90 [Sparc]: Fix bug in LowerSTORE due to r275592
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276362 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 23:28:54 +00:00
Sanjay Patel
ff2ae48761 [InstCombine] break up foldICmpEqualityWithConstant(); NFCI
Almost all of these folds require changes to allow vector types. 
Splitting up the logic should make that easier to do incrementally.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276360 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 23:27:36 +00:00
Vedant Kumar
6aa68be50e [llvm-cov] Use relative paths to the stylesheet (for html reports)
This makes it easy to swap out the default stylesheet for a custom one.
It also shaves ~6.62 MB out of the report directory for a full coverage
build of llvm+clang.

While we're at it, prune the CSS and add tests for it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276359 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 23:26:15 +00:00
Sebastian Pop
0eeda09fc4 GVH-hoist: only clone GEPs (PR28606)
Do not clone stored values unless they are GEPs that are special cased to avoid
hoisting them without hoisting their associated ld/st.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276358 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 23:22:10 +00:00
Daniel Dunbar
fe1bb06072 [lit] Use full config path in diagnostics.
- This allows tools like emacs to automatically find the config file path when
   you step through errors.

 - Patch by Dave Abrahams.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276357 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 23:20:41 +00:00
Xinliang David Li
5a06a46a4f [Profile] deprecate __llvm_profile_override_default_filename
This eliminates unncessary calls and init functions.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276354 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 23:19:10 +00:00
Daniel Dunbar
f593e4de93 [lit] Bump version number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276353 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 23:17:44 +00:00
Wei Mi
3a4fa31d34 [PM] Port NaryReassociate to the new PM
Differential Revision: https://reviews.llvm.org/D22648


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276349 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 22:28:52 +00:00
Quentin Colombet
a2132baaff [MIRTesting] Abort when failing to parse a function.
When we failed to parse a function in the mir parser, we should abort
the whole compilation instead of continuing in a weird state. Indeed,
this was creating strange machine function passes failures that were
hard to understand, until we notice that the function actually did not
get parsed correctly!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276348 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 22:25:57 +00:00
Michael Kuperstein
39008ac365 [X86] Do not use AND8ri8 in AVX512 pattern
This variant is (as documented in the TD) for disassembler use only, and should
not be used in patterns - it is longer, and is broken on 64-bit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276347 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 22:24:08 +00:00
Sanjay Patel
366a2caf93 [InstSimplify] don't crash handling a pointer or aggregate type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276345 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 21:56:00 +00:00
Akira Hatanaka
477502e694 [AArch64][Inline-Asm] Return the 32-bit floating point register class
when constraint "w" is used on a 32-bit operand.

This enables compiling the following code, which used to error out in
the backend:

void foo1(int a) {
  asm volatile ("sqxtn h0, %s0\n" : : "w"(a):);
}

Fixes PR28633.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276344 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 21:39:05 +00:00
Michael Gottesman
f517b9f699 [cmake] Move the including of utils/unittests under LLVM_INCLUDE_UTILS instead of LLVM_INCLUDE_TESTS.
This does not change anything by default since LLVM_INCLUDE_UTILS is already set
to TRUE by default. In addition, since LLVM_INCLUDE_TESTS => LLVM_INCLUDE_UTILS,
the only way that this can cause changes is in the case where LLVM_INCLUDE_UTILS
is set to TRUE, but LLVM_INCLUDE_TESTS is FALSE. In that case, building gtest is
not a huge cost.

The reason to do this is that without this change, one can not turn off
LLVM_INCLUDE_TESTS in downstream projects that also use gtest for unittests. It
also just in general makes more sense since LLVM_INCLUDE_UTILS gates FileCheck
and other utilities that are along the lines of gtest.

Additionally from talking with chandlerc, this was not done for any specific
reason, so there is no reason not to do it and lots of benefit to doing it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276342 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 21:35:23 +00:00
Sanjay Patel
32995b5eb3 [InstSimplify] recognize trunc + icmp sgt/slt variants of select simplifications (PR28466)
rL245171 exposed a hole in InstSimplify that manifested in a strange way in PR28466:
https://llvm.org/bugs/show_bug.cgi?id=28466

It's possible to use trunc + icmp sgt/slt in place of an and + icmp eq/ne, so we need to
recognize that pattern to eliminate selects that are choosing between some value and some
bitmasked version of that value.

Note that there is significant room for improvement (refactoring) and enhancement (more
patterns, possibly in InstCombine rather than here).

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276341 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 21:26:45 +00:00
Adam Nemet
4d4b609de8 [OptDiag,LDist] Convert remaining opt remarks to use the new API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276340 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 21:21:34 +00:00
Matthew Simpson
0414f48742 [LV] Move vector int induction update to end of latch
This patch moves the update instruction for vectorized integer induction phi
nodes to the end of the latch block. This ensures consistent placement of all
induction updates across all the kinds of int inductions we create (scalar,
splat vector, or vector phi).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276339 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 21:20:15 +00:00
Reid Kleckner
09577f3859 Fix the clang-cl self-host with VS 2013 headers
std::numeric_limits<int64_t>::max() is not constexpr in VC 2013 headers,
and Clang complains that it isn't. MSVC 2013 itself is emitting a
dynamic initializer for this thing. Instead, use an enum.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276334 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 21:06:04 +00:00
George Burgess IV
d0a4a04032 Normalize file docs. NFC.
Having the added `\brief` made doxygen interpret it as the summary for
the `llvm` namespace (visible at:
http://llvm.org/doxygen/namespaces.html).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276331 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 20:52:35 +00:00
Rong Xu
8dbdfe6cb7 [PGO] Make needsComdatForCounter() available (NFC)
Move needsComdatForCounter() to lib/ProfileData/InstrProf.cpp from
lib/Transforms/Instrumentation/InstrProfiling.cpp to make is available for
other files.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276330 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 20:50:02 +00:00
Sanjay Patel
d1938d1914 add vector tests and a simpler version of the negative tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276328 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 20:11:08 +00:00
Renato Golin
568aa3276e [docs] Move GitHub to GitHubSubMod
Given that other proposals are making their way through, it's better if we
specify what GitHub proposal this is, in case there are others that also
involve GitHub, but not sub-modules.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276325 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 19:52:27 +00:00
Richard Osborne
2e6126ac6b Transfer ownership of the XCore backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276321 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 19:20:57 +00:00
Anna Thomas
d89a69b5fd Revert "Invariant start/end intrinsics overloaded for address space"
This reverts commit r276316.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276320 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 19:06:28 +00:00
Sanjoy Das
e50f54b403 [IndVars] Reflow oddly formatted condition; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276319 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 18:58:01 +00:00
Anna Thomas
4227f92f58 Invariant start/end intrinsics overloaded for address space
Summary:
The llvm.invariant.start and llvm.invariant.end intrinsics currently
support specifying invariant memory objects only in the default address space.

With this change, these intrinsics are overloaded for any adddress space for memory objects
and we can use these llvm invariant intrinsics in non-default address spaces.

Example: llvm.invariant.start.p1i8(i64 4, i8 addrspace(1)* %ptr)

This overloaded intrinsic is needed for representing final or invariant memory in managed languages.

Reviewers: tstellarAMD, reames, apilipenko

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276316 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 18:41:44 +00:00
Sanjay Patel
990df03c65 make InstCombine compare helper functions private; NFC
Also, rename some of them for consistency and to follow current conventions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276312 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 18:07:40 +00:00
Vedant Kumar
12a672ec61 Avoid a string copy, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276310 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 17:50:07 +00:00
Quentin Colombet
9abf24c5c4 [IRTranslator] Add G_SUB opcode.
This commit adds a generic SUB opcode to global-isel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276308 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 17:26:50 +00:00
Quentin Colombet
b6237e4b89 [llvm-config][GlobalISel] Canonicalize LLVM_HAS_GLOBAL_ISEL on ON/OFF.
Previously LLVM_HAS_GLOBAL_ISEL would directly get the value of
LLVM_BUILD_GLOBAL_ISEL. This could be any integer value and not just ON
and OFF. The problem is that lit.cfg was checking for ON to define that
global-isel was supported, thus if we were setting
LLVM_BUILD_GLOBAL_ISEL with an integer value, say 1, this test would
fail whereas we do build global-isel and want to test it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276307 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 17:26:47 +00:00
Quentin Colombet
92934fae66 [CMake][GlobalISel] Turn LLVM_BUILD_GLOBAL_ISEL into an option. NFC.
Previously LLVM_BUILD_GLOBAL_ISEL was a boolean variable and although,
this is strictly identical to an option, it did not convey the
information that the user may set it. Options are here for that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276306 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 17:26:45 +00:00
Quentin Colombet
368a8a2f01 [IRTranslator] Add comments to explain the ordering of the switch. NFC.
Group arithmetic operations, bitwise operations, and branch operations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276305 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 17:26:41 +00:00
Sanjay Patel
ec559e1ab3 [InstCombine] break up visitICmpInstWithInstAndIntCst(); NFCI
Making smaller pieces out of some of these ~1000 line functions should make
it easier to incrementally upgrade them to handle vector types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276304 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 17:15:49 +00:00
Renato Golin
b2e96ced1e Adding RELEASE_TESTERS.TXT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276302 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 16:46:44 +00:00
Konstantin Zhuravlyov
82910c89dd [AMDGPU] Emit read-only data to .rodata for hsa
Differential Revision: https://reviews.llvm.org/D22538


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276298 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 15:59:23 +00:00