OSDN Git Service

android-x86/external-llvm.git
7 years agoAMDGPU: Remove dead pattern
Matt Arsenault [Tue, 17 Jan 2017 00:10:43 +0000 (00:10 +0000)]
AMDGPU: Remove dead pattern

This is the unsafe conversion pattern, but not guarded by
an unsafe math check. It is also already done in LegalizeDAG.

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

7 years agoSimplifyLibCalls: Replace fabs libcalls with intrinsics
Matt Arsenault [Tue, 17 Jan 2017 00:10:40 +0000 (00:10 +0000)]
SimplifyLibCalls: Replace fabs libcalls with intrinsics

Add missing fabs(fpext) optimzation that worked with the call,
and also fixes it creating a second fpext when there were multiple
uses.

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

7 years ago[Object] Fixup permissions of input files.
Davide Italiano [Mon, 16 Jan 2017 23:28:58 +0000 (23:28 +0000)]
[Object] Fixup permissions of input files.

They just need to be read/dumped, so no need to set the exec
bit on any of them. NFCI, I guess.

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

7 years ago[llvm-objdump] Dump PT_NOTE as part of -p.
Davide Italiano [Mon, 16 Jan 2017 23:13:46 +0000 (23:13 +0000)]
[llvm-objdump] Dump PT_NOTE as part of -p.

PR: 31641

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

7 years ago[llvm-objdump] Dump PT_GNU_RELRO as part of -p.
Davide Italiano [Mon, 16 Jan 2017 22:58:26 +0000 (22:58 +0000)]
[llvm-objdump] Dump PT_GNU_RELRO as part of -p.

PR: 31641

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

7 years ago[llvm-objdump] Dump PT_OPENBSD_{BOOTDATA,RANDOMIZE,WXNEEDED}.
Davide Italiano [Mon, 16 Jan 2017 22:01:41 +0000 (22:01 +0000)]
[llvm-objdump] Dump PT_OPENBSD_{BOOTDATA,RANDOMIZE,WXNEEDED}.

PR: 31641

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

7 years agoAdd missing header to see if that clears up the build
David Blaikie [Mon, 16 Jan 2017 21:40:08 +0000 (21:40 +0000)]
Add missing header to see if that clears up the build

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

7 years ago[InstCombine][AVX] Tests showing missed opportunities to pass demanded elts through...
Simon Pilgrim [Mon, 16 Jan 2017 21:34:22 +0000 (21:34 +0000)]
[InstCombine][AVX] Tests showing missed opportunities to pass demanded elts through a permilpd/permilps shuffle mask

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

7 years ago[InstCombine] use m_APInt instead of faking it
Sanjay Patel [Mon, 16 Jan 2017 21:24:41 +0000 (21:24 +0000)]
[InstCombine] use m_APInt instead of faking it

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

7 years agoAttempt to fix the MSVC build by using llvm::errc instead of std::errc
David Blaikie [Mon, 16 Jan 2017 21:20:51 +0000 (21:20 +0000)]
Attempt to fix the MSVC build by using llvm::errc instead of std::errc

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

7 years agoADMGPU/EG,CM: Implement _noret global atomics
Jan Vesely [Mon, 16 Jan 2017 21:20:13 +0000 (21:20 +0000)]
ADMGPU/EG,CM: Implement _noret global atomics

_RTN versions will be a lot more complicated

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

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

7 years ago[XRay] Implement the `llvm-xray graph` subcommand
David Blaikie [Mon, 16 Jan 2017 20:36:26 +0000 (20:36 +0000)]
[XRay] Implement the `llvm-xray graph` subcommand

Here we define the `graph` subcommand which generates a graph from the function
call information and uses it to present the call information graphically with
additional annotations.

Reviewers: dblaikie, dberris

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

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

7 years agoAttempt to workaround MSVC build issue where I suspect an enum class constant 0 is...
David Blaikie [Mon, 16 Jan 2017 20:28:59 +0000 (20:28 +0000)]
Attempt to workaround MSVC build issue where I suspect an enum class constant 0 is considered a possible null pointer

I can't reproduce this so far with web compilers, so throwing this at
the bots to see if it sticks.

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

7 years ago[PowerPC] Expand ISEL instruction into if-then-else sequence.
Tony Jiang [Mon, 16 Jan 2017 20:12:26 +0000 (20:12 +0000)]
[PowerPC] Expand ISEL instruction into if-then-else sequence.

