platform/upstream/llvm.git
4 years ago[NFC][InstCombine] Negator: do not include unneeded "llvm/IR/DerivedTypes.h" header
Roman Lebedev [Wed, 17 Jun 2020 18:16:45 +0000 (21:16 +0300)]
[NFC][InstCombine] Negator: do not include unneeded "llvm/IR/DerivedTypes.h" header

4 years ago[WebAssembly] Fix bug in FixBrTables and use branch analysis utils
Thomas Lively [Wed, 17 Jun 2020 19:34:45 +0000 (12:34 -0700)]
[WebAssembly] Fix bug in FixBrTables and use branch analysis utils

Summary:
This commit fixes a bug in the FixBrTables pass in which an
unconditional branch from the switch header block to the jump table
block was not removed before the blocks were combined. The result was
an invalid CFG in the MachineFunction. This commit also switches from
using bespoke branch analysis and deletion code to using the standard
utilities for the same.

Reviewers: aheejin, dschuff

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

Tags: #llvm

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

4 years agoRevert 'This is a test commit - ded57e1a06a6ba
Ronak Chauhan [Wed, 17 Jun 2020 19:33:42 +0000 (01:03 +0530)]
Revert 'This is a test commit - ded57e1a06a6ba

4 years agoThis is a test commit
Ronak Chauhan [Wed, 17 Jun 2020 19:31:19 +0000 (01:01 +0530)]
This is a test commit

4 years ago[clang-tidy] Prune dead code. NFC.
Benjamin Kramer [Wed, 17 Jun 2020 19:16:59 +0000 (21:16 +0200)]
[clang-tidy] Prune dead code. NFC.

4 years ago[flang] Fix out-of-tree builds
Tim Keith [Wed, 17 Jun 2020 19:01:59 +0000 (12:01 -0700)]
[flang] Fix out-of-tree builds

Replace two MLIR dependencies with MLIRLinalgOps.

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

4 years agoRevert "[OpenMP][NFC] Added DeviceID and Event pointer to __tgt_async_info"
Shilei Tian [Wed, 17 Jun 2020 19:01:16 +0000 (15:01 -0400)]
Revert "[OpenMP][NFC] Added DeviceID and Event pointer to __tgt_async_info"

This reverts commit ee1bf45e1d42d7f386d8321c3a8799476344ad91.

4 years ago[InlineSpiller] add assert about spills post terminators
Nick Desaulniers [Wed, 17 Jun 2020 18:51:51 +0000 (11:51 -0700)]
[InlineSpiller] add assert about spills post terminators

Summary:
This invariant is being violated in the test case
https://reviews.llvm.org/D77849, related to the use of the relatively
new ability for callbr to have return values, and MachineBasicBlocks
with INLINEASM_BR terminators to emit live out register defs.

As noted in the comment, this triggers invariant violations in
MachineVerifier via `llc -verify-machineinstrs` or
`llc -verify-regalloc`, since only MachineInstrs that are terminators
are allowed to follow the first terminator.

https://reviews.llvm.org/D75098 may rework this very assertion if we're
spilling via a (proposed) TCOPY MachineInstr.

Reviewers: void, efriedma, arsenm

Reviewed By: efriedma

Subscribers: qcolombet, wdng, hiraditya, llvm-commits, srhines

Tags: #llvm

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

4 years ago[clang-tidy][NFC] Remove the double look-up on IncludeInserter
Nathan James [Wed, 17 Jun 2020 18:48:12 +0000 (19:48 +0100)]
[clang-tidy][NFC] Remove the double look-up on IncludeInserter

Refactor out the double lookup in `IncludeInserter` when trying to get the `IncludeSorter` for a specified `FileID`.

Reviewed By: aaron.ballman

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

4 years agoBreakCriticalEdges for callbr indirect dests
Nick Desaulniers [Wed, 17 Jun 2020 18:37:31 +0000 (11:37 -0700)]
BreakCriticalEdges for callbr indirect dests

Summary:
llvm::SplitEdge was failing an assertion that the BasicBlock only had
one successor (for BasicBlocks terminated by CallBrInst, we typically
have multiple successors).  It was surprising that the earlier call to
SplitCriticalEdge did not handle the critical edge (there was an early
return).  Removing that triggered another assertion relating to creating
a BlockAddress for a BasicBlock that did not (yet) have a parent, which
is a simple order of operations issue in llvm::SplitCriticalEdge (a
freshly constructed BasicBlock must be inserted into a Function's basic
block list to have a parent).

Thanks to @nathanchance for the report.
Fixes: https://github.com/ClangBuiltLinux/linux/issues/1018

Reviewers: craig.topper, jyknight, void, fhahn, efriedma

Reviewed By: efriedma

Subscribers: eli.friedman, rnk, efriedma, fhahn, hiraditya, llvm-commits, nathanchance, srhines

Tags: #llvm

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

4 years ago[mlir] [VectorOps] Add create mask integration tests
aartbik [Tue, 16 Jun 2020 19:15:40 +0000 (12:15 -0700)]
[mlir] [VectorOps] Add create mask integration tests

Summary:
Two integration tests focused on i1 vectors, which exposed omissions
in the llvm backend which have since then been fixed. Note that this also
exposed an inaccuracy for print_i1 which has been fixed in this CL:
for a pure C ABI, int should be used rather than bool.

Reviewers: nicolasvasilache, ftynse, reidtatge, andydavis1, bkramer

Reviewed By: bkramer

Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, stephenneuendorffer, Joonsoo, grosul1, frgossen, Kayjukh, jurahul, msifontes

Tags: #mlir

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

4 years ago[libc][benchmarks] Link the memory benchmark exes to functions from LLVM libc.
Siva Chandra Reddy [Mon, 15 Jun 2020 20:54:53 +0000 (13:54 -0700)]
[libc][benchmarks] Link the memory benchmark exes to functions from LLVM libc.

Summary:
To get the target order correct, the benchmarks directory has been moved
one level higher. Previously, it was living in the utils directory. The
utils directory is a collection of utils which are to be used by the
tests and implementations. However, benchmarks *use* the
implementations. So, moving it out of utils helps us setup proper
target level dependencies.

