platform/upstream/llvm.git
5 years ago[SafeStack] Insert the deref after the offset
Petr Hosek [Mon, 22 Jul 2019 18:52:42 +0000 (18:52 +0000)]
[SafeStack] Insert the deref after the offset

While debugging code that uses SafeStack, we've noticed that LLVM
produces an invalid DWARF. Concretely, in the following example:

  int main(int argc, char* argv[]) {
    std::string value = "";
    printf("%s\n", value.c_str());
    return 0;
  }

DWARF would describe the value variable as being located at:

  DW_OP_breg14 R14+0, DW_OP_deref, DW_OP_constu 0x20, DW_OP_minus

The assembly to get this variable is:

  leaq    -32(%r14), %rbx

The order of operations in the DWARF symbols is incorrect in this case.
Specifically, the deref is incorrect; this appears to be incorrectly
re-inserted in repalceOneDbgValueForAlloca.

With this change which inserts the deref after the offset instead of
before it, LLVM produces correct DWARF:

  DW_OP_breg14 R14-32

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

llvm-svn: 366726

5 years agoWholeProgramDevirt: Teach the pass to respect the global's alignment.
Peter Collingbourne [Mon, 22 Jul 2019 18:50:45 +0000 (18:50 +0000)]
WholeProgramDevirt: Teach the pass to respect the global's alignment.

The bytes inserted before an overaligned global need to be padded according
to the alignment set on the original global in order for the initializer
to meet the global's alignment requirements. The previous implementation
that padded to the pointer width happened to be correct for vtables on most
platforms but may do the wrong thing if the vtable has a larger alignment.

This issue is visible with a prototype implementation of HWASAN for globals,
which will overalign all globals including vtables to 16 bytes.

There is also no padding requirement for the bytes inserted after the global
because they are never read from nor are they significant for alignment
purposes, so stop inserting padding there.

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

llvm-svn: 366725

5 years ago[PowerPC] Fix comment on MO_PLT Target Operand Flag. [NFC]
Sean Fertile [Mon, 22 Jul 2019 18:47:59 +0000 (18:47 +0000)]
[PowerPC] Fix comment on MO_PLT Target Operand Flag. [NFC]

Patch by Xiangling Liao.

llvm-svn: 366724

5 years ago[Object][XCOFF] Remove extra includes from XCOFF related files. [NFC]
Sean Fertile [Mon, 22 Jul 2019 18:47:55 +0000 (18:47 +0000)]
[Object][XCOFF] Remove extra includes from XCOFF related files. [NFC]

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

llvm-svn: 366723

5 years agoLowerTypeTests: Teach the pass to respect global alignments.
Peter Collingbourne [Mon, 22 Jul 2019 18:47:03 +0000 (18:47 +0000)]
LowerTypeTests: Teach the pass to respect global alignments.

We were previously ignoring alignment entirely when combining globals
together in this pass. There are two main things that we need to do here:
add additional padding before each global to meet the alignment requirements,
and set the combined global's alignment to the maximum of all of the original
globals' alignments.

Since we now need to calculate layout as we go anyway, use the calculated
layout to produce GlobalLayout instead of using StructLayout.

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

llvm-svn: 366722

5 years ago[OMPT] Cleanup reset of exit_frame pointer
Jonas Hahnfeld [Mon, 22 Jul 2019 18:46:02 +0000 (18:46 +0000)]
[OMPT] Cleanup reset of exit_frame pointer

This is done at call-site and does not need to be handled in
__kmp_invoke_microtask. It was already absent from the x86
and x86_64 assembly, this patch removes it from the generic
implementation in z_Linux_util.cpp and adds documentation for
AArch64 and PPC64 that it's actually not needed. I can't test
on these architectures, so I don't want to change the code just
because it looks right :)

While at it, rename some variables for consistency and add a
check in test/ompt/parallel/normal.c that the pointer was reset
before entering the barrier.

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

llvm-svn: 366721

5 years agoChanges to emit CodeView debug info nested type records properly using MCStreamer...
Nilanjana Basu [Mon, 22 Jul 2019 18:22:55 +0000 (18:22 +0000)]
Changes to emit CodeView debug info nested type records properly using MCStreamer directives

llvm-svn: 366720

5 years agoAdds support for formatting NS_CLOSED_ENUM and CF_CLOSED_ENUM alongside NS_ENUM and...
Ben Hamilton [Mon, 22 Jul 2019 18:20:01 +0000 (18:20 +0000)]
Adds support for formatting NS_CLOSED_ENUM and CF_CLOSED_ENUM alongside NS_ENUM and CF_ENUM.

Summary:
Addresses the formatting of NS_CLOSED_ENUM and CF_CLOSED_ENUM, introduced in Swift 5.

Before:

```
typedef NS_CLOSED_ENUM(NSInteger, Foo){FooValueOne = 1, FooValueTwo,
                                       FooValueThree};
```

After:

```
typedef NS_CLOSED_ENUM(NSInteger, Foo) {
  FooValueOne = 1,
  FooValueTwo,
  FooValueThree
};
```

Contributed by heijink.

Reviewers: benhamilton, krasimir

Reviewed By: benhamilton

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 366719

5 years agoDelete empty file
Jonas Hahnfeld [Mon, 22 Jul 2019 18:11:06 +0000 (18:11 +0000)]
Delete empty file

This is a left-over from r356288 which was reviewed in D58989.

llvm-svn: 366716

5 years ago[AMDGPU] Test update. NFC.
Stanislav Mekhanoshin [Mon, 22 Jul 2019 18:08:53 +0000 (18:08 +0000)]
[AMDGPU] Test update. NFC.

llvm-svn: 366715

5 years ago[SLPVectorizer] Fix some MSVC/cppcheck uninitialized variable warnings. NFCI.
Simon Pilgrim [Mon, 22 Jul 2019 17:57:36 +0000 (17:57 +0000)]
[SLPVectorizer] Fix some MSVC/cppcheck uninitialized variable warnings. NFCI.

llvm-svn: 366712

5 years agoRevert "Reland [ELF] Loose a condition for relocation with a symbol"
Vlad Tsyrklevich [Mon, 22 Jul 2019 17:48:53 +0000 (17:48 +0000)]
Revert "Reland [ELF] Loose a condition for relocation with a symbol"

