]> granicus.if.org Git - llvm/log
llvm
7 years agoStrip UTF8 BOM that got added for some reason in rL305163
Simon Pilgrim [Tue, 13 Jun 2017 09:58:27 +0000 (09:58 +0000)]
Strip UTF8 BOM that got added for some reason in rL305163

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

7 years agoPPCISelLowering.cpp: Fix warnings in r305214. [-Wdocumentation]
NAKAMURA Takumi [Tue, 13 Jun 2017 07:34:32 +0000 (07:34 +0000)]
PPCISelLowering.cpp: Fix warnings in r305214. [-Wdocumentation]

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

7 years ago[AVX-512] Mark masked VPCMP instructions as commutable.
Craig Topper [Tue, 13 Jun 2017 07:13:50 +0000 (07:13 +0000)]
[AVX-512] Mark masked VPCMP instructions as commutable.

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

7 years ago[AVX-512] Mark masked version of vpcmpeq as being commutable.
Craig Topper [Tue, 13 Jun 2017 07:13:47 +0000 (07:13 +0000)]
[AVX-512] Mark masked version of vpcmpeq as being commutable.

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

7 years ago[X86] Add masked integer compare instructions to load folding tables.
Craig Topper [Tue, 13 Jun 2017 07:13:44 +0000 (07:13 +0000)]
[X86] Add masked integer compare instructions to load folding tables.

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

7 years agoRead /out:%t which was (accidentally?) removed in r305258.
Daniel Jasper [Tue, 13 Jun 2017 07:00:05 +0000 (07:00 +0000)]
Read /out:%t which was (accidentally?) removed in r305258.

Without it, the source directory gets polluted.

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

7 years ago[Lexicon] Add GVN
Brian Gesiak [Tue, 13 Jun 2017 03:06:16 +0000 (03:06 +0000)]
[Lexicon] Add GVN

Summary: Add a lexicon entry for global value numbering.

Reviewers: davide, majnemer

Reviewed By: davide

Subscribers: llvm-commits, inouehrs

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

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

7 years agoInliner: Avoid calling shouldInline until it's absolutely necessary
David Blaikie [Tue, 13 Jun 2017 02:24:09 +0000 (02:24 +0000)]
Inliner: Avoid calling shouldInline until it's absolutely necessary

This restores the order of evaluation (& conditionalized evaluation) of
isTriviallyDeadInstruction, InlineHistoryIncludes, and shouldInline
(with the addition of a shouldInline call after
isTriviallyDeadInstruction) from before r305245.

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

7 years ago[WebAssembly] Fix symbol type for addresses of external functions
Sam Clegg [Tue, 13 Jun 2017 01:42:21 +0000 (01:42 +0000)]
[WebAssembly] Fix symbol type for addresses of external functions

These symbols were previously not being marked as functions
so were appearing as globals instead, and with the incorrect
relocation type.

Without this fix, objects that take address of external
functions include them as global imports rather than function
imports which then fails at link time.

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

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

7 years agoFix signed/unsigned comparison warning; NFC
George Burgess IV [Tue, 13 Jun 2017 01:28:49 +0000 (01:28 +0000)]
Fix signed/unsigned comparison warning; NFC

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

7 years agoAdding one test that I forgot to include with the commit for https://reviews.llvm...
Wolfgang Pieb [Tue, 13 Jun 2017 00:42:03 +0000 (00:42 +0000)]
Adding one test that I forgot to include with the commit for https://reviews.llvm.org/D32779.
NFC

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

7 years agoRevert "Revert "Fix alignment bug in COFF emission.""
Eric Beckmann [Tue, 13 Jun 2017 00:19:43 +0000 (00:19 +0000)]
Revert "Revert "Fix alignment bug in COFF emission.""

This revert was done so that my other patch to add test framework could
land separately.  Now the revert can be reverted and this patch can
reland.

This reverts commit 18b3c75b2b0d32601fb60a06b9672c33d6f0dff9.

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

7 years agoUpdate the test framework for llvm-cvtres to be more comprehensive.
Eric Beckmann [Tue, 13 Jun 2017 00:16:32 +0000 (00:16 +0000)]
Update the test framework for llvm-cvtres to be more comprehensive.

Summary: Added test cases for multiple machine types, file merging, multiple languages, and more resource types.  Also fixed new bugs these tests exposed.

Subscribers: javed.absar, llvm-commits, hiraditya

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

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

7 years agoRevert "Fix alignment bug in COFF emission."
Eric Beckmann [Tue, 13 Jun 2017 00:15:47 +0000 (00:15 +0000)]
Revert "Fix alignment bug in COFF emission."

I accidentally combined this patch with one for adding more tests, they
should be separated.

This reverts commit 3da218a523be78df32e637d3446ecf97c9ea0465.

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

7 years agoFix alignment bug in COFF emission.
Eric Beckmann [Tue, 13 Jun 2017 00:06:10 +0000 (00:06 +0000)]
Fix alignment bug in COFF emission.

Summary: Fix alignment issue in D34020, by aligning all sections to 8 bytes.

Reviewers: zturner

Subscribers: hiraditya, llvm-commits

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

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

7 years ago[IR] Remove override of operator new from PHINode.
Craig Topper [Tue, 13 Jun 2017 00:00:19 +0000 (00:00 +0000)]
[IR] Remove override of operator new from PHINode.

