OSDN Git Service

android-x86/external-llvm.git
7 years ago[AMDGPU][MC] Corrected several VI opcodes to avoid printing _e64
Dmitry Preobrazhensky [Mon, 15 May 2017 14:28:23 +0000 (14:28 +0000)]
[AMDGPU][MC] Corrected several VI opcodes to avoid printing _e64

See bug 32936: https://bugs.llvm.org//show_bug.cgi?id=32936

Reviewers: artem.tamazov, vpykhtin

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

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

7 years ago[SLPVectorizer][X86] Add vectorization tests for vXi64/vXi32/vXi16/VXi8 shifts
Simon Pilgrim [Mon, 15 May 2017 14:27:11 +0000 (14:27 +0000)]
[SLPVectorizer][X86] Add vectorization tests for vXi64/vXi32/vXi16/VXi8 shifts

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

7 years agoTest commit.
Dinar Temirbulatov [Mon, 15 May 2017 13:14:04 +0000 (13:14 +0000)]
Test commit.

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

7 years ago[AMDGPU][MC] Removed V_MQSAD_U16_U8
Dmitry Preobrazhensky [Mon, 15 May 2017 12:37:03 +0000 (12:37 +0000)]
[AMDGPU][MC] Removed V_MQSAD_U16_U8

This instruction does not really exist

See Bug 33018: https://bugs.llvm.org//show_bug.cgi?id=33018

Reviewers: vpykhtin, artem.tamazov

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

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

7 years ago[ARM] Mark LEApcrel instructions as isAsCheapAsAMove
John Brawn [Mon, 15 May 2017 11:57:54 +0000 (11:57 +0000)]
[ARM] Mark LEApcrel instructions as isAsCheapAsAMove

Doing this means that if an LEApcrel is used in two places we will rematerialize
instead of generating two MOVs. This is particularly useful for printfs using
the same format string, where we want to generate an address into a register
that's going to get corrupted by the call.

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

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

7 years ago[ARM] Mark LEApcrel as not having side effects
John Brawn [Mon, 15 May 2017 11:50:21 +0000 (11:50 +0000)]
[ARM] Mark LEApcrel as not having side effects

Doing this lets us hoist it out of loops, and I've also marked it as
rematerializable the same as the thumb1 and thumb2 counterparts.

It looks like it being marked as such was just a mistake, as the commit that
made that change only mentions LEApcrelJT and in thumb1 and thumb2 only the
LEApcrelJT instructions were marked as having side-effects, so it looks like
the intent was to only mark LEApcrelJT as having side-effects but LEApcrel was
accidentally marked as such also.

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

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

7 years ago[DWARF] - Speedup handling of relocations in DWARFContextInMemory.
George Rimar [Mon, 15 May 2017 11:45:28 +0000 (11:45 +0000)]
[DWARF] - Speedup handling of relocations in DWARFContextInMemory.

I am working on a speedup of building .gdb_index in LLD and
noticed that relocations that are proccessed in DWARFContextInMemory often uses
the same symbol in a row. This patch introduces caching to reduce the relocations
proccessing time.

For benchmark,
I took debug LLC binary objects configured with -ggnu-pubnames and linked it using LLD.

Link time without --gdb-index is about 4,45s.
Link time with --gdb-index: a) Without patch: 19,16s b) With patch: 15,52s
That means time spent on --gdb-index in this configuration is
19,16s - 4,45s = 14,71s (without patch) vs 15,52s - 4,45s = 11,07s (with patch).

Differential revision: https://reviews.llvm.org/D31136

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

7 years ago[X86] Relocate code of replacement of subtarget unsupported masked memory intrinsics...
Ayman Musa [Mon, 15 May 2017 11:30:54 +0000 (11:30 +0000)]
[X86] Relocate code of replacement of subtarget unsupported masked memory intrinsics to run also on -O0 option.

Currently, when masked load, store, gather or scatter intrinsics are used, we check in CodeGenPrepare pass if the subtarget support these intrinsics, if not we replace them with scalar code - this is a functional transformation not an optimization (not optional).

CodeGenPrepare pass does not run when the optimization level is set to CodeGenOpt::None (-O0).

Functional transformation should run with all optimization levels, so here I created a new pass which runs on all optimization levels and does no more than this transformation.

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

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

7 years ago[NVPTX] Don't rely on default arguments to SelectionDAG::getMemIntrinsicNode. NFC.
Simon Pilgrim [Mon, 15 May 2017 10:47:48 +0000 (10:47 +0000)]
[NVPTX] Don't rely on default arguments to SelectionDAG::getMemIntrinsicNode. NFC.

NFC followup to D33147, this explicitly sets all the arguments (instead of relying on the defaults) to SelectionDAG::getMemIntrinsicNode to help identify -verify-machineinstrs issues.

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

7 years ago[TableGen] Add EncoderMethod to RegisterOperand
Sam Kolton [Mon, 15 May 2017 10:13:07 +0000 (10:13 +0000)]
[TableGen] Add EncoderMethod to RegisterOperand

