126796 Commits

Author SHA1 Message Date
Dan Gohman
a9319a6e78 Followup to 258750; update this test to use .p2align .
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258752 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-26 00:17:24 +00:00
Dan Gohman
f4e788949d [MC] Use .p2align instead of .align
For historic reasons, the behavior of .align differs between targets.
Fortunately, there are alternatives, .p2align and .balign, which make the
interpretation of the parameter explicit, and which behave consistently across
targets.

This patch teaches MC to use .p2align instead of .align, so that people reading
code for multiple architectures don't have to remember which way each platform
does its .align directive.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258750 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-26 00:03:25 +00:00
Philip Reames
838543bb35 [GVN] Rearrange code to make local vs non-local cases more obvious [NFCI]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258747 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 23:37:53 +00:00
Evgeniy Stepanov
3f6b805277 [cfi] Cross-DSO CFI diagnostic mode (LLVM part).
* __cfi_check gets a 3rd argument: ubsan handler data
* Instead of trapping on failure, call __cfi_check_fail which must be
  present in the module (generated in the frontend).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258746 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 23:35:03 +00:00
Philip Reames
4d16c2e168 [GVN] Factor out common code [NFCI]
We had the same code duplicated for each type of Def.  We also have the entire block duplicated between the local and non-local case, but let's start with local cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258740 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 23:19:12 +00:00
Vedant Kumar
56ad20691a [docs] Document how to merge patches into release branches
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258736 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 22:47:54 +00:00
Matthias Braun
64d9b9e783 X86ISelLowering: Fix cmov(cmov) special lowering bug
There's a special case in EmitLoweredSelect() that produces an improved
lowering for cmov(cmov) patterns. However this special lowering is
currently broken if the inner cmov has multiple users so this patch
stops using it in this case.

If you wonder why this wasn't fixed by continuing to use the special
lowering and inserting a 2nd PHI for the inner cmov: I believe this
would incur additional copies/register pressure so the special lowering
does not improve upon the normal one anymore in this case.

This fixes http://llvm.org/PR26256 (= rdar://24329747)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258729 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 22:08:25 +00:00
Teresa Johnson
0e59f68161 [ThinLTO] Find all needed metadata when linking metadata as postpass
For metadata postpass linking, after importing all functions, we need
to recursively walk through any nodes reached via imported functions to
locate needed subprogram metadata. Some might only be reached indirectly
via the variable list for an inlined function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258728 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 22:04:56 +00:00
Simon Pilgrim
841d92c472 [X86][AVX] Add commutation support for VPERM2X128 instructions
Its main use is to allow memory folding of the 1st operand

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258726 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 21:51:34 +00:00
Teresa Johnson
63ac4d7e8a [ThinLTO] Handle DISubprogram reached indirectly from DIImportedEntity
Extend fix for PR26037 to identify DISubprogram reached from a
DIImportedEntity via a DILexicalBlock.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258722 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 21:29:55 +00:00
Xinliang David Li
1c5981f8c7 Fix a typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258716 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 20:38:13 +00:00
Lawrence Hu
685c628a18 Enable loopreroll to rerool loop with pointer induction variable.
Example:

while (buf !=end ) {
   S += buf[0];
   S += buf[1];
   buf +=2;
};

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258709 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 19:43:45 +00:00
Lawrence Hu
3602687a21 Undo commit 258700 due to missing commit message
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258708 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 19:36:30 +00:00
Matthew Simpson
ceb1e843a0 Reapply commit r25804 with fix
We were hitting an assertion because we were computing smaller type sizes for
instructions that cannot be demoted. The fix first determines the instructions
that will be demoted, and then applies the smaller type size to only those
instructions.

This should fix PR26239.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258705 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 19:24:29 +00:00
Quentin Colombet
79b3dc3c04 Speculatively revert r258620 as it is the likely culprid of PR26293.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258703 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 19:12:49 +00:00
Ivan Krasin
79890da71d Temporary disable broken fuzzer/timeout tests.
Reviewers: kcc

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258702 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 19:05:45 +00:00
Rafael Espindola
859d998768 Add a test showing we can write a vector of floats.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258701 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 19:02:20 +00:00
Lawrence Hu
1ae8104d77 Differential Revision: http://reviews.llvm.org/D13151
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258700 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 18:53:39 +00:00
Sanjay Patel
15f4113a31 don't repeat function names in documentation comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258699 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 18:38:38 +00:00
Dan Gohman
a84d3cd121 [WebAssembly] Fix unbalanced register stack code in the case of late DCE.
Instructions can be DCE'd after the RegStackify pass. If the instruction which
would be the pop for what would be a push is removed, don't use a push.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258694 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 16:48:44 +00:00
Dan Gohman
b0bd82d57a [WebAssembly] Add tests for negative offsets with global variable addresses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258693 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 15:19:39 +00:00
Dan Gohman
6f7efe6314 [WebAssembly] Minor code formatting cleanups. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258692 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 15:12:05 +00:00
Dan Gohman
ec3600bfd5 [SelectionDAG] Use the correct return type for memcpy, memmove, and memset.
When generating calls to memcpy, memmove, and memset, use void* as the return
type rather than void, to match the standard signatures for these functions.

