OSDN Git Service

android-x86/external-llvm.git
6 years agoAMDGPU: Fix v_dot{4, 8}* instruction encoding
Konstantin Zhuravlyov [Tue, 15 May 2018 19:32:47 +0000 (19:32 +0000)]
AMDGPU: Fix v_dot{4, 8}* instruction encoding

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

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

6 years ago[llvm-rc] Add support for the optional CLASS statement for dialogs
Martin Storsjo [Tue, 15 May 2018 19:21:28 +0000 (19:21 +0000)]
[llvm-rc] Add support for the optional CLASS statement for dialogs

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

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

6 years ago[MemorySSA] Don't sort IDF blocks.
Michael Zolotukhin [Tue, 15 May 2018 18:40:29 +0000 (18:40 +0000)]
[MemorySSA] Don't sort IDF blocks.

Summary:
After r332167 we started to sort the IDF blocks inside IDF calculation, so
there is no need to re-sort them on the user site. The test changes are due to
a slightly different order we're using now (originally we used DFSInNumber and
now the blocks are sorted by a pair (LevelFromRoot, DFSInNumber)).

Reviewers: dberlin, mgrang

Subscribers: Prazek, hiraditya, george.burgess.iv, llvm-commits

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

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

6 years ago[llvm-mca] use a formatted_raw_ostream to insert padding and get rid of tabs. NFC
Andrea Di Biagio [Tue, 15 May 2018 18:11:45 +0000 (18:11 +0000)]
[llvm-mca] use a formatted_raw_ostream to insert padding and get rid of tabs. NFC

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

6 years agoAMDGPU/GlobalISel: Implement select() for G_FCONSTANT
Tom Stellard [Tue, 15 May 2018 17:57:09 +0000 (17:57 +0000)]
AMDGPU/GlobalISel: Implement select() for G_FCONSTANT

Summary: Also clean up G_CONSTANT selection.

Reviewers: arsenm, nhaehnle

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

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

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

6 years agoAMDGPU: Add disasm tests for deep learning instructions + fix v_fmac_f32 disasm
Konstantin Zhuravlyov [Tue, 15 May 2018 17:39:13 +0000 (17:39 +0000)]
AMDGPU: Add disasm tests for deep learning instructions + fix v_fmac_f32 disasm

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

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

6 years ago[X86] Split WriteCvtF2F into F32->F64 and F64->F32 scheduler classes
Simon Pilgrim [Tue, 15 May 2018 17:36:49 +0000 (17:36 +0000)]
[X86] Split WriteCvtF2F into F32->F64 and F64->F32 scheduler classes

BtVer2 - Fixes schedules for (V)CVTPS2PD instructions

A lot of the Intel models still have too many InstRW overrides for these new classes - this needs cleaning up but I wanted to get the classes in first

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

6 years ago[InstCombine] fix binop-of-shuffles to check uses
Sanjay Patel [Tue, 15 May 2018 17:14:23 +0000 (17:14 +0000)]
[InstCombine] fix binop-of-shuffles to check uses

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

6 years ago[InstCombine] add multi-use shuffle tests and regenerate checks; NFC
Sanjay Patel [Tue, 15 May 2018 16:47:47 +0000 (16:47 +0000)]
[InstCombine] add multi-use shuffle tests and regenerate checks; NFC

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

6 years ago[Hexagon] Remove unused function from subtarget
Krzysztof Parzyszek [Tue, 15 May 2018 16:32:24 +0000 (16:32 +0000)]
[Hexagon] Remove unused function from subtarget

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

6 years agoRename three cxx files in unittests to cpp.
Nico Weber [Tue, 15 May 2018 16:30:30 +0000 (16:30 +0000)]
Rename three cxx files in unittests to cpp.

LLVM uses cpp as its C++ file extension, these are the only three cxx file in
the monorepo. These files apparently were called to escape a CMake check -- use
the LLVM_OPTIONAL_SOURCES mechanism that's meant as an escape for this case
instead.

No intended behavior change.
https://reviews.llvm.org/D46843

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

6 years ago[AArch64] Fix mir test case liveins info.
Geoff Berry [Tue, 15 May 2018 16:27:34 +0000 (16:27 +0000)]
[AArch64] Fix mir test case liveins info.

The test case added in r332265 had incomplete livein information which
was caught by the EXPENSIVE_CHECKS bot.  Fix the livein information and
add -verify-machineinstrs to the test case.

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

6 years ago[Hexagon] Remove unused flag from subtarget and (non)corresponding test
Krzysztof Parzyszek [Tue, 15 May 2018 16:13:52 +0000 (16:13 +0000)]
[Hexagon] Remove unused flag from subtarget and (non)corresponding test

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

6 years ago[mips] Mark select instructions correctly
Simon Dardis [Tue, 15 May 2018 16:05:04 +0000 (16:05 +0000)]
[mips] Mark select instructions correctly

Reviewers: atanasyan, abeserminji, smaksimovic

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

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