This just forwarded to the same signature in User. The version in User is protected so there's no danger of anyone outside of PHINode constructing with the wrong operator new. All PHINodes are created by a static Create function in PHINode.

I believe at one point in history this called User::operator new(s, 0) so it was useful then.

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

7 years agoUpdate LangRef for PR27284.
Adrian Prantl [Mon, 12 Jun 2017 23:59:43 +0000 (23:59 +0000)]
Update LangRef for PR27284.

And reverse the ownership between DICompileUnit and DISubprogram.

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

7 years ago[WebAssembly] MC: Fix value of R_WEBASSEMBLY_TABLE_INDEX relocations
Sam Clegg [Mon, 12 Jun 2017 23:52:44 +0000 (23:52 +0000)]
[WebAssembly] MC: Fix value of R_WEBASSEMBLY_TABLE_INDEX relocations

Previously we were writing the value function index space
value but for these types of relocations we want to be
writing the table element index space value.

Add a test case for these relocation types that fails
without this change.

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

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

7 years agoUse a fixed target triple to s to appease windows bots
Adrian Prantl [Mon, 12 Jun 2017 23:47:27 +0000 (23:47 +0000)]
Use a fixed target triple to s to appease windows bots

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

7 years ago[IR] Stop deleting other signatures of User::operator new when we override one signat...
Craig Topper [Mon, 12 Jun 2017 23:25:15 +0000 (23:25 +0000)]
[IR] Stop deleting other signatures of User::operator new when we override one signature in a class derived from User

User has 3 signatures for operator new today. They take a single size, a size and a number of users, and a size, number of users, and descriptor size.

Historically there used to only be one signature that took size and a number of uses. Long ago derived classes implemented their own versions that took just a size and would call the size and use count version. Then they left an unimplemented signature for the size and use count signature from User. As we moved to C++11 this unimplemented signature because = delete.

Since then operator new has picked up two new signatures for operator new. But when the 3 argument version was added it was never added to the delete list in all of the derived classes where the 2 argument version is deleted. This makes things inconsistent.

I believe once one version of operator new is created in a derived class name hiding will take care of making all of the base class signatures unavailable. So I don't think the deleted lines are needed at all.

This patch removes all of the deletes in cases where there is an override or there is already a delete of another signature (that should trigger name hiding too).

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

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

7 years agoFix line endings.
Zachary Turner [Mon, 12 Jun 2017 23:15:47 +0000 (23:15 +0000)]
Fix line endings.

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

7 years ago[pdb] Don't choke on unknown symbol types.
Zachary Turner [Mon, 12 Jun 2017 23:10:31 +0000 (23:10 +0000)]
[pdb] Don't choke on unknown symbol types.

When we get an unknown symbol type, we might as well at least
dump it.  Same goes for round-tripping through YAML, we can
dump the record contents as raw bytes even if we don't know
how to interpret it semantically.

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

7 years agoInliner: Don't remove calls to readnone+nounwind (but not always_inline) functions...
David Blaikie [Mon, 12 Jun 2017 23:01:17 +0000 (23:01 +0000)]
Inliner: Don't remove calls to readnone+nounwind (but not always_inline) functions in the AlwaysInliner

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

7 years agoFix an assertion failure when duplicate dbg.declares are present.
Adrian Prantl [Mon, 12 Jun 2017 22:41:06 +0000 (22:41 +0000)]
Fix an assertion failure when duplicate dbg.declares are present.

This fixes PR33157.
https://bugs.llvm.org//show_bug.cgi?id=33157

We might also think about disallowing duplicate dbg.declare intrinsics
entirely, but this may complicate some passes needlessly.

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

7 years agofix typos/formatting; NFC
Sanjay Patel [Mon, 12 Jun 2017 22:34:37 +0000 (22:34 +0000)]
fix typos/formatting; NFC

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

7 years agoSupport: Don't set RLIMIT_AS on child processes when applying a memory limit
David Blaikie [Mon, 12 Jun 2017 22:16:49 +0000 (22:16 +0000)]
Support: Don't set RLIMIT_AS on child processes when applying a memory limit

It doesn't seem relevant to set an address space limit - this isn't
important in any sense that I'm aware & it gets in the way of things
that use a lot of address space, like llvm-symbolizer.

This came up when I realized that bugpoint regression tests were much
slower with -gsplit-dwarf than plain -g. Turned out that bugpoint
subprocesses (opt, etc) were crashing and doing symbolization - but
bugpoint runs those subprocesses with a 400MB memory limit. So with
plain -g, mmaping the opt binary would exceed the memory limit, fail,
and thus be really fast - no symbolization occurred. Whereas with
-gsplit-dwarf, comically, having less to map in, it would succeed and
then spend lots of time symbolizing.

I've fixed at least the critical part of bugpoint's perf problem there
by adding an option to allow bugpoint to disable symbolization. Thus
improving the perfromance for -gsplit-dwarf and making the -g-esque
speed available without this quirk/accidental benefit.

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

7 years ago[ADT] Add type-safe methods to FoldingSetImpl; NFC.
George Burgess IV [Mon, 12 Jun 2017 22:08:08 +0000 (22:08 +0000)]
[ADT] Add type-safe methods to FoldingSetImpl; NFC.