Reviewers: stoklund, grosbach, vpykhtin

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

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

7 years ago[RegisterBankInfo] Remove overly-agressive asserts
Tom Stellard [Mon, 15 May 2017 09:52:33 +0000 (09:52 +0000)]
[RegisterBankInfo] Remove overly-agressive asserts

Summary:
We were asserting in RegisterBankInfo if RBI.copyCost() returns
UINT_MAX.  This is OK for RegBankSelect::Mode::Fast since we only
try one instruction mapping and can't recover from this, but for
RegBankSelect::Mode::Greedy we will be considering multiple
instruction mappings, so we can recover if we see a UNIT_MAX copy
cost.

The copy cost for one pair of register banks in the AMDGPU backend
will be UNIT_MAX, so this patch will prevent AMDGPU tests from
breaking.

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

Reviewed By: qcolombet

Subscribers: tpr, llvm-commits

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

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

7 years agoCMake: Fix docs-llvm-man target when clang+llvm is in the same source tree
Tom Stellard [Mon, 15 May 2017 09:34:23 +0000 (09:34 +0000)]
CMake: Fix docs-llvm-man target when clang+llvm is in the same source tree

Summary:
This was broken by r302499.  Configuring with -DLLVM_BUILD_DOCS=ON would
cause the docs-llvm-man target not to be created.

Reviewers: anemet, beanz

Reviewed By: anemet

Subscribers: llvm-commits, mgorny

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

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

7 years agoMCObjectStreamer : fail with a diagnostic when emitting an out of range value.
Arnaud A. de Grandmaison [Mon, 15 May 2017 08:43:27 +0000 (08:43 +0000)]
MCObjectStreamer : fail with a diagnostic when emitting an out of range value.

We were previously silently emitting bogus data in release mode,
making it very hard to diagnose the error, or crashing with an
assert in debug mode. A proper diagnostic is now always emitted
when the value to be emitted is out of range.

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

7 years ago[GlobalISel][X86] G_BR instruction select test
Igor Breger [Mon, 15 May 2017 07:03:38 +0000 (07:03 +0000)]
[GlobalISel][X86] G_BR instruction select test

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

7 years ago[ValueTracking] Replace all uses of ComputeSignBit with computeKnownBits.
Craig Topper [Mon, 15 May 2017 06:39:41 +0000 (06:39 +0000)]
[ValueTracking] Replace all uses of ComputeSignBit with computeKnownBits.

This patch finishes off the conversion of ComputeSignBit to computeKnownBits.

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

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

7 years agoAdd '#' to test regex that I forgot in r303025.
Daniel Jasper [Mon, 15 May 2017 04:58:27 +0000 (04:58 +0000)]
Add '#' to test regex that I forgot in r303025.

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

7 years ago[ConstantRange] Fix what appear to be copy and paste mistakes in the unittest.
Craig Topper [Mon, 15 May 2017 04:40:19 +0000 (04:40 +0000)]
[ConstantRange] Fix what appear to be copy and paste mistakes in the unittest.

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

7 years agoMove some code into ScalarEvolution.cpp; NFC
Sanjoy Das [Mon, 15 May 2017 04:22:09 +0000 (04:22 +0000)]
Move some code into ScalarEvolution.cpp; NFC

I need to add some asserts to these constructors that are easier to
add once they're in the .cpp file.

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

7 years ago[InstCombine] Merge duplicate functionality between InstCombine and ValueTracking
Craig Topper [Mon, 15 May 2017 02:44:08 +0000 (02:44 +0000)]
[InstCombine] Merge duplicate functionality between InstCombine and ValueTracking

Summary:
Merge overflow computation for signed add,
appearing both in InstCombine and ValueTracking.

As part of the merge,
cleanup the interface for overflow checks in InstCombine.

Patch by Yoav Ben-Shalom.

Reviewers: craig.topper, majnemer

Reviewed By: craig.topper

Subscribers: takuto.ikuta, llvm-commits

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

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

7 years ago[InstCombine] Remove 'return' of a called function that also returned void. NFC
Craig Topper [Mon, 15 May 2017 02:30:27 +0000 (02:30 +0000)]
[InstCombine] Remove 'return' of a called function that also returned void. NFC

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

7 years agoFix two tests that weren't correctly copied.
Daniel Jasper [Sun, 14 May 2017 22:07:50 +0000 (22:07 +0000)]
Fix two tests that weren't correctly copied.

One didn't correctly fine the regex variable, the other still had a RUN
line for FNOBUILTIN-checks, which weren't copied to the file.

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

7 years ago[X86] Utilize SelectionDAG::getSelect(). NFC.
Zvi Rackover [Sun, 14 May 2017 21:30:38 +0000 (21:30 +0000)]
[X86] Utilize SelectionDAG::getSelect(). NFC.

Replace SelectionDAG::getNode(ISD::SELECT, ...)
and SelectionDAG::getNode(ISD::VSELECT, ...)
with SelectionDAG::getSelect(...)
Saves a few lines of code and in some cases saves the need to explicitly
check the type of the desired node.

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

