]> granicus.if.org Git - llvm/log
llvm
7 years ago[MachineVerifier] Add check that tied physregs aren't different.
Mikael Holmen [Thu, 6 Jul 2017 13:18:21 +0000 (13:18 +0000)]
[MachineVerifier] Add check that tied physregs aren't different.

Summary: Added MachineVerifier code to check register ties more thoroughly, especially so that physical registers that are tied are the same. This may help e.g. when creating MIR files.

Original patch by Jesper Antonsson

Reviewers: stoklund, sanjoy, qcolombet

Reviewed By: qcolombet

Subscribers: qcolombet, llvm-commits

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

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

7 years agoFixes to Dockerfile scripts.
Ilya Biryukov [Thu, 6 Jul 2017 13:10:55 +0000 (13:10 +0000)]
Fixes to Dockerfile scripts.

- Put buildfiles into /tmp/clang-build/build, instead of /tmp/clang-build.
  We checkout the sources to /tmp/clang-build/src and running
  cmake in /tmp/clang-build was done by mistake.
- Don't add an extra ';' at the start of enabled projects list.
  It worked either way, but looked strange.
- Minor comment update.

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

7 years ago[X86][SSE] combineX86ShuffleChain - merge duplicate creations of integer mask types
Simon Pilgrim [Thu, 6 Jul 2017 13:09:19 +0000 (13:09 +0000)]
[X86][SSE] combineX86ShuffleChain - merge duplicate creations of integer mask types

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

7 years agoMade a script to build docker images easier to use.
Ilya Biryukov [Thu, 6 Jul 2017 12:46:51 +0000 (12:46 +0000)]
Made a script to build docker images easier to use.

Summary:
- Removed double indirection via command-line args (i.e. two `--`
  options of `build_docker_image.sh`).
- Added a comment on how to build 2-stage clang install into the
  `build_docker_image.sh`, it used to be only in the `docs/Docker.rst`.

Reviewers: klimek, mehdi_amini

Reviewed By: klimek

Subscribers: llvm-commits

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

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

7 years ago[X86][SSE] combineX86ShuffleChain - merge duplicate 'Zeroable' element masks
Simon Pilgrim [Thu, 6 Jul 2017 12:40:10 +0000 (12:40 +0000)]
[X86][SSE] combineX86ShuffleChain - merge duplicate 'Zeroable' element masks

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

7 years ago[X86][SSE4A] Add support for shuffle combining to EXTRQ.
Simon Pilgrim [Thu, 6 Jul 2017 12:22:58 +0000 (12:22 +0000)]
[X86][SSE4A] Add support for shuffle combining to EXTRQ.

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

7 years ago[X86][SSE4A] Add scheduling tests for SSE4A instructions
Simon Pilgrim [Thu, 6 Jul 2017 11:26:43 +0000 (11:26 +0000)]
[X86][SSE4A] Add scheduling tests for SSE4A instructions

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

7 years ago[X86][SSE4A] Split EXTRQ/INSERTQ shuffle matching from lowering. NFCI.
Simon Pilgrim [Thu, 6 Jul 2017 11:06:54 +0000 (11:06 +0000)]
[X86][SSE4A] Split EXTRQ/INSERTQ shuffle matching from lowering. NFCI.

First step toward supporting shuffle combining to EXTRQ/INSERTQ.

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

7 years agoRevert "Revert "Revert "[IndVars] Canonicalize comparisons between non-negative value...
Max Kazantsev [Thu, 6 Jul 2017 10:47:13 +0000 (10:47 +0000)]
Revert "Revert "Revert "[IndVars] Canonicalize comparisons between non-negative values and indvars"""

It appears that the problem is still there. Needs more analysis to understand why
SaturatedMultiply test fails.

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

7 years ago[globalisel][tablegen] Rename and re-comment render functions to match the new MatchT...
Daniel Sanders [Thu, 6 Jul 2017 10:37:17 +0000 (10:37 +0000)]
[globalisel][tablegen] Rename and re-comment render functions to match the new MatchTables. NFC.

The conversion to MatchTable left the function names and comments referring to
C++ statements and expressions. Updated the names and comments to account for
the fact that they're no longer unconstrained statements/expressions.

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

7 years ago[RegisterCoalescer] Fix for SubRange join unreachable
David Stuttard [Thu, 6 Jul 2017 10:07:57 +0000 (10:07 +0000)]
[RegisterCoalescer] Fix for SubRange join unreachable

Summary:
During remat, some subranges might end up having invalid segments which caused problems for later
coalescing.

Added in a check to remove segments that are invalidated as part of the remat.

See http://llvm.org/PR33524

Subscribers: MatzeB, qcolombet

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

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

7 years ago[globalisel][tablegen] Rename and re-comment to match the new MatchTables. NFC.
Daniel Sanders [Thu, 6 Jul 2017 10:06:12 +0000 (10:06 +0000)]
[globalisel][tablegen] Rename and re-comment to match the new MatchTables. NFC.

The conversion to MatchTable left the function names and comments referring to
C++ statements and expressions. Updated the names and comments to account for
the fact that they're no longer unconstrained statements/expressions.

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

7 years ago[ARM] GlobalISel: Map s32 G_FCMP in reg bank select
Diana Picus [Thu, 6 Jul 2017 09:57:46 +0000 (09:57 +0000)]
[ARM] GlobalISel: Map s32 G_FCMP in reg bank select

Map hard G_FCMP operands to FPR and the result to GPR.

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