Reviewers: gchatelet

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

4 years ago[lit] Avoid re-iterating result codes in different places
Julian Lettner [Wed, 17 Jun 2020 18:25:25 +0000 (11:25 -0700)]
[lit] Avoid re-iterating result codes in different places

Let's have one canonical place to define ResultCode instances and their
labels.

Also make ResultCode's `__init__` function self-registering to better
support custom ResultCodes.

4 years ago[OpenMP][NFC] Added DeviceID and Event pointer to __tgt_async_info
Shilei Tian [Wed, 17 Jun 2020 18:29:09 +0000 (14:29 -0400)]
[OpenMP][NFC] Added DeviceID and Event pointer to __tgt_async_info

DeviceID is added for some cases that we only have the __tgt_async_info but do
not know its corresponding device id. However, to communicate with target
plugins, we need that information.

Event is added for another way to synchronize.

4 years ago[llvm-readobj] set --elf-cg-profile as alias of --cg-profile
Zequan Wu [Mon, 15 Jun 2020 17:21:47 +0000 (10:21 -0700)]
[llvm-readobj] set --elf-cg-profile as alias of --cg-profile

Summary: Rename --elf-cg-profile to --cg-profile and keep --elf-cg-profile as an alias of --cg-profile.

Reviewers: jhenderson, MaskRay, espindola, hans

Reviewed By: jhenderson, MaskRay

Subscribers: emaste, rupprecht, llvm-commits

Tags: #llvm

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

4 years ago[CGP] Reset the debug location when promoting zext(s).
Davide Italiano [Wed, 17 Jun 2020 17:29:47 +0000 (10:29 -0700)]
[CGP] Reset the debug location when promoting zext(s).

When the zext gets promoted, it used to retain the original location,
which pessimizes the debugging experience causing an unexpected
jump in stepping at -Og.

Fixes https://bugs.llvm.org/show_bug.cgi?id=46120 (which also
contains a full C repro).

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

4 years ago[xray] Option to omit the function index
Ian Levesque [Wed, 17 Jun 2020 00:36:11 +0000 (20:36 -0400)]
[xray] Option to omit the function index

Summary:
Add a flag to omit the xray_fn_idx to cut size overhead and relocations
roughly in half at the cost of reduced performance for single function
patching.  Minor additions to compiler-rt support per-function patching
without the index.

Reviewers: dberris, MaskRay, johnislarry

Subscribers: hiraditya, arphaman, cfe-commits, #sanitizers, llvm-commits

Tags: #clang, #sanitizers, #llvm

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

4 years ago[X86] For 32-bit targets, emit two-byte NOP when possible
Alexandre Ganea [Wed, 17 Jun 2020 17:26:10 +0000 (13:26 -0400)]
[X86] For 32-bit targets, emit two-byte NOP when possible

In order to support hot-patching, we need to make sure the first emitted instruction in a function is a two-byte+ op. This is already the case on x86_64, which seems to always emit two-byte+ ops. However on 32-bit targets this wasn't the case.

PATCHABLE_OP now lowers to a XCHG AX, AX, (66 90) like MSVC does. However when targetting pentium3 (/arch:SSE) or i386 (/arch:IA32) targets, we generate MOV EDI,EDI (8B FF) like MSVC does. This is for compatiblity reasons with older tools that rely on this two byte pattern.

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

4 years ago[X86] Change signature of EmitNops. NFC.
Alexandre Ganea [Wed, 17 Jun 2020 16:08:12 +0000 (12:08 -0400)]
[X86] Change signature of EmitNops. NFC.

This is to support https://reviews.llvm.org/D81301.

4 years ago[llvm-cov gcov] Support clang<11 fake 4.2 format
Fangrui Song [Wed, 17 Jun 2020 17:17:15 +0000 (10:17 -0700)]
[llvm-cov gcov] Support clang<11 fake 4.2 format

Test cases are restored from a3bed4bd3743b5fee1e66116a63089df742bcae1

4 years ago[lldb/Test] Fix tests that rely on logfiles with reproducers.
Jonas Devlieghere [Wed, 17 Jun 2020 16:32:17 +0000 (09:32 -0700)]
[lldb/Test] Fix tests that rely on logfiles with reproducers.

Now that the log file is included in the reproducers, the path needs to
be remapped for the test to find the new file in the reproducer.

4 years ago[clang-tools-extra] Prevent linking to duplicate .a libs and dylib
Michał Górny [Tue, 16 Jun 2020 18:43:55 +0000 (20:43 +0200)]
[clang-tools-extra] Prevent linking to duplicate .a libs and dylib

Fix various tool libraries not to link to clang's .a libraries and dylib
simultaneously.  This may cause breakage, in particular through
duplicate command-line option declarations.

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

4 years ago[llvm] Disable linking llvm-exegesis to dylib
Michał Górny [Tue, 16 Jun 2020 10:31:36 +0000 (12:31 +0200)]
[llvm] Disable linking llvm-exegesis to dylib

Force linking llvm-exegesis to static LLVM libraries instead of dylib
to prevent duplicate symbols due to linking both.  Ideally, we'd want
to link to the dylib only here but the target sub-libraries use hidden
symbols from LLVM target libraries and therefore linking the dylib
fails.

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

4 years ago[llvm] Avoid linking llvm-cfi-verify to duplicate libs
Michał Górny [Tue, 16 Jun 2020 10:16:52 +0000 (12:16 +0200)]
[llvm] Avoid linking llvm-cfi-verify to duplicate libs

Fix the CMake rules for LLVMCFIVerify library not to pull duplicate
LLVM .a libraries when linking to the dylib.  This prevents problems
due to duplicate symbols and apparently fixes mingw32.

This is an alternative approach to D44650 that just forces .a libraries
instead.  However, there doesn't seem to be any reason to do that.

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

4 years ago[llvm] [CommandLine] Do not suggest really hidden opts in nearest lookup
Michał Górny [Wed, 17 Jun 2020 10:22:48 +0000 (12:22 +0200)]
[llvm] [CommandLine] Do not suggest really hidden opts in nearest lookup