7 years ago[X86][AVX1] Account for cost of extract/insert of 256-bit shifts
Simon Pilgrim [Sun, 14 May 2017 20:52:11 +0000 (20:52 +0000)]
[X86][AVX1] Account for cost of extract/insert of 256-bit shifts

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

7 years ago[X86][AVX2] Fix costs for v4i64 ashr by splat
Simon Pilgrim [Sun, 14 May 2017 20:25:42 +0000 (20:25 +0000)]
[X86][AVX2] Fix costs for v4i64 ashr by splat

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

7 years ago[X86][AVX1] Account for cost of extract/insert of 256-bit shifts by splat
Simon Pilgrim [Sun, 14 May 2017 20:02:34 +0000 (20:02 +0000)]
[X86][AVX1] Account for cost of extract/insert of 256-bit shifts by splat

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

7 years ago[X86] Add avx512vl command lines to the 128/256-bit vector-lzcnt tests so we can...
Craig Topper [Sun, 14 May 2017 19:38:11 +0000 (19:38 +0000)]
[X86] Add avx512vl command lines to the 128/256-bit vector-lzcnt tests so we can see what compare instructions are being used in the lookup table code.

I noticed the 512-bit lzcnts don't use the X86 specific lookup table code and instead use the EXPAND case in LegalizeDAG. I was toying around with fixing this and noticed it would require compare instructions that generate i1 masks and then converting from mask to vector. Then I noticed that we don't test which compares are used with avx512vl and no avx512cd.

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

7 years ago[X86] Cleanup some of the check-prefixes in the vector-lzcnt tests.
Craig Topper [Sun, 14 May 2017 19:38:09 +0000 (19:38 +0000)]
[X86] Cleanup some of the check-prefixes in the vector-lzcnt tests.

Remove an unneeded prefix from the 32-bit command line. Make all the 64-bit triples match. Replace ALL with X64 and remove it from the 32-bit test.

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

7 years ago[X86] Remove unused value from IntrinsicType enum. NFC
Craig Topper [Sun, 14 May 2017 19:38:06 +0000 (19:38 +0000)]
[X86] Remove unused value from IntrinsicType enum. NFC

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

7 years ago[X86][AVX1] Account for cost of extract/insert of 256-bit SDIV/UDIV by mul sequences
Simon Pilgrim [Sun, 14 May 2017 18:52:15 +0000 (18:52 +0000)]
[X86][AVX1] Account for cost of extract/insert of 256-bit SDIV/UDIV by mul sequences

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

7 years agoFix DynamicLibraryTest.cpp on FreeBSD and NetBSD
Dimitry Andric [Sun, 14 May 2017 18:35:38 +0000 (18:35 +0000)]
Fix DynamicLibraryTest.cpp on FreeBSD and NetBSD

Summary:

After rL301562, on FreeBSD the DynamicLibrary unittests fail, because
the test uses getMainExecutable("DynamicLibraryTests", Ptr), and since
the path does not contain any slashes, retrieving the main executable
will not work.

Reimplement getMainExecutable() for FreeBSD and NetBSD using sysctl(3),
which is more reliable than fiddling with relative or absolute paths.

Also add retrieval of the original argv[] from the GoogleTest framework,
to use as a fallback for other OSes.

Reviewers: emaste, marsupial, hans, krytarowski

Reviewed By: krytarowski

Subscribers: krytarowski, llvm-commits

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

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

7 years ago[COFF] Gracefully handle empty .drectve sections
Shoaib Meenai [Sun, 14 May 2017 18:34:56 +0000 (18:34 +0000)]
[COFF] Gracefully handle empty .drectve sections

Running `llvm-readobj -coff-directives msvcrt.lib` resulted in this error:

    Invalid data was encountered while parsing the file

This happened because some of the object files in the archive have empty
`.drectve` sections. These empty sections result in a `parse_failed` error being
returned from `COFFObjectFile::getSectionContents()`, which in turn caused
`llvm-readobj` to stop. With this change, `getSectionContents` now returns
success, and like before the resulting array is empty.

Patch by Dave Lee.

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

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

7 years ago[X86][XOP] XOP's general v16i8 shifts will be used instead of v8i16 shift + mask.
Simon Pilgrim [Sun, 14 May 2017 17:59:46 +0000 (17:59 +0000)]
[X86][XOP] XOP's general v16i8 shifts will be used instead of v8i16 shift + mask.

Tweak cost model to match what lowering actually does.

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

7 years ago[X86][SSE] Account for cost of extract/insert of v32i8 vector shifts
Simon Pilgrim [Sun, 14 May 2017 17:36:07 +0000 (17:36 +0000)]
[X86][SSE] Account for cost of extract/insert of v32i8 vector shifts

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

7 years ago[StringExtras] Add llvm::to_integer.
Zachary Turner [Sun, 14 May 2017 17:11:05 +0000 (17:11 +0000)]
[StringExtras] Add llvm::to_integer.

This is a very thin wrapper around StringRef::getAsInteger.
It serves three purposes.

