128227 Commits

Author SHA1 Message Date
Kostya Serebryany
a6b4efd1d0 [libFuzzer] speedup path coverage handling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262102 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-27 01:50:16 +00:00
Junmo Park
fbd6d6e52d Minor code cleanup. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262096 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-27 01:10:43 +00:00
Reid Kleckner
07f7a28236 [InstCombine] Be more conservative about removing stackrestore
We ended up removing a save/restore pair around an inalloca call,
leading to a miscompile in Chromium.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262095 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-27 00:53:54 +00:00
Paul Robinson
05af933abd Revert r262092, caught LLD tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262093 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 23:44:10 +00:00
Paul Robinson
ede28b79ea [FileCheck] Abort if -NOT is combined with another suffix.
Combinations of suffixes that look useful actually are ignored;
complaining about them will avoid mistakes.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262092 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 23:34:02 +00:00
Cong Hou
e2e3f26532 Fix a bug in isVectorReductionOp() in SelectionDAGBuilder.cpp that may cause assertion failure on AArch64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262091 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 23:25:30 +00:00
Ahmed Bougacha
5811aa75cf [X86] Move an encoding test from CodeGen to MC. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262089 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 23:00:03 +00:00
Ahmed Bougacha
b1a7fb8d69 [X86] Delete old redundant test. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262088 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 23:00:00 +00:00
Ahmed Bougacha
0b51670950 [X86] Fix a stale comment. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262087 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 22:59:57 +00:00
Ahmed Bougacha
8634d2741f [X86] Remove the unused SDTX86atomicBinary. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262086 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 22:59:41 +00:00
Philip Reames
edac10e31e [LVI] Extend select handling to catch min/max/clamp idioms
Most of this is fairly straight forward. Add handling for min/max via existing matcher utility and ConstantRange routines.  Add handling for clamp by exploiting condition constraints on inputs.  

Note that I'm only handling two constant ranges at this point. It would be reasonable to consider treating overdefined as a full range if the instruction is typed as an integer, but that should be a separate change.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262085 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 22:53:59 +00:00
Kostya Serebryany
86b1b67565 [libFuzzer] add -print_final_stats=1 flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262084 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 22:42:23 +00:00
Simon Pilgrim
c7dcd6a564 Strip trailing whitespace. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262083 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 22:28:50 +00:00
Philip Reames
fcd97ccb03 [ConstantRange] Add umin/smin operators
This was split off from http://reviews.llvm.org/D17184.

Reviewed by: Sanjoy



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262080 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 22:08:18 +00:00
Kit Barton
5b4af7f722 [PPC] Legalize FNEG on PPC when possible
Currently we always expand ISD::FNEG. For v4f32 and v2f64 vector types VSX has
native support for this opcode

Phabricator: http://reviews.llvm.org/D17647

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262079 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 21:59:44 +00:00
Simon Pilgrim
dd18dd4735 Fix spelling. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262078 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 21:56:27 +00:00
Sanjay Patel
41453a16f5 [x86, InstCombine] transform x86 AVX2 masked stores to LLVM intrinsics
Replicate everything for integers...because x86.

Continuation of:
http://reviews.llvm.org/rL262064



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262077 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 21:51:44 +00:00
Kostya Serebryany
1ff29eb9ca [libFuzzer] initial implementation of path coverage based on -fsanitize-coverage=trace-pc. This does not scale well yet, but already cracks FullCoverageSetTest in seconds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262073 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 21:33:56 +00:00
Chris Bieneman
98e3cc3b1e [CMake] Allow LLVM_TARGETS_TO_BUILD to accept "Native"
This allows a user to specify "Native" as a target when configuring LLVM. Native will resolve to the LLVM_NATIVE_ARCH, which is the target that supports code generation for the host.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262070 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 21:21:40 +00:00
Paul Robinson
46e8be6d8d Reapply r262054 with triple fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262069 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 21:18:34 +00:00
Kit Barton
2178c71174 Power9] Implement new vsx instructions: compare and conversion
This change implements the following vsx instructions:

Quad/Double-Precision Compare:
xscmpoqp xscmpuqp
xscmpexpdp xscmpexpqp
xscmpeqdp xscmpgedp xscmpgtdp xscmpnedp
xvcmpnedp(.) xvcmpnesp(.)
Quad-Precision Floating-Point Conversion
xscvqpdp(o) xscvdpqp
xscvqpsdz xscvqpswz xscvqpudz xscvqpuwz xscvsdqp xscvudqp
xscvdphp xscvhpdp xvcvhpsp xvcvsphp
xsrqpi xsrqpix xsrqpxp
28 instructions