Generally, the ISEL is expanded into if-then-else sequence, in some
cases (like when the destination register is the same with the true
or false value register), it may just be expanded into just the if
or else sequence.

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

7 years ago[InstCombine] fix names in canEvaluateShiftedShift(); NFC
Sanjay Patel [Mon, 16 Jan 2017 20:05:26 +0000 (20:05 +0000)]
[InstCombine] fix names in canEvaluateShiftedShift(); NFC

It's not clear what 'First' and 'Second' mean, so use 'Inner' and 'Outer'
to match foldShiftedShift() and add comments with formulas, so it's easier
to see what's going on.

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

7 years ago[InstCombine] use m_APInt to allow shift-shift folds for vectors with splat constants
Sanjay Patel [Mon, 16 Jan 2017 19:35:45 +0000 (19:35 +0000)]
[InstCombine] use m_APInt to allow shift-shift folds for vectors with splat constants

Some existing 'FIXME' tests are still not folded because of splat holes in value tracking.

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

7 years ago[InstCombine] add tests to show missed vector folds; NFC
Sanjay Patel [Mon, 16 Jan 2017 19:23:34 +0000 (19:23 +0000)]
[InstCombine] add tests to show missed vector folds; NFC

The shift-shift possibilities became easier to see after:
https://reviews.llvm.org/rL292145

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

7 years agoPR31650: Refer to enum constant when initializing llvm::None constant
David Blaikie [Mon, 16 Jan 2017 18:48:52 +0000 (18:48 +0000)]
PR31650: Refer to enum constant when initializing llvm::None constant

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

7 years ago[NVPTX] Add blank line to NVPTXUsage.rst to appease the Sphinx.
Justin Lebar [Mon, 16 Jan 2017 18:39:15 +0000 (18:39 +0000)]
[NVPTX] Add blank line to NVPTXUsage.rst to appease the Sphinx.

Fixes:

  Warning, treated as error:
  /home/buildbot/llvm-build-dir/llvm-sphinx-docs/llvm/src/docs/NVPTXUsage.rst:333:
  ERROR: Error in "code-block" directive:
  maximum 1 argument(s) allowed, 17 supplied.

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

7 years ago[InstCombine] refactor shift-of-shift folds; NFCI
Sanjay Patel [Mon, 16 Jan 2017 17:27:50 +0000 (17:27 +0000)]
[InstCombine] refactor shift-of-shift folds; NFCI

Reduces code duplication and makes it easier to extend these folds for vectors.

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

7 years ago[InstCombine][SSE] Tests showing missed opportunities to pass demanded elts through...
Simon Pilgrim [Mon, 16 Jan 2017 17:26:23 +0000 (17:26 +0000)]
[InstCombine][SSE] Tests showing missed opportunities to pass demanded elts through a packss/packus truncation

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

7 years ago[llvm-xray] Fix android build
Pavel Labath [Mon, 16 Jan 2017 16:38:23 +0000 (16:38 +0000)]
[llvm-xray] Fix android build

std::to_string is not available in the android ndk. Using llvm::to_string
instead.

Committing as obvious.

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

7 years ago[AArch64] Falkor supports Rounding Double Multiply Add/Subtract instructions.
Chad Rosier [Mon, 16 Jan 2017 16:28:43 +0000 (16:28 +0000)]
[AArch64] Falkor supports Rounding Double Multiply Add/Subtract instructions.

Falkor only partially implements the ARMv8.1a extensions, so this patch
refactors the support for the SQRDML[A|S]H instruction into a separate
feature.

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

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

7 years agoRevert r292132: [globalisel] Tablegen-erate current Register Bank Information'...
Daniel Sanders [Mon, 16 Jan 2017 15:34:43 +0000 (15:34 +0000)]
Revert r292132: [globalisel] Tablegen-erate current Register Bank Information'...

Several buildbots encountered a crash in tablegen when building this commit.
Reverting while I investigate the cause.

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

7 years agoFix use-after-free bug in AffectedValueCallbackVH::allUsesReplacedWith
Hal Finkel [Mon, 16 Jan 2017 15:22:01 +0000 (15:22 +0000)]
Fix use-after-free bug in AffectedValueCallbackVH::allUsesReplacedWith

When transferring affected values in the cache from an old value, identified by
the value of the current callback, to the specified new value we might need to
insert a new entry into the DenseMap which constitutes the cache. Doing so
might delete the current callback object. Move the copying logic into a new
function, a member of the assumption cache itself, so that we don't run into UB
should the callback handle itself be removed mid-copy.

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

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

