OSDN Git Service

android-x86/external-llvm.git
8 years agoExtract renaming from D19181
Amaury Sechet [Mon, 23 May 2016 16:38:25 +0000 (16:38 +0000)]
Extract renaming from D19181

Summary: This needs to get in before anything is released concerning attribute. If the old name gets in the wild, then we are stuck with it forever. Putting it in its own diff should getting that part at least in fast.

Reviewers: Wallbraker, whitequark, joker.eph, echristo, rafael, jyknight

Subscribers: llvm-commits, joker.eph

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270452 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[profile] show more statistics
Xinliang David Li [Mon, 23 May 2016 16:36:11 +0000 (16:36 +0000)]
[profile] show more statistics

Add value profile statistics with the 'show' command.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270450 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agollvm-dwp: Add an abstraction for the DWP string pool
David Blaikie [Mon, 23 May 2016 16:32:11 +0000 (16:32 +0000)]
llvm-dwp: Add an abstraction for the DWP string pool

Also reference strings in the memory mapped file, reduces memory usage
on a large test case by 18.5%.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270449 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemoving a switch statement that contains only a default label; NFC.
Aaron Ballman [Mon, 23 May 2016 15:52:59 +0000 (15:52 +0000)]
Removing a switch statement that contains only a default label; NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270444 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[BPF] Remove exit-on-error flag in test (PR27766)
Diana Picus [Mon, 23 May 2016 14:57:19 +0000 (14:57 +0000)]
[BPF] Remove exit-on-error flag in test (PR27766)

The exit-on-error flag on the many_args1.ll test is needed to avoid an
unreachable in BPFTargetLowering::LowerCall. We can also avoid it by ignoring
any superfluous arguments to the call (i.e. any arguments after the first 5).

Fixes PR27766.

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

v2 of r270419

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270440 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][RTM] _xabort() should not have "noreturn" attribute
Asaf Badouh [Mon, 23 May 2016 14:04:17 +0000 (14:04 +0000)]
[X86][RTM] _xabort() should not have "noreturn" attribute

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270437 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[InlineAsm] Avoid creating extra string instances in ConstraintInfo::Parse()
Alexander Potapenko [Mon, 23 May 2016 13:58:04 +0000 (13:58 +0000)]
[InlineAsm] Avoid creating extra string instances in ConstraintInfo::Parse()

Don't create unnecessary std::string objects when pushing back to |pCodes|.
NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270436 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX] Added tests that access ymm registers before and after explicit vzeroupper...
Simon Pilgrim [Mon, 23 May 2016 13:03:45 +0000 (13:03 +0000)]
[X86][AVX] Added tests that access ymm registers before and after explicit vzeroupper/vzeroall calls

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270434 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReverts "[BPF] Remove exit-on-error flag in test (PR27766)"
Renato Golin [Mon, 23 May 2016 13:02:11 +0000 (13:02 +0000)]
Reverts "[BPF] Remove exit-on-error flag in test (PR27766)"

This patch reverts r270419 because it broke a lot of buildbots,
mostly Windows. We'd like help in investigating the issues, but
for now, it should stay out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270433 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Regenerated scalar load folding tests
Simon Pilgrim [Mon, 23 May 2016 12:53:09 +0000 (12:53 +0000)]
[X86][SSE] Regenerated scalar load folding tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270431 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Regenerated partial register update tests
Simon Pilgrim [Mon, 23 May 2016 12:49:37 +0000 (12:49 +0000)]
[X86][SSE] Regenerated partial register update tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270430 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Updated sse/avx cvtsi2sd tests to use non-constant value
Simon Pilgrim [Mon, 23 May 2016 12:41:51 +0000 (12:41 +0000)]
[X86][SSE] Updated sse/avx cvtsi2sd tests to use non-constant value

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270425 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE2] Regenerated sse2 upgraded intrinsics tests
Simon Pilgrim [Mon, 23 May 2016 12:40:11 +0000 (12:40 +0000)]
[X86][SSE2] Regenerated sse2 upgraded intrinsics tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270423 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX] Regenerated avx upgraded intrinsics tests
Simon Pilgrim [Mon, 23 May 2016 12:39:06 +0000 (12:39 +0000)]
[X86][AVX] Regenerated avx upgraded intrinsics tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270422 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[BPF] Remove exit-on-error flag in test (PR27766)
Diana Picus [Mon, 23 May 2016 12:33:34 +0000 (12:33 +0000)]
[BPF] Remove exit-on-error flag in test (PR27766)