This reverts commit r366686 as it appears to be causing buildbot
failures on sanitizer-x86_64-linux-android and sanitizer-x86_64-linux.

llvm-svn: 366708

5 years ago[Windows] Fix race condition between state changes
Adrian McCarthy [Mon, 22 Jul 2019 17:03:20 +0000 (17:03 +0000)]
[Windows] Fix race condition between state changes

Patch by Martin Andersson (martin.andersson@evoma.se)

If the process is resumed before the state is changed to "running"
there is a possibility (when single stepping) that the debugger stops
and changes the state to "stopped" before it is first changed to
"running". This causes the process to ignore the stop event (since
the state did not change) which in turn leads the DebuggerThread to
wait indefinitely for the exception predicate in HandleExceptionEvent.

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

llvm-svn: 366703

5 years ago[OPENMP][MSVC]Enable /openmp[:experimental] to compile OpenMP.
Alexey Bataev [Mon, 22 Jul 2019 16:49:59 +0000 (16:49 +0000)]
[OPENMP][MSVC]Enable /openmp[:experimental] to compile OpenMP.

Mapped /openmp[:experimental] to -fopenmp option and /openmp- option to
-fno-openmp

llvm-svn: 366702

5 years ago[libunwind][ARM] Fix types in _Unwind_VRS_Get.
Mikhail Maltsev [Mon, 22 Jul 2019 16:43:03 +0000 (16:43 +0000)]
[libunwind][ARM] Fix types in _Unwind_VRS_Get.

This is a small fix for https://reviews.llvm.org/D64996. The types of
w0 and w1 in _Unwind_VRS_Get must be uint64_t, not uint32_t.

Committing as obvious.

llvm-svn: 366701

5 years ago[libc++] Do not infer support for C++17 in GCC < 7
Louis Dionne [Mon, 22 Jul 2019 16:24:48 +0000 (16:24 +0000)]
[libc++] Do not infer support for C++17 in GCC < 7

libc++'s lit configuration infers the C++ language dialect when it is
not provided by checking which -std= flags that a compiler supports.
GCC 5 and GCC 6 have a -std=c++17 flag, however, they do not have full
C++17 support. The lit configuration has hardcoded logic that removes
-std=c++1z as an option to test for GCC < 7, but not -std=c++17.

This leads to a bunch of failures when running libc++ tests with GCC 5
or GCC 6. This patch adds -std=c++17 to the list of flags that are
discarded for GCC < 7 by lit's language dialect inference.

Thanks to Bryce Adelstein Lelbach for the patch.

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

llvm-svn: 366700

5 years ago[X86] Remove const from some intrinsics that shouldn't have them
Paul Robinson [Mon, 22 Jul 2019 16:14:09 +0000 (16:14 +0000)]
[X86] Remove const from some intrinsics that shouldn't have them

llvm-svn: 366699

5 years ago[clangd] Add dlog()s for SelectionTree, enabling -debug-only=SelectionTree.cpp
Sam McCall [Mon, 22 Jul 2019 15:55:53 +0000 (15:55 +0000)]
[clangd] Add dlog()s for SelectionTree, enabling -debug-only=SelectionTree.cpp

Summary:
SelectionTree is a RecursiveASTVisitor which processes getSourceRange() for
every node. This is a lot of surface area with the AST, as getSourceRange()
is specialized for *many* node types.
And the resulting SelectionTree depends on the source ranges of many
visited nodes, and the order of traversal.

Put together, this means we really need a traversal log to debug when we
get an unexpected SelectionTree. I've built this ad-hoc a few times, now
it's time to check it in.

Example output:
```
D[14:07:44.184] Computing selection for </usr/local/google/home/sammccall/test.cc:1:7, col:8>
D[14:07:44.184]  push: VarDecl const auto x = 42
D[14:07:44.184]   claimRange: </usr/local/google/home/sammccall/test.cc:1:12, col:13>
D[14:07:44.184]   push: NestedNameSpecifierLoc (empty NestedNameSpecifierLoc)
D[14:07:44.184]   pop: NestedNameSpecifierLoc (empty NestedNameSpecifierLoc)
D[14:07:44.184]   push: QualifiedTypeLoc const auto
D[14:07:44.184]   pop: QualifiedTypeLoc const auto
D[14:07:44.184]    claimRange: </usr/local/google/home/sammccall/test.cc:1:7, col:11>
D[14:07:44.184]    hit selection: </usr/local/google/home/sammccall/test.cc:1:7, col:8>
D[14:07:44.184]   skip: IntegerLiteral 42
D[14:07:44.184]    skipped range = </usr/local/google/home/sammccall/test.cc:1:16>
D[14:07:44.184]  pop: VarDecl const auto x = 42
D[14:07:44.184]   claimRange: </usr/local/google/home/sammccall/test.cc:1:1, col:18>
D[14:07:44.184]  skip: VarDecl int y = 43
D[14:07:44.184]   skipped range = </usr/local/google/home/sammccall/test.cc:2:1, col:9>
D[14:07:44.184] Built selection tree
TranslationUnitDecl
  VarDecl const auto x = 42
     .QualifiedTypeLoc const auto

```

Reviewers: hokein

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, llvm-commits

Tags: #llvm

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

llvm-svn: 366698

5 years ago[Polly] Clang complains about missing virtual destructor
Guillaume Chatelet [Mon, 22 Jul 2019 15:34:27 +0000 (15:34 +0000)]
[Polly] Clang complains about missing virtual destructor

Summary: Feel free to reassign if needed.

Reviewers: mhalk, bollu, jdoerfert

Reviewed By: jdoerfert

Subscribers: jdoerfert, llvm-commits

Tags: #llvm

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

llvm-svn: 366697

5 years agoUpdate c++2a status page with post-Cologne information
Marshall Clow [Mon, 22 Jul 2019 15:13:14 +0000 (15:13 +0000)]
Update c++2a status page with post-Cologne information

llvm-svn: 366696

5 years agoTableGen: Support physical register inputs > 255
Matt Arsenault [Mon, 22 Jul 2019 15:02:34 +0000 (15:02 +0000)]
TableGen: Support physical register inputs > 255

This was truncating register value that didn't fit in unsigned char.
Switch AMDGPU sendmsg intrinsics to using a tablegen pattern.

llvm-svn: 366695