1) It allows a cleaner syntax when you have something other than
   a StringRef - for example, a std::string or an llvm::SmallString.
   Previously, in this case you would have to write something like:
      StringRef(MyStr).getAsInteger(0, Result)
   by explicitly constructing a temporary StringRef.  This can be
   done implicitly however with the new function by just writing:
      to_integer(MyStr, ...).
2) Correcting the travesty that is getAsInteger's return value.
   This function returns true on success, and false on failure.
   While this may cause confusion with people familiar with the
   getAsInteger API, there seems to be widespread agreement that
   the return semantics of getAsInteger was a mistake.
3) It allows the Radix to be deduced as a default argument by
   putting it last in the parameter list.  Most uses of getAsInteger
   pass 0 for the first argument.  With this syntax it can just be
   omitted.

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

7 years ago[X86][XOP] Account for cost of extract/insert of 256-bit vector shifts
Simon Pilgrim [Sun, 14 May 2017 13:38:53 +0000 (13:38 +0000)]
[X86][XOP] Account for cost of extract/insert of 256-bit vector shifts

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

7 years ago[X86][AVX] Allow 32-bit targets to peek through subvectors to extract constant splats...
Simon Pilgrim [Sun, 14 May 2017 11:46:26 +0000 (11:46 +0000)]
[X86][AVX] Allow 32-bit targets to peek through subvectors to extract constant splats for vXi64 shifts.

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

7 years ago[X86][AVX] Add additional 32-bit target vector shift tests
Simon Pilgrim [Sun, 14 May 2017 11:13:03 +0000 (11:13 +0000)]
[X86][AVX] Add additional 32-bit target vector shift tests

Shows issue with 32-bits not being able to peek through subvectors to extract constant splats

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

7 years agoupdate of the url
Sylvestre Ledru [Sun, 14 May 2017 07:55:01 +0000 (07:55 +0000)]
update of the url

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

7 years ago[InstSimplify] Add patterns for folding (A & B) | (~A ^ B) -> (~A ^ B) and its commut...
Craig Topper [Sun, 14 May 2017 07:54:43 +0000 (07:54 +0000)]
[InstSimplify] Add patterns for folding (A & B) | (~A ^ B) -> (~A ^ B) and its commuted variants.

We already had (A & ~B) | (A ^ B), but we missed the cases where the not was part of the xor.

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

7 years agofoo
Craig Topper [Sun, 14 May 2017 07:54:40 +0000 (07:54 +0000)]
foo

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

7 years ago[BasicAA] Alphabetize includes. NFC
Craig Topper [Sun, 14 May 2017 06:18:34 +0000 (06:18 +0000)]
[BasicAA] Alphabetize includes. NFC

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

7 years agoRenable test that was disabled due to cost analysis
Xinliang David Li [Sun, 14 May 2017 02:58:39 +0000 (02:58 +0000)]
Renable test that was disabled due to cost analysis

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

7 years agoFix test failure on windows -- do not return deleted func
Xinliang David Li [Sun, 14 May 2017 02:54:02 +0000 (02:54 +0000)]
Fix test failure on windows -- do not return deleted func

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

7 years ago[llvm-pdbdump] Add the option to sort functions and data.
Zachary Turner [Sun, 14 May 2017 01:13:40 +0000 (01:13 +0000)]
[llvm-pdbdump] Add the option to sort functions and data.

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

7 years ago[SelectionDAG] Added support for EXTRACT_SUBVECTOR/CONCAT_VECTORS demandedelts in...
Simon Pilgrim [Sat, 13 May 2017 22:10:58 +0000 (22:10 +0000)]
[SelectionDAG] Added support for EXTRACT_SUBVECTOR/CONCAT_VECTORS demandedelts in ComputeNumSignBits

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

7 years agoAdd missing files
Peter Collingbourne [Sat, 13 May 2017 22:10:13 +0000 (22:10 +0000)]
Add missing files

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

7 years agoMove lib/LibDriver -> lib/ToolDrivers/llvm-lib. NFCI.
Peter Collingbourne [Sat, 13 May 2017 22:06:46 +0000 (22:06 +0000)]
Move lib/LibDriver -> lib/ToolDrivers/llvm-lib. NFCI.

This reorganisation prevents us from cluttering up the top-level lib directory
with more driver libraries such as llvm-dlltool (see D29892).

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

7 years ago[X86][SSE] Test showing missing EXTRACT_SUBVECTOR/CONCAT_VECTORS demandedelts support...
Simon Pilgrim [Sat, 13 May 2017 21:50:18 +0000 (21:50 +0000)]
[X86][SSE] Test showing missing EXTRACT_SUBVECTOR/CONCAT_VECTORS demandedelts support in ComputeNumSignBits

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

7 years ago[SelectionDAG] Add VECTOR_SHUFFLE support to ComputeNumSignBits
Simon Pilgrim [Sat, 13 May 2017 19:57:10 +0000 (19:57 +0000)]
[SelectionDAG] Add VECTOR_SHUFFLE support to ComputeNumSignBits

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