6 years ago[llvm-mca] Strip leading tabs and spaces from instruction strings before printing...
Andrea Di Biagio [Tue, 15 May 2018 15:18:05 +0000 (15:18 +0000)]
[llvm-mca] Strip leading tabs and spaces from instruction strings before printing. NFC

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

6 years ago[DAG] propagate FMF for all FPMathOperators
Sanjay Patel [Tue, 15 May 2018 14:16:24 +0000 (14:16 +0000)]
[DAG] propagate FMF for all FPMathOperators

This is a simple hack based on what's proposed in D37686, but we can extend it if needed in follow-ups.
It gets us most of the FMF functionality that we want without adding any state bits to the flags. It
also intentionally leaves out non-FMF flags (nsw, etc) to minimize the patch.

It should provide a superset of the functionality from D46563 - the extra tests show propagation and
codegen diffs for fcmp, vecreduce, and FP libcalls.

The PPC log2() test shows the limits of this most basic approach - we only applied 'afn' to the last
node created for the call. AFAIK, there aren't any libcall optimizations based on the flags currently,
so that shouldn't make any difference.

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

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

6 years ago[X86] Split off F16C WriteCvtPH2PS/WriteCvtPS2PH scheduler classes
Simon Pilgrim [Tue, 15 May 2018 14:12:32 +0000 (14:12 +0000)]
[X86] Split off F16C WriteCvtPH2PS/WriteCvtPS2PH scheduler classes

Btver2 - VCVTPH2PSYrm needs to double pump the AGU
Broadwell - missing VCVTPS2PH*mr stores extra latency

Allows us to remove the WriteCvtF2FSt conversion store class

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

6 years ago[llvm-objcopy] Add --keep-symbol (-K) option
Paul Semel [Tue, 15 May 2018 14:09:37 +0000 (14:09 +0000)]
[llvm-objcopy] Add --keep-symbol (-K) option

This option permits to explicitly keep the specified
symbol so that it doesn't get removed.

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

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

6 years agoFix broken asan Support tests
Eric Liu [Tue, 15 May 2018 13:43:20 +0000 (13:43 +0000)]
Fix broken asan Support tests

The asan failures were caught in google internal asan tests after r332311
o Make StackOption support cl::list
o Rememeber to removeArguments for cl::alias in tests.

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

6 years agoReapply "DWARFVerifier: Check "completeness" of .debug_names section"
Pavel Labath [Tue, 15 May 2018 13:24:10 +0000 (13:24 +0000)]
Reapply "DWARFVerifier: Check "completeness" of .debug_names section"

This is a resubmit of r331868 (D46583), which was reverted due to
failures on the PS4 bot.

These have been resolved with r332246/D46748.

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

6 years ago[llvm-exegesis] Split AsmTemplate.Name into components.
Clement Courbet [Tue, 15 May 2018 13:07:05 +0000 (13:07 +0000)]
[llvm-exegesis] Split AsmTemplate.Name into components.

Summary:
AsmTemplate becomes IntructionBenchmarkKey, which has three components.
This allows retreiving the opcode for analysis.

Reviewers: gchatelet

Subscribers: tschuett, llvm-commits

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

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

6 years ago[llvm-mca][x86] Add F16C instruction tests
Simon Pilgrim [Tue, 15 May 2018 12:50:06 +0000 (12:50 +0000)]
[llvm-mca][x86] Add F16C instruction tests

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

6 years agoFix compilation under pre-c++14 gccs.
Clement Courbet [Tue, 15 May 2018 12:38:06 +0000 (12:38 +0000)]
Fix compilation under pre-c++14 gccs.

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

6 years agoFix r332344: only the native target is linked.
Clement Courbet [Tue, 15 May 2018 12:27:36 +0000 (12:27 +0000)]
Fix r332344: only the native target is linked.

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

6 years ago[llvm-exegesis] Add an analysis mode.
Clement Courbet [Tue, 15 May 2018 12:08:00 +0000 (12:08 +0000)]
[llvm-exegesis] Add an analysis mode.

Summary:
The analysis mode gives the user a clustered view of the measurement results.
Next steps are (requires the split ok AsmTemplate.Name into {mnemonic, mode}):
 - Show the sched class.
 - Highlight any inconsistencies with the checked-in data.

Reviewers: gchatelet

Subscribers: mgorny, llvm-commits, tschuett

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

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

6 years ago[MergeFunctions] Fix merging of small weak functions
whitequark [Tue, 15 May 2018 11:31:07 +0000 (11:31 +0000)]
[MergeFunctions] Fix merging of small weak functions

When two interposable functions are merged, we cannot replace
uses and have to emit calls to a common internal function. However,
writeThunk() will not actually emit a thunk if the function is too
small. This leaves us in a broken state where mergeTwoFunctions
already rewired the functions, but writeThunk doesn't do anything.