7 years agoRevert "Revert "[IndVars] Canonicalize comparisons between non-negative values and...
Max Kazantsev [Thu, 6 Jul 2017 09:57:41 +0000 (09:57 +0000)]
Revert "Revert "[IndVars] Canonicalize comparisons between non-negative values and indvars""

It seems that the patch was reverted by mistake. Clang testing showed failure of the
MathExtras.SaturatingMultiply test, however I was unable to reproduce the issue on the
fresh code base and was able to confirm that the transformation introduced by the change
does not happen in the said test. This gives a strong confidence that the actual reason of
the failure of the initial patch was somewhere else, and that problem now seems to be
fixed. Re-submitting the change to confirm that.

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

7 years ago[ARM] GlobalISel: Legalize G_FCMP for s32
Diana Picus [Thu, 6 Jul 2017 09:09:33 +0000 (09:09 +0000)]
[ARM] GlobalISel: Legalize G_FCMP for s32

This covers both hard and soft float.

Hard float is easy, since it's just Legal.

Soft float is more involved, because there are several different ways to
handle it based on the predicate: one and ueq need not only one, but two
libcalls to get a result. Furthermore, we have large differences between
the values returned by the AEABI and GNU functions.

AEABI functions return a nice 1 or 0 representing true and respectively
false. GNU functions generally return a value that needs to be compared
against 0 (e.g. for ogt, the value returned by the libcall is > 0 for
true).  We could introduce redundant comparisons for AEABI as well, but
they don't seem easy to remove afterwards, so we do different processing
based on whether or not the result really needs to be compared against
something (and just truncate if it doesn't).

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

7 years ago[DWARF] - Provide default implementation for getSectionLoadAddress() method of Loaded...
George Rimar [Thu, 6 Jul 2017 08:46:01 +0000 (08:46 +0000)]
[DWARF] - Provide default implementation for getSectionLoadAddress() method of LoadedObjectInfo

It is a bit unconvinent that client should implement this method
even if not use it. Patch provides default implementation.

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

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

7 years ago[globalisel][tablegen] Import rules containing intrinsic_wo_chain.
Daniel Sanders [Thu, 6 Jul 2017 08:12:20 +0000 (08:12 +0000)]
[globalisel][tablegen] Import rules containing intrinsic_wo_chain.

Summary:
As of this patch, 1018 out of 3938 rules are currently imported.

Depends on D32275

Reviewers: qcolombet, kristof.beyls, rovka, t.p.northover, ab, aditya_nandakumar

Reviewed By: qcolombet

Subscribers: dberris, igorb, llvm-commits

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

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

7 years ago[ARM] GlobalISel: Widen s1, s8, s16 G_CONSTANT
Diana Picus [Thu, 6 Jul 2017 08:04:16 +0000 (08:04 +0000)]
[ARM] GlobalISel: Widen s1, s8, s16 G_CONSTANT

Get the legalizer to widen small constants.

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

7 years agoFix -Wunused-function by making function declarations in a header non-static
David Blaikie [Thu, 6 Jul 2017 05:33:32 +0000 (05:33 +0000)]
Fix -Wunused-function by making function declarations in a header non-static

Also avoids ODR violations by ensuring names used in headers find the
same entity, not different, file-local entities in each translation
unit.

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

7 years agoSimplify InstrProfRecord tests, eliminating named temporaries in favor of braced...
David Blaikie [Thu, 6 Jul 2017 05:19:17 +0000 (05:19 +0000)]
Simplify InstrProfRecord tests, eliminating named temporaries in favor of braced init args

This will also simplify an API transition and class renaming coming
soon.

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

7 years ago[lit] Fix unit test discovery for Visual Studio builds.
David L. Jones [Thu, 6 Jul 2017 03:23:18 +0000 (03:23 +0000)]
[lit] Fix unit test discovery for Visual Studio builds.

Fix by Andrew Ng!

The Visual Studio build can contain output for multiple configuration types (
e.g. Debug, Release & RelWithDebInfo) within the same build output
directory. Therefore when discovering unit tests, the "build mode" sub directory
containing the appropriate configuration is included in the search. This sub
directory may not always be present, so a test for its existence is required.

Reviewers: zturner, modocache, dlj

Reviewed By: zturner, dlj

Subscribers: grimar, bd1976llvm, gbreynoo, edd, jhenderson, llvm-commits

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

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

7 years agoAvoid constructing GlobalExtensions only to find out it is empty.
Frederich Munch [Thu, 6 Jul 2017 00:09:09 +0000 (00:09 +0000)]
Avoid constructing GlobalExtensions only to find out it is empty.

Summary:
GlobalExtensions is dereferenced twice, once for iteration and then a check if it is empty.
As a ManagedStatic this dereference forces it's construction which is unnecessary.

Reviewers: efriedma, davide, mehdi_amini

Reviewed By: mehdi_amini

Subscribers: chapuni, llvm-commits, mehdi_amini

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

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

7 years agoRevert "Revert "Revert "Switch external cvtres.exe for llvm's own resource library."""
Eric Beckmann [Wed, 5 Jul 2017 23:46:06 +0000 (23:46 +0000)]
Revert "Revert "Revert "Switch external cvtres.exe for llvm's own resource library."""

This reverts commit ae21ee0b6cacbc1efaf4d42502e71da2f0eb45c3.

The initial revert was done in order to prevent ongoing errors on
chromium bots such as CrWinClangLLD.  However, this was done haphazardly
and I didn't realize there were test and compilation failures, so this
revert was reverted.  Now that those have been fixed, we can revert the
revert of the revert.

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

7 years agoRevert "Revert "Revert "Replace trivial use of external rc.exe by writing our own...
Eric Beckmann [Wed, 5 Jul 2017 23:45:50 +0000 (23:45 +0000)]
Revert "Revert "Revert "Replace trivial use of external rc.exe by writing our own .res file."""

This reverts commit 5fecbbbe5049665d86834cf69d8f75db4f392308.

The initial revert was done in order to prevent ongoing errors on
chromium bots such as CrWinClangLLD.  However, this was done haphazardly
and I didn't realize there were test and compilation failures, so this
revert was reverted.  Now that those have been fixed, we can revert the
revert of the revert.

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

7 years ago[IR] Use CmpInst::isFPPredicate/isIntPredicate in a few other places. NFC
Craig Topper [Wed, 5 Jul 2017 23:35:46 +0000 (23:35 +0000)]
[IR] Use CmpInst::isFPPredicate/isIntPredicate in a few other places. NFC

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

7 years ago[GlobalOpt] Remove unreachable blocks before optimizing a function.
Davide Italiano [Wed, 5 Jul 2017 22:28:28 +0000 (22:28 +0000)]
[GlobalOpt] Remove unreachable blocks before optimizing a function.

LLVM's definition of dominance allows instructions that are cyclic
in unreachable blocks, e.g.:

  %pat = select i1 %condition, @global, i16* %pat

because any instruction dominates an instruction in a block that's
not reachable from entry.
So, remove unreachable blocks from the function, because a) there's
no point in analyzing them and b) GlobalOpt should otherwise grow
some more complicated logic to break these cycles.

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

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