7 years ago[X86][SSE] Test showing inability of ComputeNumSignBits to resolve shuffles
Simon Pilgrim [Sat, 13 May 2017 17:41:07 +0000 (17:41 +0000)]
[X86][SSE] Test showing inability of ComputeNumSignBits to resolve shuffles

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

7 years ago[ValueTracking] Remove const_casts on several calls to computeKnownBits and ComputeSi...
Craig Topper [Sat, 13 May 2017 17:22:16 +0000 (17:22 +0000)]
[ValueTracking] Remove const_casts on several calls to computeKnownBits and ComputeSignBit. NFC

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

7 years agoMSan: Mark MemorySanitizer tests that use x86 intrinsics as REQUIRES: x86
Justin Bogner [Sat, 13 May 2017 16:24:38 +0000 (16:24 +0000)]
MSan: Mark MemorySanitizer tests that use x86 intrinsics as REQUIRES: x86

Tests that use target intrinsics are inherently target specific. Mark
them as such.

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

7 years ago[x86, SSE] AVX1 PR28129 (256-bit all-ones rematerialization)
Simon Pilgrim [Sat, 13 May 2017 13:42:35 +0000 (13:42 +0000)]
[x86, SSE] AVX1 PR28129 (256-bit all-ones rematerialization)

Further perf tests on Jaguar indicate that:

vxorps  %ymm0, %ymm0, %ymm0
vcmpps  $15, %ymm0, %ymm0, %ymm0

is consistently faster (by about 9%) than:

vpcmpeqd  %xmm0, %xmm0, %xmm0
vinsertf128  $1, %xmm0, %ymm0, %ymm0

Testing equivalent code on a SandyBridge (E5-2640) puts it slightly (~3%) faster as well.

Committed on behalf of @dtemirbulatov

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

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

7 years ago[LoopOptimizer][Fix]PR32859, PR24738
Simon Pilgrim [Sat, 13 May 2017 13:25:57 +0000 (13:25 +0000)]
[LoopOptimizer][Fix]PR32859, PR24738

The Loop vectorizer pass introduced undef value while it is fixing output of LCSSA form.
Here it is:

before: %e.0.ph = phi i32 [ 0, %for.inc.2.i ]
after: %e.0.ph = phi i32 [ 0, %for.inc.2.i ], [ undef, %middle.block ]

and after this change we have:

%e.0.ph = phi i32 [ 0, %for.inc.2.i ]
%e.0.ph = phi i32 [ 0, %for.inc.2.i ], [ 0, %middle.block ]

Committed on behalf of @dtemirbulatov

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

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

7 years agoThis reverts r302984
Vivek Pandya [Sat, 13 May 2017 10:59:05 +0000 (10:59 +0000)]
This reverts r302984

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

7 years agoSimplify MIR Output used for Codegen Testing
Vivek Pandya [Sat, 13 May 2017 08:55:43 +0000 (08:55 +0000)]
Simplify MIR Output used for Codegen Testing

- MIRYamlMapping: Default value provided for fields which have optional
mappings. Implemented == operators for required classes. When a field's value is
same as default value specified YAML IO class will not print it.

- MIRPrinter: Above mentioned behaviour is not on by default. If -simplify-mir
option not specified, then make yaml::Output to print fields with default values
too.

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

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

7 years ago[APInt] Use Lo_32/Hi_32/Make_64 in a few more places in the divide code. NFCI
Craig Topper [Sat, 13 May 2017 07:14:17 +0000 (07:14 +0000)]
[APInt] Use Lo_32/Hi_32/Make_64 in a few more places in the divide code. NFCI

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

7 years ago[InstCombine] Prevent InstCombine from triggering an extra iteration if something...
Craig Topper [Sat, 13 May 2017 06:56:04 +0000 (06:56 +0000)]
[InstCombine] Prevent InstCombine from triggering an extra iteration if something changed in the initial Worklist creation

Summary:
If the Worklist build causes an IR change this change flag currently factors into the flag for running another iteration of the iteration loop. But only changes during processing should trigger another loop.

This patch captures the worklist creation change flag into the outside the loop flag currently used for DbgDeclares and only sends that flag up to the caller. Rerunning the loop only depends on IC.run() now.

This uses the debug output of InstCombine to determine if one or two iterations run. I couldn't think of a better way to detect it since the second spurious iteration shoudn't make any visible changes. Just wasted computation.

I can do a pre-commit of the test case with the CHECK-NOT as a CHECK if this is an ok way to check this.

This is a subset of D31678 as I'm still not sure how to verify the analysis behavior for that.

Reviewers: davide, majnemer, spatel, chandlerc

Reviewed By: davide

Subscribers: llvm-commits

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

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

7 years agoConstProp: Split x86 SSE intrinsic tests out of calls.ll
Justin Bogner [Sat, 13 May 2017 05:52:17 +0000 (05:52 +0000)]
ConstProp: Split x86 SSE intrinsic tests out of calls.ll

This allows us to mark this as `REQUIRES: x86`, since it uses x86
target specific intrinsics.

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