Thankfully, this hasn't uncovered any new bugs. With this, issues like
the one fixed in r305207 (hopefully) shouldn't happen again.

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

7 years agoFix printing error.
Zachary Turner [Mon, 12 Jun 2017 22:08:03 +0000 (22:08 +0000)]
Fix printing error.

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

7 years ago[llvm-pdbutil] Fix one more issue with no-id-stream PDBs.
Zachary Turner [Mon, 12 Jun 2017 21:57:41 +0000 (21:57 +0000)]
[llvm-pdbutil] Fix one more issue with no-id-stream PDBs.

This one occurred when we were dumping symbols, we have code
that is prepared to dump many different types of symbols,
including symbols which reference an ID stream.  So when creating
the dumper object, we assume that there is an ID stream.  Fix
this assumption.

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

7 years agoSlightly better fix for dealing with no-id-stream PDBs.
Zachary Turner [Mon, 12 Jun 2017 21:46:51 +0000 (21:46 +0000)]
Slightly better fix for dealing with no-id-stream PDBs.

The last fix required the user to manually add the required
feature.  This caused an LLD test to fail because I failed to
update LLD.  In practice we can hide this logic so it can just
be transparently added when we write the PDB.

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

7 years ago[llvm-pdbdump] Don't fail on PDBs with no ID stream.
Zachary Turner [Mon, 12 Jun 2017 21:34:53 +0000 (21:34 +0000)]
[llvm-pdbdump] Don't fail on PDBs with no ID stream.

Older PDBs don't have this.  Its presence is detected by using
the various "feature" flags that come at the end of the PDB
Stream.  Detect this, and don't try to dump the ID stream if the
features tells us it's not present.

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

7 years ago[RS4GC] Drop invalid metadata after pointers are relocated
Anna Thomas [Mon, 12 Jun 2017 21:26:53 +0000 (21:26 +0000)]
[RS4GC] Drop invalid metadata after pointers are relocated

Summary:
After RS4GC, we should drop metadata that is no longer valid. These metadata
is used by optimizations scheduled after RS4GC, and can cause a miscompile.
One such metadata is invariant.load which is used by LICM sinking transform.
After rewriting statepoints, the address of a load maybe relocated. With
invariant.load metadata on a load instruction, LICM sinking assumes the
loaded value (from a dererenceable address) to be invariant, and
rematerializes the load operand and the load at the exit block.
This transforms the IR to have an unrelocated use of the
address after a statepoint, which is incorrect.
Other metadata we conservatively remove are related to
dereferenceability and noalias metadata.

This patch drops such metadata on store and load instructions after
rewriting statepoints.

Reviewers: reames, sanjoy, apilipenko

Reviewed by: reames

Subscribers: llvm-commits

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

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

7 years agoAMDGPU/GlobalISel: Mark 32-bit G_ADD as legal
Tom Stellard [Mon, 12 Jun 2017 20:54:56 +0000 (20:54 +0000)]
AMDGPU/GlobalISel: Mark 32-bit G_ADD as legal

Reviewers: arsenm

Reviewed By: arsenm

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

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

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

7 years ago[ADT] Reduce duplication between {Contextual,}FoldingSet; NFC
George Burgess IV [Mon, 12 Jun 2017 20:52:53 +0000 (20:52 +0000)]
[ADT] Reduce duplication between {Contextual,}FoldingSet; NFC

This is a precursor to another change (coming soon) that aims to make
FoldingSet's API more type-safe. Without this, the type-safety change
would just duplicate 4 more public methods between the already very
similar classes.

This renames FoldingSetImpl to FoldingSetBase so it's consistent with
the FooBase -> FooImpl<T> -> Foo<T> convention we seem to have with
other containers.

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

7 years agoAArch64: don't try to emit an add (shifted reg) for SP.
Tim Northover [Mon, 12 Jun 2017 20:49:53 +0000 (20:49 +0000)]
AArch64: don't try to emit an add (shifted reg) for SP.

The "Add/sub (shifted reg)" instructions use the 31 encoding for xzr and wzr
rather than the SP, so we need to use different variants.

Situations where this actually comes up are rare enough (see test-case) that I
think falling back to DAG is fine.

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

7 years agoFix a null pointer dereference in llvm-pdbutil pretty.
Zachary Turner [Mon, 12 Jun 2017 20:46:35 +0000 (20:46 +0000)]
Fix a null pointer dereference in llvm-pdbutil pretty.

Static data members were causing a problem because I mistakenly
assumed all members would affect a class's layout and so the
Layout member would be non-null.

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

7 years agoSplitKit: Fix partially live subreg splitting
Matthias Braun [Mon, 12 Jun 2017 20:30:52 +0000 (20:30 +0000)]
SplitKit: Fix partially live subreg splitting

Fix thinko/typo in subreg aware liverange splitting logic. I'm not sure
how to write a proper testcase for this. The original problem only
happens on an out-of-tree target. Forcing subreg enabled targets to
spill and split in a predictable way is near impossible.

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

7 years agoIR: Replace the "Linker Options" module flag with "llvm.linker.options" named metadata.
Peter Collingbourne [Mon, 12 Jun 2017 20:10:48 +0000 (20:10 +0000)]
IR: Replace the "Linker Options" module flag with "llvm.linker.options" named metadata.