7 years ago[globalisel] Tablegen-erate current Register Bank Information
Daniel Sanders [Mon, 16 Jan 2017 15:20:43 +0000 (15:20 +0000)]
[globalisel] Tablegen-erate current Register Bank Information

Summary:
Adds a RegisterBank tablegen class that can be used to declare the register
banks and an associated tablegen pass to generate the necessary code.

Reviewers: t.p.northover, ab, rovka, qcolombet

Subscribers: aditya_nandakumar, rengolin, kristof.beyls, vkalintiris, mgorny, dberris, llvm-commits, rovka

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

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

7 years agoRevert "[PowerPC] Expand ISEL instruction into if-then-else sequence."
Tony Jiang [Mon, 16 Jan 2017 15:01:07 +0000 (15:01 +0000)]
Revert "[PowerPC] Expand ISEL instruction into if-then-else sequence."

This reverts commit 1d0e0374438ca6e153844c683826ba9b82486bb1.

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

7 years ago[SelectionDAG] Add knownbits support for BITREVERSE
Simon Pilgrim [Mon, 16 Jan 2017 14:49:26 +0000 (14:49 +0000)]
[SelectionDAG] Add knownbits support for BITREVERSE

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

7 years ago[PowerPC] Expand ISEL instruction into if-then-else sequence.
Tony Jiang [Mon, 16 Jan 2017 14:43:12 +0000 (14:43 +0000)]
[PowerPC] Expand ISEL instruction into if-then-else sequence.

Generally, the ISEL is expanded into if-then-else sequence, in some
cases (like when the destination register is the same with the true
or false value register), it may just be expanded into just the if
or else sequence.

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

7 years agoDWARFDebugInfoTest.cpp: Don't use ArrayRef with initializer. It was allocated locally.
NAKAMURA Takumi [Mon, 16 Jan 2017 14:33:37 +0000 (14:33 +0000)]
DWARFDebugInfoTest.cpp: Don't use ArrayRef with initializer. It was allocated locally.

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

7 years ago[X86][SSE] Test showing missing BITREVERSE knownbits support
Simon Pilgrim [Mon, 16 Jan 2017 13:59:42 +0000 (13:59 +0000)]
[X86][SSE] Test showing missing BITREVERSE knownbits support

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

7 years ago[mips] Correct c.cond.fmt instruction definition.
Simon Dardis [Mon, 16 Jan 2017 13:55:58 +0000 (13:55 +0000)]
[mips] Correct c.cond.fmt instruction definition.

Permit explicit $fcc<X> operand in c.cond.fmt instruction.

Add c.cond.fmt to the MIPS to microMIPS instruction mapping table.

Check that $fcc1 - $fcc7 are unusable for MIPS-I to MIPS-III for
c.cond.fmt, bc1t, bc1f.

Reviewers: seanbruno, zoran.jovanovic, vkalintiris

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

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

7 years ago[SelectionDAG] Add support for BITREVERSE constant folding
Simon Pilgrim [Mon, 16 Jan 2017 13:39:00 +0000 (13:39 +0000)]
[SelectionDAG] Add support for BITREVERSE constant folding

We were relying on constant folding of the legalized instructions to do what constant folding we had previously

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

7 years ago[X86][SSE] Tests showing missing BITREVERSE constant folding
Simon Pilgrim [Mon, 16 Jan 2017 13:18:07 +0000 (13:18 +0000)]
[X86][SSE] Tests showing missing BITREVERSE constant folding

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

7 years ago[InstCombine][SSE] Add DemandedElts support for PSHUFB instructions
Simon Pilgrim [Mon, 16 Jan 2017 11:30:41 +0000 (11:30 +0000)]
[InstCombine][SSE] Add DemandedElts support for PSHUFB instructions

Simplify a pshufb shuffle mask based on the elements of the mask that are actually demanded.

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

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

7 years ago[X86] Merge the disassemblers handling of the different TYPE_RELs by getting the...
Craig Topper [Mon, 16 Jan 2017 06:49:09 +0000 (06:49 +0000)]
[X86] Merge the disassemblers handling of the different TYPE_RELs by getting the size information from the ENCODING field. NFCI

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

7 years ago[X86] Reduce the number of operand 'types' the disassembler needs to deal with. NFCI
Craig Topper [Mon, 16 Jan 2017 06:49:03 +0000 (06:49 +0000)]
[X86] Reduce the number of operand 'types' the disassembler needs to deal with. NFCI

We were frequently checking for a list of types and the different types
conveyed no real information. So lump them together explicitly.

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

