Commit Graph

133405 Commits

Author SHA1 Message Date
Matt Arsenault
b8aff5533e AMDGPU: Run verifer after insert waits pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272338 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 23:19:14 +00:00
Matt Arsenault
3b52126962 AMDGPU: Remove incorrect assertion
I'm still not sure under what circumstances the offset here is non-0,
but private memory is not limited to 27-bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272337 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 23:19:08 +00:00
Matt Arsenault
dad6f6f388 AMDGPU: Properly initialize SIShrinkInstructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272336 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 23:18:47 +00:00
George Burgess IV
bec2df684f [CFLAA] Handle global/arg attrs more sanely.
Prior to this patch, we used argument/global stratified attributes in
order to note that a value could have come from either dereferencing a
global/arg, or from the assignment from a global/arg.

Now, AttrUnknown is placed on sets when we see a dereference, instead of
the global/arg attributes. This allows us to be more aggressive in the
future when we see global/arg attributes without AttrUnknown.

Patch by Jia Chen.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272335 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 23:15:04 +00:00
Vitaly Buka
af4c28d141 Unpoison stack memory in use-after-return + use-after-scope mode
Summary:
We still want to unpoison full stack even in use-after-return as it can be disabled at runtime.

PR27453

Reviewers: eugenis, kcc

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272334 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 23:05:35 +00:00
Alina Sbirlea
337c62e99d Reapply 272328 and 272329 as a single patch.
[cpu-detection] [amdfam10] Return barcelona, and amdfam10 for all other
subtypes. Address Bug 28067.

Along with the refactoring of Host.cpp, getHostCPUName() was modified to
return more precise types for CPUs in amdfam10.
However, callers of getHostCPUName() do string matching on type, so this
cannot be modified.
Currently there is support in the x86 backend for barcelona.
For all other subtypes the assumed return value is amdfam10.

Fix: getHostCPUName() returns barcelona subtype and amdfam10 for all
others. This can be extended further when support for the other subtypes
is added.

Differential revision: http://reviews.llvm.org/D21193

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272333 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 23:04:15 +00:00
Alina Sbirlea
3bd97ac17f Revert 272328 and 272329 to recommit as a single patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272332 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 23:04:05 +00:00
Alina Sbirlea
05161061c3 Keep barcelona subtype for amdfam10
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272329 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 22:47:36 +00:00
Alina Sbirlea
539e7710fb [cpu-detection] Return amdfam10 for all subtypes. Address Bug 28067.
Summary: Remove architecture subtype from the string returned by getHostCPUName(). String matching done on type.

Reviewers: llvm-commits, echristo

Subscribers: mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272328 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 22:47:12 +00:00
Chris Bieneman
22f7a63da6 [CMake] Cleanup ExternalProject usage of CMake 3.x features
All the ExternalProject features in use here are supported by CMake 3.4.3, so we don't need these version checks anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272327 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 22:41:36 +00:00
Easwaran Raman
f8bdcad7be Use ProfileSummaryInfo in inline cost analysis.
Instead of directly using MaxFunctionCount and function entry count to determine callee hotness, use the isHotFunction/isColdFunction methods provided by ProfileSummaryInfo.

Differential revision: http://reviews.llvm.org/D21045


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272321 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 22:23:21 +00:00
Simon Pilgrim
8f579ce1a6 [X86][AVX512] Added avx512 VPSLLDQ/VPSRLDQ instruction comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272319 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 22:03:15 +00:00
Quentin Colombet
80b353ddd5 [LiveRangeEdit] Fix a crash in eliminateDeadDef.
When we delete a live-range, we check if that live-range is the origin of others
to keep it around for rematerialization. For that we check that the instruction
we are about to remove is the same as the definition of the VNI of the original
live-range.
If this is the case, we just shrink the live-range to an empty one.

Now, when we try to delete one of the children of such live-range (product of
splitting), we do the same check.
However, now the original live-range is empty and there is no way we can
access the VNI to check its definition, and we crash.

When we cannot get the VNI for the original live-range, that means we are not in
the presence of the original definition. Thus, this check does not need to happen
in that case and the crash is sloved!

This bug was introduced in r266162 | wmi | 2016-04-12 20:08:27. It affects every
target that uses the greedy register allocator.
To happen, we need to delete both a the original instruction and its split
products, in that order. This is likely to happen when rematerialization comes
into play.

Trying to produce a more robust test case. Will follow in a coming commit.

This fixes llvm.org/PR27983.

rdar://problem/26651519 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272314 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 21:34:31 +00:00
Vedant Kumar
657b0484b9 [docs] Fix indentation for a tool option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272309 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 21:09:54 +00:00
Simon Pilgrim
3ddec70a78 [X86][AVX512] Dropped avx512 VPSLLDQ/VPSRLDQ intrinsics
Auto-upgrade to generic shuffles like sse/avx2 implementations now that we can lower to VPSLLDQ/VPSRLDQ 

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272308 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 21:09:03 +00:00
Simon Pilgrim
f921bac68f [X86][AVX512] Fixed issue with v16i32 shuffles lowering to VPALIGNR
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272307 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 20:53:12 +00:00
Duncan P. N. Exon Smith
52fe45ec5e BitcodeReader: Use std:::piecewise_construct when upgrading type refs
r267296 used std::piecewise_construct without using
std::forward_as_tuple, and r267298 hacked it out (using an emplace_back
followed by a couple of reset() calls) because of a problem on a bot.
I'm finally circling back to call forward_as_tuple as I should have to
begin with (thanks to David Blaikie for pointing out the missing piece).