This has no practical effect for most targets, since the return values of
these calls aren't being used anyway, and most calling conventions tolerate
this kind of mismatch. However, this change will help support future
optimizations to utilize the return value to avoid holding the argument
value live across a call.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258691 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 15:05:56 +00:00
James Molloy
6672aa9478 [DemandedBits] Fix computation of demanded bits for ICmps
The computation of ICmp demanded bits is independent of the individual operand being evaluated. We simply return a mask consisting of the minimum leading zeroes of both operands.

We were incorrectly passing "I" to ComputeKnownBits - this should be "UserI->getOperand(0)". In cases where we were evaluating the 1th operand, we were taking the minimum leading zeroes of it and itself.

This should fix PR26266.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258690 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 14:49:36 +00:00
Michael Zuckerman
17dd8c0a3e [AVX512] Adding PTESTNMB/D/W/Q instruction
Differential Revision: http://reviews.llvm.org/D16520



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258688 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 14:43:23 +00:00
Aaron Ballman
8cee0bdf84 Reapplying r256836 with a fix for MSVC 14 support.
Enable more strict standards conformance in MSVC for rvalue casting and string literal type conversion to non-const types. Also enables generation of intrinsics for more functions.

Patch by Alexander Riccio


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258687 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 14:17:39 +00:00
Michael Zuckerman
046dad6f3e [AVX512] Adding PTESTMB/W/D/Q instruction
Differential Revision: http://reviews.llvm.org/D16519



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258686 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 13:27:32 +00:00
Bradley Smith
36313d3496 [ARM] Add DSP build attribute and extension targeting
This patch was originally committed as r257885, but was reverted due to windows
failures. The cause of these failures has been fixed under r258677, hence
re-committing the original patch.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258683 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 11:26:11 +00:00
Bradley Smith
0ab91df5ff [ARM] Add new system registers to ARMv8-M Baseline/Mainline
This patch was originally committed as r257884, but was reverted due to windows
failures. The cause of these failures has been fixed under r258677, hence
re-committing the original patch.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258682 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 11:25:36 +00:00
Bradley Smith
aca9dcc971 [ARM] Add ARMv8-M security extension instructions to ARMv8-M Baseline/Mainline
This patch was originally committed as r257883, but was reverted due to windows
failures. The cause of these failures has been fixed under r258677, hence
re-committing the original patch.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258681 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 11:24:47 +00:00
Asaf Badouh
3a1d1b2434 [X86][IFMA] adding intrinsics and encoding for multiply and add of unsigned 52bit integer
VPMADD52LUQ - Packed Multiply of Unsigned 52-bit Integers and Add the Low 52-bit Products to Qword Accumulators
 VPMADD52HUQ - Packed Multiply of Unsigned 52-bit Unsigned Integers and Add High 52-bit Products to 64-bit Accumulators

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258680 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 11:14:24 +00:00
Oliver Stannard
5918cc57c3 [ARM] Add ARMv8.2-A FP16 scalar instructions
This was originally committed as r255762, but reverted as it broke windows
bots. Re-commitiing the exact same patch, as the underlying cause was fixed by
r258677.

ARMv8.2-A adds 16-bit floating point versions of all existing VFP
floating-point instructions. This is an optional extension, so all of
these instructions require the FeatureFullFP16 subtarget feature.

The assembly for these instructions uses S registers (AArch32 does not
have H registers), but the instructions have ".f16" type specifiers
rather than ".f32" or ".f64". The top 16 bits of each source register
are ignored, and the top 16 bits of the destination register are set to
zero.

These instructions are mostly the same as the 32- and 64-bit versions,
but they use coprocessor 9 rather than 10 and 11.

Two new instructions, VMOVX and VINS, have been added to allow packing
and extracting two 16-bit floats stored in the top and bottom halves of
an S register.

New fixup kinds have been added for the PC-relative load and store
instructions, but no ELF relocations have been added as they have a
range of 512 bytes.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258678 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 10:26:26 +00:00
Oliver Stannard
09f29b2ea4 [TableGen] Fix sort order of asm operand classes
This is a fix for https://llvm.org/bugs/show_bug.cgi?id=22796.

The previous implementation of ClassInfo::operator< allowed cycles of classes
such that x < y < z < x, meaning that a list of them cannot be correctly
sorted, and the sort order could differ with different standard libraries.

The original implementation sorted classes by ValueName if they were otherwise
equal. This isn't strictly necessary, but some backends seem to accidentally
rely on it. If I reverse this comparison I get 8 test failures spread across
the AArch64, Mips and X86 backends, so I have left it in until those backends
can be fixed.