The exit-on-error flag on the many_args1.ll test is needed to avoid an
unreachable in BPFTargetLowering::LowerCall. We can also avoid it by ignoring
any superfluous arguments to the call (i.e. any arguments after the first 5).

Fixes PR27766

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270419 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Sparc] LEON erratum fix - Delay Slot Filler modification.
Chris Dewhurst [Mon, 23 May 2016 11:52:28 +0000 (11:52 +0000)]
[Sparc] LEON erratum fix - Delay Slot Filler modification.

This code should have been with the previous check-in (r270417) and prevents the DelaySlotFiller pass being utilized in functions where the erratum fix has been applied as this will break the run-time code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270418 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Sparc][LEON] LEON Erratum fix. Insert NOP after LD or LDF instruction.
Chris Dewhurst [Mon, 23 May 2016 10:56:36 +0000 (10:56 +0000)]
[Sparc][LEON] LEON Erratum fix. Insert NOP after LD or LDF instruction.

Due to an erratum in some versions of LEON, we must insert a NOP after any LD or LDF instruction to ensure the processor has time to load the value correctly before using it. This pass will implement that erratum fix.

The code will have no effect for other Sparc, but non-LEON processors.

Differential Review: http://reviews.llvm.org/D20353

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270417 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AMDGPU] Assembler: refactor parsing of modifiers and immediates. Allow modifiers...
Sam Kolton [Mon, 23 May 2016 09:59:02 +0000 (09:59 +0000)]
[AMDGPU] Assembler: refactor parsing of modifiers and immediates. Allow modifiers for imms.

Reviewers: nhaustov, tstellarAMD

Subscribers: kzhuravl, arsenm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270415 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTest commit
Jacob Baungard Hansen [Mon, 23 May 2016 09:41:44 +0000 (09:41 +0000)]
Test commit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270414 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[SCCP] Update comment to reflect reality.
Davide Italiano [Mon, 23 May 2016 09:34:50 +0000 (09:34 +0000)]
[SCCP] Update comment to reflect reality.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270413 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoEnable use of sigaltstack for signal handlers when available. With this,
Richard Smith [Mon, 23 May 2016 06:47:37 +0000 (06:47 +0000)]
Enable use of sigaltstack for signal handlers when available. With this,
backtraces from the signal handler on stack overflow now work reliably (on my
system at least...).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270395 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Use instruction aliases to replace custom asm parser code for optimizing moves...
Craig Topper [Mon, 23 May 2016 04:02:27 +0000 (04:02 +0000)]
[X86] Use instruction aliases to replace custom asm parser code for optimizing moves to use 2 byte VEX prefix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270394 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "Modify emitTypeInformation to use MemoryTypeTableBuilder"
David Majnemer [Mon, 23 May 2016 01:37:45 +0000 (01:37 +0000)]
Revert "Modify emitTypeInformation to use MemoryTypeTableBuilder"

This reverts commit r270106.  It results in certain function types
omitted in the output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270389 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Add patterns to implement stores of extracts of least signficant subvectors...
Craig Topper [Sun, 22 May 2016 23:44:33 +0000 (23:44 +0000)]
[AVX512] Add patterns to implement stores of extracts of least signficant subvectors using XMM or YMM stores instead of the vector extract instructions.

Similar is already done for AVX and we had lost it going to AVX512VL.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270383 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Kaleidoscope] Fix static global ordering to prevent crash on exit.
Lang Hames [Sun, 22 May 2016 22:48:36 +0000 (22:48 +0000)]
[Kaleidoscope] Fix static global ordering to prevent crash on exit.

If TheModule is declared before LLVMContext then it will be destructed after it,
crashing when it tries to deregister itself from the destructed context.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270381 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Added extra i8 extract element test
Simon Pilgrim [Sun, 22 May 2016 20:35:42 +0000 (20:35 +0000)]
[X86][SSE] Added extra i8 extract element test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270379 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[x86, AVX] don't add a vzeroupper if that's what the code is already doing (PR27823)
Sanjay Patel [Sun, 22 May 2016 20:22:47 +0000 (20:22 +0000)]
[x86, AVX] don't add a vzeroupper if that's what the code is already doing (PR27823)