This patch changes the implementation so that:

 * writeThunk() does just that.
 * The direct replacement of calls is moved into mergeTwoFunctions()
   into the non-interposable case only.
 * isThunkProfitable() is extracted and will be called for
   the non-iterposable case always, and in the interposable case
   only if uses are still left after replacement.

This issue has been introduced in https://reviews.llvm.org/D34806,
where the code for checking thunk profitability has been moved.

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

Reviewed By: whitequark

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

6 years ago[mips] Fix formatting of floating point conversion patterns
Simon Dardis [Tue, 15 May 2018 11:21:07 +0000 (11:21 +0000)]
[mips] Fix formatting of floating point conversion patterns

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

6 years ago[mips] Add disassembly support for comparison instructions
Simon Dardis [Tue, 15 May 2018 11:18:24 +0000 (11:18 +0000)]
[mips] Add disassembly support for comparison instructions

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

6 years ago[mips] Fix predicates of mfc1, mtc1 instructions
Simon Dardis [Tue, 15 May 2018 11:10:30 +0000 (11:10 +0000)]
[mips] Fix predicates of mfc1, mtc1 instructions

Reviewers: atanasyan, abeserminji, smaksimovic

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

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

6 years ago[llvm-mca] Remove unused include header files. NFC
Andrea Di Biagio [Tue, 15 May 2018 10:30:39 +0000 (10:30 +0000)]
[llvm-mca] Remove unused include header files. NFC

Also, run clang-format on RetireControlUnit.cpp.

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

6 years ago[X86] Improve unsigned saturation downconvert detection.
Artur Gainullin [Tue, 15 May 2018 10:24:12 +0000 (10:24 +0000)]
[X86] Improve unsigned saturation downconvert detection.

Summary:
New unsigned saturation downconvert patterns detection was implemented in
X86 Codegen:

(truncate (smin (smax (x, C1), C2)) to dest_type),
where C1 >= 0 and C2 is unsigned max of destination type.

(truncate (smax (smin (x, C2), C1)) to dest_type)
where C1 >= 0, C2 is unsigned max of destination type and C1 <= C2.
These two patterns are equivalent to:

(truncate (umin (smax(x, C1), unsigned_max_of_dest_type)) to dest_type)

Reviewers: RKSimon

Subscribers: llvm-commits, a.elovikov

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

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

6 years ago[llvm-mca] Add file header to RetireControlUnit.cpp.
Andrea Di Biagio [Tue, 15 May 2018 09:31:32 +0000 (09:31 +0000)]
[llvm-mca] Add file header to RetireControlUnit.cpp.

Strictly speaking, this is not necessary for .cpp files. However, other .cpp
files from this same tool have it. This also matches what we do in other tools.

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

6 years ago[llvm-exegesis] InMemoryAssembler: handle return-less targets (e.g. arm).
Clement Courbet [Tue, 15 May 2018 07:40:21 +0000 (07:40 +0000)]
[llvm-exegesis] InMemoryAssembler: handle return-less targets (e.g. arm).

Summary: Arm does not have a ret code per se.

Reviewers: gchatelet

Subscribers: mgorny, javed.absar, kristof.beyls, tschuett, llvm-commits

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

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

6 years ago[llvm-exegesis] Check perf event validity.
Clement Courbet [Tue, 15 May 2018 07:35:21 +0000 (07:35 +0000)]
[llvm-exegesis] Check perf event validity.

This was part of https://reviews.llvm.org/D46821.

Authored by Guillaume Chatelet

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

6 years ago[llvm-rc] Add support for parsing memory flags
Martin Storsjo [Tue, 15 May 2018 06:35:29 +0000 (06:35 +0000)]
[llvm-rc] Add support for parsing memory flags

Most of the handling is pretty straightforward; fetch the default
memory flags for the specific resource type before parsing the flags
and apply them on top of that, except that some flags imply others
and some flags clear more than one flag.

For icons and cursors, the flags set get passed on to all individual
single icon/cursor resources, while only some flags affect the icon/cursor
group resource.

For stringtables, the behaviour is pretty simple; the first stringtable
resource of a bundle sets the flags for the whole bundle.

The output of these tests match rc.exe byte for byte.

The actual use of these memory flags is deprecated and they have no
effect since Win16, but some resource script files may still happen
to have them in place.

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

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

6 years ago[llvm-rc] Read the Planes/BitCount fields from BITMAPINFOHEADER for icons
Martin Storsjo [Tue, 15 May 2018 06:35:20 +0000 (06:35 +0000)]
[llvm-rc] Read the Planes/BitCount fields from BITMAPINFOHEADER for icons

Previously these fields were only read from this header for cursors,
while Planes was hardcoded to 1 for icons (with a comment that it was
unknown why this was needed) and BitCount was left at the value
read originally in the RESDIRENTRY.

This fixes the single byte that was differing for the icon/cursor test
compared to rc.exe.

This is based on research/testing by Nico Weber.

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

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