5 years ago[NFC] Relaxed regression tests for PR42665
Marco Antognini [Mon, 22 Jul 2019 14:47:36 +0000 (14:47 +0000)]
[NFC] Relaxed regression tests for PR42665

Following up on the buildbot failures, this commits relaxes some tests:
instead of checking for specific IR output, it now ensures that the
underlying issue (the crash), and only that, doesn't happen.

llvm-svn: 366694

5 years agoELF: Fix a "memset clearing object of non-trivial type" warning
Pavel Labath [Mon, 22 Jul 2019 14:29:29 +0000 (14:29 +0000)]
ELF: Fix a "memset clearing object of non-trivial type" warning

Just delete the memset as the ELFHeader constructor already
zero-initializes the object. Also clean up the ObjectFileELF
constructors/desctructors while I'm in there.

llvm-svn: 366692

5 years ago[ARM][LowOverheadLoops] Revert remaining pseudos
Sam Parker [Mon, 22 Jul 2019 14:16:40 +0000 (14:16 +0000)]
[ARM][LowOverheadLoops] Revert remaining pseudos

ARMLowOverheadLoops would assert a failure if it did not find all the
pseudo instructions that comprise the hardware loop. Instead of doing
this, iterate through all the instructions of the function and revert
any remaining pseudo instructions that haven't been converted.

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

llvm-svn: 366691

5 years ago[OPENMP]Add support for analysis of firstprivate variables.
Alexey Bataev [Mon, 22 Jul 2019 13:51:07 +0000 (13:51 +0000)]
[OPENMP]Add support for analysis of firstprivate variables.

Summary:
Firstprivate variables are the variables, for which the private copies
must be created in the OpenMP regions and must be initialized with the
original values. Thus, we must report if the uninitialized variable is
used as firstprivate.

Reviewers: NoQ

Subscribers: guansong, jdoerfert, caomhin, kkwli0, cfe-commits

Tags: #clang

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

llvm-svn: 366689

5 years agoAMDGPU/GlobalISel: Fix broken tests
Matt Arsenault [Mon, 22 Jul 2019 13:33:11 +0000 (13:33 +0000)]
AMDGPU/GlobalISel: Fix broken tests

llvm-svn: 366688

5 years agoUpdate documentation for all CERT checks that correspond to a recommendation.
Aaron Ballman [Mon, 22 Jul 2019 13:22:08 +0000 (13:22 +0000)]
Update documentation for all CERT checks that correspond to a recommendation.

CERT removed their C++ secure coding recommendations from public view and so the links within that documentation are stale. This updates various pieces of documentation to make this more clear, and to help add substance where our docs deferred to CERT's wiki.

llvm-svn: 366687

5 years agoReland [ELF] Loose a condition for relocation with a symbol
Nikola Prica [Mon, 22 Jul 2019 13:07:01 +0000 (13:07 +0000)]
Reland [ELF] Loose a condition for relocation with a symbol

This patch was not the reason of the buildbot failure.