This isn't the complete fix, but it handles the trivial examples of duplicate vzero* ops in PR27823:
https://llvm.org/bugs/show_bug.cgi?id=27823
...and amusingly, the bogus cases already exist as regression tests, so let's take this baby step.

We'll need to do more in the general case where there's legitimate AVX usage in the function + there's
already a vzero in the code.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270378 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[x86, AVX] add test file to show vzeroupper pass excesses
Sanjay Patel [Sun, 22 May 2016 19:55:48 +0000 (19:55 +0000)]
[x86, AVX] add test file to show vzeroupper pass excesses

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270375 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoreduce indent; NFC
Sanjay Patel [Sun, 22 May 2016 17:08:52 +0000 (17:08 +0000)]
reduce indent; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270372 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agouse 'auto' with 'dyn_cast'; fix formatting; NFC
Sanjay Patel [Sun, 22 May 2016 16:07:20 +0000 (16:07 +0000)]
use 'auto' with 'dyn_cast'; fix formatting; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270370 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ValueTracking, InstCombine] extend isKnownToBeAPowerOfTwo() to handle vector splat...
Sanjay Patel [Sun, 22 May 2016 15:41:53 +0000 (15:41 +0000)]
[ValueTracking, InstCombine] extend isKnownToBeAPowerOfTwo() to handle vector splat constants

We could try harder to handle non-splat vector constants too,
but that seems much rarer to me.

Note that the div test isn't resolved because there's a check
for isIntegerTy() guarding that transform.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270369 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Implement missing patterns for any_extend load lowering.
Igor Breger [Sun, 22 May 2016 10:21:04 +0000 (10:21 +0000)]
[AVX512] Implement missing patterns for any_extend load lowering.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270357 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] The AVX512 file only need subtract_subvector index 0 patterns where the...
Craig Topper [Sun, 22 May 2016 07:40:58 +0000 (07:40 +0000)]
[AVX512] The AVX512 file only need subtract_subvector index 0 patterns where the source is 512-bits. The 256-bit source patterns were redundant with AVX.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270356 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Add an AddedComplexity line to the 512-bit insert_subvector undef index...
Craig Topper [Sun, 22 May 2016 07:40:40 +0000 (07:40 +0000)]
[AVX512] Add an AddedComplexity line to the 512-bit insert_subvector undef index 0 patterns. This gives them higher priority than the memory patterns. This matches AVX1/2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270355 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Change the AddedComplexity on some patterns to match their AVX/SSE equivalen...
Craig Topper [Sun, 22 May 2016 06:09:34 +0000 (06:09 +0000)]
[AVX512] Change the AddedComplexity on some patterns to match their AVX/SSE equivalents. This helps group them close together in the isel tables and enable table compression.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270354 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agobug fix: trim section specifier name length
Xinliang David Li [Sun, 22 May 2016 01:21:21 +0000 (01:21 +0000)]
bug fix: trim section specifier name length

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270349 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Add a common check-prefix to both run lines on a test so identical checks appea...
Craig Topper [Sun, 22 May 2016 00:39:33 +0000 (00:39 +0000)]
[X86] Add a common check-prefix to both run lines on a test so identical checks appear just once.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270345 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Add a couple patterns to fix some cases where two vector mask inversions...
Craig Topper [Sun, 22 May 2016 00:39:30 +0000 (00:39 +0000)]
[AVX512] Add a couple patterns to fix some cases where two vector mask inversions could appear in a row.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270344 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Remove seemingly unnecessary AddedComplexity adjustment.
Craig Topper [Sun, 22 May 2016 00:39:27 +0000 (00:39 +0000)]
[AVX512] Remove seemingly unnecessary AddedComplexity adjustment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270343 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[profile] Static counter allocation for value profiling (part-1)
Xinliang David Li [Sat, 21 May 2016 22:55:34 +0000 (22:55 +0000)]
[profile]  Static counter allocation for value profiling (part-1)

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270336 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Remove unnecessary alignment check on patterns that use VEXTRACTF128 for intege...
Craig Topper [Sat, 21 May 2016 22:50:18 +0000 (22:50 +0000)]
[X86] Remove unnecessary alignment check on patterns that use VEXTRACTF128 for integer types when only AVX1 is supported.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270335 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Add patterns for extracting subvectors and storing to memory.
Craig Topper [Sat, 21 May 2016 22:50:14 +0000 (22:50 +0000)]
[AVX512] Add patterns for extracting subvectors and storing to memory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270334 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Capitalize the Z in VEXTRACTPSzmr. Lowercase z has been primarily used to...
Craig Topper [Sat, 21 May 2016 22:50:11 +0000 (22:50 +0000)]
[AVX512] Capitalize the Z in VEXTRACTPSzmr. Lowercase z has been primarily used to indicating the zero masking behavior which is not the case here. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270333 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Rename vector extract instructions so 'mr' intead of 'rm' to reflect the...
Craig Topper [Sat, 21 May 2016 22:50:09 +0000 (22:50 +0000)]
[AVX512] Rename vector extract instructions so 'mr' intead of 'rm' to reflect the fact that memory is the destination.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270332 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Fix copy/paste mistake a I made in a comment.
Craig Topper [Sat, 21 May 2016 22:50:04 +0000 (22:50 +0000)]
[AVX512] Fix copy/paste mistake a I made in a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270331 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix 80-column violation.
Chad Rosier [Sat, 21 May 2016 21:12:06 +0000 (21:12 +0000)]
Fix 80-column violation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270329 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LiveIntervalAnalysis] Don't dereference an end iterator in repairIntervalsInRange
Hal Finkel [Sat, 21 May 2016 16:03:50 +0000 (16:03 +0000)]
[LiveIntervalAnalysis] Don't dereference an end iterator in repairIntervalsInRange