7 years ago[IR] Use CmpInst::isIntPredicate()/isFPPredicate in some asserts instead of doing...
Craig Topper [Wed, 5 Jul 2017 22:09:00 +0000 (22:09 +0000)]
[IR] Use CmpInst::isIntPredicate()/isFPPredicate in some asserts instead of doing the equivalent range check. NFC

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

7 years agoFix libcall expansion creating DAG nodes with invalid type post type legalization.
Vadim Chugunov [Wed, 5 Jul 2017 22:01:49 +0000 (22:01 +0000)]
Fix libcall expansion creating DAG nodes with invalid type post type legalization.

If we are lowering a libcall after legalization, we'll split the return type into a pair of legal values.

Patch by Jatin Bhateja and Eli Friedman.

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

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

7 years agoFix std::min ambiguity between uint32 and size_t.
Zachary Turner [Wed, 5 Jul 2017 21:59:20 +0000 (21:59 +0000)]
Fix std::min ambiguity between uint32 and size_t.

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

7 years ago[llvm-pdbutil] Add the ability to truncate stream purpose names.
Zachary Turner [Wed, 5 Jul 2017 21:54:58 +0000 (21:54 +0000)]
[llvm-pdbutil] Add the ability to truncate stream purpose names.

This will be useful for aligning fields to a fixed with in
subsequent patches.

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

7 years ago[DependenceAnalysis] Make sure base objects are the same when comparing GEPs
Brendon Cahoon [Wed, 5 Jul 2017 21:35:47 +0000 (21:35 +0000)]
[DependenceAnalysis] Make sure base objects are the same when comparing GEPs

The dependence analysis was returning incorrect information when using the GEPs
to compute dependences. The analysis uses the GEP indices under certain
conditions, but was doing it incorrectly when the base objects of the GEP are
aliases, but pointing to different locations in the same array.

This patch adds another check for the base objects. If the base pointer SCEVs
are not equal, then the dependence analysis should fall back on the path
that uses the whole SCEV for the dependence check. This fixes PR33567.

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

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

7 years agoAdded more info on silent master to the doc.
Galina Kistanova [Wed, 5 Jul 2017 20:45:44 +0000 (20:45 +0000)]
Added more info on silent master to the doc.

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

7 years ago[InstCombine] Use CmpInst::Predicate with m_Cmp instead of ICmpInst::Predicate. NFC
Craig Topper [Wed, 5 Jul 2017 20:31:00 +0000 (20:31 +0000)]
[InstCombine] Use CmpInst::Predicate with m_Cmp instead of ICmpInst::Predicate. NFC

There isn't really an ICmpInst version so we're just accessing the CmpInst version through inheritance.

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

7 years ago[WebAssembly] Fix types for address taken functions
Sam Clegg [Wed, 5 Jul 2017 20:25:08 +0000 (20:25 +0000)]
[WebAssembly] Fix types for address taken functions

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

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

7 years ago[tablegen] Avoid creating temporary strings
Alexander Shaposhnikov [Wed, 5 Jul 2017 20:14:54 +0000 (20:14 +0000)]
[tablegen] Avoid creating temporary strings

If a method / function returns a StringRef but the
variable is of type const std::string& a temporary string is
created (StringRef has a cast operator to std::string),
which is a suboptimal behavior.

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

Test plan: make check-all

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

7 years ago[WebAssembly] MC: Don't generate extra types for weak alias
Sam Clegg [Wed, 5 Jul 2017 20:09:26 +0000 (20:09 +0000)]
[WebAssembly] MC: Don't generate extra types for weak alias

Previously we were generating a void(void) function type
for a weak alias.  Update the weak-alias test case to
catch this.

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

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