Skip 'really hidden' options when performing lookup of the nearest
option when invalid option was passed.  Since these options aren't even
documented in --help-hidden, it seems inconsistent to suggest them
to users.

This fixes clang-tools-extra test failures due to unexpected suggestions
when linking the tools to LLVM dylib (that provides more options than
the subset of LLVM libraries linked directly).

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

4 years ago[Clang][Driver] Remove gold linker support for PS4 toolchain
Yuanfang Chen [Tue, 16 Jun 2020 20:50:41 +0000 (13:50 -0700)]
[Clang][Driver] Remove gold linker support for PS4 toolchain

Reviewers: probinson

Subscribers: cfe-commits

Tags: #clang

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

4 years ago[AMDGPU] Skip CFIInstructions in SIInsertWaitcnts
Scott Linder [Wed, 17 Jun 2020 16:38:34 +0000 (12:38 -0400)]
[AMDGPU] Skip CFIInstructions in SIInsertWaitcnts

Summary:
CFI emitted during PEI at the beginning of the prologue needs to apply
to any inserted waitcnts on function entry.

Reviewers: arsenm, t-tye, RamNalamothu

Reviewed By: arsenm

Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kerbowa, llvm-commits

Tags: #llvm, #debug-info

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

4 years ago[clangd] Make use of preamble bounds from the patch inside ReplayPreamble
Kadir Cetinkaya [Tue, 16 Jun 2020 19:21:45 +0000 (21:21 +0200)]
[clangd] Make use of preamble bounds from the patch inside ReplayPreamble

Summary:
Clangd was using bounds from the stale preamble, which might result in
crashes. For example:
```
 #include "a.h"
 #include "b.h" // this line is newly inserted
 #include "c.h"
```

PreambleBounds for the baseline only contains first two lines, but
ReplayPreamble logic contains an include from the third line. This would
result in a crash as we only lex preamble part of the current file
during ReplayPreamble.

This patch adds a `preambleBounds` method to PreamblePatch, which can be
used to figure out preamble bounds for the current version of the file.
Then uses it when attaching ReplayPreamble, so that it can lex the
up-to-date preamble region.

Reviewers: sammccall

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

Tags: #clang

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

4 years ago[NFC] Move getAll{S,V}GPR{32,128} methods to SIFrameLowering
vnalamot [Wed, 17 Jun 2020 16:08:09 +0000 (12:08 -0400)]
[NFC] Move getAll{S,V}GPR{32,128} methods to SIFrameLowering

Summary:
Future patch needs some of these in multiple places.

The definitions of these can't be in the header and be eligible for
inlining without making the full declaration of GCNSubtarget visible.
I'm not sure what the right trade-off is, but I opted to not bloat
SIRegisterInfo.h

Reviewers: arsenm, cdevadas

Reviewed By: arsenm

Subscribers: RamNalamothu, qcolombet, jvesely, wdng, nhaehnle, hiraditya, kerbowa, llvm-commits

Tags: #llvm

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

4 years ago[OpenMPOPT][NFC] Introducing OMPInformationCache.
sstefan1 [Sat, 13 Jun 2020 21:57:48 +0000 (23:57 +0200)]
[OpenMPOPT][NFC] Introducing OMPInformationCache.

Summary:
Introduction of OpenMP-specific information cache based on Attributor's `InformationCache`. This should make it easier to share information between them.

Reviewers: jdoerfert, JonChesterfield, hamax97, jhuber6, uenoku

Subscribers: yaxunl, hiraditya, guansong, uenoku, llvm-commits

Tags: #llvm

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

4 years ago[AMDGPU] Simplify GCNPassConfig::addOptimizedRegAlloc. NFC.
Jay Foad [Wed, 17 Jun 2020 14:55:58 +0000 (15:55 +0100)]
[AMDGPU] Simplify GCNPassConfig::addOptimizedRegAlloc. NFC.

4 years ago[X86] Regenerate mixed-ptr tests checks
Simon Pilgrim [Wed, 17 Jun 2020 14:48:07 +0000 (15:48 +0100)]
[X86] Regenerate mixed-ptr tests checks

Help reduce the diffs in D81517

4 years agoScalarEvolution.h - reduce LoopInfo.h include to forward declarations. NFC.
Simon Pilgrim [Wed, 17 Jun 2020 14:24:59 +0000 (15:24 +0100)]
ScalarEvolution.h - reduce LoopInfo.h include to forward declarations. NFC.

Move ScalarEvolution::forgetLoopDispositions implementation to ScalarEvolution.cpp to remove the dependency.

Add implicit header dependency to source files where necessary.

4 years ago[ARM] Reimplement MVE Tail-Predication pass using @llvm.get.active.lane.mask
Sjoerd Meijer [Wed, 17 Jun 2020 13:32:55 +0000 (14:32 +0100)]
[ARM] Reimplement MVE Tail-Predication pass using @llvm.get.active.lane.mask

To set up a tail-predicated loop, we need to to calculate the number of
elements processed by the loop. We can now use intrinsic
@llvm.get.active.lane.mask() to do this, which is emitted by the vectoriser in
D79100. This intrinsic generates a predicate for the masked loads/stores, and
consumes the Backedge Taken Count (BTC) as its second argument. We can now use
that to reconstruct the loop tripcount, instead of the IR pattern match
approach we were using before.

Many thanks to Eli Friedman and Sam Parker for all their help with this work.

This also adds overflow checks for the different, new expressions that we
create: the loop tripcount, and the sub expression that calculates the
remaining elements to be processed. For the latter, SCEV is not able to
calculate precise enough bounds, so we work around that at the moment, but is
not entirely correct yet, it's conservative. The overflow checks can be
overruled with a force flag, which is thus potentially unsafe (but not really
because the vectoriser is the only place where this intrinsic is emitted at the
moment). It's also good to mention that the tail-predication pass is not yet
enabled by default.  We will follow up to see if we can implement these
overflow checks better, either by a change in SCEV or we may want revise the
definition of llvm.get.active.lane.mask.

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