6 years ago[X86] Add fast isel tests for some of the avx512 truncate intrinsics to match current...
Craig Topper [Tue, 15 May 2018 04:26:27 +0000 (04:26 +0000)]
[X86] Add fast isel tests for some of the avx512 truncate intrinsics to match current clang codegen.

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

6 years ago[NFC] pull a function into its own lambda
JF Bastien [Tue, 15 May 2018 04:23:48 +0000 (04:23 +0000)]
[NFC] pull a function into its own lambda

As requested in D46858, pulling this function into its own lambda makes it
easier to read that part of the code and reason as to what's going on because
the scope it can be called from is extremely limited. We want to keep it as a
function because it's called from the two subsequent lines.

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

6 years ago[NFC] Update comments
JF Bastien [Tue, 15 May 2018 04:06:28 +0000 (04:06 +0000)]
[NFC] Update comments

Don't prepend function or data name before each comment. Split into its own NFC patch as requested in D46858.

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

6 years ago[X86] Revert part of r332267: Remove GCCBuiltin from the intrinsics that clang stoppe...
Craig Topper [Tue, 15 May 2018 03:17:05 +0000 (03:17 +0000)]
[X86] Revert part of r332267: Remove GCCBuiltin from the intrinsics that clang stopped using in r332266.

The masking of instructions that produce byte or word elements doesn't work right without avx512bw since the generic i8/i16 select won't be legal in the SelectionDAG.

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

6 years ago[RISCV] Define FeatureRelax and shouldForceRelocation for RISCV linker relaxation
Shiva Chen [Tue, 15 May 2018 01:28:50 +0000 (01:28 +0000)]
[RISCV] Define FeatureRelax and shouldForceRelocation for RISCV linker relaxation

1. Deine FeatureRelax to enable/disable linker relaxation.

2. Define shouldForceRelocation to preserve relocation types even if the fixup
   can be resolved when linker relaxation enabled. This is necessary for
   correctness as offsets may change during relaxation.

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

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

6 years ago[NFC] Add const to method signature
Max Kazantsev [Tue, 15 May 2018 01:21:56 +0000 (01:21 +0000)]
[NFC] Add const to method signature

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

6 years agoFix debug build by adding missing dependencies on libBinaryFormat
Sam Clegg [Tue, 15 May 2018 00:46:43 +0000 (00:46 +0000)]
Fix debug build by adding missing dependencies on libBinaryFormat

Debug BUILD_SHARED_LIBS build was broken by rL332305

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

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

6 years ago[Debugify] Add -debugify-each for testing each pass in a pipeline
Vedant Kumar [Tue, 15 May 2018 00:29:27 +0000 (00:29 +0000)]
[Debugify] Add -debugify-each for testing each pass in a pipeline

This adds a -debugify-each mode to opt which, when enabled, wraps each
{Module,Function}Pass in a pipeline with logic to add, check, and strip
synthetic debug info for testing purposes.

This mode can be used to test complex pipelines for debug info bugs, or
to collect statistics about the number of debug values & locations lost
throughout various stages of a pipeline.

Patch by Son Tuan Vu!

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

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

6 years ago[CommandLine] Error message for incorrect PositionalEatArgs usage
Keno Fischer [Mon, 14 May 2018 23:26:06 +0000 (23:26 +0000)]
[CommandLine] Error message for incorrect PositionalEatArgs usage

Summary:
bugpoint has several options specified as `PositionalEatArgs` to pass
options through to the underlying tool, e.g. `-tool-args`. The `-help`
message suggests the usage is: `-tool-args=<string>`. However, this is
misleading, because that's not how these arguments work. Rather than taking
a value, the option consumes all positional arguments until the next
recognized option (or all arguments if `--` is specified at some point).
To make this slightly clearer, instead print the help as:
```
  -tool-args <string>...                            - <tool arguments>...
```
Additionally, add an error if the user attempts to use a `PositionalEatArgs`
argument with a value, instead of silently ignoring it. Example:
```
./bin/bugpoint -tool-args=-mpcu=skylake-avx512
bugpoint: for the -tool-args option: This argument does not take a value.
    Instead, it consumes any positional arguments until the next recognized option.
```

Reviewed By: aprantl
Differential Revision: https://reviews.llvm.org/D46787

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

6 years ago[WebAssembly] Move toString helpers to BinaryFormat
Sam Clegg [Mon, 14 May 2018 22:42:07 +0000 (22:42 +0000)]
[WebAssembly] Move toString helpers to BinaryFormat

Subscribers: dschuff, mgorny, jgravelle-google, aheejin, sunfish, llvm-commits

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

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

6 years agoRevert "[Option] Fix PR37006 prefix choice in findNearest"
Brian Gesiak [Mon, 14 May 2018 22:36:47 +0000 (22:36 +0000)]
Revert "[Option] Fix PR37006 prefix choice in findNearest"

Summary:
This revision causes build failures in PS4 and ppc64le buildbots (for example,
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/29988).
I'll revert for now and try to diagnose the issue.

Test Plan: check-llvm check-clang

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