The new metadata is easier to manipulate than module flags.

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

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

7 years agoRemove unneeded conditionals - the code is already conditional on the same condition
David Blaikie [Mon, 12 Jun 2017 20:09:53 +0000 (20:09 +0000)]
Remove unneeded conditionals - the code is already conditional on the same condition

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

7 years agoAdd EOL at EOF to appease source utils like unifdef
Tim Hammerquist [Mon, 12 Jun 2017 20:08:55 +0000 (20:08 +0000)]
Add EOL at EOF to appease source utils like unifdef

<rdar://problem/32511256>

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

7 years ago[llvm-ar] Make llvm-lib behave more like the MSVC archiver
Reid Kleckner [Mon, 12 Jun 2017 19:45:35 +0000 (19:45 +0000)]
[llvm-ar] Make llvm-lib behave more like the MSVC archiver

Summary:
Use the filepath used to open the archive member as the archive member
name instead of the file basename. This path might be absolute or
relative.  This is important because the archive member name will show
up in the PDB, and we want our PDBs to look as much like MSVC's as
possible.

This also helps avoid an issue in our PDB module descriptor writing
code, which assumes that all module names are unique. Relative paths
still aren't guaranteed to be unique, but they're much better than
basenames, which definitely aren't unique.

Reviewers: ruiu, zturner

Subscribers: llvm-commits

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

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

7 years agoAddressed Takumi's comment about redundancy.
Galina Kistanova [Mon, 12 Jun 2017 19:17:55 +0000 (19:17 +0000)]
Addressed Takumi's comment about redundancy.

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

7 years ago[DWARF] Added a blank line in llvm-dwarfdump to test commit access.
Spyridoula Gravani [Mon, 12 Jun 2017 19:04:28 +0000 (19:04 +0000)]
[DWARF] Added a blank line in llvm-dwarfdump to test commit access.

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

7 years agoSame expressions on both sides of the return
Sylvestre Ledru [Mon, 12 Jun 2017 18:53:46 +0000 (18:53 +0000)]
Same expressions on both sides of the return

Summary:
I guess we want PointerToMemberFunction & PointerToDataMember

Fix coverity cid 1376038

Reviewers: zturner

Reviewed By: zturner

Subscribers: llvm-commits

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

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

7 years ago[PowerPC] Match vec_revb builtins to P9 instructions.
Tony Jiang [Mon, 12 Jun 2017 18:24:36 +0000 (18:24 +0000)]
[PowerPC] Match vec_revb builtins to P9 instructions.

Power9 has instructions that will reverse the bytes within an element for all
sizes (half-word, word, double-word and quad-word). These can be used for the
vec_revb builtins in altivec.h. However, we implement these to match vector
shuffle nodes as that will cover both the builtins and vector shuffles that
occur in the SDAG through other means.

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

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

7 years ago[Power9] Added support for the modsw, moduw, modsd, modud hardware instructions.
Tony Jiang [Mon, 12 Jun 2017 17:58:42 +0000 (17:58 +0000)]
[Power9] Added support for the modsw, moduw, modsd, modud hardware instructions.

Note that if we need the result of both the divide and the modulo then we
compute the modulo based on the result of the divide and not using the new
hardware instruction.

Commit on behalf of STEFAN PINTILIE.
Differential Revision: https://reviews.llvm.org/D33940

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

7 years ago[llvm-ar] Fix AddNewMember typo in enum
Reid Kleckner [Mon, 12 Jun 2017 17:44:42 +0000 (17:44 +0000)]
[llvm-ar] Fix AddNewMember typo in enum

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

7 years ago[utils] remove ability to generate llc check lines from update_test_checks.py
Sanjay Patel [Mon, 12 Jun 2017 17:44:30 +0000 (17:44 +0000)]
[utils] remove ability to generate llc check lines from update_test_checks.py

The dream of a unified check-line auto-generator for all phases of compilation is dead.
The llc script has already diverged to be better at its goal, so having 2 scripts that
do almost the same thing just causes confusion. Now, this script will only work with
opt to produce check lines for IR transforms.

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

7 years ago[x86] regenerate checks with update_llc_test_checks.py
Sanjay Patel [Mon, 12 Jun 2017 17:31:36 +0000 (17:31 +0000)]
[x86] regenerate checks with update_llc_test_checks.py

The dream of a unified check-line auto-generator for all phases of compilation is dead.
The llc script has already diverged to be better at its goal, so having 2 scripts that
do almost the same thing is just causing confusion.

We can rip out the llc ability in update_test_checks.py next and rename it, so it will
be clear that we have one script for llc check auto-generation and another for opt.

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

7 years agoAMDGPU: Don't add same implicit use multiple times
Matt Arsenault [Mon, 12 Jun 2017 17:19:20 +0000 (17:19 +0000)]
AMDGPU: Don't add same implicit use multiple times

For the last component, the same register use
was added as an implicit use and another implicit kill use.

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

7 years ago[SelectionDAG] Allow sin/cos -> sincos optimization on GNU triples w/ just -fno-math...
Geoff Berry [Mon, 12 Jun 2017 17:15:41 +0000 (17:15 +0000)]
[SelectionDAG] Allow sin/cos -> sincos optimization on GNU triples w/ just -fno-math-errno