4 years agoRevert "[InlineCost] InlineCostAnnotationWriterPass introduced"
Kirill Naumov [Wed, 17 Jun 2020 14:02:34 +0000 (14:02 +0000)]
Revert "[InlineCost] InlineCostAnnotationWriterPass introduced"

This reverts commit 37e06e8f5c6ee39a1d7cbaf7d5f5a3ebfa1b4e15.

4 years agoRevert "[InlineCost] PrinterPass prints constants to which instructions are simplified"
Kirill Naumov [Wed, 17 Jun 2020 14:02:29 +0000 (14:02 +0000)]
Revert "[InlineCost] PrinterPass prints constants to which instructions are simplified"

This reverts commit 52b0db22f8cfb594c32389224570681d2d2c2f21.

4 years agoRevert "[InlineCost] GetElementPtr with constant operands"
Kirill Naumov [Wed, 17 Jun 2020 14:02:18 +0000 (14:02 +0000)]
Revert "[InlineCost] GetElementPtr with constant operands"

This reverts commit 34fba68d80051e3c53e7843157c036f6d511ae03.

4 years ago[InlineCost] GetElementPtr with constant operands
Kirill Naumov [Tue, 2 Jun 2020 19:22:41 +0000 (19:22 +0000)]
[InlineCost] GetElementPtr with constant operands

If the GEP instruction contanins only constants as its arguments,
then it should be recognized as a constant. For now, there was
also added a flag to turn off this simplification if it causes
any regressions ("disable-gep-const-evaluation") which is off
by default. Once I gather needed data of the effectiveness of
this simplification, the flag will be deleted.

Reviewers: apilipenko, davidxl, mtrofin

Reviewed By: mtrofin

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

4 years ago[InlineCost] PrinterPass prints constants to which instructions are simplified
Kirill Naumov [Tue, 2 Jun 2020 18:57:30 +0000 (18:57 +0000)]
[InlineCost] PrinterPass prints constants to which instructions are simplified

This patch enables printing of constants to see which instructions were
constant-folded. Needed for tests and better visiual analysis of
inliner's work.

Reviewers: apilipenko, mtrofin, davidxl, fedor.sergeev

Reviewed By: mtrofin

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

4 years ago[InlineCost] InlineCostAnnotationWriterPass introduced
Kirill Naumov [Thu, 11 Jun 2020 22:24:10 +0000 (22:24 +0000)]
[InlineCost] InlineCostAnnotationWriterPass introduced

This class allows to see the inliner's decisions for better
optimization verifications and tests. To use, use flag
"-passes="print<inline-cost>"".

Reviewers: apilipenko, mtrofin, davidxl, fedor.sergeev

Reviewed By: mtrofin

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

4 years ago[clang-tidy] warnings-as-error no longer exits with ErrorCount
Nathan James [Wed, 17 Jun 2020 13:35:32 +0000 (14:35 +0100)]
[clang-tidy] warnings-as-error no longer exits with ErrorCount

When using `-warnings-as-errors`, If there are any warnings promoted to errors, clang-tidy exits with the number of warnings. This really isn't needed and can cause issues when the number of warnings doesn't fit into 8 bits as POSIX terminals aren't designed to handle more than that.
This addresses https://bugs.llvm.org/show_bug.cgi?id=46305.

Bug originally added in D15528

Reviewed By: aaron.ballman

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

4 years agoRevert "GlobalISel: Make LLT constructors constexpr"
Hans Wennborg [Wed, 17 Jun 2020 13:31:12 +0000 (15:31 +0200)]
Revert "GlobalISel: Make LLT constructors constexpr"

This reverts commit 5a95be22d248be654b992dfb25e3850dbb182a14.

It causes GCC 5.3 to segfault:

In file included from /work/llvm.monorepo/llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp:357:0:                                               lib/Target/AArch64/AArch64GenGlobalISel.inc:189:17:   in constexpr expansion of ‘llvm::LLT::scalar(16u)’
lib/Target/AArch64/AArch64GenGlobalISel.inc:205:1: internal compiler error: Segmentation fault

4 years ago[OPENMP]Fix overflow during counting the number of iterations.
Alexey Bataev [Thu, 4 Jun 2020 16:07:13 +0000 (12:07 -0400)]
[OPENMP]Fix overflow during counting the number of iterations.

Summary:
The OpenMP loops are normalized and transformed into the loops from 0 to
max number of iterations. In some cases, original scheme may lead to
overflow during calculation of number of iterations. If it is unknown,
if we can end up with overflow or not (the bounds are not constant and
  we cannot define if there is an overflow), cast original type to the
  unsigned.

Reviewers: jdoerfert

Subscribers: yaxunl, guansong, sstefan1, openmp-commits, cfe-commits, caomhin

Tags: #clang, #openmp

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

4 years ago[OPENMP50]Codegen for scan directive in for simd regions.
Alexey Bataev [Tue, 16 Jun 2020 21:06:49 +0000 (17:06 -0400)]
[OPENMP50]Codegen for scan directive in for simd regions.

Summary:
Added codegen for scan directives in parallel for regions.

Emits the code for the directive with inscan reductions.
Original code:
```
 #pragma omp for simd reduction(inscan, op : ...)
for(...) {
  <input phase>;
  #pragma omp scan (in)exclusive(...)
  <scan phase>
}
```
is transformed to something:
```
size num_iters = <num_iters>;
<type> buffer[num_iters];
 #pragma omp for simd
for (i: 0..<num_iters>) {
  <input phase>;
  buffer[i] = red;
}
 #pragma omp barrier
for (int k = 0; k != ceil(log2(num_iters)); ++k)
for (size cnt = last_iter; cnt >= pow(2, k); --k)
  buffer[i] op= buffer[i-pow(2,k)];
 #pragma omp for simd
for (0..<num_iters>) {
  red = InclusiveScan ? buffer[i] : buffer[i-1];
  <scan phase>;
}
```

Reviewers: jdoerfert

Reviewed By: jdoerfert

Subscribers: yaxunl, guansong, sstefan1, cfe-commits, caomhin

Tags: #clang

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