6 years ago[InstCombine] fix crash due to ignored addrspacecast
Keno Fischer [Mon, 14 May 2018 22:05:01 +0000 (22:05 +0000)]
[InstCombine] fix crash due to ignored addrspacecast

Summary:
Part of the InstCombine code for simplifying GEPs looks through
addrspacecasts. However, this was done by updating a variable
also used by the next transformation, for marking GEPs as
inbounds. This led to replacing a GEP with a similar instruction
in a different addrspace, which caused an assertion failure in RAUW.

This caused julia issue https://github.com/JuliaLang/julia/issues/27055

Patch by Jeff Bezanson <jeff@juliacomputing.com>

Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D46722

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

6 years ago[AArch64] enhance test to show FMF loss; NFC
Sanjay Patel [Mon, 14 May 2018 21:53:21 +0000 (21:53 +0000)]
[AArch64] enhance test to show FMF loss; NFC

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

6 years ago[Option] Fix PR37006 prefix choice in findNearest
Brian Gesiak [Mon, 14 May 2018 21:35:00 +0000 (21:35 +0000)]
[Option] Fix PR37006 prefix choice in findNearest

Summary:
In https://bugs.llvm.org/show_bug.cgi?id=37006 Nico Weber points out a
flaw in `OptTable::findNearest`: if an option "foo"'s prefixes are "--"
and "-", then the nearest option for "--fob" will be "-foo". This is
incorrect, however, since the function is expected to return "--foo".

The bug is due to a naive loop that attempts to predetermines which
prefix is best. Instead, compute the edit distance for each prefix/name
pair.

Test Plan: `check-llvm`

Reviewers: thakis

Reviewed By: thakis

Subscribers: llvm-commits

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

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

6 years ago[ARM] Back up R4 and LR if calling the stack probe function
Martin Storsjo [Mon, 14 May 2018 21:32:52 +0000 (21:32 +0000)]
[ARM] Back up R4 and LR if calling the stack probe function

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

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

6 years ago[llvm-rc] Add missing inputs for tag-icon-cursor.test.
Martin Storsjo [Mon, 14 May 2018 21:32:47 +0000 (21:32 +0000)]
[llvm-rc] Add missing inputs for tag-icon-cursor.test.

This adds the missing input files used for this test, except for
the separate input files for specific error cases; matching
test input files were provided by Nico Weber.

The extra copying of files into the %t directory doesn't seem to
be necessary since that directory only ever is used for output here,
not for inputs.

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

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

6 years ago[CodeView] Improve debugging of virtual base class member variables
Brock Wyma [Mon, 14 May 2018 21:21:22 +0000 (21:21 +0000)]
[CodeView] Improve debugging of virtual base class member variables

Initial support for passing the virtual base pointer offset to CodeViewDebug.

https://reviews.llvm.org/D46271

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

6 years ago[PowerPC] add more tests for FMF propagation; NFC
Sanjay Patel [Mon, 14 May 2018 21:17:49 +0000 (21:17 +0000)]
[PowerPC] add more tests for FMF propagation; NFC

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

6 years ago[Hexagon] Add a target feature to control using small data section
Krzysztof Parzyszek [Mon, 14 May 2018 21:01:56 +0000 (21:01 +0000)]
[Hexagon] Add a target feature to control using small data section

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

6 years ago[Hexagon] Add a target feature for generating new-value stores
Krzysztof Parzyszek [Mon, 14 May 2018 20:41:04 +0000 (20:41 +0000)]
[Hexagon] Add a target feature for generating new-value stores

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

6 years ago[DWARF] Factor out a DWARFUnitHeader class. NFC
Paul Robinson [Mon, 14 May 2018 20:32:31 +0000 (20:32 +0000)]
[DWARF] Factor out a DWARFUnitHeader class. NFC

Extract information related to a "unit header" from DWARFUnit into a
new DWARFUnitHeader class, and add a DWARFUnit member for the header.
This is one step in the direction of allowing type units in the
.debug_info section for DWARF v5.

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

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

6 years ago[Hexagon] Add a target feature for memop generation
Krzysztof Parzyszek [Mon, 14 May 2018 20:09:07 +0000 (20:09 +0000)]
[Hexagon] Add a target feature for memop generation

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

6 years agoHexagon: Put relocations after instructions not packets.
Sid Manning [Mon, 14 May 2018 19:46:08 +0000 (19:46 +0000)]
Hexagon: Put relocations after instructions not packets.

Change relocation output so that relocation information follows
individual instructions rather than clustering them at the end
of packets.

This change required shifting block of code but the actual change
is in HexagonPrettyPrinter's PrintInst.

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

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

6 years agoInline a few CMake variables into their only uses.
Nico Weber [Mon, 14 May 2018 19:23:31 +0000 (19:23 +0000)]
Inline a few CMake variables into their only uses.

No behavior change. Makes unittests CMakeLists.txt files more self-consistent.

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

