platform/upstream/llvm.git
6 years ago[mips] Fix the predicates of some aliases
Simon Dardis [Tue, 19 Jun 2018 15:25:01 +0000 (15:25 +0000)]
[mips] Fix the predicates of some aliases

Previously, some aliases were marked as not being available for microMIPS32R6,
but this was overridden at the top level.

Reviewers: atanasyan, abeserminji, smaksimovic

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

llvm-svn: 335053

6 years agoReplace HostInfo::GetLLDBPath with specific functions
Pavel Labath [Tue, 19 Jun 2018 15:09:07 +0000 (15:09 +0000)]
Replace HostInfo::GetLLDBPath with specific functions

Summary:
Instead of a function taking an enum value determining which path to
return, we now have a suite of functions, each returning a single path
kind. This makes it easy to move the python-path function into a
specific plugin in a follow-up commit.

All the users of GetLLDBPath were converted to call specific functions
instead. Most of them were hard-coding the enum value anyway, so this
conversion was simple. The only exception was SBHostOS, which I've
changed to use a switch on the incoming enum value.

Reviewers: clayborg, zturner

Subscribers: lldb-commits

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

llvm-svn: 335052

6 years agoMake TestCommandScript.py NO_DEBUG_INFO_TESTCASE
Pavel Labath [Tue, 19 Jun 2018 15:07:22 +0000 (15:07 +0000)]
Make TestCommandScript.py NO_DEBUG_INFO_TESTCASE

llvm-svn: 335051

6 years agoImplement semantic checking for __builtin_signbit.
Aaron Ballman [Tue, 19 Jun 2018 14:59:11 +0000 (14:59 +0000)]
Implement semantic checking for __builtin_signbit.

r242675 changed the signature for the signbit builtin but did not introduce proper semantic checking to ensure the arguments are as-expected. This patch groups the signbit builtin along with the other fp classification builtins. Fixes PR28172.

llvm-svn: 335050

6 years agoReverting due to line ending changes; will reapply after addressing that.
Aaron Ballman [Tue, 19 Jun 2018 14:53:20 +0000 (14:53 +0000)]
Reverting due to line ending changes; will reapply after addressing that.

llvm-svn: 335049

6 years agoImplement semantic checking for __builtin_signbit.
Aaron Ballman [Tue, 19 Jun 2018 14:36:04 +0000 (14:36 +0000)]
Implement semantic checking for __builtin_signbit.

r242675 changed the signature for the signbit builtin but did not introduce proper semantic checking to ensure the arguments are as-expected. This patch groups the signbit builtin along with the other fp classification builtins. Fixes PR28172.

llvm-svn: 335048

6 years agoAttempt to fix windows build broken by r334968
Pavel Labath [Tue, 19 Jun 2018 14:23:31 +0000 (14:23 +0000)]
Attempt to fix windows build broken by r334968

The issue was that there was no dependency from lldb-suite target to liblldb in
the no-framework scenario. This caused the finish-swig target to be executed
prematurely and fail (because it cannot copy liblldb to the python folder). On
other platforms this did not matter because there just creates a symlink.

The extra lldb-suite -> liblldb edge should fix this. Technically, I could add
this just to the !framework case as the framework target will take care of the
transitive dep, but it seemed more clear to make the dep unconditional.

llvm-svn: 335047

6 years ago[OpenMP] [CUDA] Expose teamid to the debug path
Guansong Zhang [Tue, 19 Jun 2018 14:05:38 +0000 (14:05 +0000)]
[OpenMP] [CUDA] Expose teamid to the debug path

Summary: Small bug fix for debug build. A previous fix causing trouble for debug build.

Reviewers: grokos

Reviewed By: grokos

Subscribers: openmp-commits

Tags: #openmp

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

llvm-svn: 335046

6 years ago[SLPVectorizer] Remove default OperandValueKind arguments from getArithmeticInstrCost...
Simon Pilgrim [Tue, 19 Jun 2018 13:40:00 +0000 (13:40 +0000)]
[SLPVectorizer] Remove default OperandValueKind arguments from getArithmeticInstrCost calls (NFC)

The getArithmeticInstrCost calls for shuffle vectors entry costs specify TargetTransformInfo::OperandValueKind arguments, but are just using the method's default values. This seems to be a copy + paste issue and doesn't affect the costs in anyway. The TargetTransformInfo::OperandValueProperties default arguments are already not being used.

Noticed while working on D47985.

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

llvm-svn: 335045

6 years ago[PowerPC] Fix label address calculation for ppc32
Strahinja Petrovic [Tue, 19 Jun 2018 13:07:40 +0000 (13:07 +0000)]
[PowerPC] Fix label address calculation for ppc32

This patch fixes calculating address of label on ppc32 (for -fPIC).

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

llvm-svn: 335043

6 years agollvm-exegesis: mark ~ExegesisTarget() as virtual. Fixes build.
Roman Lebedev [Tue, 19 Jun 2018 11:58:10 +0000 (11:58 +0000)]
llvm-exegesis: mark ~ExegesisTarget() as virtual. Fixes build.

/build/llvm/tools/llvm-exegesis/lib/X86/../Target.h:32:3: error: 'exegesis::ExegesisTarget' has virtual functions but non-virtual destructor [-Werror,-Wnon-virtual-dtor]
  ~ExegesisTarget();
  ^