4 years ago[SCCP] Add a few more additional sext tests (NFC).
Florian Hahn [Wed, 17 Jun 2020 12:39:36 +0000 (13:39 +0100)]
[SCCP] Add a few more additional sext tests (NFC).

4 years agoRemove global std::strings. NFCI.
Benjamin Kramer [Wed, 17 Jun 2020 12:27:36 +0000 (14:27 +0200)]
Remove global std::strings. NFCI.

4 years agoFollow up of rGe345d547a0d5, and attempt to pacify buildbot:
Sjoerd Meijer [Wed, 17 Jun 2020 12:24:09 +0000 (13:24 +0100)]
Follow up of rGe345d547a0d5, and attempt to pacify buildbot:

"error: 'get' is deprecated: The base class version of get with the scalable
argument defaulted to false is deprecated."

Changed VectorType::get() -> FixedVectorType::get().

4 years agoRecommit "[LV] Emit @llvm.get.active.lane.mask for tail-folded loops"
Sjoerd Meijer [Wed, 17 Jun 2020 09:48:20 +0000 (10:48 +0100)]
Recommit "[LV] Emit @llvm.get.active.lane.mask for tail-folded loops"

Fixed ARM regression test.

Please see the original commit message rG47650451738c for details.

4 years ago[SYCL][OpenMP] Implement thread-local storage restriction
Mariya Podchishchaeva [Wed, 17 Jun 2020 11:31:38 +0000 (14:31 +0300)]
[SYCL][OpenMP] Implement thread-local storage restriction

Summary:
SYCL and OpenMP prohibits thread local storage in device code,
so this commit ensures that error is emitted for device code and not
emitted for host code when host target supports it.

Reviewers: jdoerfert, erichkeane, bader

Reviewed By: jdoerfert, erichkeane

Subscribers: guansong, riccibruno, ABataev, yaxunl, ebevhan, Anastasia, sstefan1, cfe-commits

Tags: #clang

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

4 years ago[LSR] Filter for postinc formulae
David Green [Fri, 29 May 2020 09:53:30 +0000 (10:53 +0100)]
[LSR] Filter for postinc formulae

In more complicated loops we can easily hit the complexity limits of
loop strength reduction. If we do and filtering occurs, it's all too
easy to remove the wrong formulae for post-inc preferring accesses due
to it attempting to maximise register re-use. The patch adds an
alternative filtering step when the target is preferring postinc to pick
postinc formulae instead, hopefully lowering the complexity to below the
limit so that aggressive filtering is not needed.

There is also a change in here to stop considering existing addrecs as
free under postinc. We should already be modelling them as a reg so
don't want it to cause us to get the cost wrong. (I'm not sure that code
makes sense in general, but there are X86 tests specifically for it
where it seems to be helping so have left it around for the standard
non-post-inc case).

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

4 years ago[llvm-readobj] - Do not crash when GnuHashTable->symndx is greater than the dynamic...
Georgii Rymar [Tue, 16 Jun 2020 14:05:51 +0000 (17:05 +0300)]
[llvm-readobj] - Do not crash when GnuHashTable->symndx is greater than the dynamic symbols count.

`Elf_GnuHash_Impl` has the following method:

```
ArrayRef<Elf_Word> values(unsigned DynamicSymCount) const {
  return ArrayRef<Elf_Word>(buckets().end(), DynamicSymCount - symndx);
}
```

When DynamicSymCount is less than symndx we return an array with the huge broken size.
This patch fixes the issue and adds an assert. This assert helped to fix an issue
in one of the test cases.

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

4 years ago[llvm-readobj] - Split the printGnuHashTable(). NFCI.
Georgii Rymar [Tue, 16 Jun 2020 11:35:05 +0000 (14:35 +0300)]
[llvm-readobj] - Split the printGnuHashTable(). NFCI.

`printGnuHashTable` contains the code to check the GNU hash table.
This patch splits it to `getGnuHashTableChains` helper
(and reorders slightly to reduce).

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

4 years ago[AMDGPU] Fix failure in VCC spilling
Carl Ritson [Wed, 17 Jun 2020 10:38:25 +0000 (19:38 +0900)]
[AMDGPU] Fix failure in VCC spilling

Spills of VCC (SGPR64) will fail with new SGPR spill code,
because super register is not correctly resolved.

Reviewed By: arsenm

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

4 years ago[CallPrinter] Remove static constructor.
Benjamin Kramer [Wed, 17 Jun 2020 11:00:32 +0000 (13:00 +0200)]
[CallPrinter] Remove static constructor.

No need to have std::string here. NFC.

4 years ago[SCCP] Precommit some sext tests (NFC).
Florian Hahn [Fri, 12 Jun 2020 18:52:32 +0000 (19:52 +0100)]
[SCCP] Precommit some sext tests (NFC).

4 years ago[lldb] Remove xfail aarch64/linux from TestBuiltinTrap.py
Muhammad Omair Javaid [Wed, 17 Jun 2020 10:39:52 +0000 (15:39 +0500)]
[lldb] Remove xfail aarch64/linux from TestBuiltinTrap.py

The underlying clang bug seems to have been fixed in and test is
consistently passing on aarch64-linux buildbot.

4 years agoReturn "[InstCombine] Simplify compare of Phi with constant inputs against a constant"
Sam Parker [Wed, 17 Jun 2020 10:29:45 +0000 (11:29 +0100)]
Return "[InstCombine] Simplify compare of Phi with constant inputs against a constant"

I originally reverted the patch because it was causing performance
issues, but now I think it's just enabling simplify-cfg to do
something that I don't want instead :)

Sorry for the noise.

This reverts commit 3e39760f8eaad4770efa05824768e67237915cf5.

4 years ago[NFC] Run clang-format on clang/test/OpenMP/nvptx_target_codegen.cpp
Alexey Bader [Wed, 17 Jun 2020 10:02:35 +0000 (13:02 +0300)]
[NFC] Run clang-format on clang/test/OpenMP/nvptx_target_codegen.cpp

4 years ago[FileCheck] Implement * and / operators for ExpressionValue.
Paul Walker [Mon, 1 Jun 2020 10:09:58 +0000 (10:09 +0000)]
[FileCheck] Implement * and / operators for ExpressionValue.