7 years agoInstCombine: Move tests that use target intrinsics into subdirectories
Justin Bogner [Sat, 13 May 2017 05:39:46 +0000 (05:39 +0000)]
InstCombine: Move tests that use target intrinsics into subdirectories

Tests with target intrinsics are inherently target specific, so it
doesn't actually make sense to run them if we've excluded their
target.

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

7 years agoDisable llvm/test/Transforms/NewGVN/pr32934.ll while Davide is investigating.
NAKAMURA Takumi [Sat, 13 May 2017 03:05:38 +0000 (03:05 +0000)]
Disable llvm/test/Transforms/NewGVN/pr32934.ll while Davide is investigating.

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

7 years ago[NewGVN] XFAIL a flaky test until I find out what's going on.
Davide Italiano [Sat, 13 May 2017 02:45:47 +0000 (02:45 +0000)]
[NewGVN] XFAIL a flaky test until I find out what's going on.

I bet the change is correct but this test seems to expose some underlying
problem that manifest only on some buildbots, and I'm not able to reproduce
locally. Unfortunately I can't debug right now but I don't want to annoy
people with spurious failures, so I'll XFAIL until I can take a look (over
the weekend).

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

7 years ago[APInt] Fix typo in comment. NFC
Craig Topper [Sat, 13 May 2017 00:35:30 +0000 (00:35 +0000)]
[APInt] Fix typo in comment. NFC

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

7 years ago[AVR] When lowering Select8/Select16, put newly generated MBBs in the same spot
Dylan McKay [Sat, 13 May 2017 00:22:34 +0000 (00:22 +0000)]
[AVR] When lowering Select8/Select16, put newly generated MBBs in the same spot

Contributed by Dr. Gergő Érdi.

Fixes a bug.

Raised from (https://github.com/avr-rust/rust/issues/49).

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

7 years agoAA: Use generic intrinsics for tests instead of target specific ones
Justin Bogner [Sat, 13 May 2017 00:12:52 +0000 (00:12 +0000)]
AA: Use generic intrinsics for tests instead of target specific ones

Update a few tests to use llvm.masked.load/store instead of arm neon
vector loads and stores, and move the tests that are actually specific
to those arm intrinsics to their own files. This lets us mark the
tests that use target specific intrinsics as requiring those targets.

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

7 years ago[CodeView] Silence some -Wsign-compare warnings
Justin Bogner [Sat, 13 May 2017 00:11:39 +0000 (00:11 +0000)]
[CodeView] Silence some -Wsign-compare warnings

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

7 years ago[AVR] Remove an unused variable
Dylan McKay [Sat, 13 May 2017 00:00:26 +0000 (00:00 +0000)]
[AVR] Remove an unused variable

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

7 years ago[PartialInlining] Profile based cost analysis
Xinliang David Li [Fri, 12 May 2017 23:41:43 +0000 (23:41 +0000)]
[PartialInlining] Profile based cost analysis

Implemented frequency based cost/saving analysis
and related options.

The pass is now in a state ready to be turne on
in the pipeline (in follow up).

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

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

7 years ago[GISel]: Add a getConstantFPVRegVal utility
Aditya Nandakumar [Fri, 12 May 2017 22:54:52 +0000 (22:54 +0000)]
[GISel]: Add a getConstantFPVRegVal utility

This might be useful across various GISel Passes

https://reviews.llvm.org/D33051

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

7 years ago[GISel]: Fix undefined behavior while accessing DefaultAction map
Aditya Nandakumar [Fri, 12 May 2017 22:43:58 +0000 (22:43 +0000)]
[GISel]: Fix undefined behavior while accessing DefaultAction map

We end up dereferencing the end iterator here when the Aspect doesn't exist in the DefaultAction map.
Change the API to return Optional<LLT> and return None when not found.
Also update the callers to handle the None case

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

7 years ago[IR] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC).
Eugene Zelenko [Fri, 12 May 2017 22:25:07 +0000 (22:25 +0000)]
[IR] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC).

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

7 years ago[TLI] Add mapping for various '__<func>_finite' forms of the math routines to SVML...
Andrew Kaylor [Fri, 12 May 2017 22:11:26 +0000 (22:11 +0000)]
[TLI] Add mapping for various '__<func>_finite' forms of the math routines to SVML routines

Patch by Chris Chrulski

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

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

7 years ago[ConstantFolding] Add folding for various math '__<func>_finite' routines generated...
Andrew Kaylor [Fri, 12 May 2017 22:11:20 +0000 (22:11 +0000)]
[ConstantFolding] Add folding for various math '__<func>_finite' routines generated from -ffast-math

Patch by Chris Chrulski

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

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

7 years ago[TLI] Add declarations for various math header file routines from math-finite.h that...
Andrew Kaylor [Fri, 12 May 2017 22:11:12 +0000 (22:11 +0000)]
[TLI] Add declarations for various math header file routines from math-finite.h that create '__<func>_finite as functions

Patch by Chris Chrulski

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

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