There was one case in the X86 backend where the observable behaviour of the
assembler is changed by this patch. This was because some of the memory asm
operands were not marked as children of X86MemAsmOperand.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258677 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 10:20:19 +00:00
Junmo Park
8000639b3a Silence a -Wparentheses warning; NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258676 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 10:17:17 +00:00
Igor Breger
3c3041375c AVX1 : Enable vector masked_load/store to AVX1.
Use AVX1 FP instructions (vmaskmovps/pd) in place of the AVX2 int instructions (vpmaskmovd/q).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258675 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 10:17:11 +00:00
Michael Zuckerman
9f537213d3 [AVX512] [CMPPS ][ CMPPD ] Adding full Comparison Predicate names
X86AsmParser.cpp is missing full comparison predicate names for CMPPD and CMPPS Instructions.
X86AsmParser.cpp defines only the short names of the Comparison predicate that you can find in the following pdf:
https://software.intel.com/sites/default/files/managed/07/b7/319433-023.pdf
Page 5-61 table 5-3

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258671 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 08:43:26 +00:00
Davide Italiano
0c2d31e26a [llvm-size] Use stderr instead of stdout for error messages.
This matches the behavior of other tools: objdump, readobj etc..


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258667 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 01:24:15 +00:00
Lang Hames
b4125011b5 [Object][COFF] Revert r258665 - It doesn't do what I had intended.
I'm discussing the right approach for tracking visibility for COFF symbols on
the llvm-dev list.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258666 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 01:21:45 +00:00
Lang Hames
a6a79a64c8 [Object][COFF] Set the generic SF_Exported flag on COFF exported symbols.
The ORC ObjectLinkingLayer uses this flag during symbol lookup. Failure to set
it causes all symbols to behave as if they were non-exported, which has caused
failures in the kaleidoscope tutorials on Windows. Raising the flag should
un-break the tutorials.

No test case yet - none of the existing command line tools for printing symbol
tables (llvm-nm, llvm-objdump) show the status of this flag, and I don't want to
change the format from these tools without consulting their owners. I'll send an
email to the dev-list to figure out the right way forward.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258665 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-24 21:56:40 +00:00
David Majnemer
a4c381a26a [COFF] Simplify SetSectionName
Consolidate the code which handles string table offsets less than 999999
with the code for offsets less than 9999999.  While we are here,
simplify the code by not using sprintf to generate the string.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258664 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-24 20:46:11 +00:00
David Majnemer
de2bf5828a [LoopSimplify] Reuse changeToUnreachable
Use existing functionality provided in changeToUnreachable instead of
reinventing it in LoopSimplify.

No functionality change is intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258663 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-24 19:32:52 +00:00
David Majnemer
846ffdada2 Fix build bot breakage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258661 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-24 16:46:53 +00:00
Elena Demikhovsky
f4a0173582 Added Skylake client to X86 targets and features
Changes in X86.td:

I set features of Intel processors in incremental form: IVB = SNB + X HSW = IVB + X ..
I added Skylake client processor and defined it's features
FeatureADX was missing on KNL
Added some new features to appropriate processors SMAP, IFMA, PREFETCHWT1, VMFUNC and others

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258659 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-24 10:41:28 +00:00
Amjad Aboud
cddf52c859 Fixed few comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258658 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-24 08:18:55 +00:00
Igor Breger
4c3605b6dc AVX512: VMOVDQU8/16/32/64 (load) intrinsic implementation.
Differential Revision: http://reviews.llvm.org/D16137

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258657 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-24 08:04:33 +00:00
Craig Topper
aed38efd95 [TableGen] In AsmWriterEmitter unique command search, rather than storing a mapping from instruction to unique command, instead store a list of which instructions each unique command corresponds to.
This simplifies the complexity of the code that tries to find further operands to merge into the unique command.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258656 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-24 07:13:28 +00:00
David Majnemer
f79a93da00 Fix buildbot failures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258655 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-24 06:40:37 +00:00
David Majnemer
2f0346603d [SCCP] Remove duplicate code
SCCP has code identical to changeToUnreachable's behavior, switch it
over to just call changeToUnreachable.

No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258654 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-24 06:26:47 +00:00
David Majnemer
6b7f46e721 [InstCombine, SCCP] Consolidate code used to remove instructions
InstCombine and SCCP both want to remove dead code in a very particular
way but using identical means to do so.  Share the code between the two.

No functionality change is intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258653 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-24 05:26:18 +00:00
David Majnemer
50a24fa5b1 [WinEH] Don't miscompile cleanups which conditionally unwind to caller
A cleanup can have paths which unwind or end up in unreachable.
If there is an unreachable path *and* a path which unwinds to caller,
we would mistakenly inject an unwind path to a catchswitch on the
unreachable path.  This results in a verifier assertion firing because
the cleanup unwinds to two different places: to the caller and to the
catchswitch.

This occured because we used getCleanupRetUnwindDest to determine if the
cleanuppad had no cleanuprets.
This is incorrect, getCleanupRetUnwindDest returns null for cleanuprets
which unwind to caller.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258651 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-23 23:54:33 +00:00