7 years agoAdd a test for relocation addend on mips.
Rafael Espindola [Wed, 5 Jul 2017 19:31:07 +0000 (19:31 +0000)]
Add a test for relocation addend on mips.

An lld test found a bug in a llvm patch I am working on. It is better
to have test coverage for that in llvm too.

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

7 years agoRevert "Revert "Replace trivial use of external rc.exe by writing our own .res file.""
Eric Beckmann [Wed, 5 Jul 2017 19:04:48 +0000 (19:04 +0000)]
Revert "Revert "Replace trivial use of external rc.exe by writing our own .res file.""

This reverts commit 8c8dce3b8f15d6ebaefc35ce88f15a85c8cdbd6e.

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

7 years agoRevert "Revert "Switch external cvtres.exe for llvm's own resource library.""
Eric Beckmann [Wed, 5 Jul 2017 19:04:33 +0000 (19:04 +0000)]
Revert "Revert "Switch external cvtres.exe for llvm's own resource library.""

This reverts commit 165e578e47f1cd38191120aad23a9020fb5476dd.

Forgot to run tests on this.

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

7 years agoRevert "Switch external cvtres.exe for llvm's own resource library."
Eric Beckmann [Wed, 5 Jul 2017 18:59:16 +0000 (18:59 +0000)]
Revert "Switch external cvtres.exe for llvm's own resource library."

This reverts commit 600d52c278e123dd08bee24c1f00932b55add8de.

This patch still seems to break CrWinClangLLD, reverting until I can
find root problem.

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

7 years agoRevert "Replace trivial use of external rc.exe by writing our own .res file."
Eric Beckmann [Wed, 5 Jul 2017 18:59:01 +0000 (18:59 +0000)]
Revert "Replace trivial use of external rc.exe by writing our own .res file."

This patch still seems to break CrWinClangLLD, reverting this once more
until I can discover root problem.

This reverts commit 3dbbc8ce43be50ffde2b1c655c6d3a25796fe78b.

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

7 years ago[PDB] Add a test that verifies every known type record.
Zachary Turner [Wed, 5 Jul 2017 18:43:25 +0000 (18:43 +0000)]
[PDB] Add a test that verifies every known type record.

We had a lot of one-off tests for this type and that type,
or "every type that happens to be generated by this program
I built".  Eventually I got a bug report filed where we were
crashing on a type that was not covered by any of these tests.
So this test carefully constructs a minimal C++ program that
will cause every type we support to be emitted.  This ensures
full coverage for type records.

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

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

7 years ago[AMDGPU] Move GISel accessor initialization from TargetMachine to Subtarget.
Quentin Colombet [Wed, 5 Jul 2017 18:40:56 +0000 (18:40 +0000)]
[AMDGPU] Move GISel accessor initialization from TargetMachine to Subtarget.

NFC

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

7 years ago[Power9] Disable removing extra swaps on P9.
Sean Fertile [Wed, 5 Jul 2017 18:37:10 +0000 (18:37 +0000)]
[Power9] Disable removing extra swaps on P9.

On power 8 we sometimes insert swaps to deal with the difference between
Little-Endian and Big-Endian. The swap removal pass is supposed to clean up
these swaps. On power 9 we don't need this pass since we do not need to insert
the swaps in the first place.

Commiting on behalf of Stefan Pintilie.
Differential Revision: https://reviews.llvm.org/D34627

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

7 years ago{DAGCombiner] Fold (rot x, 0) -> x
Simon Pilgrim [Wed, 5 Jul 2017 18:27:11 +0000 (18:27 +0000)]
{DAGCombiner] Fold (rot x, 0) -> x

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

7 years ago[X86] Test bitfield loadstore tests on i686 as well
Simon Pilgrim [Wed, 5 Jul 2017 18:09:30 +0000 (18:09 +0000)]
[X86] Test bitfield loadstore tests on i686 as well

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

7 years ago[PowerPC] Make sure that we remove dead PHI nodes after the PPCCTRLoops pass.
Sean Fertile [Wed, 5 Jul 2017 17:57:57 +0000 (17:57 +0000)]
[PowerPC] Make sure that we remove dead PHI nodes after the PPCCTRLoops pass.

Commiting on behalf of Stefan Pintilie.
Differential Revision: https://reviews.llvm.org/D34829

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

7 years ago[DAGCombiner] visitRotate patch to optimize pair of ROTR/ROTL instructions into one...
Andrew Zhogin [Wed, 5 Jul 2017 17:55:42 +0000 (17:55 +0000)]
[DAGCombiner] visitRotate patch to optimize pair of ROTR/ROTL instructions into one with combined shift operand.

For two ROTR operations with shifts C1, C2; combined shift operand will be (C1 + C2) % bitsize.

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

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

7 years ago[X86][SSE] Dropped -mcpu from bitcast+setcc mask tests
Simon Pilgrim [Wed, 5 Jul 2017 17:30:30 +0000 (17:30 +0000)]
[X86][SSE] Dropped -mcpu from bitcast+setcc mask tests

Use triple and attribute only for consistency

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

7 years ago[Power9] Exploit vector extract with variable index.
Tony Jiang [Wed, 5 Jul 2017 16:55:00 +0000 (16:55 +0000)]
[Power9] Exploit vector extract with variable index.

This patch adds the exploitation for new power 9 instructions which extract
variable elements from vectors:
VEXTUBLX
VEXTUBRX
VEXTUHLX
VEXTUHRX
VEXTUWLX
VEXTUWRX