7 years ago[APInt] Add early outs for a division by 1 to udiv/urem/udivrem
Craig Topper [Fri, 12 May 2017 21:45:50 +0000 (21:45 +0000)]
[APInt] Add early outs for a division by 1 to udiv/urem/udivrem

We already counted the number of bits in the RHS so its pretty cheap to just check if the RHS is 1.

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

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

7 years ago[APInt] In udivrem, remember the bit width in a local variable so we don't reread...
Craig Topper [Fri, 12 May 2017 21:45:44 +0000 (21:45 +0000)]
[APInt] In udivrem, remember the bit width in a local variable so we don't reread it from the LHS which might be aliased with Quotient or Remainder.

This helped the compiler generate better code for the single word case. It was able to remember that the bit width was still a single word when it created the Remainder APInt and not create code for it possibly being multiword.

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

7 years agoLTO: Don't verify modules twice in verifyMergedModuleOnce
Adrian Prantl [Fri, 12 May 2017 21:38:32 +0000 (21:38 +0000)]
LTO: Don't verify modules twice in verifyMergedModuleOnce

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

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

7 years ago[Doc] Document "Splat" in the lexicon
Sanjay Patel [Fri, 12 May 2017 21:30:31 +0000 (21:30 +0000)]
[Doc] Document "Splat" in the lexicon

Patch by Wei-Ren Chen (陳韋任)!

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

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

7 years ago[x86] add vector tests for demanded bits; NFC
Sanjay Patel [Fri, 12 May 2017 20:53:48 +0000 (20:53 +0000)]
[x86] add vector tests for demanded bits; NFC

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

7 years agoAMDGPU/SI: Don't promote to vector if the load/store is volatile.
Changpeng Fang [Fri, 12 May 2017 20:31:12 +0000 (20:31 +0000)]
AMDGPU/SI: Don't promote to vector if the load/store is volatile.

Summary:
  We should not change volatile loads/stores in promoting alloca to vector.

Reviewers:
  arsenm

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

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

7 years ago[NVPTX] Don't flag StoreRetVal memory chain operands as ReadMem (PR32146)
Simon Pilgrim [Fri, 12 May 2017 19:56:43 +0000 (19:56 +0000)]
[NVPTX] Don't flag StoreRetVal memory chain operands as ReadMem (PR32146)

This fixes 47 of the 75 NVPTX '-verify-machineinstrs with EXPENSIVE_CHECKS' errors in PR32146.

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

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

7 years agoRemove ignore-empty-index-file option
Teresa Johnson [Fri, 12 May 2017 19:32:11 +0000 (19:32 +0000)]
Remove ignore-empty-index-file option

Summary:
As discussed in the D32195 review thread and on IRC, remove this option
and replace with parameter, which will be set to true when invoked
from clang in the context of a ThinLTO distributed backend.

Reviewers: pcc

Subscribers: mehdi_amini, llvm-commits

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

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

7 years agoAdd LiveRangeShrink pass to shrink live range within BB.
Dehao Chen [Fri, 12 May 2017 19:29:27 +0000 (19:29 +0000)]
Add LiveRangeShrink pass to shrink live range within BB.

Summary: LiveRangeShrink pass moves instruction right after the definition with the same BB if the instruction and its operands all have more than one use. This pass is inexpensive and guarantees optimal live-range within BB.

Reviewers: davidxl, wmi, hfinkel, MatzeB, andreadb

Reviewed By: MatzeB, andreadb

Subscribers: hiraditya, jyknight, sanjoy, skatkov, gberry, jholewinski, qcolombet, javed.absar, krytarowski, atrick, spatel, RKSimon, andreadb, MatzeB, mehdi_amini, mgorny, efriedma, davide, dberlin, llvm-commits

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

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

7 years ago[PPC] Move the combine "a << (b % (sizeof(a) * 8)) -> (PPCshl a, b)" to the backend...
Tim Shen [Fri, 12 May 2017 19:25:37 +0000 (19:25 +0000)]
[PPC] Move the combine "a << (b % (sizeof(a) * 8)) -> (PPCshl a, b)" to the backend. NFC.

Summary:
Eli pointed out that it's unsafe to combine the shifts to ISD::SHL etc.,
because those are not defined for b > sizeof(a) * 8, even after some of
the combiners run.

However, PPCISD::SHL defines that behavior (as the instructions themselves).
Move the combination to the backend.

The tests in shift_mask.ll still pass.

Reviewers: echristo, hfinkel, efriedma, iteratee

Subscribers: nemanjai, llvm-commits

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

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

7 years ago[CodeView] Add a random access type visitor.
Zachary Turner [Fri, 12 May 2017 19:18:12 +0000 (19:18 +0000)]
[CodeView] Add a random access type visitor.

This adds a visitor that is capable of accessing type
records randomly and caching intermediate results that it
learns about during partial linear scans.  This yields
amortized O(1) access to a type stream even though type
streams cannot normally be indexed.

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

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