Phabricator: http://reviews.llvm.org/D16709

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262068 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 21:11:55 +00:00
Chris Bieneman
b9c9a2934f [CMake] Add the gold plugin before clang
This is needed to connect dependencies between the LLVMgold plugin and the clang stage-2 builds due to limitations in ExternalProject_Add.

Patch by Mike Edwards

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262067 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 21:07:04 +00:00
Chris Bieneman
995ce72c12 [CMake] Assigning the LTO component to lto.h
This makes it so lto.h is installed when you run the install-LTO target.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262066 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 21:07:02 +00:00
Sanjay Patel
8fe5b80086 [x86, InstCombine] transform x86 AVX masked stores to LLVM intrinsics
The intended effect of this patch in conjunction with:
http://reviews.llvm.org/rL259392
http://reviews.llvm.org/rL260145

is that customers using the AVX intrinsics in C will benefit from combines when
the store mask is constant:

void mstore_zero_mask(float *f, __m128 v) {
  _mm_maskstore_ps(f, _mm_set1_epi32(0), v);
}

void mstore_fake_ones_mask(float *f, __m128 v) {
  _mm_maskstore_ps(f, _mm_set1_epi32(1), v);
}

void mstore_ones_mask(float *f, __m128 v) {
  _mm_maskstore_ps(f, _mm_set1_epi32(0x80000000), v);
}

void mstore_one_set_elt_mask(float *f, __m128 v) {
  _mm_maskstore_ps(f, _mm_set_epi32(0x80000000, 0, 0, 0), v);
}

...so none of the above will actually generate a masked store for optimized code.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262064 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 21:04:14 +00:00
Sanjay Patel
f6454b5f87 [x86] refactor to eliminate duplicated code; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262062 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 20:59:05 +00:00
Amaury Sechet
e882cad04a Fix warning in DwarfCFIException. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262061 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 20:49:07 +00:00
Paul Robinson
7d591196bd Revert r262054 on one file that fails sometimes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262060 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 20:41:07 +00:00
Amaury Sechet
dc766bd433 Extract the method to begin and end a fragment in AsmPrinterHandler in their own method. NFC
Summary: This is extracted from D17555

Reviewers: davidxl, reames, sanjoy, MatzeB, pete

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262058 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 20:30:37 +00:00
Quentin Colombet
5cde53b025 [GlobalISel] Fix a ranlib warning about empty TOC.
Fixes PR26733


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262057 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 20:05:02 +00:00
Paul Robinson
45648a4496 Fix tests that used CHECK-NEXT-NOT and CHECK-DAG-NOT.
FileCheck actually doesn't support combo suffixes.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262054 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 19:40:34 +00:00
Nirav Dave
9f68f5fa4d Fix Sparc 32bit Lowering to rebundle up v2i32 values.
Summary: Fix LowerCall to rebundle v2i32 values after lowering and add testcase

Reviewers: jyknight

Subscribers: llvm-commits, jyknight

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262048 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 18:55:22 +00:00
Sanjay Patel
8631e9e9fb [x86, AVX] fold 'isPositive' 256-bit vector integer operations (PR26701)
This extends the fold introduced with:
http://reviews.llvm.org/rL262036



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262047 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 18:42:50 +00:00
Reid Kleckner
4f8c4bec33 [IR] Optimize bitfield layout of Value for MSVC
This should save a pointer of padding from all MSVC Value subclasses.

Recall that MSVC will not pack the following bitfields together:
  unsigned Bits : 29;
  unsigned Flag1 : 1;
  unsigned Flag2 : 1;
  unsigned Flag3 : 1;

Add a static_assert because LLVM developers always trip over this
behavior. This regressed in June.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262045 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 18:08:59 +00:00
Sanjay Patel
568de6274c [x86, AVX] add 256-bit tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262044 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 18:07:58 +00:00
Renato Golin
59e23fa211 [CMAKE] Update build on recent Haiku
This patch updates cmake build scripts to build on Haiku. It adds Haiku x86_64 to config.guess.
Please consider reviewing.

Pathc by Jérôme Duval.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262038 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 17:01:45 +00:00
Sanjay Patel
3d8c62e7f1 [x86, SSE] fold 'isPositive' vector integer operations (PR26701)
This is one of the cases shown in:
https://llvm.org/bugs/show_bug.cgi?id=26701