Subscribers: arichardson, hiraditya, thopre, llvm-commits

Tags: #llvm

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

4 years ago[IR] Don't copy profile metadata in createCallMatchingInvoke()
Hans Wennborg [Wed, 17 Jun 2020 08:26:30 +0000 (10:26 +0200)]
[IR] Don't copy profile metadata in createCallMatchingInvoke()

The invoke instruction can have profile metadata with branch_weights,
which does not make sense for a call instruction and will be
rejected by the verifier.

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

4 years agoFix LoopIdiomRecognize pass return status
serge-sans-paille [Thu, 4 Jun 2020 20:25:14 +0000 (22:25 +0200)]
Fix LoopIdiomRecognize pass return status

Introduce an helper class to aggregate the cleanup in case of rollback.

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

4 years agoRevert "[LV] Emit @llvm.get.active.mask for tail-folded loops"
Sjoerd Meijer [Wed, 17 Jun 2020 09:09:17 +0000 (10:09 +0100)]
Revert "[LV] Emit @llvm.get.active.mask for tail-folded loops"

This reverts commit 47650451738c821993c763356854b560a0f9f550
while I investigate the build bot failures.

4 years ago[NFC] Add API for edge domination check in dom tree
Max Kazantsev [Wed, 17 Jun 2020 09:02:57 +0000 (16:02 +0700)]
[NFC] Add API for edge domination check in dom tree

4 years ago[SCCP] Move common code to simplify basic block to helper (NFC).
Florian Hahn [Wed, 17 Jun 2020 08:40:47 +0000 (09:40 +0100)]
[SCCP] Move common code to simplify basic block to helper (NFC).

Reviewers: efriedma, davide

Reviewed By: efriedma

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

4 years ago[LV] Emit @llvm.get.active.mask for tail-folded loops
Sjoerd Meijer [Wed, 10 Jun 2020 07:37:47 +0000 (08:37 +0100)]
[LV] Emit @llvm.get.active.mask for tail-folded loops

This emits new IR intrinsic @llvm.get.active.mask for tail-folded vectorised
loops if the intrinsic is supported by the backend, which is checked by
querying TargetTransform hook emitGetActiveLaneMask.

This intrinsic creates a mask representing active and inactive vector lanes,
which is used by the masked load/store instructions that are created for
tail-folded loops. The semantics of @llvm.get.active.mask are described here in
LangRef:

https://llvm.org/docs/LangRef.html#llvm-get-active-lane-mask-intrinsics

This intrinsic is also used to provide a hint to the backend. That is, the
second argument of the intrinsic represents the back-edge taken count of the
loop. For MVE, for example, we use that to set up tail-predication, which is a
new form of predication in MVE for vector loops that implicitely predicates the
last vector loop iteration by implicitely setting active/inactive lanes, i.e.
the tail loop is predicated. In order to set up a tail-predicated vector loop,
we need to know the number of data elements processed by the vector loop, which
corresponds the the tripcount of the scalar loop, which we can now reconstruct
using @llvm.get.active.mask.

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

4 years ago[TTI] Refactor emitGetActiveLaneMask
Sjoerd Meijer [Tue, 9 Jun 2020 16:19:57 +0000 (17:19 +0100)]
[TTI] Refactor emitGetActiveLaneMask

Refactor TTI hook emitGetActiveLaneMask and remove the unused arguments
as suggested in D79100.

4 years ago[CallPrinter] Handle freq = 0 case
Kirill Bobyrev [Wed, 17 Jun 2020 08:52:18 +0000 (10:52 +0200)]
[CallPrinter] Handle freq = 0 case

Improvement of the following revision:
bbc629ebd6429d43cfd72d9a0e2b5ca8a4083b54

This might still be problematic if freq = 0, so it's better to check for
that.

4 years ago[CallPrinter] Fix maxFreq = 0 case
Kirill Bobyrev [Wed, 17 Jun 2020 08:44:28 +0000 (10:44 +0200)]
[CallPrinter] Fix maxFreq = 0 case

llvm::getHeatColor becomes a problem when maxFreq = 0 -> freq = 0 =>
log2(double(freq)) / log2(maxFreq) -> log2(0.) / log2(0.) which
results in illegal instruction on some architectures.

Problematic revision: https://reviews.llvm.org/D77172

4 years ago[SveEmitter] Add builtins for svtbl2
Sander de Smalen [Tue, 16 Jun 2020 15:48:08 +0000 (16:48 +0100)]
[SveEmitter] Add builtins for svtbl2

Reviewers: david-arm, efriedma, c-rhodes

Reviewed By: c-rhodes

Tags: #clang

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

4 years ago[clangd] Depend on llvm-config for lit tests
Kadir Cetinkaya [Wed, 17 Jun 2020 08:39:49 +0000 (10:39 +0200)]
[clangd] Depend on llvm-config for lit tests

4 years ago[MemDep] Also remove load instructions from NonLocalDesCache.
Florian Hahn [Wed, 17 Jun 2020 08:24:56 +0000 (09:24 +0100)]
[MemDep] Also remove load instructions from NonLocalDesCache.

Currently load instructions are added to the cache for invariant pointer
group dependencies, but only pointer values are removed currently. That
leads to dangling AssertingVHs in the test case below, where we delete a
load from an invariant pointer group. We should also remove the entries
from the cache.

Fixes PR46054.

Reviewers: efriedma, hfinkel, asbirlea

Reviewed By: efriedma

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

4 years agoUse explicitly unsigned zero to prevent from a warning
Serge Pavlov [Wed, 17 Jun 2020 08:34:00 +0000 (15:34 +0700)]
Use explicitly unsigned zero to prevent from a warning

4 years ago[Test] Add missing opportunity for replacement of select with Phi
Max Kazantsev [Wed, 17 Jun 2020 08:12:58 +0000 (15:12 +0700)]
[Test] Add missing opportunity for replacement of select with Phi

4 years ago[DebugInfo] Unify Cursor usage for all debug line opcodes
James Henderson [Wed, 10 Jun 2020 13:00:36 +0000 (14:00 +0100)]
[DebugInfo] Unify Cursor usage for all debug line opcodes