This fixes a bug introduced in:

  r262115 - CodeGen: Take MachineInstr& in SlotIndexes and LiveIntervals, NFC

The iterator End here might == MBB->end(), and so we can't unconditionally
dereference it. This often goes unnoticed (I don't have a test case that always
crashes, and ASAN does not catch it either) because the function call arguments are
turned right back into iterators. MachineInstrBundleIterator's constructor,
however, does have an assert which might randomly fire.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270323 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Clang][AVX512][intrinsics] Fix rcp and sqrt intrinsics.
Michael Zuckerman [Sat, 21 May 2016 14:44:18 +0000 (14:44 +0000)]
[Clang][AVX512][intrinsics] Fix rcp and sqrt intrinsics.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270322 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Clang][AVX512][intrinsics] Fix vscalef intrinsics.
Michael Zuckerman [Sat, 21 May 2016 11:09:53 +0000 (11:09 +0000)]
[Clang][AVX512][intrinsics] Fix vscalef intrinsics.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270321 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-readobj] - Teach readobj to recognize SHF_COMPRESSED flag.
George Rimar [Sat, 21 May 2016 10:16:58 +0000 (10:16 +0000)]
[llvm-readobj] - Teach readobj to recognize SHF_COMPRESSED flag.

Main problem here was that SHF_COMPRESSED has the same value with
XCORE_SHF_CP_SECTION, which was included as standart (common) flag.
As far I understand xCore is a family of controllers and it that
means it's constant should be processed separately,
only if e_machine == EM_XCORE, otherwise llvm-readobj would output
different constants twice for compressed section:

Flags [
..
SHF_COMPRESSED (0x800)
..
XCORE_SHF_CP_SECTION (0x800)
..
]