7 years ago[AVX-512] Teach the disassembler about all of the EVEX gather and scatter instructions.
Craig Topper [Mon, 16 Jan 2017 05:44:33 +0000 (05:44 +0000)]
[AVX-512] Teach the disassembler about all of the EVEX gather and scatter instructions.

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

7 years ago[AVX-512] Begin giving the disassembler a way to recognize that VSIB is a different...
Craig Topper [Mon, 16 Jan 2017 05:44:25 +0000 (05:44 +0000)]
[AVX-512] Begin giving the disassembler a way to recognize that VSIB is a different encoding than regular addressing modes.

This part first teaches it not to check error if EVEX.V2 is used by a VSIB instruction.

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

7 years agoFix typos. NFC
Xin Tong [Mon, 16 Jan 2017 03:41:09 +0000 (03:41 +0000)]
Fix typos. NFC

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

7 years ago[AVX-512] Add more gather/scatter encoding test cases.
Craig Topper [Mon, 16 Jan 2017 00:58:20 +0000 (00:58 +0000)]
[AVX-512] Add more gather/scatter encoding test cases.

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

7 years ago[AVX-512] Correct memory operand size for VPGATHERQPS and VPGATHERQD
Craig Topper [Mon, 16 Jan 2017 00:55:58 +0000 (00:55 +0000)]
[AVX-512] Correct memory operand size for VPGATHERQPS and VPGATHERQD
with ZMM index. Similar for SCATTER and the prefetch gather and scatter
instructions.

Fixes PR31618.

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

7 years ago[AVX-512] Fix register class in one of the gather/scatter memory operands so that...
Craig Topper [Mon, 16 Jan 2017 00:55:50 +0000 (00:55 +0000)]
[AVX-512] Fix register class in one of the gather/scatter memory operands so that all 32 bit registers can be allowed.

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

7 years ago[InstCombine] add tests to show missed vector folds; NFC
Sanjay Patel [Sun, 15 Jan 2017 23:45:03 +0000 (23:45 +0000)]
[InstCombine] add tests to show missed vector folds; NFC

Also, add comments and remove bogus comment.

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

7 years agoEmpty line. NFC.
Xin Tong [Sun, 15 Jan 2017 23:32:11 +0000 (23:32 +0000)]
Empty line. NFC.

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

7 years agoUse getLoopLatch in place of isLoopSimplifyForm
Xin Tong [Sun, 15 Jan 2017 21:17:52 +0000 (21:17 +0000)]
Use getLoopLatch in place of isLoopSimplifyForm

Summary:
Use getLoopLatch in place of isLoopSimplifyForm. we do not need
to know whether the loop has a preheader nor dedicated exits.

Reviewers: hfinkel, sanjoy, atrick, mkuper

Subscribers: mzolotukhin, llvm-commits

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

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

7 years ago[CostModel][X86] Fix AVX512BW vector shift costs for vXi16 types
Simon Pilgrim [Sun, 15 Jan 2017 20:44:00 +0000 (20:44 +0000)]
[CostModel][X86] Fix AVX512BW vector shift costs for vXi16 types

We already have patterns in place to support 128/256-bit shifts without AVX512VL

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

7 years ago[CostModel][X86] Drop separate AVX512VL checks - they match existing AVX512 costs
Simon Pilgrim [Sun, 15 Jan 2017 20:19:28 +0000 (20:19 +0000)]
[CostModel][X86] Drop separate AVX512VL checks - they match existing AVX512 costs

Keep the tests though.

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

7 years ago[CostModel][X86] Update vector shift tests to correctly check by non-constant uniform...
Simon Pilgrim [Sun, 15 Jan 2017 20:10:28 +0000 (20:10 +0000)]
[CostModel][X86] Update vector shift tests to correctly check by non-constant uniform values.

Use shuffle( scslar_to_vector, zeroinitializer) pattern instead of shuffle( vec, zeroinitializer)

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

7 years agoDelete a dead argument. NFC
Xin Tong [Sun, 15 Jan 2017 19:53:59 +0000 (19:53 +0000)]
Delete a dead argument. NFC

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

7 years ago[InstCombine] fix formatting; NFC
Sanjay Patel [Sun, 15 Jan 2017 17:55:35 +0000 (17:55 +0000)]
[InstCombine] fix formatting; NFC

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

7 years ago[InstCombine][SSE] Tests showing missed opportunities to pass demanded elts through...
Simon Pilgrim [Sun, 15 Jan 2017 17:49:04 +0000 (17:49 +0000)]
[InstCombine][SSE] Tests showing missed opportunities to pass demanded elts through a pshufb shuffle mask

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