This is a natural extension of the previous changes to use the Cursor
class independently in the standard and extended opcode paths, and in
turn allows delaying error handling until the entire line has been
printed in verbose mode, removing interleaved output in some cases.

Reviewed by: MaskRay, JDevlieghere

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

4 years ago[gn build] Port 6754a0e2edd
LLVM GN Syncbot [Wed, 17 Jun 2020 08:12:14 +0000 (08:12 +0000)]
[gn build] Port 6754a0e2edd

4 years ago[SafeStack,NFC] Fix names after files move
Vitaly Buka [Mon, 15 Jun 2020 09:37:19 +0000 (02:37 -0700)]
[SafeStack,NFC] Fix names after files move

Summary: Depends on D81831.

Reviewers: eugenis, pcc

Reviewed By: eugenis

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[SafeStack,NFC] Move SafeStackColoring code
Vitaly Buka [Mon, 15 Jun 2020 09:26:28 +0000 (02:26 -0700)]
[SafeStack,NFC] Move SafeStackColoring code

Summary:
This code is going to be used in StackSafety.
This patch is file move with minimal changes. Identifiers
will be fixed in the followup patch.

Reviewers: eugenis, pcc

Reviewed By: eugenis

Subscribers: mgorny, hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[SystemZ] Bugfix in storeLoadCanUseBlockBinary().
Jonas Paulsson [Thu, 11 Jun 2020 16:49:54 +0000 (18:49 +0200)]
[SystemZ] Bugfix in storeLoadCanUseBlockBinary().

Check that the MemoryVT of LoadA matches that of LoadB.

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

Review: Ulrich Weigand

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

4 years agosubdirectories should not use cmake project command
Joachim Protze [Wed, 17 Jun 2020 07:38:56 +0000 (09:38 +0200)]
subdirectories should not use cmake project command

4 years ago[OpenMP][Tool] Header-only multiplexing of OMPT tools
Joachim Protze [Tue, 10 Mar 2020 18:47:45 +0000 (19:47 +0100)]
[OpenMP][Tool] Header-only multiplexing of OMPT tools

Reviewed By: jdoerfert

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

4 years ago[NFC]][PowerPC] Remove unused intrinsic for old CTR loop pass
Kang Zhang [Wed, 17 Jun 2020 07:06:46 +0000 (07:06 +0000)]
[NFC]][PowerPC] Remove unused intrinsic for old CTR loop pass

Summary:

In the patch D62907 the PPC CTRLoops pass has been replaced by Generic
Hardware Loop pass, and it has imported some new intrinsic for Generic
Hardware Loop.

The old intrinsic used in PPC CTRLoops int_ppc_mtctr and
int_ppc_is_decremented_ctr_nonzero is been replaced by
int_set_loop_iterations and loop_decrement.

This patch is to remove above unused two instrinsic.

Reviewed By: shchenz

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

4 years ago[www] Update cxx_dr_status page for recent fixes.
Richard Smith [Wed, 17 Jun 2020 06:56:45 +0000 (23:56 -0700)]
[www] Update cxx_dr_status page for recent fixes.

4 years agoRevert "DR458: Search template parameter scopes in the right order."
Richard Smith [Wed, 17 Jun 2020 06:53:44 +0000 (23:53 -0700)]
Revert "DR458: Search template parameter scopes in the right order."

We weren't re-entering template scopes in the right order, causing this
to break self-host with -fdelayed-template-parsing.

This reverts commit 237c2a23b6d4fa953f5ae910dccf492db61bb959.

4 years ago[Support] Get process statistics in ExecuteAndWait and Wait
Serge Pavlov [Thu, 23 Apr 2020 06:04:52 +0000 (13:04 +0700)]
[Support] Get process statistics in ExecuteAndWait and Wait

The functions sys::ExcecuteAndWait and sys::Wait now have additional
argument of type pointer to structure, which is filled with process
execution statistics upon process termination. These are total and user
execution times and peak memory consumption. By default this argument is
nullptr so existing users of these function must not change behavior.

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

4 years ago[clang] Enable -mms-bitfields by default for mingw targets
Martin Storsjö [Sat, 13 Jun 2020 20:04:40 +0000 (23:04 +0300)]
[clang] Enable -mms-bitfields by default for mingw targets

This matches GCC, which enabled -mms-bitfields by default for
mingw targets in 4.7 [1].

[1] https://www.gnu.org/software/gcc/gcc-4.7/changes.html

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

4 years ago[clang] Don't emit warn_cxx_ms_struct when MSBitfields is enabled globally
Martin Storsjö [Sat, 13 Jun 2020 19:29:52 +0000 (22:29 +0300)]
[clang] Don't emit warn_cxx_ms_struct when MSBitfields is enabled globally

This diagnostic (which defaults to an error, added in
95833f33bda6c92e746e0b0007b69c2c30bfc693) was intended to clearly
point out cases where the C++ ABI won't match the Microsoft C++ ABI,
for cases when this is enabled via a pragma over a region of code.