Note that this code uses emplace_back() instead of
push_back(make_pair()) because the move constructor for TrackingMDRef is
expensive (cheaper than a copy, but still expensive).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272306 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 20:46:33 +00:00
Simon Pilgrim
9ceba992f6 [X86][AVX512] Added support for lowering 512-bit vector shuffles to bit/byte shifts
512-bit VPSLLDQ/VPSRLDQ can only be used for avx512bw targets so lowerVectorShuffleAsShift had to be adjusted to include the subtarget

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272300 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 20:13:58 +00:00
Justin Lebar
dd9e8b3bcc [NVPTX] Add intrinsics for shfl instructions.
Summary:
Currently clang emits these instructions via inline (volatile) asm in
the CUDA headers.  Switching to intrinsics will let the optimizer reason
across calls to these intrinsics.

Reviewers: tra

Subscribers: llvm-commits, jholewinski

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272298 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 20:04:08 +00:00
Sanjoy Das
1684d07087 NFC cleanup of InitializePasses.h
- Alphabetically sort the initializeXXX calls (this was brought up in
   D21115)
 - Remove repeated function names from doxygen comments

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272297 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 19:58:30 +00:00
Justin Lebar
e9ee1a2278 [NVPTX] Mark bar.sync intrinsic as convergent.
Summary:
__syncthreads, which corresponds to bar.sync 0, is already convergent.
This makes the more general bar.sync n likewise convergent.

Reviewers: tra

Subscribers: llvm-commits, jholewinski

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272295 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 19:49:26 +00:00
Easwaran Raman
33933df91a [PM] Port LCSSA to the new PM.
Differential Revision: http://reviews.llvm.org/D21090


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272294 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 19:44:46 +00:00
Vedant Kumar
4342472183 Revert "[lit] Use os.devnull instead of named temp files"
This reverts commit r272290. It breaks a test that depends on being able
to seek the /dev/null equivalent on Windows:

http://bb.pgr.jp/builders/ninja-clang-x64-mingw64-RA/builds/11360

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272293 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 19:36:48 +00:00
Wei Ding
39ce7152a2 AMDGPU/SI: Fix 32-bit fdiv lowering
We were using the fast fdiv lowering for all division, implementation of
IEEE754 fdiv is added.

http://reviews.llvm.org/D20557

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272292 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 19:17:15 +00:00
Vedant Kumar
20c54a3a30 [lit] Use os.devnull instead of named temp files
Use os.devnull instead of tempfiles when substituting '/dev/null' on
Windows machines. This should make the bots just a bit speedier.

Thanks to Yunzhong Gao for testing this patch on Windows!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272290 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 18:38:41 +00:00
Michael Kuperstein
26a9a137a4 [LV] Use vector phis for some secondary induction variables
Previously, we materialized secondary vector IVs from the primary scalar IV,
by offseting the primary to match the correct start value, and then broadcasting
it - inside the loop body. Instead, we can use a real vector IV, like we do for
the primary.

This enables using vector IVs for secondary integer IVs whose type matches the
type of the primary.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272283 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 18:03:15 +00:00
Chris Bieneman
08b0a6d0ed [CMake] Add LLVM_TOOLS_INSTALL_DIR to LLVMConfig.cmake
This is the more-correct fix to out-of-tree building. AddLLVM.cmake relies on this variable being set, so we should make sure it is set in LLVMConfig.cmake.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272279 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 17:22:02 +00:00
Davide Italiano
a72ade5c07 Also fix a typo. Need more coffee today.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272278 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 17:06:01 +00:00
Davide Italiano
c4c43eaa95 Improve r272262, check that __stack_chk_guard is used.
Thanks to Rafael for the suggestion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272277 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 17:04:38 +00:00
Jan Vesely
406c47ff89 SelectionDAG: Implement expansion of {S,U}MIN/MAX in integer legalization
Fixes {u,}long_{min,max,clamp} opencl piglit regressions on EG.

Reviewers: arsenm
Differential Revision: http://reviews.llvm.org/D17898

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272272 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 16:04:00 +00:00
Hans Wennborg
5fe52b9fdf PDB/Raw/Hash.h: try to fix VS2013 build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272269 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 15:33:06 +00:00
Haicheng Wu
c4f2258852 Reapply "[MBP] Reduce code size by running tail merging in MBP.""
This reapplies commit r271930, r271915, r271923.  They hit a bug in
Thumb which is fixed in r272258 now.

The original message:

The code layout that TailMerging (inside BranchFolding) works on is not the
final layout optimized based on the branch probability. Generally, after
BlockPlacement, many new merging opportunities emerge.