what probably does not make sence if you're not working with xcore file.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270320 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Add patterns for VEXTRACT v16i16->v8i16 and v32i8->v16i8. Disable AVX2 versi...
Craig Topper [Sat, 21 May 2016 07:08:56 +0000 (07:08 +0000)]
[AVX512] Add patterns for VEXTRACT v16i16->v8i16 and v32i8->v16i8. Disable AVX2 versions of vector extract when AVX512VL is enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270318 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Disable AVX2 VPERMD, VPERMQ, VPERMPS, and VPERMPD patterns when AVX512VL...
Craig Topper [Sat, 21 May 2016 06:07:18 +0000 (06:07 +0000)]
[AVX512] Disable AVX2 VPERMD, VPERMQ, VPERMPS, and VPERMPD patterns when AVX512VL is enabled. Also add shuffle comment printing for AVX512VL VPERMPD/VPERMQ to keep some tests that now use these instructions instead of the AVX2 ones.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270317 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Disable AVX/AVX2 VBROADCASTSS/VBROADCASTSD patterns when AVX512VL is enabled.
Craig Topper [Sat, 21 May 2016 05:47:25 +0000 (05:47 +0000)]
[AVX512] Disable AVX/AVX2 VBROADCASTSS/VBROADCASTSD patterns when AVX512VL is enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270316 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Use update_llc_test_checks to update some tests so we can see all the instru...
Craig Topper [Sat, 21 May 2016 05:46:58 +0000 (05:46 +0000)]
[AVX512] Use update_llc_test_checks to update some tests so we can see all the instruction encodings and ensure everything is with EVEX.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270315 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[SimplifyCFG] Remove cleanuppads which are empty except for calls to lifetime.end
David Majnemer [Sat, 21 May 2016 05:12:32 +0000 (05:12 +0000)]
[SimplifyCFG] Remove cleanuppads which are empty except for calls to lifetime.end

A cleanuppad is not cheap, they turn into many instructions and result
in additional spills and fills.  It is not worth keeping a cleanuppad
around if all it does is hold a lifetime.end instruction.

N.B.  We first try to merge the cleanuppad with another cleanuppad to
avoid dropping the lifetime and debug info markers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270314 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Fix test cases I missed in r270311.
Craig Topper [Sat, 21 May 2016 03:59:55 +0000 (03:59 +0000)]
[AVX512] Fix test cases I missed in r270311.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270313 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Define priorities for register classes
Matt Arsenault [Sat, 21 May 2016 03:55:07 +0000 (03:55 +0000)]
AMDGPU: Define priorities for register classes

Allocating larger register classes first should give better allocation
results (and more importantly for myself, make the lit tests more stable
with respect to scheduler changes).

Patch by Matthias Braun

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270312 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Disable AVX/AVX2 patterns for VPSADBW and VPMULUDQ when the AVX512VL/AVX512B...
Craig Topper [Sat, 21 May 2016 03:52:32 +0000 (03:52 +0000)]
[AVX512] Disable AVX/AVX2 patterns for VPSADBW and VPMULUDQ when the AVX512VL/AVX512BWI equivalents are available.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270311 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Convert some SSE2/AVX2 intrinsics to ISD opcodes during lowering instead of...
Craig Topper [Sat, 21 May 2016 03:52:28 +0000 (03:52 +0000)]
[X86] Convert some SSE2/AVX2 intrinsics to ISD opcodes during lowering instead of pattern matching the intrinsics. This unifies handling with AVX512 and allows these intrinsics to select EVEX encoded instructions to increase available registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270310 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[IRCE] Don't use an allocator for range checks; NFC
Sanjoy Das [Sat, 21 May 2016 02:52:13 +0000 (02:52 +0000)]
[IRCE] Don't use an allocator for range checks; NFC

The InductiveRangeCheck struct is only five words long; so passing these
around value is fine.  The allocator makes the code look more complex
than it is.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270309 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[IRCE] Don't pass IRBuilder<> where unnecessary; NFC
Sanjoy Das [Sat, 21 May 2016 02:31:51 +0000 (02:31 +0000)]
[IRCE] Don't pass IRBuilder<> where unnecessary; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270308 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Cleanup lowering actions
Matt Arsenault [Sat, 21 May 2016 02:27:49 +0000 (02:27 +0000)]
AMDGPU: Cleanup lowering actions

These are kind of a mess and hard to follow, particularly
for loads and stores. Fix various redundant, unnecessary
and dead settings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270307 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[GuardWidening] Fix incorrect use of remove_if
Sanjoy Das [Sat, 21 May 2016 02:24:44 +0000 (02:24 +0000)]
[GuardWidening] Fix incorrect use of remove_if

I had used `std::remove_if` under the assumption that it moves the
predicate matching elements to the end, but actaully the elements
remaining towards the end (after the iterator returned by
`std::remove_if`) are indeterminate.  Fix the bug (and make the code
more straightforward) by using a temporary SmallVector, and add a test
case demonstrating the issue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270306 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Fix high bits after division optimization
Matt Arsenault [Sat, 21 May 2016 01:53:33 +0000 (01:53 +0000)]
AMDGPU: Fix high bits after division optimization