The MSVC compatible struct layout feature can also be enabled via a
compiler option (-mms-bitfields). If enabled that way, one essentially
can't compile any C++ code unless also building with
-Wno-incompatible-ms-struct (which GCC doesn't support, and projects
developed with GCC aren't setting).

For the MinGW target, it's expected that the C++ ABI won't match
the MSVC one, if this option is used for getting the struct
layout to match MSVC.

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

4 years ago[clang] [MinGW] Link kernel32 once after the last instance of msvcrt
Martin Storsjö [Sat, 30 May 2020 21:05:13 +0000 (00:05 +0300)]
[clang] [MinGW] Link kernel32 once after the last instance of msvcrt

The msvcrt library isn't a pure import library; it does contain
regular object files with wrappers/fallbacks, and these can require
linking against kernel32.

This only makes a difference when linking with ld.bfd, as lld
always searches all static libraries.

This matches a similar change made recently in gcc in
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=850533ab160ef40eccfd039e1e3b138cf26e76b8,
although clang adds --start-group --end-group around these libraries
if -static is specified, which gcc doesn't. But try to match gcc's
linking order in any case, for consistency.

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

4 years ago[DebugInfo] Support parsing and dumping of DWARF64 macro units.
Igor Kudrin [Wed, 17 Jun 2020 05:57:54 +0000 (12:57 +0700)]
[DebugInfo] Support parsing and dumping of DWARF64 macro units.

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

4 years ago[DA] propagate loop live-out values that get used in a branch
Sameer Sahasrabuddhe [Wed, 17 Jun 2020 02:44:50 +0000 (08:14 +0530)]
[DA] propagate loop live-out values that get used in a branch

Values that are uniform within a loop but appear divergent to uses
outside the loop are "tainted" so that such uses are marked
divergent. But if such a use is a branch, then it's divergence needs
to be propagated. The simplest way to do that is to put the branch
back in the main worklist so that it is processed appropriately.

Reviewed By: simoll

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

4 years ago[IR] Add missing GlobalAlias copying of ThreadLocalMode attribute
Itay Bookstein [Tue, 16 Jun 2020 23:17:27 +0000 (16:17 -0700)]
[IR] Add missing GlobalAlias copying of ThreadLocalMode attribute

Summary:
Previously, GlobalAlias::copyAttributesFrom did not preserve ThreadLocalMode,
causing incorrect IR generation in IR linking flows. This patch pushes the code
responsible for copying this attribute from GlobalVariable::copyAttributesFrom
down to GlobalValue::copyAttributesFrom so that it is shared by GlobalAlias.
Fixes PR46297.

Reviewers: tejohnson, pcc, hans

Reviewed By: tejohnson, hans

Subscribers: hiraditya, ibookstein, dexonsmith, llvm-commits

Tags: #llvm

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

4 years agoAMDGPU/GlobalISel: Fix obvious bug in ported 32-bit udiv/urem
Matt Arsenault [Wed, 17 Jun 2020 02:38:33 +0000 (22:38 -0400)]
AMDGPU/GlobalISel: Fix obvious bug in ported 32-bit udiv/urem

This was hidden by the IR expansion in AMDGPUCodeGenPrepare, which I
forgot to turn off.

4 years agoDR458: Search template parameter scopes in the right order.
Richard Smith [Tue, 16 Jun 2020 23:55:56 +0000 (16:55 -0700)]
DR458: Search template parameter scopes in the right order.

C++ unqualified name lookup searches template parameter scopes
immediately after finishing searching the entity the parameters belong
to. (Eg, for a class template, you search the template parameter scope
after looking in that class template and its base classes and before
looking in the scope containing the class template.) This is complicated
by the fact that scope lookup within a template parameter scope looks in
a different sequence of places prior to reaching the end of the
declarator-id in the template declaration.

We used to approximate the proper lookup rule with a hack in the scope /
decl context walk inside name lookup. Now we instead compute the lookup
parent for each template parameter scope. This gets the right answer and
as a bonus is substantially simpler and more uniform.

In order to get this right, we now make sure to enter a distinct Scope
for each template parameter scope. (The fact that we didn't before was
already a bug, but not really observable most of the time, since
template parameters can't shadow each other.)

4 years agoDon't assert if we find a dependently-typed variable in the
Richard Smith [Wed, 17 Jun 2020 02:27:54 +0000 (19:27 -0700)]
Don't assert if we find a dependently-typed variable in the
redeclaration chain for an array.

A prior attempt to fix this in r280330 didn't handle the case where the
old variable is dependent and the new one is not.

It is notable and worrying that the test case in this example forms a
redeclaration chain for a non-dependent variable that includes a
declaration with a dependent type. We should probably fix that too.

4 years ago[PowerPC] remove wrong added FIXME in testcases, NFC
Chen Zheng [Mon, 15 Jun 2020 08:03:32 +0000 (04:03 -0400)]
[PowerPC] remove wrong added FIXME in testcases, NFC

remove the wrong added comments as xsmaddasp is introduced in PWR8

4 years ago[lld-macho] Use uint64_t for getSize() instead of size_t
Jez Ng [Wed, 17 Jun 2020 00:27:28 +0000 (17:27 -0700)]
[lld-macho] Use uint64_t for getSize() instead of size_t

Summary:
So things work on 32-bit machines. (@vzakhari reported the
breakage starting from D80177).

Reviewers: #lld-macho, vzakhari

Subscribers: llvm-commits, vzakhari

Tags: #llvm

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

4 years ago[ObjectYAML][DWARF] Let writeVariableSizedInteger() return Error.
Xing GUO [Wed, 17 Jun 2020 01:29:04 +0000 (09:29 +0800)]
[ObjectYAML][DWARF] Let writeVariableSizedInteger() return Error.

This patch helps change the return type of `writeVariableSizedInteger()` from `void` to `Error`.

Reviewed By: jhenderson

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

4 years agoAMDGPU: Remove intermediate DAG node for trig_preop intrinsic
Matt Arsenault [Wed, 17 Jun 2020 00:45:15 +0000 (20:45 -0400)]
AMDGPU: Remove intermediate DAG node for trig_preop intrinsic

We weren't doing anything with this, and keeping it would just add
more boilerplate for GlobalISel.

4 years ago[lld-macho][test] Fix dylink-lazy.s after 0a5228a02c32cb5b10d43cb154d6d0abaf360ba7
Fangrui Song [Wed, 17 Jun 2020 00:57:59 +0000 (17:57 -0700)]
[lld-macho][test] Fix dylink-lazy.s after 0a5228a02c32cb5b10d43cb154d6d0abaf360ba7

4 years ago[builtins][test] Delete unneeded file headers
Fangrui Song [Wed, 17 Jun 2020 00:46:22 +0000 (17:46 -0700)]
[builtins][test] Delete unneeded file headers

We don't add file headers to tests. The comments are useless as well -
their purpose can be easily inferred from the filenames.

4 years ago[CodeGen][TLS] Set TLS Model for __tls_guard as well.
Jun Ma [Tue, 16 Jun 2020 06:30:36 +0000 (14:30 +0800)]
[CodeGen][TLS] Set TLS Model for __tls_guard as well.

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