Deleted code was introduced as a work around for a bug in the gold linker
(http://sourceware.org/PR16794). Test case that was given as a reason for
this part of code, the one on previous link, now works for the gold.
This condition is too strict and when a code is compiled with debug info
it forces generation of numerous relocations with symbol for architectures
that do not have relocation addend.

Reviewers: arsenm, espindola

Reviewed By: MaskRay

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

llvm-svn: 366686

5 years agoAMDGPU/GlobalISel: Remove unnecessary code
Matt Arsenault [Mon, 22 Jul 2019 13:05:25 +0000 (13:05 +0000)]
AMDGPU/GlobalISel: Remove unnecessary code

The minnum/maxnum case are dead, and the cvt is handled by the
default.

llvm-svn: 366685

5 years ago[ARM] Fix for MVE VPT block pass
David Green [Mon, 22 Jul 2019 12:51:38 +0000 (12:51 +0000)]
[ARM] Fix for MVE VPT block pass

We need to ensure that the number of T's is correct when adding multiple
instructions into the same VPT block.

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

llvm-svn: 366684

5 years agoUpdated the signature for some stack related intrinsics (CLANG)
Christudasan Devadasan [Mon, 22 Jul 2019 12:50:30 +0000 (12:50 +0000)]
Updated the signature for some stack related intrinsics (CLANG)

Modified the intrinsics
int_addressofreturnaddress,
int_frameaddress & int_sponentry.
This commit depends on the changes in rL366679

Reviewed By: arsenm

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

llvm-svn: 366683

5 years agoRevert the change to the [[nodiscard]] feature test macro value.
Aaron Ballman [Mon, 22 Jul 2019 12:49:28 +0000 (12:49 +0000)]
Revert the change to the [[nodiscard]] feature test macro value.

This value only gets bumped once both P1301 and P1771 are implemented.

llvm-svn: 366682

5 years ago[X86] EltsFromConsecutiveLoads - support common source loads (REAPPLIED)
Simon Pilgrim [Mon, 22 Jul 2019 12:44:10 +0000 (12:44 +0000)]
[X86] EltsFromConsecutiveLoads - support common source loads (REAPPLIED)

This patch enables us to find the source loads for each element, splitting them into a Load and ByteOffset, and attempts to recognise consecutive loads that are in fact from the same source load.

A helper function, findEltLoadSrc, recurses to find a LoadSDNode and determines the element's byte offset within it. When attempting to match consecutive loads, byte offsetted loads then attempt to matched against a previous load that has already been confirmed to be a consecutive match.

Next step towards PR16739 - after this we just need to account for shuffling/repeated elements to create a vector load + shuffle.

Fixed out of bounds load assert identified in rL366501

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

llvm-svn: 366681

5 years agoAMDGPU/GlobalISel: Fix tests without asserts
Matt Arsenault [Mon, 22 Jul 2019 12:43:41 +0000 (12:43 +0000)]
AMDGPU/GlobalISel: Fix tests without asserts

The legality check is only done under NDEBUG, so the failure cases are
different in a release build.

llvm-svn: 366680

5 years agoAdded address-space mangling for stack related intrinsics
Christudasan Devadasan [Mon, 22 Jul 2019 12:42:48 +0000 (12:42 +0000)]
Added address-space mangling for stack related intrinsics

Modified the following 3 intrinsics:
int_addressofreturnaddress,
int_frameaddress & int_sponentry.

Reviewed By: arsenm

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

llvm-svn: 366679

5 years ago[X86][SSE] Add EltsFromConsecutiveLoads test case identified in rL366501
Simon Pilgrim [Mon, 22 Jul 2019 12:17:56 +0000 (12:17 +0000)]
[X86][SSE] Add EltsFromConsecutiveLoads test case identified in rL366501

Test case that led to rL366441 being reverted at rL366501

llvm-svn: 366678

5 years ago[yaml2obj] - Change how we handle implicit sections.
George Rimar [Mon, 22 Jul 2019 12:01:52 +0000 (12:01 +0000)]
[yaml2obj] - Change how we handle implicit sections.

Instead of having the special list of implicit sections,
that are mixed with the sections read from YAML on late
stages, I just create the placeholders and add them to
the main sections list early.

That allows to significantly simplify the code.

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

llvm-svn: 366677

5 years ago[ARM][test] Improve tests
Fangrui Song [Mon, 22 Jul 2019 11:37:03 +0000 (11:37 +0000)]
[ARM][test] Improve tests

Delete trailing 2>&1 that is not piped to another command.
Add --no-show-raw-insn to objdump -d commands.

llvm-svn: 366676

5 years ago[clangd] Set buffer name for main file. NFCI
Sam McCall [Mon, 22 Jul 2019 11:12:16 +0000 (11:12 +0000)]
[clangd] Set buffer name for main file. NFCI

llvm-svn: 366675

5 years ago[clangd] Log input code of failed highlighting tests. NFC
Ilya Biryukov [Mon, 22 Jul 2019 10:05:11 +0000 (10:05 +0000)]
[clangd] Log input code of failed highlighting tests. NFC

llvm-svn: 366674

5 years ago[lldb][NFC] Tablegenify breakpoint
Raphael Isemann [Mon, 22 Jul 2019 10:02:09 +0000 (10:02 +0000)]
[lldb][NFC] Tablegenify breakpoint

llvm-svn: 366673

5 years ago[AST] Treat semantic form of InitListExpr as implicit code in traversals
Ilya Biryukov [Mon, 22 Jul 2019 09:58:53 +0000 (09:58 +0000)]
[AST] Treat semantic form of InitListExpr as implicit code in traversals

Summary:
In particular, do not traverse the semantic form if shouldVisitImplicitCode()
returns false.

This simplifies the common case of traversals, avoiding the need to
worry about some expressions being traversed twice.

No tests break after the change, the change would allow to simplify at
least one of the usages, i.e. r366070 which had to handle this in
clangd.

Reviewers: gribozavr

Reviewed By: gribozavr

Subscribers: kadircet, cfe-commits

Tags: #clang

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

llvm-svn: 366672

5 years agoAdd location of SVN staging dir to git-llvm error output
Stefan Granitz [Mon, 22 Jul 2019 09:47:40 +0000 (09:47 +0000)]
Add location of SVN staging dir to git-llvm error output

Summary:
In pre-monorepo times the svn staging directory was `.git/svn`. The below error message wasn't mentioning the new name yet.

Example before:
```
Can't push git rev 104cfa289d9 because svn status is not empty:
!     llvm/trunk/include/llvm
```

Example after:
```
Can't push git rev 104cfa289d9 because status in svn staging dir (.git/llvm-upstream-svn) is not empty:
!     llvm/trunk/include/llvm
```

Reviewers: mehdi_amini, jlebar, teemperor

Reviewed By: mehdi_amini

Subscribers: llvm-commits, #llvm

Tags: #llvm

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

llvm-svn: 366671

5 years ago[OpenCL] Improve destructor support in C++ for OpenCL
Marco Antognini [Mon, 22 Jul 2019 09:39:13 +0000 (09:39 +0000)]
[OpenCL] Improve destructor support in C++ for OpenCL

This re-applies r366422 with a fix for Bug PR42665 and a new regression
test.

llvm-svn: 366670

5 years ago[IPRA][ARM] Make use of the "returned" parameter attribute
Oliver Stannard [Mon, 22 Jul 2019 08:44:36 +0000 (08:44 +0000)]
[IPRA][ARM] Make use of the "returned" parameter attribute

ARM has code to recognise uses of the "returned" function parameter
attribute which guarantee that the value passed to the function in r0
will be returned in r0 unmodified. IPRA replaces the regmask on call
instructions, so needs to be told about this to avoid reverting the
optimisation.

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

llvm-svn: 366669

5 years ago[llvm-readobj] - Stop using precompiled objects in file-headers.test
George Rimar [Mon, 22 Jul 2019 08:10:02 +0000 (08:10 +0000)]
[llvm-readobj] - Stop using precompiled objects in file-headers.test

This converts all sub-tests except one to YAML instead of precompiled inputs.

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

llvm-svn: 366668

5 years ago[AMDGPU] Save some work when an atomic op has no uses
Jay Foad [Mon, 22 Jul 2019 07:19:44 +0000 (07:19 +0000)]
[AMDGPU] Save some work when an atomic op has no uses

Summary:
In the atomic optimizer, save doing a bunch of work and generating a
bunch of dead IR in the fairly common case where the result of an
atomic op (i.e. the value that was in memory before the atomic op was
performed) is not used. NFC.

Reviewers: arsenm, dstuttard, tpr

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, t-tye, hiraditya, jfb, llvm-commits

Tags: #llvm

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

llvm-svn: 366667

5 years ago[PowerPC][NFC] Precommit a test case where ppc-mi-peepholes miscompiles extswsli
Kai Luo [Mon, 22 Jul 2019 05:32:20 +0000 (05:32 +0000)]
[PowerPC][NFC] Precommit a test case where ppc-mi-peepholes miscompiles extswsli

Added a test case to show codegen differences.

llvm-svn: 366666

5 years ago[Loop Peeling] Fix the handling of branch weights of peeled off branches.
Serguei Katkov [Mon, 22 Jul 2019 05:15:34 +0000 (05:15 +0000)]
[Loop Peeling] Fix the handling of branch weights of peeled off branches.

Current algorithm to update branch weights of latch block and its copies is
based on the assumption that number of peeling iterations is approximately equal
to trip count.

However it is not correct. According to profitability check in one case we can decide to peel
in case it helps to reduce the number of phi nodes. In this case the number of peeled iteration
can be less then estimated trip count.

This patch introduces another way to set the branch weights to peeled of branches.
Let F is a weight of the edge from latch to header.
Let E is a weight of the edge from latch to exit.
F/(F+E) is a probability to go to loop and E/(F+E) is a probability to go to exit.
Then, Estimated TripCount = F / E.
For I-th (counting from 0) peeled off iteration we set the the weights for
the peeled latch as (TC - I, 1). It gives us reasonable distribution,
The probability to go to exit 1/(TC-I) increases. At the same time
the estimated trip count of remaining loop reduces by I.

As a result after peeling off N iteration the weights will be
(F - N * E, E) and trip count of loop becomes
F / E - N or TC - N.

The idea is taken from the review of the patch D63918 proposed by Philip.

Reviewers: reames, mkuper, iajbar, fhahn
Reviewed By: reames
Subscribers: hiraditya, zzheng, llvm-commits
Differential Revision: https://reviews.llvm.org/D64235

llvm-svn: 366665

5 years ago[utils] Clean up UpdateTestChecks/common.py
Fangrui Song [Mon, 22 Jul 2019 04:59:01 +0000 (04:59 +0000)]
[utils] Clean up UpdateTestChecks/common.py

llvm-svn: 366664

5 years ago[analyzer] Fix -Wunused-function in NDEBUG builds with #ifdef LLVM_DUMP_METHOD
Fangrui Song [Mon, 22 Jul 2019 04:14:09 +0000 (04:14 +0000)]
[analyzer] Fix -Wunused-function in NDEBUG builds with #ifdef LLVM_DUMP_METHOD

llvm-svn: 366663

5 years ago[InstCombine] Add foldAndOfICmps test cases inspired by PR42691.
Craig Topper [Mon, 22 Jul 2019 02:43:43 +0000 (02:43 +0000)]
[InstCombine] Add foldAndOfICmps test cases inspired by PR42691.

icmp ne %x, INT_MIN can be treated similarly to icmp sgt %x, INT_MIN.
icmp ne %x, INT_MAX can be treated similarly to icmp slt %x, INT_MAX.
icmp ne %x, UINT_MAX can be treated similarly to icmp ult %x, UINT_MAX.

We already treat icmp ne %x, 0 similarly to icmp ugt %x, 0

llvm-svn: 366662

5 years ago[PowerPC][NFC] Precomit test case for upcoming patch
Nemanja Ivanovic [Sun, 21 Jul 2019 21:03:45 +0000 (21:03 +0000)]
[PowerPC][NFC] Precomit test case for upcoming patch

Just committing a test case for an upcoming patch so that the review can show
only the codegen differences.

llvm-svn: 366661

5 years ago[X86] SimplifyDemandedVectorEltsForTargetNode - Move SUBV_BROADCAST narrowing handlin...
Simon Pilgrim [Sun, 21 Jul 2019 19:04:44 +0000 (19:04 +0000)]
[X86] SimplifyDemandedVectorEltsForTargetNode - Move SUBV_BROADCAST narrowing handling. NFCI.

Move the narrowing of SUBV_BROADCAST to where we handle all the other opcodes.

llvm-svn: 366660

5 years ago[PowerPC][NFC] Regenerate test using script
Nemanja Ivanovic [Sun, 21 Jul 2019 18:42:29 +0000 (18:42 +0000)]
[PowerPC][NFC] Regenerate test using script

This test case ended up as a hybrid of generated checks and manually inserted
checks. Regenerate using script to make it consistent.

llvm-svn: 366659

5 years ago[InstCombine] Update comment I missed in r366649. NFC
Craig Topper [Sun, 21 Jul 2019 16:15:03 +0000 (16:15 +0000)]
[InstCombine] Update comment I missed in r366649. NFC

llvm-svn: 366658

5 years ago[SmallBitVector] Fix bug in find_next_unset for small types with indices >=32
Simon Pilgrim [Sun, 21 Jul 2019 16:06:26 +0000 (16:06 +0000)]
[SmallBitVector] Fix bug in find_next_unset for small types with indices >=32

We were creating a bitmask from a shift of unsigned instead of uintptr_t, meaning we couldn't create masks for indices above 31.

Noticed due to a MSVC analyzer warning.

llvm-svn: 366657

5 years ago[GISel]: Attach missing range metadata while translating G_LOADs
Aditya Nandakumar [Sun, 21 Jul 2019 14:07:54 +0000 (14:07 +0000)]
[GISel]: Attach missing range metadata while translating G_LOADs

https://reviews.llvm.org/D65048

Attach range information to G_LOAD when only defining one register.

reviewed by: arsenm

llvm-svn: 366656

5 years ago[ARM] Move MVE VPT block tests into the Thumb2 directory. NFC
David Green [Sun, 21 Jul 2019 13:09:19 +0000 (13:09 +0000)]
[ARM] Move MVE VPT block tests into the Thumb2 directory. NFC

llvm-svn: 366655

5 years ago[lldb] Fix crash when looking up type coming from the ClangModuleDeclVendor
Raphael Isemann [Sun, 21 Jul 2019 10:31:13 +0000 (10:31 +0000)]
[lldb] Fix crash when looking up type coming from the ClangModuleDeclVendor

Summary:
We assume in LLDB that every type comes from an ASTContext with an associated ClangASTContext.
However the types inside the ClangModuleDeclVendor don't have a ClangASTContext so we end up
crashing whenever we create a CompilerType for one of these types.

Simplest way to trigger this bug is to just look up NSObject from a module:
   (lldb) expr @import Foundation
   (lldb) type lookup NSObject
   Assertion failed: (m_type_system != nullptr), function CompilerType, file /Users/teemperor/llvm1/llvm-project/lldb/source/Symbol/CompilerType.cpp, line 39.

This patch just creates a ClangASTContext for the ASTContext used by ClangModuleDeclVendor.

Reviewers: davide, shafik

Reviewed By: davide

Subscribers: lldb-commits

Tags: #lldb

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

llvm-svn: 366653

5 years ago[NFC][InstCombine] Add a few extra srem-by-power-of-two tests - extra uses
Roman Lebedev [Sun, 21 Jul 2019 09:05:49 +0000 (09:05 +0000)]
[NFC][InstCombine] Add a few extra srem-by-power-of-two tests - extra uses

llvm-svn: 366652

5 years ago[NativePDB] Make GetOrCreateDeclForUid return an lldb CompilerDecl
Nathan Lanza [Sun, 21 Jul 2019 07:46:18 +0000 (07:46 +0000)]
[NativePDB] Make GetOrCreateDeclForUid return an lldb CompilerDecl

We intend to make PdbAstBuilder abstract and implement
PdbAstBuilderClang along with any other languages that wish to use
PDBs. Thus, change GetOrCreateDeclForUid from returning a clang decl
to a lldb_private::CompilerDecl.

llvm-svn: 366650

5 years ago[InstCombine] Remove insertRangeTest code that handles the equality case.
Craig Topper [Sun, 21 Jul 2019 06:43:38 +0000 (06:43 +0000)]
[InstCombine] Remove insertRangeTest code that handles the equality case.

For equality, the function called getTrue/getFalse with the VT
of the comparison input. But getTrue/getFalse need the boolean VT.
So if this code ever executed, it would assert.

I believe these cases are removed by InstSimplify so we don't get here.

So this patch just fixes up an assert to exclude the equality
possibility and removes the broken code.

llvm-svn: 366649

5 years ago[InstCombine] Don't use AddOne/SubOne to see if two APInts are 1 apart. Use APInt...
Craig Topper [Sun, 21 Jul 2019 05:26:05 +0000 (05:26 +0000)]
[InstCombine] Don't use AddOne/SubOne to see if two APInts are 1 apart. Use APInt operations instead. NFCI

AddOne/SubOne create new Constant objects. That seems heavy for
comparing ConstantInts which wrap APInts. Just do the math on
on the APInts and compare them.

llvm-svn: 366648

5 years ago[lldb] Fix buildbot build fail caused by r366645
Yuanfang Chen [Sun, 21 Jul 2019 00:07:39 +0000 (00:07 +0000)]
[lldb] Fix buildbot build fail caused by r366645

llvm-svn: 366647

5 years agogn build: Merge r366622
Nico Weber [Sun, 21 Jul 2019 00:03:55 +0000 (00:03 +0000)]
gn build: Merge r366622

llvm-svn: 366646

5 years ago[Clang] Replace cc1 options '-mdisable-fp-elim' and '-momit-leaf-frame-pointer'
Yuanfang Chen [Sat, 20 Jul 2019 22:50:50 +0000 (22:50 +0000)]
[Clang] Replace cc1 options '-mdisable-fp-elim' and '-momit-leaf-frame-pointer'
with '-mframe-pointer'

After D56351 and D64294, frame pointer handling is migrated to tri-state
(all, non-leaf, none) in clang driver and on the function attribute.
This patch makes the frame pointer handling cc1 option tri-state.

Reviewers: chandlerc, rnk, t.p.northover, MaskRay

Reviewed By: MaskRay

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

llvm-svn: 366645

5 years ago[ELF] Support explicitly overriding relocation model in LTO
Petr Hosek [Sat, 20 Jul 2019 21:59:47 +0000 (21:59 +0000)]
[ELF] Support explicitly overriding relocation model in LTO

lld currently selects the relocation model automatically depending on
the link flags specified, but in some cases it'd be useful to allow
explicitly overriding the relocation model using a flag.

llvm-svn: 366644

5 years ago[NFC][InstCombine] Autogenerate a few tests
Roman Lebedev [Sat, 20 Jul 2019 21:34:00 +0000 (21:34 +0000)]
[NFC][InstCombine] Autogenerate a few tests

llvm-svn: 366643

5 years ago[NFC][InstCombine] Add srem-by-signbit tests - still can fold to bittest
Roman Lebedev [Sat, 20 Jul 2019 21:33:50 +0000 (21:33 +0000)]
[NFC][InstCombine] Add srem-by-signbit tests - still can fold to bittest

https://rise4fun.com/Alive/IIeS

llvm-svn: 366642

5 years ago[NFC][Codegen][X86][AArch64] Add "(x s% C) == 0" tests
Roman Lebedev [Sat, 20 Jul 2019 19:25:44 +0000 (19:25 +0000)]
[NFC][Codegen][X86][AArch64] Add "(x s% C) == 0" tests

Much like with `urem`, the same optimization (albeit with slightly
different algorithm) applies for the signed case, too.

I'm simply copying the test coverage from `urem` case for now,
i believe it should be (close to?) sufficient.

llvm-svn: 366640

5 years agobuild: allow the user to specify `llvm-tblgen`
Saleem Abdulrasool [Sat, 20 Jul 2019 17:59:08 +0000 (17:59 +0000)]
build: allow the user to specify `llvm-tblgen`

This follows the same pattern as Clang and permits the user to specify
the tablegen to use via `-DLLVM_TABLEGEN=`.  This allows for
cross-compiling LLDB for a foreign target (e.g. Windows ARM64 on Windows
X64).  The LLVM dependency for LLDB in that case must be a Windows ARM64
build which cannot cross-compile llvm-tblgen due to the way that Visual
Studio works.  Instead, permit the user to have a separate tablegen
build which can be used during the build.

llvm-svn: 366639

5 years agoFix asan infinite loop on undefined symbol
Serge Guelton [Sat, 20 Jul 2019 17:44:30 +0000 (17:44 +0000)]
Fix asan infinite loop on undefined symbol

Fix llvm#39641

Recommit of r366413

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

> llvm-svn: 366632

llvm-svn: 366638

5 years ago[Codegen][SelectionDAG] X u% C == 0 fold: non-splat vector improvements
Roman Lebedev [Sat, 20 Jul 2019 16:33:15 +0000 (16:33 +0000)]
[Codegen][SelectionDAG] X u% C == 0 fold: non-splat vector improvements

Summary:
Four things here:
1. Generalize the fold to handle non-splat divisors. Reasonably trivial.
2. Unban power-of-two divisors. I don't see any reason why they should
   be illegal.
   * There is no ban in Hacker's Delight
   * I think the ban came from the same bug that caused the miscompile
      in the base patch - in `floor((2^W - 1) / D)` we were dividing by
      `D0` instead of `D`, and we **were** ensuring that `D0` is not `1`,
      which made sense.
3. Unban `1` divisors. I no longer believe Hacker's Delight actually says
   that the fold is invalid for `D = 0`. Further considerations:
   * We know that
     * `(X u% 1) == 0`  can be constant-folded to `1`,
     * `(X u% 1) != 0`  can be constant-folded to `0`,
   *  Also, we know that
     * `X u<= -1` can be constant-folded to `1`,
     * `X u>  -1` can be constant-folded to `0`,
   * https://godbolt.org/z/7jnZJX https://rise4fun.com/Alive/oF6p
   * We know will end up with the following:
       `(setule/setugt (rotr (mul N, P), K), Q)`
   * Therefore, for given new DAG nodes and comparison predicates
     (`ule`/`ugt`), we will still produce the correct answer if:
     `Q` is a all-ones constant; and both `P` and `K` are *anything*
     other than `undef`.
   * The fold will indeed produce `Q = all-ones`.
4. Try to re-splat the `P` and `K` vectors - we don't care about
   their values for the lanes where divisor was `1`.

Reviewers: RKSimon, hermord, craig.topper, spatel, xbolva00

Reviewed By: RKSimon

Subscribers: hiraditya, javed.absar, dexonsmith, llvm-commits

Tags: #llvm

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

llvm-svn: 366637

5 years ago[X86][SSE] Use PSADBW to improve vXi8 sum reduction (PR42674)
Simon Pilgrim [Sat, 20 Jul 2019 15:20:11 +0000 (15:20 +0000)]
[X86][SSE] Use PSADBW to improve vXi8 sum reduction (PR42674)

As detailed on PR42674, we can reduce a vXi8 down until we have the final <8 x i8>, and then use PSADBW with zero, to sum those values. We then extract the bottom i8, discarding any overflow from the upper bits of the i16 result.

llvm-svn: 366636

5 years agoFix cppcheck reduce scope variable warnings. NFCI
Simon Pilgrim [Sat, 20 Jul 2019 13:01:16 +0000 (13:01 +0000)]
Fix cppcheck reduce scope variable warnings. NFCI

Move a couple of variables inside the block where they are actually needed.

llvm-svn: 366635

5 years agoRevert "Fix asan infinite loop on undefined symbol"
Serge Guelton [Sat, 20 Jul 2019 13:00:12 +0000 (13:00 +0000)]
Revert "Fix asan infinite loop on undefined symbol"

This reverts commit cbd28cd05bb11e9d76d71c6cc2d38d89dbb1fe1a.

Buildbot fail: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/22434/steps/64-bit%20check-asan-dynamic/

llvm-svn: 366634

5 years ago[Local] Zap blockaddress without users in ConstantFoldTerminator.
Florian Hahn [Sat, 20 Jul 2019 12:25:47 +0000 (12:25 +0000)]
[Local] Zap blockaddress without users in ConstantFoldTerminator.

If the blockaddress is not destoryed, the destination block will still
be marked as having its address taken, limiting further transformations.

I think there are other places where the dead blockaddress constants are kept
around, I'll look into that as follow up.

Reviewers: craig.topper, brzycki, davide

Reviewed By: brzycki, davide

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

llvm-svn: 366633

5 years agoFix asan infinite loop on undefined symbol
Serge Guelton [Sat, 20 Jul 2019 12:01:18 +0000 (12:01 +0000)]
Fix asan infinite loop on undefined symbol

Fix llvm#39641

Recommit of r366413

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

llvm-svn: 366632

5 years ago[CMake] Align debugserver with lldb-server on Darwin
Stefan Granitz [Sat, 20 Jul 2019 11:18:31 +0000 (11:18 +0000)]
[CMake] Align debugserver with lldb-server on Darwin

Summary: Make debugserver a tool like lldb-server, so it can be included/excluded via `LLDB_TOOL_DEBUGSERVER_BUILD`. This replaces the old `LLDB_NO_DEBUGSERVER` flag. Doing the same for darwin-debug while I am here.

Reviewers: xiaobai, JDevlieghere, davide

Reviewed By: xiaobai, JDevlieghere

Subscribers: mgorny, lldb-commits, #lldb

Tags: #lldb

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

llvm-svn: 366631

5 years ago[c++20] P1161R3: a[b,c] is deprecated.
Richard Smith [Sat, 20 Jul 2019 09:32:27 +0000 (09:32 +0000)]
[c++20] P1161R3: a[b,c] is deprecated.

llvm-svn: 366630

5 years agoMark P1301R4 in C++2a as being SVN instead.
Aaron Ballman [Sat, 20 Jul 2019 08:57:08 +0000 (08:57 +0000)]
Mark P1301R4 in C++2a as being SVN instead.

llvm-svn: 366629

5 years agoWe support P1301R4 in C++2a as of r366626.
Aaron Ballman [Sat, 20 Jul 2019 08:24:56 +0000 (08:24 +0000)]
We support P1301R4 in C++2a as of r366626.

llvm-svn: 366628

5 years ago[cxx_status] Update status page for WG21 Cologne meeting motions.
Richard Smith [Sat, 20 Jul 2019 08:20:54 +0000 (08:20 +0000)]
[cxx_status] Update status page for WG21 Cologne meeting motions.

Note that many of the paper links will be dead until the post-meeting
mailing is released.

llvm-svn: 366627

5 years agoImplement P1301R4, which allows specifying an optional message on the [[nodiscard...
Aaron Ballman [Sat, 20 Jul 2019 07:56:34 +0000 (07:56 +0000)]
Implement P1301R4, which allows specifying an optional message on the [[nodiscard]] attribute.

This also bumps the attribute feature test value and introduces the notion of a C++2a extension warning.

llvm-svn: 366626

5 years ago[GlobalISel][AArch64] Contract trivial same-size cross-bank copies into G_STOREs
Jessica Paquette [Sat, 20 Jul 2019 01:55:35 +0000 (01:55 +0000)]
[GlobalISel][AArch64] Contract trivial same-size cross-bank copies into G_STOREs

Sometimes, you can end up with cross-bank copies between same-sized GPRs and
FPRs, which feed into G_STOREs. When these copies feed only into stores, they
aren't necessary; we can just store using the original register bank.

This provides some minor code size savings for some floating point SPEC
benchmarks. (Around 0.2% for 453.povray and 450.soplex)

This issue doesn't seem to show up due to regbankselect or anything similar. So,
this patch introduces an early select function, `contractCrossBankCopyIntoStore`
which performs the contraction when possible. The selector then continues
normally and selects the correct store opcode, eliminating needless copies
along the way.

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

llvm-svn: 366625

5 years ago[WebAssembly] Compute and export TLS block alignment
Guanzhong Chen [Fri, 19 Jul 2019 23:34:16 +0000 (23:34 +0000)]
[WebAssembly] Compute and export TLS block alignment

Summary:
Add immutable WASM global `__tls_align` which stores the alignment
requirements of the TLS segment.

Add `__builtin_wasm_tls_align()` intrinsic to get this alignment in Clang.

The expected usage has now changed to:

    __wasm_init_tls(memalign(__builtin_wasm_tls_align(),
                             __builtin_wasm_tls_size()));

Reviewers: tlively, aheejin, sbc100, sunfish, alexcrichton

Reviewed By: tlively

Subscribers: dschuff, jgravelle-google, hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

llvm-svn: 366624

5 years ago[LTO] Always mark regular LTO units with EnableSplitLTOUnit=1
Teresa Johnson [Fri, 19 Jul 2019 23:02:58 +0000 (23:02 +0000)]
[LTO] Always mark regular LTO units with EnableSplitLTOUnit=1

Summary:
Regular LTO modules do not need LTO Unit splitting, only ThinLTO does
(they must be consistently split into regular and Thin units for
optimizations such as whole program devirtualization and lower type
tests). In order to avoid spurious errors from LTO when combining with
split ThinLTO modules, always set this flag for regular LTO modules.

Reviewers: pcc

Subscribers: mehdi_amini, Prazek, inglorion, steven_wu, dexonsmith, cfe-commits

Tags: #clang

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

llvm-svn: 366623

5 years agoRe-commit: r366610 and r366612: Expand pseudo-components before embedding in llvm...
Daniel Sanders [Fri, 19 Jul 2019 22:46:47 +0000 (22:46 +0000)]
Re-commit: r366610 and r366612: Expand pseudo-components before embedding in llvm-config

There were two main problems:
* The 'nativecodegen' pseudo-component was unconditionally adding
  ${native_tgt}CodeGen even though it conditionally added ${native_tgt}Info and
  ${native_tgt}Desc. This has been fixed by making ${native_tgt}CodeGen
  conditional too
* The 'all' pseudo-component was causing library names like LLVMLLVMDemangle as
  the expansion was to a library name and not a component. There doesn't seem to
  be a list of available components anywhere so this has been fixed by moving the
  expansion of 'all' back where it was before. This manifested in different ways
  on different builders but it was the same root cause

llvm-svn: 366622

5 years agoAMDGPU/GlobalISel: Legalize GEP for other 32-bit address spaces
Matt Arsenault [Fri, 19 Jul 2019 22:28:44 +0000 (22:28 +0000)]
AMDGPU/GlobalISel: Legalize GEP for other 32-bit address spaces

llvm-svn: 366621

5 years ago[NFC] Remove unused variable
Denis Bakhvalov [Fri, 19 Jul 2019 21:59:42 +0000 (21:59 +0000)]
[NFC] Remove unused variable

Change-Id: I5aee24dcdf6eebfbf788e52be22463387f23d927
llvm-svn: 366620

5 years ago[AMDGPU] Autogenerate register sequences in tuples
Stanislav Mekhanoshin [Fri, 19 Jul 2019 21:43:42 +0000 (21:43 +0000)]
[AMDGPU] Autogenerate register sequences in tuples

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

llvm-svn: 366619

5 years agoRevert "Fix asan infinite loop on undefined symbol"
Matthew Voss [Fri, 19 Jul 2019 21:41:07 +0000 (21:41 +0000)]
Revert "Fix asan infinite loop on undefined symbol"

This reverts commit 8e46275488ca453a24964cb26be0736172ad1db8.

This was failing on sanitizer-x86_64-linux and our internal CI.

llvm-svn: 366618

5 years agoDisallow most calling convention attributes on PS4
Sunil Srivastava [Fri, 19 Jul 2019 21:38:34 +0000 (21:38 +0000)]
Disallow most calling convention attributes on PS4

PS4 now only allows "cdecl", and its equivalent on PS4, "sysv_abi".

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

llvm-svn: 366617

5 years ago[AMDGPU] Fixed occupancy calculation for gfx10
Stanislav Mekhanoshin [Fri, 19 Jul 2019 21:29:51 +0000 (21:29 +0000)]
[AMDGPU] Fixed occupancy calculation for gfx10

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

llvm-svn: 366616

5 years agoRevert r366610 and r366612: Expand pseudo-components before embedding in llvm-config
Daniel Sanders [Fri, 19 Jul 2019 21:11:05 +0000 (21:11 +0000)]
Revert r366610 and r366612: Expand pseudo-components before embedding in llvm-config

Some targets are missing LLVMDemangle, one is adding the LLVM prefix twice, and two
are hitting the very error this patch fixes for my target. Reverting while I work
through the reports.

llvm-svn: 366615

5 years ago[InstCombine] Fix copy/paste mistake in the test cases I added for PR42691. NFC
Craig Topper [Fri, 19 Jul 2019 21:09:21 +0000 (21:09 +0000)]
[InstCombine] Fix copy/paste mistake in the test cases I added for PR42691. NFC

llvm-svn: 366614

5 years agoAMDGPU: Avoid custom predicates for stores with glue
Matt Arsenault [Fri, 19 Jul 2019 21:01:30 +0000 (21:01 +0000)]
AMDGPU: Avoid custom predicates for stores with glue

llvm-svn: 366613

5 years agoFix a latent bug discovered by r366610: nativecodegen includes X86CodeGen when X86...
Daniel Sanders [Fri, 19 Jul 2019 20:58:11 +0000 (20:58 +0000)]
Fix a latent bug discovered by r366610: nativecodegen includes X86CodeGen when X86 is not compiled

I believe this to have been a latent bug as the same expansion checks for the
existence of ${native_tgt}Info and ${native_tgt}Desc and only adds them if
they were compiled but unconditionally adds ${native_tgt}CodeGen.

This should fix llvm-clang-x86_64-win-fast which builds ARM only on an X86 host and similar builders.

llvm-svn: 366612

5 years ago[InstCombine] Add test cases for PR42691. NFC
Craig Topper [Fri, 19 Jul 2019 20:48:52 +0000 (20:48 +0000)]
[InstCombine] Add test cases for PR42691. NFC

llvm-svn: 366611