Differential Revision: https://reviews.llvm.org/D34032
Commit on behalf of Zaara Syeda (syzaara@ca.ibm.com)

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

7 years ago[Power9] Exploit vector integer extend instructions when indices aren't correct.
Tony Jiang [Wed, 5 Jul 2017 16:00:38 +0000 (16:00 +0000)]
[Power9] Exploit vector integer extend instructions when indices aren't correct.

This patch adds on to the exploitation added by https://reviews.llvm.org/D33510.
This now catches build vector nodes where the inputs are coming from sign
extended vector extract elements where the indices used by the vector extract
are not correct. We can still use the new hardware instructions by adding a
shuffle to move the elements to the correct indices. I introduced a new PPCISD
node here because adding a vector_shuffle and changing the elements of the
vector_extracts was getting undone by another DAG combine.

Commit on behalf of Zaara Syeda (syzaara@ca.ibm.com)
Differential Revision: https://reviews.llvm.org/D34009

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

7 years ago[globalisel][tablegen] Fix another unused variable warning introduced by r307159
Daniel Sanders [Wed, 5 Jul 2017 15:34:16 +0000 (15:34 +0000)]
[globalisel][tablegen] Fix another unused variable warning introduced by r307159

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

7 years agoDebugInfo: Generalize LoadedObjectInfoHelper from RuntimeDyld
David Blaikie [Wed, 5 Jul 2017 15:23:56 +0000 (15:23 +0000)]
DebugInfo: Generalize LoadedObjectInfoHelper from RuntimeDyld

Make it usable by any class derived (even indirectly) from
LoadedObjectInfo by allowing a custom base class to be specified and
perfect forwarding to the ctor.

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

7 years ago[globalisel][tablegen] Finish fixing compile-time regressions by merging the matcher...
Daniel Sanders [Wed, 5 Jul 2017 14:50:18 +0000 (14:50 +0000)]
[globalisel][tablegen] Finish fixing compile-time regressions by merging the matcher and emitter state machines.

Summary:
Also, made a few minor tweaks to shave off a little more cumulative memory consumption:
* All rules share a single NewMIs instead of constructing their own. Only one
  will end up using it.
* Use MIs.resize(1) instead of MIs.clear();MIs.push_back(I) and prevent
  GIM_RecordInsn from changing MIs[0].

Depends on D33764

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

Reviewed By: ab

Subscribers: kristof.beyls, igorb, llvm-commits

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

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

7 years ago[SLPVectorizer] Add an extra parameter to cancelScheduling function, NFCI.
Dinar Temirbulatov [Wed, 5 Jul 2017 13:53:03 +0000 (13:53 +0000)]
[SLPVectorizer] Add an extra parameter to cancelScheduling function, NFCI.

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

7 years ago[IndVarSimplify] Add AShr exact flags using induction variables ranges.
David Green [Wed, 5 Jul 2017 13:25:58 +0000 (13:25 +0000)]
[IndVarSimplify] Add AShr exact flags using induction variables ranges.

This adds exact flags to AShr/LShr flags where we can statically
prove it is valid using the range of induction variables. This
allows further optimisations to remove extra loads.

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

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

7 years ago[SystemZ] Simplify handling of 128-bit multiply/divide instruction
Ulrich Weigand [Wed, 5 Jul 2017 13:17:31 +0000 (13:17 +0000)]
[SystemZ] Simplify handling of 128-bit multiply/divide instruction

Several integer multiply/divide instructions require use of a
register pair as input and output.  This patch moves setting
up the input register pair from C++ code to TableGen, simplifying
the whole process and making it more easily extensible.

No functional change.

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

7 years ago[SystemZ] Small cleanups to SystemZScheduleZ13.td
Ulrich Weigand [Wed, 5 Jul 2017 13:14:43 +0000 (13:14 +0000)]
[SystemZ] Small cleanups to SystemZScheduleZ13.td

Fixes a couple of whitespace errors, re-sorts the vector floating-point
instructions to make them more easily extensible, and adds a missing
pseudo instruction.

No functional change.

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

7 years ago[Hexagon] Preclude non-memory test from being optimized away. NFC.
Nirav Dave [Wed, 5 Jul 2017 13:08:03 +0000 (13:08 +0000)]
[Hexagon] Preclude non-memory test from being optimized away. NFC.

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

7 years agoCMake: Add LLVM_UTILS_INSTALL_DIR option
Tom Stellard [Wed, 5 Jul 2017 12:57:30 +0000 (12:57 +0000)]
CMake: Add LLVM_UTILS_INSTALL_DIR option

Summary:
This is like the LLVM_TOOLS_INSTALL_DIR option, but for the utils
that are installed when the LLVM_INSTALL_UTILS.  This option
defaults to 'bin' to remain consistent with the current behavior, but
distros may want to install these to libexec/llvm.

Reviewers: beanz

Reviewed By: beanz

Subscribers: llvm-commits, mgorny

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

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

7 years ago[GlobalISel] Refactor Legalizer helpers for libcalls
Diana Picus [Wed, 5 Jul 2017 12:57:24 +0000 (12:57 +0000)]
[GlobalISel] Refactor Legalizer helpers for libcalls

We used to have a helper that replaced an instruction with a libcall.
That turns out to be too aggressive, since sometimes we need to replace
the instruction with at least two libcalls. Therefore, change our
existing helper to only create the libcall and leave the instruction
removal as a separate step. Also rename the helper accordingly.

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