Summary:
This change enables the sin(x) cos(x) -> sincos(x) optimization on GNU
target triples.  This optimization was being inhibited when -ffast-math
wasn't set because sincos in GLibC does not set errno, while sin and cos
do.  However, this optimization will only run if the attributes on the
sin/cos calls include readnone, which is how clang represents the fact
that it doesn't care about the errno values set by these functions (via
the -fno-math-errno flag).

Reviewers: hfinkel, bogner

Subscribers: mcrosier, javed.absar, llvm-commits, paul.redmond

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

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

7 years agoAMDGPU: Teach isLegalAddressingMode about flat offsets
Matt Arsenault [Mon, 12 Jun 2017 17:06:35 +0000 (17:06 +0000)]
AMDGPU: Teach isLegalAddressingMode about flat offsets

Also fix reporting r+r as a valid addressing mode without
offsets.

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

7 years ago[x86] regenerate checks with update_llc_test_checks.py
Sanjay Patel [Mon, 12 Jun 2017 17:05:43 +0000 (17:05 +0000)]
[x86] regenerate checks with update_llc_test_checks.py

The dream of a unified check-line auto-generator for all phases of compilation is dead.
The llc script has already diverged to be better at its goal, so having 2 scripts that
do almost the same thing is just causing confusion for newcomers. I plan to fix up more
x86 tests in a next commit. We can rip out the llc ability in update_test_checks.py after
that.

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

7 years agoAMDGPU: Start selecting flat instruction offsets
Matt Arsenault [Mon, 12 Jun 2017 16:53:51 +0000 (16:53 +0000)]
AMDGPU: Start selecting flat instruction offsets

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

7 years agoAMDGPU: Verify that flat offsets aren't used pre-GFX9
Matt Arsenault [Mon, 12 Jun 2017 16:37:55 +0000 (16:37 +0000)]
AMDGPU: Verify that flat offsets aren't used pre-GFX9

For convenience the operand is always present in the instruction,
but it isn't valid to use except on GFX9.

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

7 years ago[Falkor] Enable SW Prefetch.
Haicheng Wu [Mon, 12 Jun 2017 16:34:19 +0000 (16:34 +0000)]
[Falkor] Enable SW Prefetch.

SW prefetch is good for Falkor.

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

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

7 years agoAMDGPU: Start adding offset fields to flat instructions
Matt Arsenault [Mon, 12 Jun 2017 15:55:58 +0000 (15:55 +0000)]
AMDGPU: Start adding offset fields to flat instructions

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

7 years agoStackColoring: smarter check for slot overlap
Than McIntosh [Mon, 12 Jun 2017 14:56:02 +0000 (14:56 +0000)]
StackColoring: smarter check for slot overlap

Summary:
The old check for slot overlap treated 2 slots `S` and `T` as
overlapping if there existed a CFG node in which both of the slots could
possibly be active. That is overly conservative and caused stack blowups
in Rust programs. Instead, check whether there is a single CFG node in
which both of the slots are possibly active *together*.

Fixes PR32488.

Patch by Ariel Ben-Yehuda <ariel.byd@gmail.com>

Reviewers: thanm, nagisa, llvm-commits, efriedma, rnk

Reviewed By: thanm

Subscribers: dotdash

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

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

7 years ago[DAG] add helper to bind memop chains; NFCI
Sanjay Patel [Mon, 12 Jun 2017 14:41:48 +0000 (14:41 +0000)]
[DAG] add helper to bind memop chains; NFCI

This step is just intended to reduce code duplication rather than change any functionality.

A follow-up would be to replace PPCTargetLowering::spliceIntoChain() usage with this new helper.

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

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

7 years ago[InstCombine] lshr (sext iM X to iN), N-M --> zext (ashr X, min(N-M, M-1)) to iN
Sanjay Patel [Mon, 12 Jun 2017 14:23:43 +0000 (14:23 +0000)]
[InstCombine] lshr (sext iM X to iN), N-M --> zext (ashr X, min(N-M, M-1)) to iN

This is a follow-up to https://reviews.llvm.org/D33879 / https://reviews.llvm.org/rL304939 ,
and was discussed in https://reviews.llvm.org/D33338.

We prefer this form because a narrower shift may be cheaper, and we can more easily fold a
zext than a sext.

http://rise4fun.com/Alive/slVe

Name: shz
%s = sext i8 %x to i12
%r = lshr i12 %s, 4
=>
%a = ashr i8 %x, 4
%r = zext i8 %a to i12

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

7 years agoConst correctness for TTI::getRegisterBitWidth
Daniel Neilson [Mon, 12 Jun 2017 14:22:21 +0000 (14:22 +0000)]
Const correctness for TTI::getRegisterBitWidth

Summary: The method TargetTransformInfo::getRegisterBitWidth() is declared const, but the type erasing implementation classes (TargetTransformInfo::Concept & TargetTransformInfo::Model) that were introduced by Chandler in https://reviews.llvm.org/D7293 do not have the method declared const. This is an NFC to tidy up the const consistency between TTI and its implementation.

Reviewers: chandlerc, rnk, reames

Reviewed By: reames

Subscribers: reames, jfb, arsenm, dschuff, nemanjai, nhaehnle, javed.absar, sbc100, jgravelle-google, llvm-commits

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

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