7 years ago[AArch64][Falkor] Refine modeling of multiply accumulate forwarding.
Geoff Berry [Fri, 12 May 2017 18:57:10 +0000 (18:57 +0000)]
[AArch64][Falkor] Refine modeling of multiply accumulate forwarding.

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

7 years ago[APInt] Add an assert to check for divide by zero in udivrem. NFC
Craig Topper [Fri, 12 May 2017 18:19:01 +0000 (18:19 +0000)]
[APInt] Add an assert to check for divide by zero in udivrem. NFC

udiv and urem already had the same assert.

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

7 years ago[APInt] Remove unnecessary checks of rhsWords==1 with lhsWords==1 from udiv and udivr...
Craig Topper [Fri, 12 May 2017 18:18:57 +0000 (18:18 +0000)]
[APInt] Remove unnecessary checks of rhsWords==1 with lhsWords==1 from udiv and udivrem. NFC

At this point in the code rhsWords is guaranteed to be non-zero and less than or equal to lhsWords. So if lhsWords is 1, rhsWords must also be 1. urem alread had the check removed so this makes all 3 consistent.

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

7 years agoAMDGPU: Add lit.local.cfg to disable global-isel tests when global-isel is disabled
Tom Stellard [Fri, 12 May 2017 17:59:30 +0000 (17:59 +0000)]
AMDGPU: Add lit.local.cfg to disable global-isel tests when global-isel is disabled

This should fix bots broken by r302919.

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

7 years agoStrip trailing whitespace. NFCI.
Simon Pilgrim [Fri, 12 May 2017 17:42:36 +0000 (17:42 +0000)]
Strip trailing whitespace. NFCI.

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

7 years ago[KnownBits] Add bit counting methods to KnownBits struct and use them where possible
Craig Topper [Fri, 12 May 2017 17:20:30 +0000 (17:20 +0000)]
[KnownBits] Add bit counting methods to KnownBits struct and use them where possible

This patch adds min/max population count, leading/trailing zero/one bit counting methods.

The min methods return answers based on bits that are known without considering unknown bits. The max methods give answers taking into account the largest count that unknown bits could give.

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

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

7 years ago[codeview] Fix assertion failure introduced in r295354 refactoring
Reid Kleckner [Fri, 12 May 2017 17:02:40 +0000 (17:02 +0000)]
[codeview] Fix assertion failure introduced in r295354 refactoring

CodeViewDebug sets Asm to nullptr to disable debug info generation.  You
can get a .ll file like no-cus.ll from 'clang -gcodeview -g0', which
happens in the ubsan test suite.

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

7 years agoMake sure we have actually written what is expected by the test.
Galina Kistanova [Fri, 12 May 2017 17:00:13 +0000 (17:00 +0000)]
Make sure we have actually written what is expected by the test.

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

7 years agoAMDGPU/GlobalISel: Mark 32-bit integer constants as legal
Tom Stellard [Fri, 12 May 2017 16:46:46 +0000 (16:46 +0000)]
AMDGPU/GlobalISel: Mark 32-bit integer constants as legal

Reviewers: arsenm

Reviewed By: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, igorb, dstuttard, tpr, t-tye, llvm-commits

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

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

7 years ago[APInt] Use MathExtras.h BitsToFloat/Double and Float/DoubleToBits instead of type...
Craig Topper [Fri, 12 May 2017 16:28:21 +0000 (16:28 +0000)]
[APInt] Use MathExtras.h BitsToFloat/Double and Float/DoubleToBits instead of type punning through a union

The functions in MathExtras.h uses a safer memcpy instead of going through a union.

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

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

7 years ago[SPARC] Support 'f' and 'e' inline asm constraints.
James Y Knight [Fri, 12 May 2017 15:59:10 +0000 (15:59 +0000)]
[SPARC] Support 'f' and 'e' inline asm constraints.

Based on patch by Patrick Boettcher and Chris Dewhurst.

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

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

7 years ago[x86] add tests for potential vector narrowing optimization (PR32790)
Sanjay Patel [Fri, 12 May 2017 15:56:39 +0000 (15:56 +0000)]
[x86] add tests for potential vector narrowing optimization (PR32790)

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

7 years ago[LoopUnroll] Fix a test. REQUIRE should be REQUIRES.
Davide Italiano [Fri, 12 May 2017 15:30:58 +0000 (15:30 +0000)]
[LoopUnroll] Fix a test. REQUIRE should be REQUIRES.

Found by inspection.

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

7 years ago[NewGVN] Improve debug output a bit. NFCI.
Davide Italiano [Fri, 12 May 2017 15:28:12 +0000 (15:28 +0000)]
[NewGVN] Improve debug output a bit. NFCI.

While debugging a predicate info problem, I noticed this was missing
a newline, making the debug output slightly less readable.

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

7 years ago[DAGCombine] Use SelectionDAG::getAnyExtOrTrunc helper. NFCI.
Simon Pilgrim [Fri, 12 May 2017 15:26:50 +0000 (15:26 +0000)]
[DAGCombine] Use SelectionDAG::getAnyExtOrTrunc helper. NFCI.

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