7 years ago[NVPTX] Add fptosi tests to convert-fp.ll.
Justin Lebar [Sun, 15 Jan 2017 16:55:54 +0000 (16:55 +0000)]
[NVPTX] Add fptosi tests to convert-fp.ll.

These seem to have been left off by accident.

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

7 years ago[NVPTX] Add codegen tests for llvm.fma.
Justin Lebar [Sun, 15 Jan 2017 16:55:37 +0000 (16:55 +0000)]
[NVPTX] Add codegen tests for llvm.fma.

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

7 years ago[NVPTX] Modernize intrinics.ll test.
Justin Lebar [Sun, 15 Jan 2017 16:54:57 +0000 (16:54 +0000)]
[NVPTX] Modernize intrinics.ll test.

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

7 years ago[NVPTX] Let there be One True Way to set NVVMReflect params.
Justin Lebar [Sun, 15 Jan 2017 16:54:35 +0000 (16:54 +0000)]
[NVPTX] Let there be One True Way to set NVVMReflect params.

Summary:
Previously there were three ways to inform the NVVMReflect pass whether
you wanted to flush denormals to zero:

  * An LLVM command-line option
  * Parameters to the NVVMReflect constructor
  * Metadata on the module itself.

This change removes the first two, leaving only the third.

The motivation for this change, aside from simplifying things, is that
we want LLVM to be aware of whether it's operating in FTZ mode, so other
passes can use this information.  Ideally we'd have a target-generic
piece of metadata on the module.  This change moves us in that
direction.

Reviewers: tra

Subscribers: jholewinski, llvm-commits

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

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

7 years agoFix blend mask by switch the side of the operand since Blend node uses opposite mask...
Michael Zuckerman [Sun, 15 Jan 2017 16:43:14 +0000 (16:43 +0000)]
Fix blend mask by switch the side of the operand since Blend node uses opposite mask then Select NODE.

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

7 years agoFix un-initialized error introduced by r291959.
Daniel Jasper [Sun, 15 Jan 2017 16:42:36 +0000 (16:42 +0000)]
Fix un-initialized error introduced by r291959.

This is uncovered when running tools/dsymutil/X86/empty_range.s.test
with ASAN. Haven't investigate yet, whether that means there is an ODR
violation in that test.

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

7 years ago[InstCombine] use m_APInt to allow ashr folds for vectors with splat constants
Sanjay Patel [Sun, 15 Jan 2017 16:38:19 +0000 (16:38 +0000)]
[InstCombine] use m_APInt to allow ashr folds for vectors with splat constants

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

7 years ago[InstCombine] add explanatory comments to tests; NFC
Sanjay Patel [Sun, 15 Jan 2017 16:22:26 +0000 (16:22 +0000)]
[InstCombine] add explanatory comments to tests; NFC

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

7 years agoReverted: Track validity of pass results
Serge Pavlov [Sun, 15 Jan 2017 10:23:18 +0000 (10:23 +0000)]
Reverted: Track validity of pass results

Commits r291882 and related r291887.

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

7 years agoRevert "[GlobalISel] track predecessor mapping during switch lowering."
Daniel Jasper [Sun, 15 Jan 2017 09:41:49 +0000 (09:41 +0000)]
Revert "[GlobalISel] track predecessor mapping during switch lowering."

This reverts commit r291973.

The test fails in a Release build with LLVM_BUILD_GLOBAL_ISEL enabled.
AFAICT, llc segfaults. I'll add a few more details to the original
commit.

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

7 years ago[PM] Clean up the testing for IVUsers, especially with the new PM.
Chandler Carruth [Sun, 15 Jan 2017 09:29:27 +0000 (09:29 +0000)]
[PM] Clean up the testing for IVUsers, especially with the new PM.

First, I've moved a test of IVUsers from the LSR tree to a dedicated
IVUsers test directory. I've also simplified its RUN line now that the
new pass manager's loop PM is providing analyses on their own.

No functionality changed, but it makes subsequent changes cleaner.

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

7 years agoNewGVN: Change a bunch of densemap find_or_creates to lookups, since they should...
Daniel Berlin [Sun, 15 Jan 2017 09:18:41 +0000 (09:18 +0000)]
NewGVN: Change a bunch of densemap find_or_creates to lookups, since they should not be creating new entries

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