This is essentially doing a 24-bit signed division with FP.
We need to truncate to the N bit result.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270305 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[RegBankSelect] Compute the repairing cost for copies.
Quentin Colombet [Sat, 21 May 2016 01:43:25 +0000 (01:43 +0000)]
[RegBankSelect] Compute the repairing cost for copies.

Prior to this patch, we were using 1 for all the repairing costs.
Now, we use the information from the target to get this information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270304 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[RegisterBankInfo] Fix the initialization of the map VT to RegBank.
Quentin Colombet [Sat, 21 May 2016 01:41:17 +0000 (01:41 +0000)]
[RegisterBankInfo] Fix the initialization of the map VT to RegBank.

Prior to this patch we could have read uninitialized memory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270303 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVR] Add AVRMCAsmInfo
Dylan McKay [Sat, 21 May 2016 01:06:37 +0000 (01:06 +0000)]
[AVR] Add AVRMCAsmInfo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270302 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Fix verifier error when spilling SGPRs
Matt Arsenault [Sat, 21 May 2016 00:53:42 +0000 (00:53 +0000)]
AMDGPU: Fix verifier error when spilling SGPRs

The current SGPR spilling test does not stress this
because it is using s_buffer_load instructions to
increase SGPR pressure and spill, but their output
operands have the same SReg_32_XM0 constraint. This fixes
an error when the SReg_32 output from most instructions
is spilled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270301 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Fix relationship between SReg_32 and SReg_32_XM0
Matt Arsenault [Sat, 21 May 2016 00:53:28 +0000 (00:53 +0000)]
AMDGPU: Fix relationship between SReg_32 and SReg_32_XM0

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270300 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix implicit type conversion. NFC.
Chris Bieneman [Sat, 21 May 2016 00:36:47 +0000 (00:36 +0000)]
Fix implicit type conversion. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270299 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVR] Fix header files in MCTargetDesc
Dylan McKay [Sat, 21 May 2016 00:35:07 +0000 (00:35 +0000)]
[AVR] Fix header files in MCTargetDesc

Everything now compiles successfully, but there are still undefined
references.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270298 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Handle cbranch vccz/vccnz
Matt Arsenault [Sat, 21 May 2016 00:29:40 +0000 (00:29 +0000)]
AMDGPU: Handle cbranch vccz/vccnz

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270297 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Implement ReverseBranchCondition
Matt Arsenault [Sat, 21 May 2016 00:29:34 +0000 (00:29 +0000)]
AMDGPU: Implement ReverseBranchCondition

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270296 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Implement AnalyzeBranch
Matt Arsenault [Sat, 21 May 2016 00:29:27 +0000 (00:29 +0000)]
AMDGPU: Implement AnalyzeBranch

Original patch by Tom Stellard

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270295 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Optimize away return instructions using fallthroughs.
Dan Gohman [Sat, 21 May 2016 00:21:56 +0000 (00:21 +0000)]
[WebAssembly] Optimize away return instructions using fallthroughs.

This saves a small amount of code size, and is a first small step toward
passing values on the stack across block boundaries.

Differential Review: http://reviews.llvm.org/D20450

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270294 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix constant folding of addrspacecast of null
Matt Arsenault [Sat, 21 May 2016 00:14:04 +0000 (00:14 +0000)]
Fix constant folding of addrspacecast of null

This should not be making assumptions on the value of
the casted pointer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270293 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVR] Fix signuature of AVRTargetMachine constructor
Dylan McKay [Fri, 20 May 2016 23:39:04 +0000 (23:39 +0000)]
[AVR] Fix signuature of AVRTargetMachine constructor

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270292 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoLiveIntervalAnalysis: Rework constructMainRangeFromSubranges()
Matthias Braun [Fri, 20 May 2016 23:14:56 +0000 (23:14 +0000)]
LiveIntervalAnalysis: Rework constructMainRangeFromSubranges()