7 years ago[ADT] Don't use __used__ attribute on struct members in unit test
Francis Ricci [Mon, 12 Jun 2017 14:19:25 +0000 (14:19 +0000)]
[ADT] Don't use __used__ attribute on struct members in unit test

On some compilers, __used__ can only be applied to variables
or functions.

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

7 years ago[X86][SSE] Change memop fragment to inherit from vec128load with local alignment...
Simon Pilgrim [Mon, 12 Jun 2017 10:01:27 +0000 (10:01 +0000)]
[X86][SSE] Change memop fragment to inherit from vec128load with local alignment controls

First possible step towards merging SSE/AVX memory folding pattern fragments.

Also allows us to remove the duplicate non-temporal load logic.

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

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

7 years agoExport the required symbol from DynamicLibraryTests
Roger Ferrer Ibanez [Mon, 12 Jun 2017 07:22:15 +0000 (07:22 +0000)]
Export the required symbol from DynamicLibraryTests

Running unittests/Support/DynamicLibrary/DynamicLibraryTests fails
when LLVM is configured with -DLLVM_EXPORT_SYMBOLS_FOR_PLUGINS=ON, because
the test's version script only contains symbols extracted from the static libraries,
that the test links with, but not those from the main object/executable itself.

The patch moves the one symbol, needed by the test, to a static library.

Fixes https://bugs.llvm.org/show_bug.cgi?id=32893

Patch by Momchil Velikov.

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

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

7 years ago[AVX-512] Add VPCONFLICT and VPLZCNT to load folding tables.
Craig Topper [Mon, 12 Jun 2017 04:57:31 +0000 (04:57 +0000)]
[AVX-512] Add VPCONFLICT and VPLZCNT to load folding tables.

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

7 years agoAddress http://bugs.llvm.org/pr32207 by making BannerPrinted local to runOnSCC and...
Yaron Keren [Mon, 12 Jun 2017 02:18:50 +0000 (02:18 +0000)]
Address http://bugs.llvm.org/pr32207 by making BannerPrinted local to runOnSCC and skipping banner for function declarations.

Reviewed By: Mehdi AMINI

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

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

7 years agoInitialize SubArch in class Triple
Kamil Rytarowski [Mon, 12 Jun 2017 00:28:14 +0000 (00:28 +0000)]
Initialize SubArch in class Triple

Summary:
LLDB built with asan on NetBSD detected issues in the following code:

```
void ArchSpec::Clear() {
  m_triple = llvm::Triple();
  m_core = kCore_invalid;
  m_byte_order = eByteOrderInvalid;
  m_distribution_id.Clear();
  m_flags = 0;
}
```

  --- lldb/source/Core/ArchSpec.cpp

Runtime error messages:

/public/pkgsrc-tmp/wip/lldb-netbsd/work/.buildlink/include/llvm/ADT/Triple.h:44:7: runtime error: load of value 32639, which is not a valid value for type 'SubArchType'
/public/pkgsrc-tmp/wip/lldb-netbsd/work/.buildlink/include/llvm/ADT/Triple.h:44:7: runtime error: load of value 3200171710, which is not a valid value for type 'SubArchType'
/public/pkgsrc-tmp/wip/lldb-netbsd/work/.buildlink/include/llvm/ADT/Triple.h:44:7: runtime error: load of value 3200171710, which is not a valid value for type 'SubArchType'

Correct this issue with initialization of SubArch() in the class Triple constructor.

Sponsored by <The NetBSD Foundation>

Reviewers: chandlerc, zturner

Reviewed By: zturner

Subscribers: llvm-commits, zturner

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

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

7 years ago[x86] use vperm2f128 rather than vinsertf128 when there's a chance to fold a 32-byte...
Sanjay Patel [Sun, 11 Jun 2017 21:18:58 +0000 (21:18 +0000)]
[x86] use vperm2f128 rather than vinsertf128 when there's a chance to fold a 32-byte load

I was looking closer at the x86 test diffs in D33866, and the first change seems like it
shouldn't happen in the first place. So this patch will resolve that.

Using Agner's tables and AMD docs, vperm2f128 and vinsertf128 have identical timing for
any given CPU model, so we should be able to interchange those without affecting perf.
But as we can see in some of the diffs here, using vperm2f128 allows load folding, so
we should take that opportunity to reduce code size and register pressure.

A secondary advantage is making AVX1 and AVX2 codegen more similar. Given that vperm2f128
was introduced with AVX1, we should be selecting it in all of the same situations that we
would with AVX2. If there's some reason that an AVX1 CPU would not want to use this
instruction, that should be fixed up in a later pass.

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

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

7 years ago[PartialInlining] Support shrinkwrap life_range markers
Xinliang David Li [Sun, 11 Jun 2017 20:46:05 +0000 (20:46 +0000)]
[PartialInlining] Support shrinkwrap life_range markers

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

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

7 years ago[ADT] Use LLVM_ATTRIBUTE_USED instead of __attribute__ for unit test
Francis Ricci [Sun, 11 Jun 2017 19:28:21 +0000 (19:28 +0000)]
[ADT] Use LLVM_ATTRIBUTE_USED instead of __attribute__ for unit test

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

7 years ago[ADT] Suppress unused attribute warning in unit test
Francis Ricci [Sun, 11 Jun 2017 18:52:25 +0000 (18:52 +0000)]
[ADT] Suppress unused attribute warning in unit test

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