7 years ago[PM] Teach the optimization remarks emitter to handle invalidation
Chandler Carruth [Sun, 15 Jan 2017 08:20:50 +0000 (08:20 +0000)]
[PM] Teach the optimization remarks emitter to handle invalidation
events.

This pass sometimes has a pointer to BlockFrequencyInfo so it needs
custom invalidation logic. It is also otherwise immutable so we can
reduce the number of invalidations that happen substantially.

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

7 years agoThese two functions should be const. We often could detect it but this just makes...
Daniel Berlin [Sun, 15 Jan 2017 07:40:51 +0000 (07:40 +0000)]
These two functions should be const. We often could detect it but this just makes it always true.

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

7 years agoUpdate update_test_checks so that . is a valid identifier character in addition to _
Daniel Berlin [Sun, 15 Jan 2017 07:40:46 +0000 (07:40 +0000)]
Update update_test_checks so that . is a valid identifier character in addition to _

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

7 years ago[Orc][RPC] Add an RPCFunctionNotSupported error type and return it from
Lang Hames [Sun, 15 Jan 2017 06:34:25 +0000 (06:34 +0000)]
[Orc][RPC] Add an RPCFunctionNotSupported error type and return it from
negotiateFunction where appropriate.

Replacing the old ECError with a custom type allows us to attach the name of
the function that could not be negotiated, enabling better diagnostics for
negotiation failures.

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

7 years ago[PM] Introduce an analysis set used to preserve all analyses over
Chandler Carruth [Sun, 15 Jan 2017 06:32:49 +0000 (06:32 +0000)]
[PM] Introduce an analysis set used to preserve all analyses over
a function's CFG when that CFG is unchanged.

This allows transformation passes to simply claim they preserve the CFG
and analysis passes to check for the CFG being preserved to remove the
fanout of all analyses being listed in all passes.

I've gone through and removed or cleaned up as many of the comments
reminding us to do this as I could.

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

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

7 years ago[AVX-512] Remove unnecessary duplicate broadcast patterns. NFC
Craig Topper [Sun, 15 Jan 2017 06:15:45 +0000 (06:15 +0000)]
[AVX-512] Remove unnecessary duplicate broadcast patterns. NFC

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

7 years ago[AVX-512] Replicate some broadcast patterns to VLX and disable the AVX2 patterns...
Craig Topper [Sun, 15 Jan 2017 05:47:45 +0000 (05:47 +0000)]
[AVX-512] Replicate some broadcast patterns to VLX and disable the AVX2 patterns when VLX is available.

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

7 years ago[X86] Remove untested MOVDDUP patterns.
Craig Topper [Sun, 15 Jan 2017 05:21:29 +0000 (05:21 +0000)]
[X86] Remove untested MOVDDUP patterns.

These all involve bitcasts around the memory operands. This isn't
something we normally do for isel patterns. I suspect DAG combine should
convert the load type making this unnecessary.

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

7 years agoAdd a LLVM_USE_LINKER that defines the linker to use when building LLVM
Mehdi Amini [Sun, 15 Jan 2017 03:21:30 +0000 (03:21 +0000)]
Add a LLVM_USE_LINKER that defines the linker to use when building LLVM

Summary:
This string parameter is passed to -fuse-ld when linking. It can be
an absolute path to your custom linker, otherwise clang will look for
`ld.{name}`.

Reviewers: davide, tejohnson, pcc

Subscribers: llvm-commits, mgorny

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

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

7 years agoGive comparator const call operator
Eric Fiselier [Sun, 15 Jan 2017 02:06:44 +0000 (02:06 +0000)]
Give comparator const call operator

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

7 years agoPDB: Add a class to create the /names stream contents.
Rui Ueyama [Sun, 15 Jan 2017 00:36:02 +0000 (00:36 +0000)]
PDB: Add a class to create the /names stream contents.

This patch adds a new class NameHashTableBuilder which creates /names streams.
This patch contains a test to confirm that a stream created by
NameHashTableBuilder can be read by NameHashTable reader class.

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

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

7 years ago[PM] The assumption cache is fundamentally designed to be self-updating,
Chandler Carruth [Sun, 15 Jan 2017 00:26:18 +0000 (00:26 +0000)]
[PM] The assumption cache is fundamentally designed to be self-updating,
mark it as never invalidated in the new PM.

The old PM already required this to work, and after a discussion with
Hal this seems to really be the only sensible answer. The cache
gracefully degrades as the IR is mutated, and most things which do this
should already be incrementally updating the cache.