We now use LiveRangeCalc::extendToUses() instead of a specially designed
algorithm in constructMainRangeFromSubranges():
- The original motivation for constructMainRangeFromSubranges() were
  differences between the main liverange and subranges because of hidden
  dead definitions. This case however cannot happen anymore with the
  DetectDeadLaneMasks pass in place.
- It simplifies the code.
- This fixes a longstanding bug where we did not properly create new SSA
  values on merging control flow (the MachineVerifier missed most of
  these cases).
- Move constructMainRangeFromSubranges() to LiveIntervalAnalysis and
  LiveRangeCalc to better match the implementation/available helper
  functions.

This re-applies r269016. The fixes from r270290 and r270259 should avoid
the machine verifier problems this time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270291 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMachineVerifier: subregs so not require defs/valnos on every path
Matthias Braun [Fri, 20 May 2016 23:02:13 +0000 (23:02 +0000)]
MachineVerifier: subregs so not require defs/valnos on every path

It is fine for subregister ranges to be undefined on some CFG paths as
we may have a "vregX:other_subreg<read-undef> =" def on that path. We
do not (and should not) have live segments for the subregister ranges.
The MachineVerifier should not complain about this.

This is a slight variant of http://llvm.org/PR27705

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270290 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix struct member names and simplify. NFC.
Rui Ueyama [Fri, 20 May 2016 22:59:05 +0000 (22:59 +0000)]
Fix struct member names and simplify. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270289 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PowerPC] Add a testcase for TCO on string rvo function
Tim Shen [Fri, 20 May 2016 22:42:01 +0000 (22:42 +0000)]
[PowerPC] Add a testcase for TCO on string rvo function

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270287 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[yaml2obj] [MachO] Fill Segment and Section data
Chris Bieneman [Fri, 20 May 2016 22:31:50 +0000 (22:31 +0000)]
[yaml2obj] [MachO] Fill Segment and Section data

This fills section data with 0xDEADBEEF and segment data not inside a section with 0xBAADDA7A. This results in yaml2obj generating a matching size object file. Any additional bytes in the file are zero'd.

This is a starting point for populating the remaining segment data, and provides a hex viewable file that you can easily see the missing data in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270286 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoadd test vector sdiv
Sanjay Patel [Fri, 20 May 2016 22:08:40 +0000 (22:08 +0000)]
add test vector sdiv

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270285 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoadd test for vector shift
Sanjay Patel [Fri, 20 May 2016 22:08:16 +0000 (22:08 +0000)]
add test for vector shift

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270284 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoSDAG: Implement Select instead of SelectImpl in PPCDAGToDAGISel
Justin Bogner [Fri, 20 May 2016 21:43:23 +0000 (21:43 +0000)]
SDAG: Implement Select instead of SelectImpl in PPCDAGToDAGISel

- Where we were returning a node before, call ReplaceNode instead.
- Where we would return null to fall back to another selector, rename
  the method to try* and return a bool for success.
- Where we were calling SelectNodeTo, just return afterwards.

Part of llvm.org/pr26808.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270283 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[lanai] Change reloc to use PIC_ by default and cleanup.
Jacques Pienaar [Fri, 20 May 2016 21:41:53 +0000 (21:41 +0000)]
[lanai] Change reloc to use PIC_ by default and cleanup.

* Change reloc to PIC_;
* Cleanup (clang-format & modify test);

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270282 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoSwitch from the linux-specific 'struct sigaltstack' to POSIX's 'stack_t'. This
Richard Smith [Fri, 20 May 2016 21:38:15 +0000 (21:38 +0000)]
Switch from the linux-specific 'struct sigaltstack' to POSIX's 'stack_t'. This
is what I get for trusting my system's man pages I suppose.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270280 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd a configure-time check for the existence of sigaltstack. It seems that some
Richard Smith [Fri, 20 May 2016 21:26:00 +0000 (21:26 +0000)]
Add a configure-time check for the existence of sigaltstack. It seems that some
systems provide a <signal.h> that doesn't declare it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270278 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReinstate r269992 (reverting r270267), but restricted to cases where glibc is
Richard Smith [Fri, 20 May 2016 21:18:12 +0000 (21:18 +0000)]
Reinstate r269992 (reverting r270267), but restricted to cases where glibc is
the C standard library implementation in use.