/build/llvm/tools/llvm-exegesis/lib/X86/Target.cpp:15:7: error: 'exegesis::(anonymous namespace)::ExegesisX86Target' has virtual functions but non-virtual destructor [-Werror,-Wnon-virtual-dtor]
class ExegesisX86Target : public ExegesisTarget {
      ^

llvm-svn: 335042

6 years agoRe-land r335038 "[llvm-exegesis] A mechanism to add target-specific functionality.""
Clement Courbet [Tue, 19 Jun 2018 11:28:59 +0000 (11:28 +0000)]
Re-land r335038 "[llvm-exegesis] A mechanism to add target-specific functionality.""

Fix typo: LLVM_NATIVE_ARCH -> LLVM_EXEGESIS_NATIVE_ARCH.

llvm-svn: 335041

6 years agoRevert r335038 "[llvm-exegesis] A mechanism to add target-specific functionality."
Clement Courbet [Tue, 19 Jun 2018 10:54:12 +0000 (10:54 +0000)]
Revert r335038 "[llvm-exegesis] A mechanism to add target-specific functionality."

Breaks buildbots.

llvm-svn: 335040

6 years ago[InstCombine] Replacing X86-specific rounding intrinsics with generic floor-ceil
Mikhail Dvoretckii [Tue, 19 Jun 2018 10:49:12 +0000 (10:49 +0000)]
[InstCombine] Replacing X86-specific rounding intrinsics with generic floor-ceil

This patch replaces calls to X86-specific intrinsics with floor-ceil semantics
with calls to target-independent @llvm.floor.* and @llvm.ceil.* intrinsics. This
doesn't affect the resulting machine code, as those intrinsics are lowered to
the same instructions, but exposes these specific rounding cases to generic
optimizations.

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

llvm-svn: 335039

6 years ago[llvm-exegesis] A mechanism to add target-specific functionality.
Clement Courbet [Tue, 19 Jun 2018 10:39:50 +0000 (10:39 +0000)]
[llvm-exegesis] A mechanism to add target-specific functionality.

Summary: This is a step towards implementing memory operands and X87.

Reviewers: gchatelet

Subscribers: mgorny, tschuett, llvm-commits

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

llvm-svn: 335038

6 years ago[X86] VRNDSCALE* folding from masked and scalar ffloor and fceil patterns
Mikhail Dvoretckii [Tue, 19 Jun 2018 10:37:52 +0000 (10:37 +0000)]
[X86] VRNDSCALE* folding from masked and scalar ffloor and fceil patterns

This patch handles back-end folding of generic patterns created by lowering the
X86 rounding intrinsics to native IR in cases where the instruction isn't a
straightforward packed values rounding operation, but a masked operation or a
scalar operation.

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

llvm-svn: 335037

6 years ago[LoopSimplifyCFG] Invalidate SCEV in LoopSimplifyCFG
David Green [Tue, 19 Jun 2018 09:43:36 +0000 (09:43 +0000)]
[LoopSimplifyCFG] Invalidate SCEV in LoopSimplifyCFG

LoopSimplifyCFG, being a loop pass, needs to preserve scalar
evolution. This invalidates SE for the loops altered during
block merging.

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

llvm-svn: 335036

6 years ago[clangd] Use workspace root path as hint path for resolving URIs in workspace/symbol
Eric Liu [Tue, 19 Jun 2018 09:33:53 +0000 (09:33 +0000)]
[clangd] Use workspace root path as hint path for resolving URIs in workspace/symbol

Summary:
Some URI schemes require a hint path to be provided, and workspace root
path seems to be a good fit.

Reviewers: sammccall, malaperle

Reviewed By: sammccall

Subscribers: ilya-biryukov, MaskRay, jkorous, cfe-commits

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

llvm-svn: 335035

6 years ago[MCA][NFC] Add generic XOP resource tests
Roman Lebedev [Tue, 19 Jun 2018 09:21:27 +0000 (09:21 +0000)]
[MCA][NFC] Add generic XOP resource tests

Summary:
Based on
* [[ https://support.amd.com/TechDocs/43479.pdf | AMD64 Architecture Programmer’s Manual Volume 6: 128-Bit and 256-Bit XOP and FMA4 Instructions ]],
* [[ https://support.amd.com/TechDocs/24594.pdf | AMD64 Architecture Programmer’s Manual Volume 3: General-Purpose and System Instructions]],
* https://en.wikipedia.org/wiki/XOP_instruction_set

Appears to be only supported in AMD's 15h generation, so only in b**d**ver[1-4],
for which currently llvm has no scheduling profiles.

Reviewers: RKSimon, craig.topper, andreadb, spatel

Reviewed By: RKSimon

Subscribers: gbedwell, llvm-commits

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

llvm-svn: 335034

6 years ago[MCA][NFC] Add generic TBM resource tests
Roman Lebedev [Tue, 19 Jun 2018 09:21:22 +0000 (09:21 +0000)]
[MCA][NFC] Add generic TBM resource tests

Summary:
Based on https://support.amd.com/TechDocs/24594.pdf,
https://en.wikipedia.org/wiki/Bit_Manipulation_Instruction_Sets#TBM_(Trailing_Bit_Manipulation)

Appears to be only supported in AMD's 15h generation, so only in b**d**ver[1-4],
for which currently llvm has no scheduling profiles.

Reviewers: RKSimon, craig.topper, simark, andreadb

Reviewed By: RKSimon

Subscribers: gbedwell, llvm-commits

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

llvm-svn: 335033

6 years ago[SLPVectorizer] Pull out AltOpcode determination from reorderAltShuffleOperands.
Simon Pilgrim [Tue, 19 Jun 2018 09:16:06 +0000 (09:16 +0000)]
[SLPVectorizer] Pull out AltOpcode determination from reorderAltShuffleOperands.

Minor step towards making the alternate opcode system work with a wider range of opcode pairs.

llvm-svn: 335032

6 years agoRemove valueCoversEntireFragment asserts in ConvertDebugDeclareToDebugValue
Bjorn Pettersson [Tue, 19 Jun 2018 08:41:34 +0000 (08:41 +0000)]
Remove valueCoversEntireFragment asserts in ConvertDebugDeclareToDebugValue

This is a fixup for r334830 causing problems in polly-aosp buildbot.

Focus in r334830 was to fix a problem seen with
ConvertDebugDeclareToDebugValue involving store instructions.
It also added some asserts to find out of similar problems
existed for the ConvertDebugDeclareToDebugValue functions
involving load and phi instructions. One of those asserts seems
to blow in the polly-aosp buildbot, so I'll revert the asserts
while debugging.

llvm-svn: 335031

6 years ago[analyzer] Made a buildbot happy.
Kristof Umann [Tue, 19 Jun 2018 08:35:02 +0000 (08:35 +0000)]
[analyzer] Made a buildbot happy.

Since `isPrimitiveType` was only used in an assert, a builbot with `-Werror`
and no asserts enabled failed to build it as it was unused.

llvm-svn: 335030

6 years agoMove ScopInfo to isl++
Tobias Grosser [Tue, 19 Jun 2018 08:13:53 +0000 (08:13 +0000)]
Move ScopInfo to isl++

llvm-svn: 335029

6 years agoAdd a factory method to ConstantDataArray that allows to pass in the data as StringRef
Adrian Kuegel [Tue, 19 Jun 2018 08:12:28 +0000 (08:12 +0000)]
Add a factory method to ConstantDataArray that allows to pass in the data as StringRef

This simplifies the case if we already have access to the raw data that we need to store in a ConstantDataArray.
The new factor method can also be reused for implementing the factory method that gets the data as ArrayRef.

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

llvm-svn: 335028

6 years ago[LoopInterchange] Move PHI handling to adjustLoopBranches.
Florian Hahn [Tue, 19 Jun 2018 08:03:24 +0000 (08:03 +0000)]
[LoopInterchange] Move PHI handling to adjustLoopBranches.

This patch moves the logic to handle reduction PHI nodes to the end of
adjustLoopBranches. Reduction PHI nodes in the outer loop header can be
moved to the inner loop header and reduction PHI nodes from the inner loop
header can be moved to the outer loop header. In the latter situation,
we have to deal with 1 kind of PHI nodes:

    PHI nodes that are part of inner loop-only reductions.

We can replace the PHI node with the value coming from outside
the inner loop.

Reviewers: mcrosier, efriedma, karthikthecool

Reviewed By: efriedma

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

llvm-svn: 335027

6 years agoTest commit.
Mikhail Dvoretckii [Tue, 19 Jun 2018 07:55:10 +0000 (07:55 +0000)]
Test commit.

llvm-svn: 335026

6 years ago[XRay] rm GLOB || true -> rm -f
Fangrui Song [Tue, 19 Jun 2018 07:11:33 +0000 (07:11 +0000)]
[XRay] rm GLOB || true -> rm -f

Summary: `rm -f` does not write diagnostic message when there is no file argument.

Reviewers: dberris

Subscribers: delcypher, llvm-commits, #sanitizers

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

llvm-svn: 335025

6 years agoIf the arch is P9, we will select the DFLOADf32/DFLOADf64 pseudo instruction when...
QingShan Zhang [Tue, 19 Jun 2018 06:54:51 +0000 (06:54 +0000)]
If the arch is P9, we will select the DFLOADf32/DFLOADf64 pseudo instruction when we are loading a floating,
and expand it post RA basing on the register pressure. However, we miss to do the add-imm peephole for these pseudo instruction.

Differential Revision: https://reviews.llvm.org/D47568
Reviewed By: Nemanjai

llvm-svn: 335024

6 years ago[RISCV] Add tests for overflow intrinsics
Roger Ferrer Ibanez [Tue, 19 Jun 2018 06:45:47 +0000 (06:45 +0000)]
[RISCV] Add tests for overflow intrinsics

This is using the existing codegen so we can see the change once we custom
lower ISD::{U,S}{ADD,SUB}O nodes.

llvm-svn: 335023

6 years agoRevert r335019 "Update NRVO logic to support early return (Attempt 2)"
Taiju Tsuiki [Tue, 19 Jun 2018 05:35:30 +0000 (05:35 +0000)]
Revert r335019 "Update NRVO logic to support early return (Attempt 2)"

llvm-svn: 335022

6 years ago[Sema] Produce diagnostics for attribute 'trivial_abi' that appears
Akira Hatanaka [Tue, 19 Jun 2018 05:04:44 +0000 (05:04 +0000)]
[Sema] Produce diagnostics for attribute 'trivial_abi' that appears
after the closing brace of a class declaration.

Merge the two call sites of checkIllFormedTrivialABIStruct and sink it
into CheckCompletedCXXClass so that it is called after the attribute has
been attached to the CXXRecordDecl.

rdar://problem/40873297

llvm-svn: 335021

6 years ago[SimplifyIndVars] Eliminate redundant truncs
Max Kazantsev [Tue, 19 Jun 2018 04:48:34 +0000 (04:48 +0000)]
[SimplifyIndVars] Eliminate redundant truncs

This patch adds logic to deal with the following constructions:

  %iv = phi i64 ...
  %trunc = trunc i64 %iv to i32
  %cmp = icmp <pred> i32 %trunc, %invariant

Replacing it with
  %iv = phi i64 ...
  %cmp = icmp <pred> i64 %iv, sext/zext(%invariant)

In case if it is legal. Specifically, if `%iv` has signed comparison users, it is
required that `sext(trunc(%iv)) == %iv`, and if it has unsigned comparison
uses then we require `zext(trunc(%iv)) == %iv`. The current implementation
bails if `%trunc` has other uses than `icmp`, but in theory we can handle more
cases here (e.g. if the user of trunc is bitcast).

Differential Revision: https://reviews.llvm.org/D47928
Reviewed By: reames

llvm-svn: 335020

6 years agoUpdate NRVO logic to support early return (Attempt 2)
Taiju Tsuiki [Tue, 19 Jun 2018 04:39:07 +0000 (04:39 +0000)]
Update NRVO logic to support early return (Attempt 2)

Summary:
This is the second attempt of r333500 (Update NRVO logic to support early return).
The previous one was reverted for a miscompilation for an incorrect NRVO set up on templates such as:
```
struct Foo {};

template <typename T>
T bar() {
  T t;
  if (false)
    return T();
  return t;
}
```

Where, `t` is marked as non-NRVO variable before its instantiation. However, while its instantiation, it's left an NRVO candidate, turned into an NRVO variable later.

Reviewers: rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

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

llvm-svn: 335019

6 years ago[X86] Add the ability to force an EVEX2VEX mapping table entry from the .td files...
Craig Topper [Tue, 19 Jun 2018 04:24:44 +0000 (04:24 +0000)]
[X86] Add the ability to force an EVEX2VEX mapping table entry from the .td files. Remove remaining manual table entries from the tablegen emitter.

This adds an EVEX2VEXOverride string to the X86 instruction class in X86InstrFormats.td. If this field is set it will add manual entry in the EVEX->VEX tables that doesn't check the encoding information.

Then use this mechanism to map VMOVDU/A8/16, 128-bit VALIGN, and VPSHUFF/I instructions to VEX instructions.

Finally, remove the manual table from the emitter.

This has the bonus of fully sorting the autogenerated EVEX->VEX tables by their EVEX instruction enum value. We may be able to use this to do a binary search for the conversion and get rid of the need to create a DenseMap.

llvm-svn: 335018

6 years ago[X86] Add a new VEX_WPrefix encoding to tag EVEX instruction that have VEX.W==1,...
Craig Topper [Tue, 19 Jun 2018 04:24:42 +0000 (04:24 +0000)]
[X86] Add a new VEX_WPrefix encoding to tag EVEX instruction that have VEX.W==1, but can be converted to their VEX equivalent that uses VEX.W==0.

EVEX makes heavy use of the VEX.W bit to indicate 64-bit element vs 32-bit elements. Many of the VEX instructions were split into 2 versions with different masking granularity.

The EVEX->VEX table generate can collapse the two versions if the VEX version uses is tagged as VEX_WIG. But if the VEX version is instead marked VEX.W==0 we can't combine them because we don't know if there is also a VEX version with VEX.W==1.

This patch adds a new VEX_W1X tag that indicates the EVEX instruction encodes with VEX.W==1, but is safe to convert to a VEX instruction with VEX.W==0.

This allows us to remove a bunch of manual EVEX->VEX table entries. We may want to look into splitting up the VEX_WPrefix field which would simplify the disassembler.

llvm-svn: 335017

6 years agoRevert "[SCEV] Add nuw/nsw to mul ops in StrengthenNoWrapFlags"
Sanjoy Das [Tue, 19 Jun 2018 04:09:44 +0000 (04:09 +0000)]
Revert "[SCEV] Add nuw/nsw to mul ops in StrengthenNoWrapFlags"

This reverts r334428.  It incorrectly marks some multiplications as nuw.  Tim
Shen is working on a proper fix.

Original commit message:

[SCEV] Add nuw/nsw to mul ops in StrengthenNoWrapFlags where safe.

Summary:
Previously we would add them for adds, but not multiplies.

llvm-svn: 335016

6 years ago[X86] Simplify the TSFlags checking code in EvexToVexInstPass. NFCI
Craig Topper [Tue, 19 Jun 2018 03:17:46 +0000 (03:17 +0000)]
[X86] Simplify the TSFlags checking code in EvexToVexInstPass. NFCI

The code was previously checking the L2 and L flag on 3 separate lines, treating the combination as an encoding. Instead its better to think of the L2 bit as being something that can't be done with VEX and early returning. Then we just need to check the L bit.

llvm-svn: 335015

6 years agoFix up Info.plist when building LLDB.framework with CMake
Alex Langford [Tue, 19 Jun 2018 02:59:30 +0000 (02:59 +0000)]
Fix up Info.plist when building LLDB.framework with CMake

Summary:
We weren't using the Info.plist template in resources previously.
When using that template, some of the key's values weren't being populated
because some variables were not being defined. In one case, CMake didn't
like the substring expansion syntax of CFBundleIdentifier so I got rid of that.

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

llvm-svn: 335014

6 years agoFix bots after r334981
Francis Visoiu Mistrih [Tue, 19 Jun 2018 02:56:24 +0000 (02:56 +0000)]
Fix bots after r334981

llvm-svn: 335013

6 years ago[WebAssembly] Remove an extra ';' at the end of a namespace
Heejin Ahn [Tue, 19 Jun 2018 01:23:14 +0000 (01:23 +0000)]
[WebAssembly] Remove an extra ';' at the end of a namespace

llvm-svn: 335008

6 years ago[asan] Avoid deadlock when initializing the symbolizer CHECK fails
Reid Kleckner [Tue, 19 Jun 2018 00:36:47 +0000 (00:36 +0000)]
[asan] Avoid deadlock when initializing the symbolizer CHECK fails

llvm-svn: 335007

6 years ago[WebAssembly] Add more utility functions
Heejin Ahn [Tue, 19 Jun 2018 00:32:03 +0000 (00:32 +0000)]
[WebAssembly] Add more utility functions

Summary:
Added more utility functions that will be used in EH-related passes Also
changed `LoopBottom` function to `getBottom` and uses templates to be
able to handle other classes as well, which will be used in CFGSort
later.

Reviewers: dschuff

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

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

llvm-svn: 335006

6 years ago[WebAssembly] Add WasmEHFuncInfo for unwind destination information
Heejin Ahn [Tue, 19 Jun 2018 00:26:39 +0000 (00:26 +0000)]
[WebAssembly] Add WasmEHFuncInfo for unwind destination information

Summary:
Add WasmEHFuncInfo and routines to calculate and fill in this struct to
keep track of unwind destination information. This will be used in
other EH related passes.

Reviewers: dschuff

Subscribers: sbc100, jgravelle-google, sunfish, chrib, llvm-commits

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

llvm-svn: 335005

6 years ago[ARM] Thumb2 constant cmp testcases.
Eli Friedman [Tue, 19 Jun 2018 00:14:10 +0000 (00:14 +0000)]
[ARM] Thumb2 constant cmp testcases.

Shows some missed optimizations for the -7929856 and -2166 testcases.
-7929856 is due to a bug in ARMTargetLowering::getARMCmp, I think;
the -2166 case is a missing pattern.

llvm-svn: 335004

6 years ago[ARM] Testcase for Thumb1 cmp with constants.
Eli Friedman [Tue, 19 Jun 2018 00:12:13 +0000 (00:12 +0000)]
[ARM] Testcase for Thumb1 cmp with constants.

Even if a comparison isn't legal, we should try to prefer constants
which can be materialized with a two-instruction sequence. (Thinking
about it a bit more, there might be some more clever sequence we could
generate for certain comparisons invoving powers of two, but I'm not
sure exactly what that would look like.)

llvm-svn: 335003

6 years ago[ARM] Add Thumb1 coverage for cmn testcases.
Eli Friedman [Tue, 19 Jun 2018 00:09:44 +0000 (00:09 +0000)]
[ARM] Add Thumb1 coverage for cmn testcases.

There's a missed optimization for immediates: we can save two
instructions by using adds instead of movs+mvns+cmp.

llvm-svn: 335002

6 years ago[ARM] Testcase for missed optimization for masking.
Eli Friedman [Tue, 19 Jun 2018 00:08:32 +0000 (00:08 +0000)]
[ARM] Testcase for missed optimization for masking.

When the result of masking is truncated to i16, we should try to use
"bic" instead of "and".

llvm-svn: 335001

6 years ago[ARM] Testcase for missed optimization with i16 compare.
Eli Friedman [Tue, 19 Jun 2018 00:07:30 +0000 (00:07 +0000)]
[ARM] Testcase for missed optimization with i16 compare.

The result looks weird because the DAG actually has an explicit
shift; I haven't figured out why, exactly.

llvm-svn: 335000

6 years ago[WebAssembly] Fixed disassembler unit test failure.
Derek Schuff [Tue, 19 Jun 2018 00:02:34 +0000 (00:02 +0000)]
[WebAssembly] Fixed disassembler unit test failure.

Summary: A recent commit forgot to update the unit tests.

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

Patch by Wouter Van Oortmerssen

llvm-svn: 334999

6 years ago[WebAssembly] Make rethrow instruction take a target BB argument
Heejin Ahn [Mon, 18 Jun 2018 23:54:29 +0000 (23:54 +0000)]
[WebAssembly] Make rethrow instruction take a target BB argument

Summary:
This patch changes the rethrow instruction to take a BB argument in LLVM
backend, like `br` and `br_if`s. This BB is a target catch BB the
rethrow instruction unwinds to. This BB argument will be converted to an
relative depth immediate at the end of CFGStackify pass, as in the same
way of branches.

RETHROW_TO_CALLER is a codegen-only instruction that should be used when
a rethrow instruction does not have an unwind destination BB, i.e., it
should rethrow to its caller function.

Reviewers: dschuff

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

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

llvm-svn: 334998

6 years ago[VPlan] Add Analysis and Core to LLVM_LINK_COMPONENTS
Heejin Ahn [Mon, 18 Jun 2018 23:51:16 +0000 (23:51 +0000)]
[VPlan] Add Analysis and Core to LLVM_LINK_COMPONENTS

Summary: Without these, build with `-DSHARED_LIB=ON` fails.

Reviewers: dschuff

Subscribers: mgorny, bollu, tschuett, rkruppe, rogfer01, llvm-commits

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

llvm-svn: 334997

6 years agoUtilize new SDNode flag functionality to expand current support for fadd
Michael Berg [Mon, 18 Jun 2018 23:44:59 +0000 (23:44 +0000)]
Utilize new SDNode flag functionality to expand current support for fadd

Summary: This patch originated from D46562 and is a proper subset, with some issues addressed.

Reviewers: spatel, hfinkel, wristow, arsenm, javed.absar

Reviewed By: spatel

Subscribers: wdng, nhaehnle

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

llvm-svn: 334996

6 years agoSome NFC changes to how we scan of kexts & kernels in memory in the
Jason Molenda [Mon, 18 Jun 2018 23:30:03 +0000 (23:30 +0000)]
Some NFC changes to how we scan of kexts & kernels in memory in the
DynamicLoaderDarwinKernel plugin.  Created a new function ReadMachHeader
and instead of reading through the target cached memory reader,
start by reading only a mach header sized chunk of memory, then
check it for a valid mach-o magic # and use the size of the load
commands to pre-fetch the entire load commands of the kext which
is the only thing we're going to read, instead of letting the generic
mach-o parser read it in 512 byte chunks.

Functionally this is doing exactly the same thing as before, but by
cutting down on the # of packets going back and forth, even on a
local connection it's close to a quarter faster than it was before.

<rdar://problem/38570146>

llvm-svn: 334995

6 years ago[X86] Remove ReadAfterLd from avx512_shift_rmbi multiclass.
Craig Topper [Mon, 18 Jun 2018 23:20:57 +0000 (23:20 +0000)]
[X86] Remove ReadAfterLd from avx512_shift_rmbi multiclass.

The instructions that use this class don't have another source register. So I think this was just marking one of the address operands as ReadAfterLd?

llvm-svn: 334994

6 years agoRevert "Simplify blockaddress usage before giving up in MergeBlockIntoPredecessor"
Xin Tong [Mon, 18 Jun 2018 23:20:08 +0000 (23:20 +0000)]
Revert "Simplify blockaddress usage before giving up in MergeBlockIntoPredecessor"

This reverts commit f976cf4cca0794267f28b54e468007fd476d37d9.

I am reverting this because it causes break in a few bots and its going
to take me sometime to look at this.

llvm-svn: 334993

6 years agoSimplify blockaddress usage before giving up in MergeBlockIntoPredecessor
Xin Tong [Mon, 18 Jun 2018 22:59:13 +0000 (22:59 +0000)]
Simplify blockaddress usage before giving up in MergeBlockIntoPredecessor

Summary:
Simplify blockaddress usage before giving up in MergeBlockIntoPredecessor

This is a missing small optimization in MergeBlockIntoPredecessor.

This helps with one simplifycfg test which expects this case to be handled.

Reviewers: davide, spatel, brzycki, asbirlea

Subscribers: llvm-commits

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

llvm-svn: 334992

6 years ago[ELF] Uniquify --wrap list.
Fangrui Song [Mon, 18 Jun 2018 22:32:15 +0000 (22:32 +0000)]
[ELF] Uniquify --wrap list.

Summary: For --wrap foo --wrap foo, bfd/gold wrap the symbol only once but LLD would rotate it twice.

Reviewers: ruiu, espindola

Subscribers: emaste, arichardson, mgrang, llvm-commits

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

llvm-svn: 334991

6 years agoTidy comment language and explanation.
Eric Christopher [Mon, 18 Jun 2018 22:21:19 +0000 (22:21 +0000)]
Tidy comment language and explanation.

llvm-svn: 334990

6 years agoPull non-lazy stub table emission into a separate function alongside
Eric Christopher [Mon, 18 Jun 2018 22:21:18 +0000 (22:21 +0000)]
Pull non-lazy stub table emission into a separate function alongside
the individual stub creation to increase readability a bit in the
non-object file format specific function.

llvm-svn: 334989

6 years agoAdd return statements to make it clear that all of these are mutually exclusive condi...
Eric Christopher [Mon, 18 Jun 2018 22:21:13 +0000 (22:21 +0000)]
Add return statements to make it clear that all of these are mutually exclusive conditions.

else if would have worked just as well, but this keeps the original readability a bit more clear.

llvm-svn: 334988

6 years agoTests for dag combine select (binop) -> select. NFC.
Stanislav Mekhanoshin [Mon, 18 Jun 2018 21:49:07 +0000 (21:49 +0000)]
Tests for dag combine select (binop) -> select. NFC.

Tests will be updated with https://reviews.llvm.org/D48223

llvm-svn: 334987

6 years ago[llvm-mca] Cleanup the header syntax line. Fix a comment. NFC.
Matt Davis [Mon, 18 Jun 2018 21:38:38 +0000 (21:38 +0000)]
[llvm-mca] Cleanup the header syntax line. Fix a comment. NFC.

This patch removes a few dashes from the header comment to make room for the syntax line.

llvm-svn: 334986

6 years ago[WebAssembly] Modified tablegen defs to have 2 parallel instuction sets.
Wouter van Oortmerssen [Mon, 18 Jun 2018 21:22:44 +0000 (21:22 +0000)]
[WebAssembly] Modified tablegen defs to have 2 parallel instuction sets.

Summary:
One for register based, much like the existing definitions,
and one for stack based (suffix _S).

This allows us to use registers in most of LLVM (which works better),
and stack based in MC (which results in a simpler and more readable
assembler / disassembler).

Tried to keep this change as small as possible while passing tests,
follow-up commit will:
- Add reg->stack conversion in MI.
- Fix asm/disasm in MC to be stack based.
- Fix emitter to be stack based.

tests passing:
llvm-lit -v `find test -name WebAssembly`

test/CodeGen/WebAssembly
test/MC/WebAssembly
test/MC/Disassembler/WebAssembly
test/DebugInfo/WebAssembly
test/CodeGen/MIR/WebAssembly
test/tools/llvm-objdump/WebAssembly

Reviewers: dschuff, sbc100, jgravelle-google, sunfish

Subscribers: aheejin, JDevlieghere, llvm-commits

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

llvm-svn: 334985

6 years agorefactor of visitFADD for AllowNewConst cases
Michael Berg [Mon, 18 Jun 2018 21:12:21 +0000 (21:12 +0000)]
refactor of visitFADD for AllowNewConst cases

Summary: Refactoring for all constant cases which require AllowNewConst and some staging for future fmf usage.

Reviewers: spatel, hfinkel, wristow

Reviewed By: spatel

Subscribers: nhaehnle

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

llvm-svn: 334984

6 years ago[AArch64][SVE] Asm: Fix predicate pattern diagnostics.
Sander de Smalen [Mon, 18 Jun 2018 21:03:02 +0000 (21:03 +0000)]
[AArch64][SVE] Asm: Fix predicate pattern diagnostics.

This patch uses the DiagnosticPredicate for SVE predicate patterns
to improve their diagnostics, now giving a 'invalid operand' diagnostic
if the type is not an immediate or one of the expected pattern
labels.

Reviewers: samparker, SjoerdMeijer, javed.absar, fhahn

Reviewed By: fhahn

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

llvm-svn: 334983

6 years agoIRgen: Mark aliases of ctors and dtors as unnamed_addr.
Peter Collingbourne [Mon, 18 Jun 2018 20:58:54 +0000 (20:58 +0000)]
IRgen: Mark aliases of ctors and dtors as unnamed_addr.

This is not only semantically correct but ensures that they will not
be marked as address-significant once D48155 lands.

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

llvm-svn: 334982

6 years agoFixing os_version_check.c to be actual C source
Chris Bieneman [Mon, 18 Jun 2018 20:56:19 +0000 (20:56 +0000)]
Fixing os_version_check.c to be actual C source

The initial implementaiton was using the C++ typeof keyword. This
causes the compiler to spew warnings unnecissarilly. This patch removes
the uses of typeof and replaces them with explicit typedefs of the
function types.

llvm-svn: 334981

6 years ago[AArch64][SVE] Asm: Support for saturating INC/DEC (32bit scalar) instructions.
Sander de Smalen [Mon, 18 Jun 2018 20:50:33 +0000 (20:50 +0000)]
[AArch64][SVE] Asm: Support for saturating INC/DEC (32bit scalar) instructions.

The variants added by this patch are:
- SQINC     signed increment, e.g. sqinc x0, w0, all, mul #4
- SQDEC     signed decrement, e.g. sqdec x0, w0, all, mul #4
- UQINC   unsigned increment, e.g. uqinc w0, all, mul #4
- UQDEC   unsigned decrement, e.g. uqdec w0, all, mul #4

This patch includes asmparser changes to parse a GPR64 as a GPR32 in
order to satisfy the constraint check:
  x0 == GPR64(w0)
in:
  sqinc x0, w0, all, mul #4
         ^___^ (must match)

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

Reviewed By: fhahn

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

llvm-svn: 334980

6 years ago[WebAssembly] Cleaned up register accessors in WebAssemblyMachineFunctionInfo.h
Wouter van Oortmerssen [Mon, 18 Jun 2018 20:45:49 +0000 (20:45 +0000)]
[WebAssembly] Cleaned up register accessors in WebAssemblyMachineFunctionInfo.h

Tested: llvm-lit -v `find test -name WebAssembly`

(This is a commit access "test commit" :)

llvm-svn: 334979

6 years agoFixed file completion for paths that start with '~'.
Raphael Isemann [Mon, 18 Jun 2018 20:11:38 +0000 (20:11 +0000)]
Fixed file completion for paths that start with '~'.

We didn't add the remaining path behind the '~' to the completion string,
causing it to just complete directories inside the user home directory. This
patch just adds the directory of the remaining path if there is one.

Fixes rdar://problem/40147002

llvm-svn: 334978

6 years ago[x86] regenerate checks and adjust tests
Sanjay Patel [Mon, 18 Jun 2018 20:05:16 +0000 (20:05 +0000)]
[x86] regenerate checks and adjust tests

2 of these tests were clearly not doing what the comments
said they were doing.

The last test was added at rL177933 with no assertions
(presumably it used to crash). But either we don't have
that problem anymore, or this test is folded sooner,
so we don't hit the bug that was fixed by disabling late
FP constant creation. Looking at this as part of reviewing
D48289.

llvm-svn: 334977

6 years ago[docs] Fix indentation of llvm-exegesis command line arguments
Simon Pilgrim [Mon, 18 Jun 2018 20:05:02 +0000 (20:05 +0000)]
[docs] Fix indentation of llvm-exegesis command line arguments

llvm-svn: 334976

6 years ago[TSan] Report proper error on allocator failures instead of CHECK(0)-ing
Alex Shlyapnikov [Mon, 18 Jun 2018 20:03:31 +0000 (20:03 +0000)]
[TSan] Report proper error on allocator failures instead of CHECK(0)-ing

Summary:
Following up on and complementing D44404 and other sanitizer allocators.

Currently many allocator specific errors (OOM, for example) are reported as
a text message and CHECK(0) termination, no stack, no details, not too
helpful nor informative. To improve the situation, detailed and structured
common errors were defined and reported under the appropriate conditions.

Common tests were generalized a bit to cover a slightly different TSan
stack reporting format, extended to verify errno value and returned
pointer value check is now explicit to facilitate debugging.

Reviewers: dvyukov

Subscribers: srhines, kubamracek, delcypher, #sanitizers, llvm-commits

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

llvm-svn: 334975

6 years agoFix clangd test to pass when delayed template parsing is on by default
Reid Kleckner [Mon, 18 Jun 2018 18:55:10 +0000 (18:55 +0000)]
Fix clangd test to pass when delayed template parsing is on by default

llvm-svn: 334973

6 years agoDon't let test/Driver/no-canonical-prefixes.c form a symlink cycle the second time...
Nico Weber [Mon, 18 Jun 2018 18:50:35 +0000 (18:50 +0000)]
Don't let test/Driver/no-canonical-prefixes.c form a symlink cycle the second time it runs.

The test makes %t.fake a symlink to %t.real by running `ln -sf %t.real
%t.fake`. If %t.fake already is a symlink to %t.real when this runs (e.g. if
the test has run before), then this effectively becomes `ln -sf %t.real %t.real`,
symlinking the directory to itself. At least on my mac, this leads to the
directory containing itself.

As fix, just remove %t.fake before creating the symlink. To clean up build dirs
on bots, also remove %t.real for a while.

https://reviews.llvm.org/D48224

llvm-svn: 334972

6 years ago[X86] Encode the EVEX2VEX exception list information in .td files instead of the...
Craig Topper [Mon, 18 Jun 2018 18:47:07 +0000 (18:47 +0000)]
[X86] Encode the EVEX2VEX exception list information in .td files instead of the emitter source.

Rather than having an exclusion list in tablegen sources, add a flag to the X86 instruction records that can be used to suppress checking for convertibility.

llvm-svn: 334971

6 years ago[NFC] make MIFlag accessor functions consistant with usage model
Michael Berg [Mon, 18 Jun 2018 18:37:48 +0000 (18:37 +0000)]
[NFC] make MIFlag accessor functions consistant with usage model

llvm-svn: 334970

6 years ago[VPlan] Add VPInstruction to VPRecipe transformation.
Florian Hahn [Mon, 18 Jun 2018 18:28:49 +0000 (18:28 +0000)]
[VPlan] Add VPInstruction to VPRecipe transformation.

This patch introduces a VPInstructionToVPRecipe transformation, which
allows us to generate code for a VPInstruction based VPlan re-using the
existing infrastructure.

Reviewers: dcaballe, hsaito, mssimpso, hfinkel, rengolin, mkuper, javed.absar, sguggill

Reviewed By: dcaballe

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

llvm-svn: 334969

6 years agoIntroduce lldb-framework CMake target and centralize its logic
Alex Langford [Mon, 18 Jun 2018 18:27:16 +0000 (18:27 +0000)]
Introduce lldb-framework CMake target and centralize its logic

Summary:
In this patch I aim to do the following:

1) Create an lldb-framework target that acts as the target that handles generating LLDB.framework. Previously, liblldb acted as the target for generating the framework in addition to generating the actual lldb library. This made the target feel overloaded.
2) Centralize framework generation as much as it makes sense to do so.
3) Create a target lldb-suite, which depends on every tool and library that makes liblldb fully functional. One result of having this target is it makes tracking dependencies much clearer.

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

llvm-svn: 334968

6 years ago[ORC] Add an initial implementation of a replacement CompileOnDemandLayer.
Lang Hames [Mon, 18 Jun 2018 18:01:43 +0000 (18:01 +0000)]
[ORC] Add an initial implementation of a replacement CompileOnDemandLayer.

CompileOnDemandLayer2 is a replacement for CompileOnDemandLayer built on the ORC
Core APIs. Functions in added modules are extracted and compiled lazily.
CompileOnDemandLayer2 supports multithreaded JIT'd code, and compilation on
multiple threads.

llvm-svn: 334967

6 years ago[ORC] Keep weak flag on VSO symbol tables during materialization, but treat
Lang Hames [Mon, 18 Jun 2018 18:01:41 +0000 (18:01 +0000)]
[ORC] Keep weak flag on VSO symbol tables during materialization, but treat
materializing weak symbols as strong.

This removes some elaborate flag tweaking and plays nicer with RuntimeDyld,
which relies of weak/common flags to determine whether it should emit a given
weak definition. (Switching to strong up-front makes it appear as if there is
already an overriding definition, which would require an extra back-channel to
override).

llvm-svn: 334966

6 years ago[analyzer] Remove accidentally committed lines.
George Karpenkov [Mon, 18 Jun 2018 17:59:03 +0000 (17:59 +0000)]
[analyzer] Remove accidentally committed lines.

llvm-svn: 334965

6 years agoFix a bug introduced by rL334850
Tomasz Krupa [Mon, 18 Jun 2018 17:57:05 +0000 (17:57 +0000)]
Fix a bug introduced by rL334850

Summary: All *_sqrt_round_s[s|d] intrinsics should execute a square root on
zeroth element from B (Ops[1]) and insert in to A (Ops[0]), not the other way around.

Reviewers: itaraban, craig.topper

Reviewed By: craig.topper

Subscribers: craig.topper, cfe-commits

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

llvm-svn: 334964

6 years agoShrink interval after moving copy in removePartialRedundancy
Krzysztof Parzyszek [Mon, 18 Jun 2018 17:16:39 +0000 (17:16 +0000)]
Shrink interval after moving copy in removePartialRedundancy

llvm-svn: 334963

6 years ago[OPENMP, NVPTX] Emit simple reduction if requested.
Alexey Bataev [Mon, 18 Jun 2018 17:11:45 +0000 (17:11 +0000)]
[OPENMP, NVPTX] Emit simple reduction if requested.

If simple reduction is requested, use the simple reduction instead of
the runtime functions calls.

llvm-svn: 334962

6 years ago[llvm-mca] Use an ordered map to collect hardware statistics. NFC.
Andrea Di Biagio [Mon, 18 Jun 2018 17:04:56 +0000 (17:04 +0000)]
[llvm-mca] Use an ordered map to collect hardware statistics. NFC.

Histogram entries are now ordered by key.  This should improves their
readability when statistics are printed.

llvm-svn: 334961

6 years agoFix typoed cast to avoid assertion in MCFragment::dump.
Nirav Dave [Mon, 18 Jun 2018 16:26:11 +0000 (16:26 +0000)]
Fix typoed cast to avoid assertion in MCFragment::dump.

llvm-svn: 334959

6 years ago[SLPVectorizer] Tidyup isShuffle helper
Simon Pilgrim [Mon, 18 Jun 2018 16:25:01 +0000 (16:25 +0000)]
[SLPVectorizer] Tidyup isShuffle helper

Ensure we keep track of the input vectors in all cases instead of just for SK_Select.

Ideally we'd reuse the shuffle mask pattern matching in TargetTransformInfo::getInstructionThroughput here to easily add support for all TargetTransformInfo::ShuffleKind without mass code duplication, I've added a TODO for now but D48236 should help us here.

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

llvm-svn: 334958

6 years ago[TableGen] Make TiedAsmOperandTable in the AsmMatcher 'static' since its at file...
Craig Topper [Mon, 18 Jun 2018 16:17:46 +0000 (16:17 +0000)]
[TableGen] Make TiedAsmOperandTable in the AsmMatcher 'static' since its at file scope.

llvm-svn: 334957

6 years ago[TableGen] Remove unused member variable.
Craig Topper [Mon, 18 Jun 2018 16:17:45 +0000 (16:17 +0000)]
[TableGen] Remove unused member variable.

I think this became unused after r324196.

llvm-svn: 334956

6 years agoFix macosx build broken by the VersionTuple refactor
Pavel Labath [Mon, 18 Jun 2018 16:10:20 +0000 (16:10 +0000)]
Fix macosx build broken by the VersionTuple refactor

I actually did check that macos builds before committing, but this error
was in conditionally compiled code that did not seem to be used on my
machine.

I also fix a typo in the previous speculative NetBSD patch.

llvm-svn: 334955

6 years agoFix netbsd build broken by r334950
Pavel Labath [Mon, 18 Jun 2018 15:44:36 +0000 (15:44 +0000)]
Fix netbsd build broken by r334950

This also includes one more build fix for windows.

llvm-svn: 334953

6 years agoAttempt to fix windows&freebsd builds broken by r334950
Pavel Labath [Mon, 18 Jun 2018 15:29:42 +0000 (15:29 +0000)]
Attempt to fix windows&freebsd builds broken by r334950

llvm-svn: 334952

6 years ago[VPlanRecipeBase] Add eraseFromParent().
Florian Hahn [Mon, 18 Jun 2018 15:18:48 +0000 (15:18 +0000)]
[VPlanRecipeBase] Add eraseFromParent().

Reviewers: dcaballe, hsaito, mkuper, hfinkel

Reviewed By: dcaballe

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

llvm-svn: 334951

6 years agoUse llvm::VersionTuple instead of manual version marshalling
Pavel Labath [Mon, 18 Jun 2018 15:02:23 +0000 (15:02 +0000)]
Use llvm::VersionTuple instead of manual version marshalling

Summary:
This has multiple advantages:
- we need only one function argument/instance variable instead of three
- no need to default initialize variables
- no custom parsing code
- VersionTuple has comparison operators, which makes version comparisons much
  simpler

Reviewers: zturner, friss, clayborg, jingham

Subscribers: emaste, lldb-commits

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

llvm-svn: 334950

6 years ago[AArch64][SVE] Asm: Support for saturating INC/DEC (64bit scalar) instructions.
Sander de Smalen [Mon, 18 Jun 2018 14:47:52 +0000 (14:47 +0000)]
[AArch64][SVE] Asm: Support for saturating INC/DEC (64bit scalar) instructions.

Summary:
The variants added by this patch are:
- SQINC  (signed increment)
- UQINC  (unsigned increment)
- SQDEC  (signed decrement)
- UQDEC  (unsigned decrement)

For example:
  uqincw  x0, all, mul #4

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

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

llvm-svn: 334948

6 years ago[X86][BtVer2] Flag AVX2+ scheduler classes as unsupported
Simon Pilgrim [Mon, 18 Jun 2018 14:31:14 +0000 (14:31 +0000)]
[X86][BtVer2] Flag AVX2+ scheduler classes as unsupported

Jaguar only supports up to AVX1

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

llvm-svn: 334947

6 years ago[ELF] - Simplify the conflict-variable-linkage-name.s test case. [NFC]
George Rimar [Mon, 18 Jun 2018 14:14:35 +0000 (14:14 +0000)]
[ELF] - Simplify the conflict-variable-linkage-name.s test case. [NFC]

This is a follow up requested during post commit review for
"[lld] r333880 - [ELF] - Also use DW_AT_linkage_name when gathering information about variables for error messages."

It removes checking of the input objects since it is really excessive.

llvm-svn: 334946

6 years ago[llvm-mca] Add tests for XOP and AVX512 instructions that implicitly clear the upper...
Andrea Di Biagio [Mon, 18 Jun 2018 14:00:30 +0000 (14:00 +0000)]
[llvm-mca] Add tests for XOP and AVX512 instructions that implicitly clear the upper portion of a super-register.

When the destination register of a XOP instruction is an XMM register, bits
[255:128] of the corresponding YMM register are cleared.

When the destination register of a EVEX encoded instruction is an XMM/YMM
register, the upper bits of the corresponding ZMM are cleared.
On processors that feature AVX512, a write to an XMM registers always clears the
upper portion of the corresponding ZMM register if the instruction is VEX or
EVEX encoded.

These new tests show some interesting cases which aren't correctly analyzed by
llvm-mca. The lack of knowledge related to the implicit update on the
super-registers is addressed by D48225.

llvm-svn: 334945