6 years agoRemove a workaround that should be unneeded after r202806.
Nico Weber [Mon, 14 May 2018 19:13:23 +0000 (19:13 +0000)]
Remove a workaround that should be unneeded after r202806.

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

6 years ago[X86] Add NT load/store scheduler classes
Simon Pilgrim [Mon, 14 May 2018 18:37:19 +0000 (18:37 +0000)]
[X86] Add NT load/store scheduler classes

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

6 years agoalphabetize list
Nico Weber [Mon, 14 May 2018 18:23:05 +0000 (18:23 +0000)]
alphabetize list

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

6 years ago[X86] Remove and autoupgrade avx512.vbroadcast.ss/avx512.vbroadcast.sd intrinsics.
Craig Topper [Mon, 14 May 2018 18:21:22 +0000 (18:21 +0000)]
[X86] Remove and autoupgrade avx512.vbroadcast.ss/avx512.vbroadcast.sd intrinsics.

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

6 years ago[llvm-mca][X86] Add missing SSE4A test file
Simon Pilgrim [Mon, 14 May 2018 18:20:40 +0000 (18:20 +0000)]
[llvm-mca][X86] Add missing SSE4A test file

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

6 years ago[X86][BtVer2] Fix MMX/YMM integer vector nt store schedules
Simon Pilgrim [Mon, 14 May 2018 18:07:28 +0000 (18:07 +0000)]
[X86][BtVer2] Fix MMX/YMM integer vector nt store schedules

MMX was missing and YMM was tagged as a fp nt store

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

6 years ago[X86] Remove GCCBuiltin from the intrinsics that clang stopped using in r332266.
Craig Topper [Mon, 14 May 2018 18:02:21 +0000 (18:02 +0000)]
[X86] Remove GCCBuiltin from the intrinsics that clang stopped using in r332266.

Add a FIXME for their eventual removal.

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

6 years ago[BranchFolding] Allow hoisting to block with a single conditional branch.
Geoff Berry [Mon, 14 May 2018 17:31:18 +0000 (17:31 +0000)]
[BranchFolding] Allow hoisting to block with a single conditional branch.

Summary:
The BranchFolding pass is currently missing opportunities to hoist
common code if the hoisted-to block contains a single conditional branch
that has register uses.  This occurs somewhat frequently on AArch64 with
CBZ/TBZ opcodes.

This change also eliminates some code differences when debug info is
present since the presence of e.g. DBG_VALUE instructions in the
hoisted-to block can enable hoisting that wouldn't have occurred without
them.

Reviewers: MatzeB, rnk, kparzysz, twoh, aprantl, javed.absar

Subscribers: kristof.beyls, JDevlieghere, mcrosier, llvm-commits

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

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

6 years ago[llvm-mca][x86] Add scalar nt-store instruction tests
Simon Pilgrim [Mon, 14 May 2018 17:10:33 +0000 (17:10 +0000)]
[llvm-mca][x86] Add scalar nt-store instruction tests

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

6 years ago[Hexagon] Avoid predicate copies to integer registers from store-locked
Krzysztof Parzyszek [Mon, 14 May 2018 16:41:40 +0000 (16:41 +0000)]
[Hexagon] Avoid predicate copies to integer registers from store-locked

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

6 years ago[mips] Fix the predicates of round, ceiling, floor and trunc.
Simon Dardis [Mon, 14 May 2018 16:26:50 +0000 (16:26 +0000)]
[mips] Fix the predicates of round, ceiling, floor and trunc.

Reviewers: atanasyan, abeserminji, smaksimovic

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

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

6 years ago[llvm-mca][x86] Add and/not/or/xor instruction tests
Simon Pilgrim [Mon, 14 May 2018 16:26:24 +0000 (16:26 +0000)]
[llvm-mca][x86] Add and/not/or/xor instruction tests

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

6 years ago[NFC] [Power] Fix instruction format for xsrqpi
Zaara Syeda [Mon, 14 May 2018 15:45:15 +0000 (15:45 +0000)]
[NFC] [Power] Fix instruction format for xsrqpi

xsrqpi is currently using Z23Form_1.
The instruction format is xsrqpi R,VRT,VRB,RMC.
Rathar than bits 11-15 being used for FRA, it should have
bits 11-14 reserved and bit 15 for R. This patch adds a new
class Z23Form_4 to fix the instruction format.

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

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

6 years ago[AArch64] Improve single vector lane stores
Evandro Menezes [Mon, 14 May 2018 15:26:35 +0000 (15:26 +0000)]
[AArch64] Improve single vector lane stores

When storing the 0th lane of a vector, use a simpler and usually more efficient scalar store instead.

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

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

6 years ago[llvm-mca] Improved support for dependency-breaking instructions.
Andrea Di Biagio [Mon, 14 May 2018 15:08:22 +0000 (15:08 +0000)]
[llvm-mca] Improved support for dependency-breaking instructions.