This works around a glibc bug in the backtrace() function where it fails to
produce a backtrace on x86_64 if libgcc / libunwind is statically linked.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270276 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoCreate a sigaltstack when we register our signal handlers. Otherwise we'd very
Richard Smith [Fri, 20 May 2016 21:07:41 +0000 (21:07 +0000)]
Create a sigaltstack when we register our signal handlers. Otherwise we'd very
likely fail to produce a backtrace if we crash due to stack overflow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270273 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert r270268 due to unused variable warnings.
Michael Kuperstein [Fri, 20 May 2016 20:55:51 +0000 (20:55 +0000)]
Revert r270268 due to unused variable warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270272 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoadd tests for vector urem
Sanjay Patel [Fri, 20 May 2016 20:55:17 +0000 (20:55 +0000)]
add tests for vector urem

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270271 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAddress post-review for r270246
David Majnemer [Fri, 20 May 2016 20:41:24 +0000 (20:41 +0000)]
Address post-review for r270246

This gets rid of some unnecessary SmallStrings in
X86TargetMachine::getSubtargetImpl.

No functionality change is intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270270 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agodsymutil/modules: Reword the warning for static libraries without module caches
Adrian Prantl [Fri, 20 May 2016 20:36:06 +0000 (20:36 +0000)]
dsymutil/modules: Reword the warning for static libraries without module caches

In addition to clarifying the warning message this contains a minor functional
change in that it now warns if the *immediate* parent directory in which the
missing PCM is expected to be isn't found.

This patch also includes a more comprehensive testcase.

rdar://problem/25860711

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270269 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[BasicAA] Turn DecomposeGEPExpression runtime checks into asserts.
Michael Kuperstein [Fri, 20 May 2016 20:26:50 +0000 (20:26 +0000)]
[BasicAA] Turn DecomposeGEPExpression runtime checks into asserts.

When it has a DataLayout, DecomposeGEPExpression() should return the same object
as GetUnderlyingObject(). Per the FIXME, it currently always has a DL, so the
runtime check is redundant and can become an assert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270268 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "Work around a glibc bug: backtrace() spuriously fails if..."
Chris Bieneman [Fri, 20 May 2016 20:15:17 +0000 (20:15 +0000)]
Revert "Work around a glibc bug: backtrace() spuriously fails if..."

This commit has been breaking the FreeBSD bots:
http://lab.llvm.org:8011/builders/lld-x86_64-freebsd

This reverts commit r269992.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270267 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agouse FileCheck instead of grep for exact checking
Sanjay Patel [Fri, 20 May 2016 20:07:18 +0000 (20:07 +0000)]
use FileCheck instead of grep for exact checking

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270265 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[esan] Use ModulePass for EfficiencySanitizerPass.
Derek Bruening [Fri, 20 May 2016 20:00:05 +0000 (20:00 +0000)]
[esan] Use ModulePass for EfficiencySanitizerPass.

Summary:
Uses ModulePass instead of FunctionPass for EfficiencySanitizerPass to
better support global variable creation for a forthcoming struct field
counter tool.

Patch by Qin Zhao.

Reviewers: aizatsky

Subscribers: llvm-commits, eugenis, vitalybuka, bruening, kcc

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270263 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agopdbdump: print out symbol names referred by publics stream.
Rui Ueyama [Fri, 20 May 2016 19:55:17 +0000 (19:55 +0000)]
pdbdump: print out symbol names referred by publics stream.

DBI stream contains a stream number of the symbol record stream.
Symbol record streams is an array of length-type-value members.
Each member represents one symbol.

Publics stream contains offsets to the symbol record stream.
This patch is to print out all symbols that are referenced by
the publics stream.

Note that even with this patch, llvm-pdbdump cannot dump all the
information in a publics stream since it contains more information
than symbol names. I'll improve it in followup patches.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270262 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUse report_fatal_error after all
Krzysztof Parzyszek [Fri, 20 May 2016 19:46:42 +0000 (19:46 +0000)]
Use report_fatal_error after all

Depending on the compiler used to build LLVM, llvm_unreachable can either
expand to a call to abort(), or to a __builtin_unreachable. The latter
does not have a predictable behavior at runtime.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270260 91177308-0d34-0410-b5e6-96231b3b80d8