7 years agoFix unused variable warning on non-debug EXPENSIVE_CHECKS builds
Simon Pilgrim [Sun, 11 Jun 2017 12:49:29 +0000 (12:49 +0000)]
Fix unused variable warning on non-debug EXPENSIVE_CHECKS builds

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

7 years ago[DAGCombine] Make sure we check the ResNo from UADDO before combining
Amaury Sechet [Sun, 11 Jun 2017 11:36:38 +0000 (11:36 +0000)]
[DAGCombine] Make sure we check the ResNo from UADDO before combining

Summary: UADDO has 2 result, and one must check the result no before doing any kind of combine. Without it, the transform is invalid.

Reviewers: joerg

Subscribers: llvm-commits

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

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

7 years ago[MemorySSA] preservesAll() implies preserves<MemorySSA>(). NFCI.
Davide Italiano [Sun, 11 Jun 2017 01:05:45 +0000 (01:05 +0000)]
[MemorySSA] preservesAll() implies preserves<MemorySSA>(). NFCI.

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

7 years agoTableGen.cmake: Try to fix build breakage introduce in r305142.
NAKAMURA Takumi [Sun, 11 Jun 2017 00:57:30 +0000 (00:57 +0000)]
TableGen.cmake: Try to fix build breakage introduce in r305142.

LLVM_TABLEGEN_TARGET is undefined in clang standalone build.
STREQUAL cannot omit LHS. Then I saw an error;

  CMake Error at /path/to/install/llvm/lib/cmake/llvm/TableGen.cmake:40 (if):
      if given arguments:
        "STREQUAL" "/path/to/install/llvm/bin/llvm-tblgen.exe"
      Unknown arguments specified

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

7 years ago[SmallVector] Reinstate the typedefs.
Davide Italiano [Sat, 10 Jun 2017 23:18:32 +0000 (23:18 +0000)]
[SmallVector] Reinstate the typedefs.

They're unused with recent versions of libstdc++ but older ones
(e.g. libstdc++ 4.9 still requires them). Maybe we should bump
the requirements on the minimum version to make GCC 7 happy, but
in the meanwhile we need to live with the warning.

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

7 years ago[SmallVector] Remove unused typedefs, spotted by GCC 7. NFCI.
Davide Italiano [Sat, 10 Jun 2017 23:00:23 +0000 (23:00 +0000)]
[SmallVector] Remove unused typedefs, spotted by GCC 7. NFCI.

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

7 years ago[opt-viewer] Include default values in help output
Brian Gesiak [Sat, 10 Jun 2017 21:33:27 +0000 (21:33 +0000)]
[opt-viewer] Include default values in help output

Summary:
Python's argparse module includes a `%(default)s` format specifier that
can be used to print the default value of an option in its help text.
Use this for opt-viewer utilities' `--jobs` arguments.

Reviewers: anemet

Reviewed By: anemet

Subscribers: llvm-commits, fhahn

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

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

7 years ago[X86][SSE] Extended PR32368 to SSE/AVX1/AVX2
Simon Pilgrim [Sat, 10 Jun 2017 21:13:01 +0000 (21:13 +0000)]
[X86][SSE] Extended PR32368 to SSE/AVX1/AVX2

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

7 years ago[X86][AVX512] Added test case for PR32368
Simon Pilgrim [Sat, 10 Jun 2017 20:58:43 +0000 (20:58 +0000)]
[X86][AVX512] Added test case for PR32368

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

7 years agodwarfdump: Handle relocs to zlib (.zdebug*) compressed sections
David Blaikie [Sat, 10 Jun 2017 19:32:50 +0000 (19:32 +0000)]
dwarfdump: Handle relocs to zlib (.zdebug*) compressed sections

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

7 years ago[X86][SLM] Add SLM arithmetic vectorization tests
Simon Pilgrim [Sat, 10 Jun 2017 19:16:09 +0000 (19:16 +0000)]
[X86][SLM] Add SLM arithmetic vectorization tests

As discussed on D33983, as SLM has so many custom costs its worth testing as well.

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

7 years agoBreak seems serve better here.
Galina Kistanova [Sat, 10 Jun 2017 18:26:19 +0000 (18:26 +0000)]
Break seems serve better here.

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

7 years agoFix a ubsan failure introduced by r305092
Vedant Kumar [Sat, 10 Jun 2017 18:07:24 +0000 (18:07 +0000)]
Fix a ubsan failure introduced by r305092

lib/Object/WindowsResource.cpp:578:3: runtime error: store to
misaligned address 0x7fa09aedebbe for type 'unsigned int', which
requires 4 byte alignment
0x7fa09aedebbe: note: pointer points here
00 00 03 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00  00 00
            ^

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

7 years ago[EarlyCSE] Add option to use MemorySSA for function simplification run of EarlyCSE...
Geoff Berry [Sat, 10 Jun 2017 15:20:03 +0000 (15:20 +0000)]
[EarlyCSE] Add option to use MemorySSA for function simplification run of EarlyCSE (off by default).

Summary:
Use MemorySSA for memory dependency checking in the EarlyCSE pass at the
start of the function simplification portion of the pipeline.  We rely
on the fact that GVNHoist runs just after this pass of EarlyCSE to
amortize the MemorySSA construction cost since GVNHoist uses MemorySSA
and EarlyCSE preserves it.