7 years ago[AsmParser] Mnemonic Spell Corrector
Sjoerd Meijer [Wed, 5 Jul 2017 12:39:13 +0000 (12:39 +0000)]
[AsmParser] Mnemonic Spell Corrector

This implements suggesting other mnemonics when an invalid one is specified,
for example:

$ echo "adXd r1,r2,#3" | llvm-mc -triple arm
<stdin>:1:1: error: invalid instruction, did you mean: add, qadd?
adXd r1,r2,#3
^

The implementation is target agnostic, but as a first step I have added it only
to the ARM backend; so the ARM backend is a good example if someone wants to
enable this too for another target.

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

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

7 years ago[globalisel][tablegen] Fix the misuse of STATISTICS() on release builds (like r307088...
Daniel Sanders [Wed, 5 Jul 2017 12:14:18 +0000 (12:14 +0000)]
[globalisel][tablegen] Fix the misuse of STATISTICS() on release builds (like r307088) after r307133.

r307133 brought back a couple instances of the same mistake that was already
fixed by r307088. Fixed it again.

Using NumPatternEmitted as a unique id for the tables is not valid on release
builds since the counters don't count in that case.

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

7 years ago[ARM] GlobalISel: Extract tiny helper. NFC
Diana Picus [Wed, 5 Jul 2017 11:53:51 +0000 (11:53 +0000)]
[ARM] GlobalISel: Extract tiny helper. NFC

Extract functionality for determining if the target uses AEABI.

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

7 years ago[MachineIRBuilder] Fix formatting. NFC.
Diana Picus [Wed, 5 Jul 2017 11:47:23 +0000 (11:47 +0000)]
[MachineIRBuilder] Fix formatting. NFC.

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

7 years ago[GlobalISel][X86] For now don't handle not trivial function arguments lowering.
Igor Breger [Wed, 5 Jul 2017 11:40:35 +0000 (11:40 +0000)]
[GlobalISel][X86] For now don't handle not trivial function arguments lowering.

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

7 years ago[MachineIRBuilder] Add buildOr helper. NFC.
Diana Picus [Wed, 5 Jul 2017 11:32:12 +0000 (11:32 +0000)]
[MachineIRBuilder] Add buildOr helper. NFC.

This isn't used anywhere yet, but I need it for a future commit.

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

7 years ago[GlobalIsel] allow x86_fp80 values to be dumped.
Igor Breger [Wed, 5 Jul 2017 11:11:10 +0000 (11:11 +0000)]
[GlobalIsel] allow x86_fp80 values to be dumped.

Summary:
Otherwise the fallback path fails with an assertion on x86_64 targets,
when "x86_fp80" is encountered.

Reviewers: t.p.northover, zvi, guyblank

Reviewed By: zvi

Subscribers: rovka, kristof.beyls, llvm-commits

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

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

7 years ago[MachineIRBuilder] Add buildBinaryOp helper. NFC
Diana Picus [Wed, 5 Jul 2017 11:02:31 +0000 (11:02 +0000)]
[MachineIRBuilder] Add buildBinaryOp helper. NFC

Add a helper for building simple binary ops like add, mul, sub, and.
This can be used in the future for quickly adding support for or, xor.

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

7 years ago[globalisel][tablegen] Fix an unused variable warning in release builds after r307133
Daniel Sanders [Wed, 5 Jul 2017 10:16:48 +0000 (10:16 +0000)]
[globalisel][tablegen] Fix an unused variable warning in release builds after r307133

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

7 years agoRevert "[IndVars] Canonicalize comparisons between non-negative values and indvars"
Max Kazantsev [Wed, 5 Jul 2017 09:44:41 +0000 (09:44 +0000)]
Revert "[IndVars] Canonicalize comparisons between non-negative values and indvars"

This patch seems to cause failures of test MathExtras.SaturatingMultiply on
multiple buildbots. Reverting until the reason of that is clarified.

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

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

7 years ago[globalisel][tablegen] Added instruction emission to the state-machine-based matcher.
Daniel Sanders [Wed, 5 Jul 2017 09:39:33 +0000 (09:39 +0000)]
[globalisel][tablegen] Added instruction emission to the state-machine-based matcher.

Summary:
This further improves the compile-time regressions that will be caused by a
re-commit of r303259.

Also added included preliminary work in preparation for the multi-insn emitter
since I needed to change the relevant part of the API for this patch anyway.

Depends on D33758

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

Reviewed By: ab

Subscribers: kristof.beyls, igorb, llvm-commits

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

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

7 years ago[IndVars] Canonicalize comparisons between non-negative values and indvars
Max Kazantsev [Wed, 5 Jul 2017 06:38:49 +0000 (06:38 +0000)]
[IndVars] Canonicalize comparisons between non-negative values and indvars

-If there is a IndVar which is known to be non-negative, and there is a value which is also non-negative,
then signed and unsigned comparisons between them produce the same result. Both of those can be
seen in the same loop. To allow other optimizations to simplify them, we turn all instructions like

  %c = icmp slt i32 %iv, %b
to

  %c = icmp ult i32 %iv, %b

if both %iv and %b are known to be non-negative.

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

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

7 years ago[GlobalISel][X86] Allow graceful fallback for struct/array argument/return value...
Igor Breger [Wed, 5 Jul 2017 06:24:13 +0000 (06:24 +0000)]
[GlobalISel][X86] Allow graceful fallback for struct/array argument/return value lowering. Going to support it in follow patch.

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

7 years agoAdd the missing triple to the test case added as part of r307120.
Nemanja Ivanovic [Wed, 5 Jul 2017 05:14:43 +0000 (05:14 +0000)]
Add the missing triple to the test case added as part of r307120.

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

7 years ago[PowerPC] Fix for PR33636
Nemanja Ivanovic [Wed, 5 Jul 2017 04:51:29 +0000 (04:51 +0000)]
[PowerPC] Fix for PR33636

Remove casts to a constant when a node can be an undef.

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

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

7 years ago[Bash-autocompletion] Show flags which has HelpText or GroupID
Yuka Takahashi [Wed, 5 Jul 2017 02:36:32 +0000 (02:36 +0000)]
[Bash-autocompletion] Show flags which has HelpText or GroupID

Summary: Otherwise internal flags will be also completed.

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

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

7 years agoRewrite areNonVolatileConsecutiveLoads to use BaseIndexOffset
Nirav Dave [Wed, 5 Jul 2017 01:21:23 +0000 (01:21 +0000)]
Rewrite areNonVolatileConsecutiveLoads to use BaseIndexOffset

Relanding after rewriting undef.ll test to avoid host-dependant
endianness.

As discussed in D34087, rewrite areNonVolatileConsecutiveLoads using
generic checks. Also, propagate missing local handling from there to
BaseIndexOffset checks.

Tests of note:

  * test/CodeGen/X86/build-vector* - Improved.
  * test/CodeGen/BPF/undef.ll - Improved store alignment allows an
    additional store merge

  * test/CodeGen/X86/clear_upper_vector_element_bits.ll - This is a
    case we already do not handle well. Here, the DAG is improved, but
    scheduling causes a code size degradation.

Reviewers: RKSimon, craig.topper, spatel, andreadb, filcab

Subscribers: nemanjai, llvm-commits

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

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

7 years ago[profiledata] Avoid creating a temporary vector in getNumValueData
Alexander Shaposhnikov [Wed, 5 Jul 2017 01:20:52 +0000 (01:20 +0000)]
[profiledata] Avoid creating a temporary vector in getNumValueData

getValueSitesForKind returns ArrayRef which has a cast operator
to std::vector, as a result a temporary vector is created
if the type of the variable is const std::vector&
that is suboptimal in this case.

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

Test plan: make check-all

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

7 years ago[SafepointIRVerifier] Add verifier pass for finding GC relocation bugs
Anna Thomas [Wed, 5 Jul 2017 01:16:29 +0000 (01:16 +0000)]
[SafepointIRVerifier] Add verifier pass for finding GC relocation bugs

Original Patch and summary by Philip Reames.

RewriteStatepointsForGC tries to rewrite a function in a manner where
the optimizer can't end up using a pointer value after it might have
been relocated by a safepoint. This pass checks the invariant that
RSForGC is supposed to establish and that (if we constructed semantics
correctly) later passes must preserve.

This has been a really useful diagnostic tool when initially developing
the rewriting scheme and has found numerous bugs.

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

Reviewed by: swaroop.sridhar, mjacob

Subscribers: llvm-commits

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

7 years agoRevert "[AVR] Add the branch selection pass from the GitHub repository"
Dylan McKay [Wed, 5 Jul 2017 00:50:56 +0000 (00:50 +0000)]
Revert "[AVR] Add the branch selection pass from the GitHub repository"

This reverts commit 602ef067c1d58ecb425d061f35f2bc4c7e92f4f3.

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

7 years ago[AVR] Add the branch selection pass from the GitHub repository
Dylan McKay [Wed, 5 Jul 2017 00:41:19 +0000 (00:41 +0000)]
[AVR] Add the branch selection pass from the GitHub repository

We should rewrite this using the generic branch relaxation pass, but for
the moment having this pass is better than hitting an assertion error.

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

7 years agoNFC.
Gadi Haber [Tue, 4 Jul 2017 21:51:05 +0000 (21:51 +0000)]
NFC.
Made some updates to the half.ll test under CodeGen to make it friendly to the update_llc_test_checks .py tool as follows:
1.Removing the llc flag -asm-verbose=false
2.Grouping the multiple check-prefix directives
3.Apply update_llc_test_checks.py tool on the test

This change is needed to easily update scheduling changes in an upcoming patch.

Reviewers: zvi, RKSimon, craig.topper

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

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

7 years agoRecommit r307064, "[InstCombine] Add test cases demonstrating creation of extra bswap...
Craig Topper [Tue, 4 Jul 2017 20:15:24 +0000 (20:15 +0000)]
Recommit r307064, "[InstCombine] Add test cases demonstrating creation of extra bswap instrinsic calls when when optimizing bswap and bitwise ops when the bswaps have additional uses. NFC"

The test check lines have now been fixed.

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

7 years ago[ARM][test] Added test/CodeGen/ARM/ror.ll test. NFC precommit for D12833.
Andrew Zhogin [Tue, 4 Jul 2017 19:50:22 +0000 (19:50 +0000)]
[ARM][test] Added test/CodeGen/ARM/ror.ll test. NFC precommit for D12833.

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

7 years ago[X86][SSE4A] Add support for combining from non-v16i8 EXTRQI/INSERTQI shuffles
Simon Pilgrim [Tue, 4 Jul 2017 18:11:02 +0000 (18:11 +0000)]
[X86][SSE4A] Add support for combining from non-v16i8 EXTRQI/INSERTQI shuffles

With the improved shuffle decoding we can now combine EXTRQI/INSERTQI shuffles from non-v16i8 vector types

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

7 years agoFix signed/unsigned comparison warnings
Simon Pilgrim [Tue, 4 Jul 2017 17:42:01 +0000 (17:42 +0000)]
Fix signed/unsigned comparison warnings

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

7 years ago[AMDGPU] Switch scalarize global loads ON by default
Alexander Timofeev [Tue, 4 Jul 2017 17:32:00 +0000 (17:32 +0000)]
[AMDGPU] Switch scalarize global loads ON by default
Differential revision: https://reviews.llvm.org/D34407

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

7 years ago[LoopDeletion] NFC: Add loop being analyzed debug statement
Anna Thomas [Tue, 4 Jul 2017 17:00:03 +0000 (17:00 +0000)]
[LoopDeletion] NFC: Add loop being analyzed debug statement

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

7 years ago[X86][SSE4A] Generalized EXTRQI/INSERTQI shuffle decodes
Simon Pilgrim [Tue, 4 Jul 2017 16:53:12 +0000 (16:53 +0000)]
[X86][SSE4A] Generalized EXTRQI/INSERTQI shuffle decodes

The existing decodes only worked for v16i8 vectors, this adds support for any 128-bit vector

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

7 years agofix trivial typos in comments; NFC
Hiroshi Inoue [Tue, 4 Jul 2017 16:35:26 +0000 (16:35 +0000)]
fix trivial typos in comments; NFC

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

7 years ago[globalisel][tablegen] Fix the modules build after r307079
Daniel Sanders [Tue, 4 Jul 2017 16:29:38 +0000 (16:29 +0000)]
[globalisel][tablegen] Fix the modules build after r307079

Exclude InstructionSelectorImpl.h since DEBUG_TYPE may vary between includes.

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

7 years ago[DAGCombiner] Intermediate variables in visitRotate promoted to the function's begin...
Andrew Zhogin [Tue, 4 Jul 2017 15:57:39 +0000 (15:57 +0000)]
[DAGCombiner] Intermediate variables in visitRotate promoted to the function's begin. NFC precommit for D12833.

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

7 years ago[globalisel][tablegen] Fix release builds after r307079
Daniel Sanders [Tue, 4 Jul 2017 15:31:50 +0000 (15:31 +0000)]
[globalisel][tablegen] Fix release builds after r307079

Using NumPatternEmitted as a unique id for the tables is not valid on release
builds since the counters don't count in that case.

Also fix an unused variable warning.

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

7 years ago[FastISel] Move gc intrinsic test to X86 directory
Anna Thomas [Tue, 4 Jul 2017 15:24:08 +0000 (15:24 +0000)]
[FastISel] Move gc intrinsic test to X86 directory

Move from generic to X86 directory since gc intrinsics only supposed in
X86 64 bit.
Add target triple as well.
Fixes build failure in i686-linux-RA  caused by rL307084.

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

7 years agoFix dangling StringRefs found by clang-tidy misc-dangling-handle check.
Alexander Kornienko [Tue, 4 Jul 2017 15:13:02 +0000 (15:13 +0000)]
Fix dangling StringRefs found by clang-tidy misc-dangling-handle check.

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

7 years ago[FastISel][SelectionDAG]Teach fastISel about GC intrinsics
Anna Thomas [Tue, 4 Jul 2017 15:09:09 +0000 (15:09 +0000)]
[FastISel][SelectionDAG]Teach fastISel about GC intrinsics

Summary:
We are crashing in LLC at O0 when gc intrinsics are present in the block.
The reason being FastISel performs basic block ISel by modifying GC.relocates
to be the first instruction in the block. This can cause us to visit the GC
relocate before it's corresponding GC.statepoint is visited, which is incorrect.
When we lower the statepoint, we record the base and derived pointers, along
with the gc.relocates. After this we can visit the gc.relocate.

This patch avoids fastISel from incorrectly creating the block with gc.relocate
as the first instruction.

Reviewers: qcolombet, skatkov, qikon, reames

Reviewed by: skatkov

Subscribers: llvm-commits

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

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

7 years ago[AMDGPU] Fix latency of MIMG instructions
Marek Olsak [Tue, 4 Jul 2017 14:43:38 +0000 (14:43 +0000)]
[AMDGPU] Fix latency of MIMG instructions

Patch by cwabbott (Connor Abbott).

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

7 years agoNFC. Removed mention of missing script from build_docker_image.sh.
Ilya Biryukov [Tue, 4 Jul 2017 14:41:21 +0000 (14:41 +0000)]
NFC. Removed mention of missing script from build_docker_image.sh.

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

7 years ago[globalisel][tablegen] Partially fix compile-time regressions by converting matcher...
Daniel Sanders [Tue, 4 Jul 2017 14:35:06 +0000 (14:35 +0000)]
[globalisel][tablegen] Partially fix compile-time regressions by converting matcher to state-machine(s)

Summary:
Replace the matcher if-statements for each rule with a state-machine. This
significantly reduces compile time, memory allocations, and cumulative memory
allocation when compiling AArch64InstructionSelector.cpp.o after r303259 is
recommitted.

The following patches will expand on this further to fully fix the regressions.

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

Reviewed By: ab

Subscribers: vitalybuka, aemerson, javed.absar, igorb, llvm-commits, kristof.beyls

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

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