This gets rid of a bunch of logic preserving and testing the
invalidation of this analysis.

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

7 years ago[PM] Fix instcombine's analysis preservation in the new pass manager to
Chandler Carruth [Sat, 14 Jan 2017 23:25:22 +0000 (23:25 +0000)]
[PM] Fix instcombine's analysis preservation in the new pass manager to
cover domtree and alias analysis. These are the pretty clear analyses
that we would always want to survive this pass.

To make these survive, we also need to preserve the assumption cache.

Added a test that verifies the important bits of this preservation.

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

7 years ago[InstCombine] clean up visitAshr(); NFCI
Sanjay Patel [Sat, 14 Jan 2017 23:13:50 +0000 (23:13 +0000)]
[InstCombine] clean up visitAshr(); NFCI

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

7 years ago[InstCombine] add test to show missed vector fold; NFC
Sanjay Patel [Sat, 14 Jan 2017 23:12:29 +0000 (23:12 +0000)]
[InstCombine] add test to show missed vector fold; NFC

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

7 years agoAdding const overloads of operator* and operator-> for DenseSet iterators
David Majnemer [Sat, 14 Jan 2017 21:54:58 +0000 (21:54 +0000)]
Adding const overloads of operator* and operator-> for DenseSet iterators

This fixes some problems when building ClangDiagnostics.cpp on Visual Studio 2017 RC. As far as I understand, there was a change in the implementation of the constructor for std::vector with two iterator parameters, which in our case causes an attempt to dereference const Iterator objects. Since there was no overload for a const Iterator, the compile would fail.

Patch by Hugo Puhlmann!

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

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

7 years ago[NewGVN] Fix a warning from GCC.
Davide Italiano [Sat, 14 Jan 2017 20:44:08 +0000 (20:44 +0000)]
[NewGVN] Fix a warning from GCC.

Patch by Gonsolo.
Differential Revision:  https://reviews.llvm.org/D28731

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

7 years ago[NewGVN] clang-format this file after recent changes.
Davide Italiano [Sat, 14 Jan 2017 20:15:04 +0000 (20:15 +0000)]
[NewGVN] clang-format this file after recent changes.

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

7 years ago[NewGVN] Try to be consistent wit the style used in this file. NFCI.
Davide Italiano [Sat, 14 Jan 2017 20:13:18 +0000 (20:13 +0000)]
[NewGVN] Try to be consistent wit the style used in this file. NFCI.

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

7 years ago[TargetLowering] Simplfiy a bit. NFCI.
Davide Italiano [Sat, 14 Jan 2017 20:09:29 +0000 (20:09 +0000)]
[TargetLowering] Simplfiy a bit. NFCI.

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

7 years ago[CostModel][X86] Updated vXi64 ASHR costs on AVX512 targets now that D28604 has landed
Simon Pilgrim [Sat, 14 Jan 2017 19:24:23 +0000 (19:24 +0000)]
[CostModel][X86] Updated vXi64 ASHR costs on AVX512 targets now that D28604 has landed

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

7 years ago[X86][XOP] Added support for VPMADCSWD 'extend+hadd' IFMA patterns
Simon Pilgrim [Sat, 14 Jan 2017 18:52:13 +0000 (18:52 +0000)]
[X86][XOP] Added support for VPMADCSWD 'extend+hadd' IFMA patterns

VPMADCSWD act as VPADDD( VPMADDWD( x, y ), z ) - multiply+extend+hadd and add to v4i32 accumulator

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

7 years ago[X86][XOP] Added support for VPMACSDQH/VPMACSDQL 'extension' IFMA patterns
Simon Pilgrim [Sat, 14 Jan 2017 18:08:54 +0000 (18:08 +0000)]
[X86][XOP] Added support for VPMACSDQH/VPMACSDQL 'extension' IFMA patterns

VPMACSDQH/VPMACSDQL act as VPADDQ( VPMULDQ( x, y ), z ) - multiply+extending either the odd/even 4i32 input elements and adding to v2i64 accumulator

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

7 years ago[X86][XOP] Added support for VPMACSWW/VPMACSDD 'lossy' IFMA patterns
Simon Pilgrim [Sat, 14 Jan 2017 17:13:52 +0000 (17:13 +0000)]
[X86][XOP] Added support for VPMACSWW/VPMACSDD 'lossy' IFMA patterns

VPMACSWW/VPMACSDD act as add( mul( x, y ), z ) - ignoring any upper bits from both the multiply and add stages

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