This is turned off by default.  A follow-up change will turn it on to
allow for easier reversion in case it breaks something.

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

7 years agoAdded llvm_unreachable to address warning: this statement may fall through. NFC.
Galina Kistanova [Sat, 10 Jun 2017 08:04:51 +0000 (08:04 +0000)]
Added llvm_unreachable to address warning: this statement may fall through. NFC.

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

7 years agoAdded llvm_unreachable as ReportError cannot be specified as noreturn.
Galina Kistanova [Sat, 10 Jun 2017 07:50:14 +0000 (07:50 +0000)]
Added llvm_unreachable as ReportError cannot be specified as noreturn.

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

7 years agoAdded dependency on the TableGen executable file.
Galina Kistanova [Sat, 10 Jun 2017 07:48:49 +0000 (07:48 +0000)]
Added dependency on the TableGen executable file.

For the case when LLVM_OPTIMIZED_TABLEGEN is ON (enables LLVM_USE_HOST_TOOLS),
we need both _TABLEGEN_TARGET and _TABLEGEN_EXE in the  DEPENDS list
to have .inc files rebuilt on a tablegen change, as cmake does not propagate
file-level dependencies of custom targets.

We could always have just one dependency on both the target and
the file, but the 2 cases would produce cleaner cmake files.

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

7 years ago[IR] Remove stale comment from HungoffOperandTraits. NFC
Craig Topper [Sat, 10 Jun 2017 06:58:26 +0000 (06:58 +0000)]
[IR] Remove stale comment from HungoffOperandTraits. NFC

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

7 years ago[IR] Delete operator new(size_t, unsigned) for ShuffleVector making it consistent...
Craig Topper [Sat, 10 Jun 2017 06:58:24 +0000 (06:58 +0000)]
[IR] Delete operator new(size_t, unsigned) for ShuffleVector making it consistent with other instructions that declare another operator new with a different signature. NFC

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

7 years ago[IR] Put a comment back on a function it belongs to. NFC
Craig Topper [Sat, 10 Jun 2017 06:58:22 +0000 (06:58 +0000)]
[IR] Put a comment back on a function it belongs to. NFC

Looks like the function was moved to a different part of the class in December, but the comment didn't move with it.

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

7 years ago[IR] Remove unnecessary override of operator new in ExtractValueInst. It's already...
Craig Topper [Sat, 10 Jun 2017 06:58:19 +0000 (06:58 +0000)]
[IR] Remove unnecessary override of operator new in ExtractValueInst. It's already inherited from UnaryInstruction. NFC

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

7 years agoAMDGPU : Fix ISA Version Definitions.
Wei Ding [Sat, 10 Jun 2017 03:53:19 +0000 (03:53 +0000)]
AMDGPU : Fix ISA Version Definitions.

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

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

7 years ago[InstSimplify] Don't constant fold or DCE calls that are marked nobuiltin
Andrew Kaylor [Fri, 9 Jun 2017 23:18:11 +0000 (23:18 +0000)]
[InstSimplify] Don't constant fold or DCE calls that are marked nobuiltin

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

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

7 years ago[PowerPC] add memcmp test with one constant operand and equality cmp; NFC
Sanjay Patel [Fri, 9 Jun 2017 23:15:14 +0000 (23:15 +0000)]
[PowerPC] add memcmp test with one constant operand and equality cmp; NFC

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

7 years ago[CGP] add a reference to DataLayout in MemCmpExpansion; NFCI
Sanjay Patel [Fri, 9 Jun 2017 23:01:05 +0000 (23:01 +0000)]
[CGP] add a reference to DataLayout in MemCmpExpansion; NFCI

We're currently passing endian-ness around as a param (and not uniformly),
so this eliminates the need for that. I'd like to add a constant fold
call too, and that requires a DL.

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

7 years ago[AArch64] Add fallback in FastISel fp16 conversions
I-Jui (Ray) Sung [Fri, 9 Jun 2017 22:40:50 +0000 (22:40 +0000)]
[AArch64] Add fallback in FastISel fp16 conversions

Summary:
- Fix assertion failures on F16 to/from int types in FastISel by falling
  back to regular ISel
- Add a testcase of various conversion cases with FastISel (-O0)

Reviewers: kristof.beyls, jmolloy, SjoerdMeijer

Reviewed By: SjoerdMeijer

Subscribers: SjoerdMeijer, llvm-commits, srhines, pirama, aemerson, rengolin, javed.absar, kristof.beyls

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

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

7 years agoEnable c++1z experimental builds.
Vassil Vassilev [Fri, 9 Jun 2017 22:09:57 +0000 (22:09 +0000)]
Enable c++1z experimental builds.

Patch by David Abdurachmanov!

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

7 years ago[Support] Fix some Clang-tidy modernize-use-using and Include What You Use warnings...
Eugene Zelenko [Fri, 9 Jun 2017 21:41:54 +0000 (21:41 +0000)]
[Support] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC).

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

7 years ago[LVI] Fix spelling error in comment. NFC
Craig Topper [Fri, 9 Jun 2017 21:21:17 +0000 (21:21 +0000)]
[LVI] Fix spelling error in comment. NFC

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