The tool assumes that a zero-latency instruction that doesn't consume hardware
resources is an optimizable dependency-breaking instruction. That means, it
doesn't have to wait on register input operands, and it doesn't consume any
physical register. The PRF knows how to optimize it at register renaming stage.

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

6 years ago[CodeGen/AccelTable]: Handle -dwarf-linkage-names=Abstract correctly
Pavel Labath [Mon, 14 May 2018 14:13:20 +0000 (14:13 +0000)]
[CodeGen/AccelTable]: Handle -dwarf-linkage-names=Abstract correctly

Summary:
If we are not emitting a linkage name in the .debug_info sections, we
should not add it into the index either. This makes sure our index is
consistent with the actual debug info.

I am also explicitly setting the --dwarf-linkage-names=All in the
name-collsions test as that one would now fail on targets where this
defaults to "Abstract" (in fact, it would have failed already if there
wasn't a bug in the DWARF verifier, which I fix as well).

Reviewers: probinson, aprantl, JDevlieghere

Subscribers: llvm-commits

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

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

6 years agoDocs: Fix the title underline too short.
Nicola Zaghen [Mon, 14 May 2018 13:54:39 +0000 (13:54 +0000)]
Docs: Fix the title underline too short.

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

6 years ago[AggressiveInstCombine] avoid crashing on unsimplified code (PR37446)
Sanjay Patel [Mon, 14 May 2018 13:43:32 +0000 (13:43 +0000)]
[AggressiveInstCombine] avoid crashing on unsimplified code (PR37446)

This bug:
https://bugs.llvm.org/show_bug.cgi?id=37446
...raises another question: why do we run aggressive-instcombine before
regular instcombine?

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

6 years ago[mips] Add missing test case from r332227
Simon Dardis [Mon, 14 May 2018 13:18:51 +0000 (13:18 +0000)]
[mips] Add missing test case from r332227

I did not commit this test from D46689.

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

6 years agoRename DEBUG macro to LLVM_DEBUG.
Nicola Zaghen [Mon, 14 May 2018 12:53:11 +0000 (12:53 +0000)]
Rename DEBUG macro to LLVM_DEBUG.

The DEBUG() macro is very generic so it might clash with other projects.
The renaming was done as follows:
- git grep -l 'DEBUG' | xargs sed -i 's/\bDEBUG\s\?(/LLVM_DEBUG(/g'
- git diff -U0 master | ../clang/tools/clang-format/clang-format-diff.py -i -p1 -style LLVM
- Manual change to APInt
- Manually chage DOCS as regex doesn't match it.

In the transition period the DEBUG() macro is still present and aliased
to the LLVM_DEBUG() one.

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

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

6 years agoFix Wdocumentation warnings. NFCI.
Simon Pilgrim [Mon, 14 May 2018 12:22:30 +0000 (12:22 +0000)]
Fix Wdocumentation warnings. NFCI.

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

6 years agoFix "not all control paths return a value" MSVC warning. NFCI.
Simon Pilgrim [Mon, 14 May 2018 12:20:19 +0000 (12:20 +0000)]
Fix "not all control paths return a value" MSVC warning. NFCI.

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

6 years agoRe-land r332230 "[llvm-exegesis]Fix a warning in r332221"
Clement Courbet [Mon, 14 May 2018 12:00:35 +0000 (12:00 +0000)]
Re-land r332230 "[llvm-exegesis]Fix a warning in r332221"

comparison of integers of different signs: 'const unsigned long' and 'const int' [-Werror,-Wsign-compare]

unittests/tools/llvm-exegesis/BenchmarkResultTest.cpp:60:5: note: in instantiation of function template specialization 'testing::internal::EqHelper<false>::Compare<unsigned long, int>' requested here
    ASSERT_EQ(FromDiskVector.size(), 1);

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

6 years ago[AArch64][SVE] Extend parsing of Prefetch operation for SVE.
Sander de Smalen [Mon, 14 May 2018 11:54:41 +0000 (11:54 +0000)]
[AArch64][SVE] Extend parsing of Prefetch operation for SVE.

Reviewers: rengolin, fhahn, samparker, SjoerdMeijer, javed.absar

Reviewed By: fhahn

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

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

6 years ago[llvm-exegesis] Revert accidentally commited code.
Clement Courbet [Mon, 14 May 2018 11:35:37 +0000 (11:35 +0000)]
[llvm-exegesis] Revert accidentally commited code.

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

6 years ago[llvm-exegesis] Fix a warning in r332221
Clement Courbet [Mon, 14 May 2018 11:31:02 +0000 (11:31 +0000)]
[llvm-exegesis] Fix a warning in r332221

comparison of integers of different signs: 'const unsigned long' and 'const int' [-Werror,-Wsign-compare]

unittests/tools/llvm-exegesis/BenchmarkResultTest.cpp:60:5: note: in instantiation of function template specialization 'testing::internal::EqHelper<false>::Compare<unsigned long, int>' requested here
    ASSERT_EQ(FromDiskVector.size(), 1);

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

6 years ago[llvm-exegesis] Add an analysis mode.
Clement Courbet [Mon, 14 May 2018 11:30:56 +0000 (11:30 +0000)]
[llvm-exegesis] Add an analysis mode.

The analysis mode gives the user a clustered view of the measurement results and
highlights any inconsistencies with the checked-in data.

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

6 years ago[mips] Correct the predicates of indexed floating point stores and loads.
Simon Dardis [Mon, 14 May 2018 10:53:15 +0000 (10:53 +0000)]
[mips] Correct the predicates of indexed floating point stores and loads.

Also, fix the register class for microMIPS.

Reviewers: atanasyan, abeserminji, smaksimovic

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

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

6 years ago[llvm-exegesis] Allow lists of BenchmarkResults to be parsed as std::vector<Benchmark...
Clement Courbet [Mon, 14 May 2018 09:01:22 +0000 (09:01 +0000)]
[llvm-exegesis] Allow lists of BenchmarkResults to be parsed as std::vector<BenchmarkResult>.

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

6 years agoTest commit access.
Nicola Zaghen [Mon, 14 May 2018 08:24:29 +0000 (08:24 +0000)]
Test commit access.

Remove trailing whitespace.

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

6 years ago[LLVM-C] Add Bindings For Module Flags
Robert Widmann [Mon, 14 May 2018 08:09:00 +0000 (08:09 +0000)]
[LLVM-C] Add Bindings For Module Flags

Summary:
The first foray into merging debug info into the echo tests.

- Add bindings to Module::getModuleFlagsMetadata() in the form of LLVMCopyModuleFlagsMetadata
- Add the opaque type LLVMModuleFlagEntry to represent Module::ModuleFlagEntry
- Add accessors for LLVMModuleFlagEntry's behavior, key, and metadata node.

Reviewers: whitequark, deadalnix

Reviewed By: whitequark

Subscribers: aprantl, JDevlieghere, llvm-commits, harlanhaskins

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

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

6 years ago[llvm-ar] Make PositionalArgs static.
Fangrui Song [Mon, 14 May 2018 05:56:48 +0000 (05:56 +0000)]
[llvm-ar] Make PositionalArgs static.

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

6 years agoCorrect compatibility with the GNU Assembler's handling of comparison ops
Bill Wendling [Mon, 14 May 2018 05:25:36 +0000 (05:25 +0000)]
Correct compatibility with the GNU Assembler's handling of comparison ops

GAS returns -1 for a comparison operator if the result is true and 0 if false.

  https://www.sourceware.org/binutils/docs-2.12/as.info/Infix-Ops.html#Infix%20Ops

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

6 years ago[X86] Add fast isel test cases for the clang output for 512-bit cvtps2pd related...
Craig Topper [Mon, 14 May 2018 05:09:41 +0000 (05:09 +0000)]
[X86] Add fast isel test cases for the clang output for 512-bit cvtps2pd related intrinsics.

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

6 years ago[X86] Cleanup a multiclass that doesn't need as many parameters after recent intrinsi...
Craig Topper [Mon, 14 May 2018 00:17:52 +0000 (00:17 +0000)]
[X86] Cleanup a multiclass that doesn't need as many parameters after recent intrinsic removals.

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

6 years ago[X86] Remove and autoupgrade the cvtusi2sd intrinsic. Use uitofp+insertelement instead.
Craig Topper [Mon, 14 May 2018 00:06:49 +0000 (00:06 +0000)]
[X86] Remove and autoupgrade the cvtusi2sd intrinsic. Use uitofp+insertelement instead.

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

6 years ago[X86] Add patterns for combining movss+uint_to_fp into the intrinsic instructions...
Craig Topper [Sun, 13 May 2018 23:24:21 +0000 (23:24 +0000)]
[X86] Add patterns for combining movss+uint_to_fp into the intrinsic instructions under AVX512.

This matches what we do for sint_to_fp.

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

6 years ago[X86] Add fast-isel test cases for _mm_cvtu32_sd, _mm_cvtu64_sd, _mm_cvtu32_ss, and...
Craig Topper [Sun, 13 May 2018 23:24:19 +0000 (23:24 +0000)]
[X86] Add fast-isel test cases for _mm_cvtu32_sd, _mm_cvtu64_sd, _mm_cvtu32_ss, and _mm_cvtu64_ss.

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

6 years ago[X86] Extend instcombine folds for pclmuldq intrinsics to the 256 and 512 bit version.
Craig Topper [Sun, 13 May 2018 21:56:32 +0000 (21:56 +0000)]
[X86] Extend instcombine folds for pclmuldq intrinsics to the 256 and 512 bit version.

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

6 years ago[X86] Add missing test for the InstCombines of pclmulqdq.
Craig Topper [Sun, 13 May 2018 18:26:06 +0000 (18:26 +0000)]
[X86] Add missing test for the InstCombines of pclmulqdq.

Apparently this test was lost when r293151 was committed. It was present in the review, but not the commit.

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