This patch calls Tail Merging after MBP and calls MBP again if Tail Merging
merges anything.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272267 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 15:24:29 +00:00
Ulrich Weigand
09f4ea27b7 [SystemZ] Enable long displacement constraints for inline ASM operands
This enables use of the 'S' constraint for inline ASM operands on
SystemZ, which allows for a memory reference with a signed 20-bit
immediate displacement. This patch includes corresponding documentation
and test case updates.

I've changed the 'T' constraint to match the new behavior for 'S', as
'T' also uses a long displacement (though index constraints are still
not implemented). I also changed 'm' to match the behavior for 'S' as
this will allow for a wider range of displacements for 'm', though
correct me if that's not the right decision.

Author: colpell
Differential Revision: http://reviews.llvm.org/D21097



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272266 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 15:19:16 +00:00
Davide Italiano
cbf7512550 Move stackguard test to X86/ directory as it's not generic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272264 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 15:16:58 +00:00
Davide Italiano
cb6cf5b6ec [CodeGen] Change getSDagStackGuard to get an internal sym.
Fixes a crash in the backend during an LTO build of rtld(1) in
FreeBSD.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272262 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 14:23:38 +00:00
Hrvoje Varga
221d208604 [mips][microMIPS] Implement BOVC, BNVC, EXT, INS and JALRC instructions
Differential Revision: http://reviews.llvm.org/D11798


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272259 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 12:57:23 +00:00
James Molloy
fe8f3cffbd [Thumb] A branch is not part of an IT block
ReplaceTailWithBranchTo assumed that if an instruction is predicated, it must be part of an IT block. This is not correct for conditional branches.

No testcase as this was triggered by the reverted patch r272017 - test coverage will occur when that patch is re-reverted and there is no known way to trigger this in the meantime.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272258 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 11:51:29 +00:00
Igor Breger
de21197e48 [AVX512] Remove masked_move/blendm intrinsic from back-end.
This is complement patch to D21060.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272257 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 11:46:55 +00:00
Zlatko Buljan
2edd549258 [mips][microMIPS] Add CodeGen support for SEL.*, SELEQZ, SELNEZ, SELEQZ.*, SELNEZ.* and CMP.condn.fmt instructions
Differential Revision: http://reviews.llvm.org/D20862


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272256 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 11:15:53 +00:00
Sam Kolton
eb66787999 [AMDGPU] Disassembler: Support for sdwa instructions
Reviewers: vpykhtin, tstellarAMD

Subscribers: arsenm, kzhuravl

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272255 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 11:04:45 +00:00
Diana Picus
1063f931d5 [llc] Remove exit-on-error flag from MIR tests (PR27770)
This is made possible by removing an assert in llc that assumed
MIRParser::parseLLVMModule would exit on error. MIRParser's documentation states
that it returns null if a parsing error occurs, so there's no reason to assert.
We can instead just fall through to where the check for a module is performed
and exit if it is null.

This commit is part of the clean-up after r269655.

Fixes PR27770

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272254 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 10:31:05 +00:00
Craig Topper
b867bf3ea9 [AVX512] Fix shuffle decode printing for several instructions with write masks. There are still more bugs here with UNPCK and PALIGN for sure. But these were the easiest ones to fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272252 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 07:49:08 +00:00
James Molloy
95709cad3b [Thumb] Select a BIC instead of AND if the immediate can be encoded more optimally negated
If an immediate is only used in an AND node, it is possible that the immediate can be more optimally materialized when negated. If this is the case, we can negate the immediate and use a BIC instead;

  int i(int a) {
    return a & 0xfffffeec;
  }

Used to produce:
    ldr r1, [CONSTPOOL]
    ands r0, r1
  CONSTPOOL: 0xfffffeec

And now produces:
    movs    r1, #255
    adds    r1, #20  ; Less costly immediate generation
    bics    r0, r1

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272251 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 07:39:08 +00:00
Craig Topper
cadff981d8 [X86] Fix a test I failed to re-generate in r272249.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272250 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 07:10:34 +00:00
Craig Topper
1b683873d6 [X86] Bring consistent naming to the SSE/AVX and AVX512 PALIGNR instructions. Then add shuffle decode printing for the EVEX forms which is made easier by having the naming structure more similar to other instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272249 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 07:06:38 +00:00
Craig Topper
d7bd8be924 [X86] Fix bad comment in assert. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272248 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 07:06:33 +00:00
Xinliang David Li
035a5a9202 Revert r272194 No need for it if loop Analysis Manager is used
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272243 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 03:22:39 +00:00
Saleem Abdulrasool
ecb6658e47 test: fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272242 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 03:14:32 +00:00
Saleem Abdulrasool
d389f8dd86 AArch64: support the .arch directive in the IAS
Add support to the AArch64 IAS for the `.arch` directive.  This allows the
assembly input to use architectural functionality in part of a file.  This is
used in existing code like BoringSSL.

Resolves PR26016!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272241 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 02:56:40 +00:00
Kostya Serebryany
41a5827cd3 [libFuzzer] add one more OOM test, which we currently don't handle very well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272240 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-09 01:20:35 +00:00