Shift and negate is what InstCombine appears to prefer, so I've started with that pattern. 
Note that the 'pcmpeq' instructions are always generating the negative one for the actual
'pcmpgt' comparison in each case (side note: why isn't there an alias mnemonic for that?).

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262036 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 16:56:03 +00:00
Reid Kleckner
0e6b04c2c0 [WinEH] Fix funclet return block clobber mask placement
MBB slot index intervals are half open, not closed. getMBBEndIndex()
returns the slot index of the start of the next block in layout order.
Placing a register mask there is incorrect if the successor of the
funclet return is not laid out after the return. Clang generates IR for
catch bodies before generating the following normal code, so we never
noticed this issue until the D frontend authors filed a bug about it.

Instead, we can put the clobber mask on the last instruction of the
funclet return block. We still aren't using a register mask operand on
the CATCHRET instruction because it would cause PEI to spill all CSRs,
including XMM regs, in the prologue.

Fixes PR26679.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262035 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 16:53:19 +00:00
Chandler Carruth
7b1b31d2b7 [PM] Finish removing references to fix MSVC builds. Somehow adding base
classes changed whether the decltype of these expressions was
a reference. I'm somewhat horrified why, and there may need to be
a deeper fix on MSVC, but this should at least get the bots a step
further.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262008 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 12:30:18 +00:00
Chris Dewhurst
f7a1494177 Reverting breaking change. Sorry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262007 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 12:20:10 +00:00
Chandler Carruth
1ce194e6fd [PM] Speculative patch to try and fix MSVC's compilation.
No idea why r262004 triggered this, but just trying to fix somehow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262006 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 12:17:54 +00:00
Chris Dewhurst
528e89dfaf Reviewed at reviews.llvm.org/D17133
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262005 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 11:46:47 +00:00
Chandler Carruth
adb60a3a11 [PM] Introduce CRTP mixin base classes to help define passes and
analyses in the new pass manager.

These just handle really basic stuff: turning a type name into a string
statically that is nice to print in logs, and getting a static unique ID
for each analysis.

Sadly, the format of passes in anonymous namespaces makes using their
names in tests really annoying so I've customized the names of the no-op
passes to keep tests sane to read.

This is the first of a few simplifying refactorings for the new pass
manager that should reduce boilerplate and confusion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262004 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 11:44:45 +00:00
Chris Dewhurst
7768d8796b Initial test commit only
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262003 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 11:38:24 +00:00
Chandler Carruth
a459c9c8aa [PM] Remove a FIXME now that it is no longer needed.
This has been fixed for some time, but the code hadn't been updated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261996 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 10:02:04 +00:00
Nikolay Haustov
1c038cf2fa [AMDGPU] Assembler: Basic support for MIMG
Add parsing and printing of image operands. Matches legacy sp3 assembler.
Change image instruction order to have data/image/sampler operands in the beginning. This is needed because optional operands in MC are always last.
Update SITargetLowering for new order.
Add basic MC test.
Update CodeGen tests.

Review: http://reviews.llvm.org/D17574

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261995 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 09:51:05 +00:00
Chandler Carruth
b55a5104a1 [PM] Clean up some formatting with the latest clang-format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261992 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 09:37:52 +00:00
James Molloy
aee2c336ac [AArch64] Slight cleanup in FPLoadBalancing
Instead of the convoluted if-statment we can just use getColor. This also fixes
a bug where we relied upon the parity of tablegen-generated register indexes
(instead of using the machine encoding).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261990 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 09:10:53 +00:00
Simon Pilgrim
1c7f0f6e51 [X86][F16C] Added native IR half/float conversion tests.
Placeholder tests until we start improving native vector support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261989 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 08:52:29 +00:00
David Blaikie
6802c0801c llvm-dwp: provide diagnostics for duplicate DWO IDs
These diagnostics aren't perfect - in the case of merging several dwos
into dwps and those dwps into more dwps - just getting the message about
the original source file name might not be much help (since it's the
same in both dwos, by definition - but doesn't tell you which chain of
dwps to backtrack)

It might be worth adding the DW_AT_dwo_id to the split debug info to
improve the diagnostic experience - might help track down the duplicates
better.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261988 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 07:30:15 +00:00
David Blaikie
132af4d0cd llvm-dwp: Support empty .dwo files
Though a bit odd, this is handy for a few reasons - for example, in a
build system that wants consistent input/output of build steps, but
where split-dwarf might be overriden/disabled by the user on a per-file
basis.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261987 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 07:04:58 +00:00