7 years ago[X86][XOP] Add tests for integer fused multiply add
Simon Pilgrim [Sat, 14 Jan 2017 13:07:22 +0000 (13:07 +0000)]
[X86][XOP] Add tests for integer fused multiply add

Tests showing missed opportunities to use XOP's integer fma instructions

Some of these are pretty awkward to match as they often have implicit sext/trunc stages but many just ignore overflow bits which makes things pretty straightforward.

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

7 years agofix some typos in the doc
Sylvestre Ledru [Sat, 14 Jan 2017 11:37:01 +0000 (11:37 +0000)]
fix some typos in the doc

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

7 years ago[utils] Improve extraction of check prefixes from RUN lines
Nikolai Bozhenov [Sat, 14 Jan 2017 09:39:35 +0000 (09:39 +0000)]
[utils] Improve extraction of check prefixes from RUN lines

Correct handling of the following FileCheck options is implemented in
update_llc_test_checks.py and update_test_checks.py scripts:

1) -check-prefix (with a single dash)
2) -check-prefixes (with multiple prefixes)

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

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

7 years ago[AVX-512] Teach two address instruction pass to replace masked move instructions...
Craig Topper [Sat, 14 Jan 2017 07:50:52 +0000 (07:50 +0000)]
[AVX-512] Teach two address instruction pass to replace masked move instructions with blendm instructions when its beneficial.

Isel now selects masked move instructions for vselect instead of blendm. But sometimes it beneficial to register allocation to remove the tied register constraint by using blendm instructions.

This also picks up cases where the masked move was created due to a masked load intrinsic.

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

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

7 years ago[AVX-512] Replace V_SET0 in AVX-512 patterns with AVX512_128_SET0. Enhance AVX512_128...
Craig Topper [Sat, 14 Jan 2017 07:29:24 +0000 (07:29 +0000)]
[AVX-512] Replace V_SET0 in AVX-512 patterns with AVX512_128_SET0. Enhance AVX512_128_SET0 expansion to make this possible.

We'll now expand AVX512_128_SET0 to an EVEX VXORD if VLX available. Or if its not, but register allocation has selected a non-extended register we will use VEX VXORPS. And if its an extended register without VLX we'll use a 512-bit XOR. Do the same for AVX512_FsFLD0SS/SD.

This makes it possible for the register allocator to have all 32 registers available to work with.

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

7 years agoRemoving potentially error-prone fallthrough. NFC
Marcello Maggioni [Sat, 14 Jan 2017 07:28:47 +0000 (07:28 +0000)]
Removing potentially error-prone fallthrough. NFC

This fallthrough if other cases are added between fabs and default
could cause fabs to fall to the next case resulting in a bug.
Better getting rid of it immediately just to be sure.

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

7 years agoDelete duplicate word. NFC
Xin Tong [Sat, 14 Jan 2017 05:51:36 +0000 (05:51 +0000)]
Delete duplicate word. NFC

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

7 years ago[X86] Simplify the code that calculates a scaled blend mask. We don't need a second...
Craig Topper [Sat, 14 Jan 2017 04:29:15 +0000 (04:29 +0000)]
[X86] Simplify the code that calculates a scaled blend mask. We don't need a second loop.

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

7 years ago[AVX-512] Change blend mask in lowerVectorShuffleAsBlend to a 64-bit value. Also...
Craig Topper [Sat, 14 Jan 2017 04:19:35 +0000 (04:19 +0000)]
[AVX-512] Change blend mask in lowerVectorShuffleAsBlend to a 64-bit value. Also add 32-bit mode command lines to the test case that exercises this just to make sure we sanely handle the 64-bit immediate there.

This fixes a undefined sanitizer failure from r291888.

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

7 years agoFix modules buildbots broken in r291983.
Eugene Zelenko [Sat, 14 Jan 2017 01:07:05 +0000 (01:07 +0000)]
Fix modules buildbots broken in r291983.

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

7 years ago[Transforms/Utils] Fix some Clang-tidy modernize and Include What You Use warnings...
Eugene Zelenko [Sat, 14 Jan 2017 00:32:38 +0000 (00:32 +0000)]
[Transforms/Utils] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

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

7 years agoCompute summary before calling extractProfTotalWeight
Easwaran Raman [Sat, 14 Jan 2017 00:32:37 +0000 (00:32 +0000)]
Compute summary before calling extractProfTotalWeight

extractProfTotalWeight checks if the profile type is sample profile, but
before that we have to ensure that summary is available. Also expanded
the unittest to test the case where there is no summar

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

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