platform/upstream/llvm.git
4 years agoAMDGPU/GlobalISel: Legalize unpacked d16 image operations
Matt Arsenault [Wed, 15 Jan 2020 19:23:20 +0000 (14:23 -0500)]
AMDGPU/GlobalISel: Legalize unpacked d16 image operations

On targets that don't have the normal packed f16 layout, handle these
during legalization. Directly modify the register types. We can infer
this was a d16 load based on the mem operand size during selection.

A16 operands should possibly be handled here as well, but don't worry
about that yet.

4 years agoAMDGPU/GlobalISel: Only map VOP operands to VGPRs
Matt Arsenault [Mon, 13 Jan 2020 16:24:25 +0000 (11:24 -0500)]
AMDGPU/GlobalISel: Only map VOP operands to VGPRs

This trivially avoids violating the constant bus restriction.

Previously this was allowing one SGPR in the first source
operand, which technically also avoided violating this for most
operations (but not for special cases reading vcc).

We do need to write some new, smarter operand folds to pick the
optimal SGPR to use in some kind of post-isel fold, but that's purely
an optimization.

I was originally thinking we would pick which operands should be SGPRs
in RegBankSelect, but I think this isn't really manageable. There
would be additional complexity to handle every G_* instruction, and
then any nontrivial instruction patterns would need to know when to
avoid violating it, which is likely to be very error prone.

I think having all inputs being canonically copies to VGPRs will
simplify the operand folding logic. The current folding we do is
backwards, and only considers one operand at a time, relative to
operands it already has. It therefore poorly handles the case where
there is already a constant bus operand user. If all operands are
copies, it's somewhat simpler to consider all input operands at once
to choose the optimal constant bus user.

Since the failure mode for constant bus violations is now a verifier
error and not an selection failure, this moves towards a place where
we can turn on the fallback mode. The SGPR copy folding optimizations
can be left for later.

4 years ago[GlobalISel] (fix) Use pointer type size for offset constant when lowering stores
Dominik Montada [Thu, 30 Jan 2020 13:25:10 +0000 (08:25 -0500)]
[GlobalISel] (fix) Use pointer type size for offset constant when lowering stores

Commit 9965b12fd1b was supposed to change the offset constant when
lowering load/stores, but only introduced this change for loads. This
patch adds the same fix for stores.

4 years agotest-release.sh: Add MLIR to the projects list
Hans Wennborg [Thu, 30 Jan 2020 13:30:30 +0000 (14:30 +0100)]
test-release.sh: Add MLIR to the projects list

4 years agoAMDGPU/GlobalISel: Select llvm.amdgcn.buffer.atomic.cmpswap
Matt Arsenault [Tue, 14 Jan 2020 14:29:05 +0000 (09:29 -0500)]
AMDGPU/GlobalISel: Select llvm.amdgcn.buffer.atomic.cmpswap

4 years ago[Linalg] Format Linalg/fusion.mlir.
Alexander Belyaev [Thu, 30 Jan 2020 13:10:36 +0000 (14:10 +0100)]
[Linalg] Format Linalg/fusion.mlir.

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

4 years agoActivate extension loading test on Darwin now that the underlying fix has landed
serge-sans-paille [Thu, 30 Jan 2020 10:09:11 +0000 (11:09 +0100)]
Activate extension loading test on Darwin now that the underlying fix has landed

Original bug fixed by ab2300bc154f7bed43f85f74fd3fe31be71d90e0

4 years ago[gn build] Port f00be8da62b
LLVM GN Syncbot [Thu, 30 Jan 2020 12:56:31 +0000 (12:56 +0000)]
[gn build] Port f00be8da62b

4 years ago[PowerPC][Future] Prefixed Instructions 64 Byte Boundary Support
Stefan Pintilie [Tue, 28 Jan 2020 01:20:53 +0000 (19:20 -0600)]
[PowerPC][Future] Prefixed Instructions 64 Byte Boundary Support

A known limitation for Future CPU is that the new prefixed instructions may
not cross 64 Byte boundaries.

All instructions are already 4 byte aligned so the only situation where this
can occur is when the prefix is in one 64 byte block and the instruction that
is prefixed is at the top of the next 64 byte block. To fix this case
PPCELFStreamer was added to intercept EmitInstruction. When a prefixed
instruction is emitted we try to align it to 64 Bytes by adding a maximum of
4 bytes. If the prefixed instruction crosses the 64 Byte boundary then the
alignment would trigger and a 4 byte nop would be added to push the
instruction into the next 64 byte block.

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

4 years ago[FPEnv][AArch64] Add lowering and instruction selection for STRICT_FP_ROUND
John Brawn [Tue, 21 Jan 2020 17:18:18 +0000 (17:18 +0000)]
[FPEnv][AArch64] Add lowering and instruction selection for STRICT_FP_ROUND

This gets selected to the appropriate fcvt instruction. Handling from there on
isn't fully correct yet, as we need to model fcvt reading and writing to fpsr
and fpcr.

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

4 years ago[AVR] Recognize the AVR architecture in lldb
Ayke van Laethem [Tue, 28 Jan 2020 10:56:24 +0000 (11:56 +0100)]
[AVR] Recognize the AVR architecture in lldb

This commit adds AVR support to lldb. With this change, it can load a
binary and do basic things like dump a line table.

Not much else has been implemented, that should be done in later
changes.

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

4 years ago[libc++] [P0325] Implement to_array from LFTS with updates.
Marek Kurdej [Thu, 30 Jan 2020 12:27:35 +0000 (13:27 +0100)]
[libc++] [P0325] Implement to_array from LFTS with updates.

Summary:
This patch implements https://wg21.link/P0325.
Please mind that at it is my first contribution to libc++, so I may have forgotten to abide to some conventions.

Reviewers: EricWF, mclow.lists, ldionne, lichray

Reviewed By: ldionne, lichray

Subscribers: lichray, dexonsmith, zoecarver, christof, ldionne, libcxx-commits

Tags: #libc

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

4 years ago[DAGCombiner] ISD::AND/OR/XOR - use general SelectionDAG::FoldConstantArithmetic
Simon Pilgrim [Thu, 30 Jan 2020 12:02:38 +0000 (12:02 +0000)]
[DAGCombiner] ISD::AND/OR/XOR - use general SelectionDAG::FoldConstantArithmetic

This handles all the constant splat / opaque testing for us.

4 years ago[DAGCombiner] ISD::SDIV/UDIV/SREM/UREM - use general SelectionDAG::FoldConstantArithmetic
Simon Pilgrim [Thu, 30 Jan 2020 11:49:49 +0000 (11:49 +0000)]
[DAGCombiner] ISD::SDIV/UDIV/SREM/UREM - use general SelectionDAG::FoldConstantArithmetic

This handles all the constant splat / opaque testing for us.

4 years ago[MLIR] Added llvm.invoke and llvm.landingpad
Shraiysh Vaishay [Thu, 30 Jan 2020 11:50:12 +0000 (12:50 +0100)]
[MLIR] Added llvm.invoke and llvm.landingpad

Summary:
I have tried to implement `llvm.invoke` and `llvm.landingpad`.

  # `llvm.invoke` is similar to `llvm.call` with two successors added, the first one is the normal label and the second one is unwind label.
  # `llvm.launchpad` takes a variable number of args with either `catch` or `filter` associated with them. Catch clauses are not array types and filter clauses are array types. This is same as the criteria used by LLVM (https://github.com/llvm/llvm-project/blob/4f82af81a04d711721300f6ca32f402f2ea6faf4/llvm/include/llvm/IR/Instructions.h#L2866)

Examples:
LLVM IR
```
define i32 @caller(i32 %a) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
    invoke i32 @foo(i32 2) to label %success unwind label %fail

  success:
    ret i32 2

  fail:
    landingpad {i8*, i32} catch i8** @_ZTIi catch i8** null catch i8* bitcast (i8** @_ZTIi to i8*) filter [1 x i8] [ i8 1 ]
    ret i32 3
}
```
MLIR LLVM Dialect
```
llvm.func @caller(%arg0: !llvm.i32) -> !llvm.i32 {
  %0 = llvm.mlir.constant(3 : i32) : !llvm.i32
  %1 = llvm.mlir.constant("\01") : !llvm<"[1 x i8]">
  %2 = llvm.mlir.addressof @_ZTIi : !llvm<"i8**">
  %3 = llvm.bitcast %2 : !llvm<"i8**"> to !llvm<"i8*">
  %4 = llvm.mlir.null : !llvm<"i8**">
  %5 = llvm.mlir.addressof @_ZTIi : !llvm<"i8**">
  %6 = llvm.mlir.constant(2 : i32) : !llvm.i32
  %7 = llvm.invoke @foo(%6) to ^bb1 unwind ^bb2 : (!llvm.i32) -> !llvm.i32
^bb1: // pred: ^bb0
  llvm.return %6 : !llvm.i32
^bb2: // pred: ^bb0
  %8 = llvm.landingpad (catch %5 : !llvm<"i8**">) (catch %4 : !llvm<"i8**">) (catch %3 : !llvm<"i8*">) (filter %1 : !llvm<"[1 x i8]">) : !llvm<"{ i8*, i32 }">
  llvm.return %0 : !llvm.i32
}
```

Signed-off-by: Shraiysh Vaishay <cs17btech11050@iith.ac.in>
Differential Revision: https://reviews.llvm.org/D72006

4 years ago[ARM][LowOverheadLoops] Skip debug values
Sam Parker [Thu, 30 Jan 2020 10:47:55 +0000 (10:47 +0000)]
[ARM][LowOverheadLoops] Skip debug values

While iterating through the loop, don't inspect any dbg values.

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

4 years ago[yaml2obj] - Add a way to set sh_entsize for relocation sections.
Georgii Rymar [Wed, 29 Jan 2020 13:40:40 +0000 (16:40 +0300)]
[yaml2obj] - Add a way to set sh_entsize for relocation sections.

We are missing ability to override the sh_entsize field for
SHT_REL[A] sections. It would be useful for writing test cases.

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

4 years ago[clangd] Make go-to-def jumps to overriden methods on `final` specifier.
Haojian Wu [Thu, 30 Jan 2020 11:45:43 +0000 (12:45 +0100)]
[clangd] Make go-to-def jumps to overriden methods on `final` specifier.

Reviewers: sammccall

Reviewed By: sammccall

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

Tags: #clang

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

4 years agoAdd 'gpu.terminator' operation.
Stephan Herhut [Wed, 29 Jan 2020 12:59:36 +0000 (13:59 +0100)]
Add 'gpu.terminator' operation.

Summary:
The 'gpu.terminator' operation is used as the terminator for the
regions of gpu.launch. This is to disambugaute them from the
return operation on 'gpu.func' functions.

This is a breaking change and users of the gpu dialect will need
to adapt their code when producting 'gpu.launch' operations.

Reviewers: nicolasvasilache

Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, csigg, arpith-jacob, mgester, lucyrfox, liufengdb, llvm-commits

Tags: #llvm

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

4 years ago[llvm-readobj] - Improve error message reported by DynRegionInfo.
Georgii Rymar [Thu, 23 Jan 2020 15:56:24 +0000 (18:56 +0300)]
[llvm-readobj] - Improve error message reported by DynRegionInfo.

DynRegionInfo is a helper class used to create memory ranges.
It is used for many things and can report errors.
Errors reported currently do not provide a good diagnostic.
This patch fixes it and adds a test for each possible case.

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

4 years ago[clangd] Log directory when a CDB is loaded
Kadir Cetinkaya [Wed, 29 Jan 2020 10:54:22 +0000 (11:54 +0100)]
[clangd] Log directory when a CDB is loaded

Summary: Fixes https://github.com/clangd/clangd/issues/268

Reviewers: sammccall

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

Tags: #clang

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

4 years ago[lldb][NFC] Remove TypeSystemClang::GetASTContext calls in IRForTarget
Raphael Isemann [Thu, 30 Jan 2020 10:53:41 +0000 (11:53 +0100)]
[lldb][NFC] Remove TypeSystemClang::GetASTContext calls in IRForTarget

Similar to previous commits, this just replaces the lookup in the
global map with the reference to the TypeSystemClang instance we already
have in this context.

4 years ago[llvm-readobj] - Add a few warnings for --gnu-hash-table.
Georgii Rymar [Thu, 23 Jan 2020 13:24:56 +0000 (16:24 +0300)]
[llvm-readobj] - Add a few warnings for --gnu-hash-table.

The current implementation stops dumping in case of a single error
it handles, though we can continue dumping.
This patch refines it: it adds a few warnings and a few test cases.

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

4 years ago[clangd] Bump vscode-clangd v0.0.20
Haojian Wu [Thu, 30 Jan 2020 10:42:27 +0000 (11:42 +0100)]
[clangd] Bump vscode-clangd v0.0.20

CHANGELOG:
- update lsp dependencies to pickup the latest LSP 3.15
- better support for cu files

4 years agoAdd lowering of STRICT_FSETCC and STRICT_FSETCCS
John Brawn [Fri, 24 Jan 2020 15:47:51 +0000 (15:47 +0000)]
Add lowering of STRICT_FSETCC and STRICT_FSETCCS

These become STRICT_FCMP and STRICT_FCMPE, which then get selected to the
corresponding FCMP and FCMPE instructions, though the handling from there on
isn't fully correct as we don't model reads and writes to FPCR and FPSR.

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

4 years ago[clangd][vscode] Get rid of the deprecated vscode module in the extension.
Haojian Wu [Wed, 29 Jan 2020 12:13:45 +0000 (13:13 +0100)]
[clangd][vscode] Get rid of the deprecated vscode module in the extension.

Summary:
The vscode module has been deprecated, and it doesn't work anymore after
we require the minimal VSCode version 1.41.0, this patch migrate to the
new @type/vscode and vscode-test modules, see
https://code.visualstudio.com/api/working-with-extensions/testing-extension#migrating-from-vscode

Reviewers: sammccall

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

Tags: #clang

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

4 years ago[ASTMatchers] Add hasPlacementArg and hasAnyPlacementArg traversal matcher for CXXNewExpr
Nathan James [Thu, 30 Jan 2020 10:15:00 +0000 (10:15 +0000)]
[ASTMatchers] Add hasPlacementArg and hasAnyPlacementArg traversal matcher for CXXNewExpr

Summary: Adds new traversal matchers called `hasPlacementArg` and `hasAnyPlacementArg` that matches on arguments to `placement new` operators.

Reviewers: aaron.ballman

Reviewed By: aaron.ballman

Subscribers: merge_guards_bot, mehdi_amini, hiraditya, steven_wu, dexonsmith, cfe-commits

Tags: #clang

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

4 years agoAMDGPU: Fix AMDGPUUnifyDivergentExitNodes with no normal returns
Connor Abbott [Mon, 9 Dec 2019 11:04:00 +0000 (12:04 +0100)]
AMDGPU: Fix AMDGPUUnifyDivergentExitNodes with no normal returns

Summary:
The code was assuming in a few places that if there was only one exit
from the function that it was a normal return, which is invalid. It
could be an infinite loop, in which case we still need to insert the
usual fake edge so that the null export happens. This fixes shaders that
end with an infinite loop that discards.

Reviewers: arsenm, nhaehnle, critson

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

Tags: #llvm

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

4 years ago[InstCombine][AMDGPU] Trim components of s_buffer_load
Piotr Sobczak [Fri, 20 Dec 2019 20:06:19 +0000 (21:06 +0100)]
[InstCombine][AMDGPU] Trim components of s_buffer_load

Summary:
Add trimming of unused components of s_buffer_load.

For s_buffer_load and unformatted buffer_load also trim unused
components at the beginning of vector and update offset accordingly.

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

Tags: #llvm

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

4 years ago[DebugInfo] Fix DebugLine::Prologue::getLength
James Henderson [Wed, 29 Jan 2020 14:45:41 +0000 (14:45 +0000)]
[DebugInfo] Fix DebugLine::Prologue::getLength

The function a) returned 32-bits when in DWARF64, the PrologueLength
field is 64-bits in size, and b) didn't work for DWARF version 5.

Also deleted some related dead code. With this deletion, getLength is
itself dead, but another change is about to make use of it.

Reviewed by: probinson

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

4 years agoInline debug variable.
Michael Forster [Thu, 30 Jan 2020 09:20:49 +0000 (10:20 +0100)]
Inline debug variable.

Summary:
In a release build this variable becomes unused and may break the build
with `-Werror,-Wunused-variable`.

Reviewers: gribozavr2, jdoerfert, sstefan1

Reviewed By: gribozavr2

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[X86][Sched] A bunch of fixes to the Zen2 sched model latencies.
Clement Courbet [Wed, 22 Jan 2020 10:44:12 +0000 (11:44 +0100)]
[X86][Sched] A bunch of fixes to the Zen2 sched model latencies.

Summary:
As determined with `llvm-exegesis`.

Some of these look like typos/misunderstandings of the sched model td
spec:
  - latency defaults to `1` when not set => Maybe we can avoid
    having a default ?
  - problems with regexps not being anchored by default (XCHG matching
    CMPXHG)

Note that this is not complete, it fixes only the most obvious mistakes,
and only for latency (not uops).

Reviewers: RKSimon, GGanesh

Subscribers: hiraditya, jfb, mstojanovic, hfinkel, craig.topper, andreadb, lebedev.ri, llvm-commits

Tags: #llvm

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

4 years ago[ARM][LowOverheadLoops] Check scalar predicates
Sam Parker [Thu, 30 Jan 2020 08:26:28 +0000 (08:26 +0000)]
[ARM][LowOverheadLoops] Check scalar predicates

When trying to remove the loop iteration count, check that the
instruction will always execute.

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

4 years ago[InstCombine] Update SimplifyCFG test
Nikita Popov [Thu, 30 Jan 2020 09:11:00 +0000 (10:11 +0100)]
[InstCombine] Update SimplifyCFG test

This test also runs -instcombine. Here the operands in an or chain
have been reassociated.

4 years ago[InstCombine] Add SetVector.h include
Nikita Popov [Thu, 30 Jan 2020 08:56:24 +0000 (09:56 +0100)]
[InstCombine] Add SetVector.h include

Hopefully fixes the build for examples.

4 years ago[InstCombine] Process newly inserted instructions in the correct order
Nikita Popov [Wed, 1 Jan 2020 16:56:37 +0000 (17:56 +0100)]
[InstCombine] Process newly inserted instructions in the correct order

InstCombine operates on the basic premise that the operands of the
currently processed instruction have already been simplified. It
achieves this by pushing instructions to the worklist in reverse
program order, so that instructions are popped off in program order.
The worklist management in the main combining loop also makes sure
to uphold this invariant.

However, the same is not true for all the code that is performing
manual worklist management. The largest problem (addressed in this
patch) are instructions inserted by InstCombine's IRBuilder. These
will be pushed onto the worklist in order of insertion (generally
matching program order), which means that a) the users of the
original instruction will be visited first, as they are pushed later
in the main loop and b) the newly inserted instructions will be
visited in reverse program order.

This causes a number of problems: First, folds operate on instructions
that have not had their operands simplified, which may result in
optimizations being missed (ran into this in
https://reviews.llvm.org/D72048#1800424, which was the original
motivation for this patch). Additionally, this increases the amount
of folds InstCombine has to perform, both within one iteration, and
by increasing the number of total iterations.

This patch addresses the issue by adding a Worklist.AddDeferred()
method, which is used for instructions inserted by IRBuilder. These
will only be added to the real worklist after the combine finished,
and in reverse order, so they will end up processed in program order.
I should note that the same should also be done to nearly all other
uses of Worklist.Add(), but I'm starting with just this occurrence,
which has by far the largest test fallout.

Most of the test changes are due to
https://bugs.llvm.org/show_bug.cgi?id=44521 or other cases where
we don't canonicalize something. These are neutral. One regression
has been addressed in D73575 and D73647. The remaining regression
in an shl+sdiv fold can't really be fixed without dropping another
transform, but does not seem particularly problematic in the first
place.

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

4 years agoAdd GDB pretty printers for llvm::ilist, llvm::simple_ilist, and llvm::ilist_node.
Christian Sigg [Tue, 28 Jan 2020 21:02:17 +0000 (22:02 +0100)]
Add GDB pretty printers for llvm::ilist, llvm::simple_ilist, and llvm::ilist_node.

Reviewers: dblaikie

Reviewed By: dblaikie

Subscribers: merge_guards_bot, llvm-commits

Tags: #llvm

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

4 years ago[mlir][NFC] Explicitly initialize dynamic legality when setting op
River Riddle [Thu, 30 Jan 2020 08:21:32 +0000 (00:21 -0800)]
[mlir][NFC] Explicitly initialize dynamic legality when setting op
action.

4 years ago[AArch64][GlobalISel] During ISel try to convert G_PTR_ADD to G_ADD.
Amara Emerson [Wed, 29 Jan 2020 21:42:48 +0000 (13:42 -0800)]
[AArch64][GlobalISel] During ISel try to convert G_PTR_ADD to G_ADD.

This lowering tries to look for G_PTR_ADD instructions and then converts
them to a standard G_ADD with a COPY on the source, and G_INTTOPTR on the
result. This is ok for address space 0 on AArch64 as p0 can be treated as
s64.

The motivation behind this is to expose the add semantics to the imported
tablegen patterns. We shouldn't need to check for uses being loads/stores,
because the selector works bottom up, uses before defs. By the time we
end up trying to select a G_PTR_ADD, we should have already attempted to
fold this into addressing modes and were therefore unsuccessful.

This gives some performance and code size improvements across the board.

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

4 years agoDefine _LIBCPP_HAS_TIMESPEC_GET for FreeBSD when appropriate
Dimitry Andric [Thu, 30 Jan 2020 07:00:28 +0000 (08:00 +0100)]
Define _LIBCPP_HAS_TIMESPEC_GET for FreeBSD when appropriate

Summary:
FreeBSD got `timespec_get` support somewhere in the 12.x timeframe, but
the C++ version check in its system headers was written incorrectly.
This has now been fixed for both FreeBSD 13 and 12.

Add checks for the corresponding `__FreeBSD_version` values, to define
`_LIBCPP_HAS_TIMESPEC_GET` when the function is supported.

Reviewers: emaste, EricWF, ldionne, mclow.lists

Reviewed By: ldionne

Subscribers: arichardson, krytarowski, christof, dexonsmith, libcxx-commits

Tags: #libc

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

4 years agoRevert "[X86] Don't exit from foldOffsetIntoAddress if the Offset is 0, but AM.Disp...
Craig Topper [Thu, 30 Jan 2020 06:59:05 +0000 (22:59 -0800)]
Revert "[X86] Don't exit from foldOffsetIntoAddress if the Offset is 0, but AM.Disp is non-zero."

Possibly causing build bot failures.

4 years agoEven more fixes of implicit std::string conversions
Mikael Holmén [Thu, 30 Jan 2020 06:32:53 +0000 (07:32 +0100)]
Even more fixes of implicit std::string conversions

4 years ago[X86] Add function isPrefix()
Shengchen Kan [Sun, 19 Jan 2020 06:28:21 +0000 (14:28 +0800)]
[X86] Add function isPrefix()

Currently some prefixes are emitted as instructions, to distinguish them
from real instruction, fuction isPrefix() is added. The kinds of prefix
are consistent with X86GenInstrInfo.inc.

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

4 years agoRevert "[lldb/Reproducers] Assert when trying to get object for invalid index."
Jonas Devlieghere [Thu, 30 Jan 2020 06:01:38 +0000 (22:01 -0800)]
Revert "[lldb/Reproducers] Assert when trying to get object for invalid index."

Apparently this is not doing what I thought it was doing...

4 years ago[llvm][VectorUtils] Tweak VFShape for scalable vector functions.
Francesco Petrogalli [Wed, 22 Jan 2020 22:34:27 +0000 (22:34 +0000)]
[llvm][VectorUtils] Tweak VFShape for scalable vector functions.

Summary:
This patch makes sure that the field VFShape.VF is greater than zero
when demangling the vector function name of scalable vector functions
encoded in the "vector-function-abi-variant" attribute.

This change is required to be able to provide instances of VFShape
that can be used to query the VFDatabase for the vectorization passes,
as such passes always require a positive value for the Vectorization Factor (VF)
needed by the vectorization process.

It is not possible to extract the value of VFShape.VF from the mangled
name of scalable vector functions, because it is encoded as
`x`. Therefore, the VFABI demangling function has been modified to
extract such information from the IR declaration of the vector
function, under the assumption that _all_ vectors in the signature of
the vector function have the same number of lanes. Such assumption is
valid because it is also assumed by the Vector Function ABI
specifications supported by the demangling function (x86, AArch64, and
LLVM internal one).

The unit tests that demangle scalable names have been modified by
adding the IR module that carries the declaration of the vector
function name being demangled.

In particular, the demangling function fails in the following cases:

1. When the declaration of the scalable vector function is not
    present in the module.

2. When the value of VFSHape.VF is not greater than 0.

Reviewers: jdoerfert, sdesmalen, andwar

Reviewed By: jdoerfert

Subscribers: mgorny, kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[lldb/Reproducers] Fix reproducer instrumentation formatting (NFC)
Jonas Devlieghere [Thu, 30 Jan 2020 05:21:02 +0000 (21:21 -0800)]
[lldb/Reproducers] Fix reproducer instrumentation formatting (NFC)

4 years ago[lldb/Reproducers] Assert when trying to get object for invalid index.
Jonas Devlieghere [Thu, 30 Jan 2020 05:19:58 +0000 (21:19 -0800)]
[lldb/Reproducers] Assert when trying to get object for invalid index.

Assert when trying to get an object for an index we haven't seen before.
This will crash anyway, the assertion is just a bit more informative.

4 years ago[lldb] Replace SmallStr.str().str() with std::string conversion operator.
Jonas Devlieghere [Thu, 30 Jan 2020 05:33:37 +0000 (21:33 -0800)]
[lldb] Replace SmallStr.str().str() with std::string conversion operator.

Use the std::string conversion operator introduced in
d7049213d0fcda691c9e79f9b41e357198d99738. The SmallString in the log
statement doesn't require conversion at all when using the variadic log
macro.

4 years ago[X86] Don't exit from foldOffsetIntoAddress if the Offset is 0, but AM.Disp is non...
Craig Topper [Thu, 30 Jan 2020 04:33:35 +0000 (20:33 -0800)]
[X86] Don't exit from foldOffsetIntoAddress if the Offset is 0, but AM.Disp is non-zero.

This is an alternate fix for the issue D73606 was trying to
solve.

The main issue here is that we bailed out of
foldOffsetIntoAddress if Offset is 0. But if we just found a
symbolic displacement and AM.Disp became non-zero
earlier, we still need to validate that AM.Disp with the symbolic
displacement.

This passes fold-add-pcrel.ll.

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

4 years ago[lld] Replace SmallStr.str().str() with std::string conversion operator.
Jonas Devlieghere [Thu, 30 Jan 2020 05:30:21 +0000 (21:30 -0800)]
[lld] Replace SmallStr.str().str() with std::string conversion operator.

Use the std::string conversion operator introduced in
d7049213d0fcda691c9e79f9b41e357198d99738.

4 years ago[clang] Replace SmallStr.str().str() with std::string conversion operator.
Jonas Devlieghere [Thu, 30 Jan 2020 05:27:46 +0000 (21:27 -0800)]
[clang] Replace SmallStr.str().str() with std::string conversion operator.

Use the std::string conversion operator introduced in
d7049213d0fcda691c9e79f9b41e357198d99738.

4 years ago[llvm] Replace SmallStr.str().str() with std::string conversion operator.
Jonas Devlieghere [Thu, 30 Jan 2020 05:14:15 +0000 (21:14 -0800)]
[llvm] Replace SmallStr.str().str() with std::string conversion operator.

Use the std::string conversion operator introduced in
d7049213d0fcda691c9e79f9b41e357198d99738.

4 years ago[llvm][NFC] Rename CallAnalyzer::onCommonInstructionSimplification
Mircea Trofin [Thu, 30 Jan 2020 05:07:15 +0000 (21:07 -0800)]
[llvm][NFC] Rename CallAnalyzer::onCommonInstructionSimplification

Summary:
It is called when instructions aren't simplified, and the implementation
is expected to account for a penalty. Renamed to
onCommonInstructionMissedSimplification.

Reviewers: davidxl, eraman

Reviewed By: davidxl

Subscribers: hiraditya, baloghadamsoftware, haicheng, a.sidorin, Szelethus, donat.nagy, dkrupp, llvm-commits

Tags: #llvm

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

4 years ago[llvm][docs] Fix formatting in LangRef. [NFC]
Francesco Petrogalli [Thu, 30 Jan 2020 04:27:55 +0000 (22:27 -0600)]
[llvm][docs] Fix formatting in LangRef. [NFC]

The syntax of the call site attribute "vector-function-abi-variant"
is rendered with fixed size fonts (verbatim text).

4 years ago[CMake][libcxx] Don't wrap __config_site path in quotes on Windows
Petr Hosek [Tue, 28 Jan 2020 03:28:59 +0000 (19:28 -0800)]
[CMake][libcxx] Don't wrap __config_site path in quotes on Windows

This is failing to compile on Windows because clang-cl is trying to
use the path with quotes, dropping them resolves the issue.

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

4 years ago[Attributor] Pointer privatization attribute (argument promotion)
Johannes Doerfert [Wed, 30 Oct 2019 22:20:20 +0000 (17:20 -0500)]
[Attributor] Pointer privatization attribute (argument promotion)

A pointer is privatizeable if it can be replaced by a new, private one.
Privatizing pointer reduces the use count, interaction between unrelated
code parts. This is a first step towards replacing argument promotion.
While we can already handle recursion (unlike argument promotion!) we
are restricted to stack allocations for now because we do not analyze
the uses in the callee.

Reviewed By: uenoku

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

4 years ago[gn build] Port f2af0607000
LLVM GN Syncbot [Thu, 30 Jan 2020 01:35:57 +0000 (01:35 +0000)]
[gn build] Port f2af0607000

4 years ago[llvm-objcopy] Initial support for wasm in llvm-objcopy
Derek Schuff [Thu, 30 Jan 2020 01:30:57 +0000 (17:30 -0800)]
[llvm-objcopy] Initial support for wasm in llvm-objcopy

Currently only supports simple copying, other operations to follow.

Reviewers: sbc100, alexshap, jhenderson

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

This is a reland of a928d127a with a one-line fix to ensure that
the wasm version number is written as little-endian (it's the only
field in all of the binary format that's not a single byte or an
LEB, but we may have to watch out more when we start handling the
linking section).

4 years ago[libc++] Explicitly specify LIBCXX_ENABLE_SHARED to try and fix CI
Louis Dionne [Thu, 30 Jan 2020 01:28:34 +0000 (17:28 -0800)]
[libc++] Explicitly specify LIBCXX_ENABLE_SHARED to try and fix CI

Configuring libc++abi with LIBCXX_ENABLE_STATIC=OFF is broken since
https://reviews.llvm.org/D71894, so this patch fixes the issue for
Apple platforms to unblock our CI.

4 years ago[Attributor] Fix TODO to avoid recomputation of results
Johannes Doerfert [Thu, 30 Jan 2020 00:02:42 +0000 (18:02 -0600)]
[Attributor] Fix TODO to avoid recomputation of results

The helpers AAReturnedFromReturnedValues and
AACallSiteReturnedFromReturned are useful not only to avoid code
duplication but also to avoid recomputation of results. If we have N
call sites we should not recompute the function return information N
times but once. These are mostly straightforward usages with some minor
improvements on the helpers and addition of a new one
(IRPosition::getAssociatedType) that knows about function return types.

4 years ago[lldb/Reproducers] Add unittest for char** (de)serializer
Jonas Devlieghere [Thu, 30 Jan 2020 01:16:31 +0000 (17:16 -0800)]
[lldb/Reproducers] Add unittest for char** (de)serializer

4 years ago[lldb/Reproducers] Account for char** being a nullptr
Jonas Devlieghere [Thu, 30 Jan 2020 00:32:41 +0000 (16:32 -0800)]
[lldb/Reproducers] Account for char** being a nullptr

4 years ago[gn build] add a FIXME about using /Gw on win
Nico Weber [Thu, 30 Jan 2020 00:12:08 +0000 (19:12 -0500)]
[gn build] add a FIXME about using /Gw on win

4 years ago[LTO] Add optimization remarks for removed functions
Gabor Horvath [Wed, 29 Jan 2020 01:13:12 +0000 (17:13 -0800)]
[LTO] Add optimization remarks for removed functions

This only works with regular LTO for now.

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

4 years ago[X86] Improve X86 cmpps/cmppd/cmpss/cmpsd intrinsics with strictfp
Craig Topper [Wed, 29 Jan 2020 23:48:09 +0000 (15:48 -0800)]
[X86] Improve X86 cmpps/cmppd/cmpss/cmpsd intrinsics with strictfp

The constrained fcmp intrinsics don't allow the TRUE/FALSE predicates.
Using them will assert. To workaround this I'm emitting the old X86 specific intrinsics that were never removed from the backend when we switched to using fcmp in IR. We have no way to mark them as being strict, but that's true of all target specific intrinsics so doesn't seem like we need to solve that here.

I've also added support for selecting between signaling and quiet.

Still need to support SAE which will require using a target specific
intrinsic. Also need to fix masking to not use an AND instruction
after the compare.

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

4 years ago[X86] Fix the cost model for v16i16->v16i32 zero_extend/sign_extend with AVX2
Craig Topper [Wed, 29 Jan 2020 19:40:52 +0000 (11:40 -0800)]
[X86] Fix the cost model for v16i16->v16i32 zero_extend/sign_extend with AVX2

We seem to be inheriting the cost from sse4.1. But if we have 256-bit registers we should be able to do this with just one extract to split the 16i16 and two v8i16->v8i32 operations so our cost should be 3 not 4.

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

4 years ago[mlir] [VectorOps] consolidate all vector utilities to one header/cc file
aartbik [Wed, 29 Jan 2020 23:21:30 +0000 (15:21 -0800)]
[mlir] [VectorOps] consolidate all vector utilities to one header/cc file

Reviewers: nicolasvasilache, andydavis1, dcaballe

Reviewed By: andydavis1, dcaballe

Subscribers: dcaballe, merge_guards_bot, mgorny, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, liufengdb, llvm-commits

Tags: #llvm

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

4 years agoGlobalISel: Add observer argument to legalizeIntrinsic
Matt Arsenault [Mon, 27 Jan 2020 20:50:55 +0000 (15:50 -0500)]
GlobalISel: Add observer argument to legalizeIntrinsic

This is passed to legalizeCustom, but not intrinsic. Also remove the
MRI argument, since you can get that from the MachineIRBuilder.

I'm not sure why MachineIRBuilder has a private observer member, and
this is passed separately.

4 years ago[compiler-rt][profile] fix test/instrprof-set-filename.c on windows
Yuanfang Chen [Wed, 29 Jan 2020 22:59:14 +0000 (14:59 -0800)]
[compiler-rt][profile] fix test/instrprof-set-filename.c on windows

Summary: `.cmd` is interpreted as script in windows console.

Reviewers: davidxl, rnk

Reviewed By: davidxl

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

4 years agoAMDGPU/GlobalISel: Select permlane16/permlanex16
Matt Arsenault [Thu, 16 Jan 2020 02:23:07 +0000 (21:23 -0500)]
AMDGPU/GlobalISel: Select permlane16/permlanex16

4 years ago[opt viewer] Python compat - decode/encode string
Yuanfang Chen [Mon, 20 Jan 2020 01:52:08 +0000 (17:52 -0800)]
[opt viewer] Python compat - decode/encode string

Summary:
Use io.open instead of codecs.open according to here
https://stackoverflow.com/questions/10971033/backporting-python-3-openencoding-utf-8-to-python-2

Add `u` prefix to string literal to make them utf-8 in python2.

Reviewers: anemet, serge-sans-paille

Reviewed by: serge-sans-paille

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

4 years ago[lldb/Reproducers] Add (de)serialization overload for char**
Jonas Devlieghere [Wed, 29 Jan 2020 22:06:20 +0000 (14:06 -0800)]
[lldb/Reproducers] Add (de)serialization overload for char**

This patch adds an overload to serialize and deserialize char** types.
This is necessary for things like the SBLaunchInfo ctor. We serialize
the array length followed by each individual item.

4 years ago[scudo][standalone] Revert some perf-degrading changes
Kostya Kortchinsky [Wed, 29 Jan 2020 20:35:44 +0000 (12:35 -0800)]
[scudo][standalone] Revert some perf-degrading changes

Summary:
A couple of seemingly innocuous changes ended up having a large impact
on the 32-bit performance. I still have to make those configurable at
some point, but right now it will have to do.

Subscribers: #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

4 years ago[SmallString] Remove StringRef indirection for std::string conversion.
Jonas Devlieghere [Wed, 29 Jan 2020 21:48:39 +0000 (13:48 -0800)]
[SmallString] Remove StringRef indirection for std::string conversion.

There's no need to go through StringRef to convert a SmallString to a
std::string, the conversion operator can create a std::string directly.

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

4 years ago[libc] Add a library of standalone C++ utilities.
Siva Chandra Reddy [Mon, 27 Jan 2020 05:50:27 +0000 (21:50 -0800)]
[libc] Add a library of standalone C++ utilities.

Some of the existing utils in utils/UnitTest/Test.h have been moved to
this new library.

Reviewers: abrachet, gchatelet

Tags: #libc-project

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

4 years ago[NFC][AArch64][SVE] Rename Destructive enumerator from DestructiveInstType
Cameron McInally [Wed, 29 Jan 2020 21:22:14 +0000 (15:22 -0600)]
[NFC][AArch64][SVE] Rename Destructive enumerator from DestructiveInstType

Rename Destructive enumerator in preparation for a larger set of patches to
support prefixing destructive oeprations with MOVPRFX.

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

4 years ago[build] Fix LLVM_ENABLE_RUNTIMES override condition
Shoaib Meenai [Wed, 29 Jan 2020 21:40:36 +0000 (13:40 -0800)]
[build] Fix LLVM_ENABLE_RUNTIMES override condition

I forgot to add parentheses in fa44d72b9e43, though I prefer the
expanded form anyway.

4 years ago[GlobalISel] Add new combine to convert scalar G_MUL to G_SHL.
Amara Emerson [Wed, 29 Jan 2020 17:42:26 +0000 (09:42 -0800)]
[GlobalISel] Add new combine to convert scalar G_MUL to G_SHL.

For pow2 constants we should use G_SHL for pattern matching (and perf)
purposes later.

Vector support not yet implemented.

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

4 years ago[libc] Fix build after 777180a32b61070a10dd330b4f038bf24e916af1.
Siva Chandra Reddy [Wed, 29 Jan 2020 21:29:52 +0000 (13:29 -0800)]
[libc] Fix build after 777180a32b61070a10dd330b4f038bf24e916af1.

Implicit conversion from llvm::StringRef to std::string was made
explicit in the above commit.

4 years ago[gn build] Port 5ea83eef4d6
LLVM GN Syncbot [Wed, 29 Jan 2020 21:19:26 +0000 (21:19 +0000)]
[gn build] Port 5ea83eef4d6

4 years ago[lldb] Fix build break in ProcessDebugger due to StringRef usage changes
Stella Stamenova [Wed, 29 Jan 2020 21:19:04 +0000 (13:19 -0800)]
[lldb] Fix build break in ProcessDebugger due to StringRef usage changes

4 years agoRevert "[llvm-objcopy] Initial support for wasm in llvm-objcopy"
Derek Schuff [Wed, 29 Jan 2020 21:12:56 +0000 (13:12 -0800)]
Revert "[llvm-objcopy] Initial support for wasm in llvm-objcopy"

This reverts commit a928d127a52a061733d2e42c4c9159a267f7dbd4.

It seems to cause issues with big-endian architectures.

4 years ago[AArch64][GlobalISel] Fix TBNZ/TBZ opcode selection
Jessica Paquette [Wed, 29 Jan 2020 20:50:48 +0000 (12:50 -0800)]
[AArch64][GlobalISel] Fix TBNZ/TBZ opcode selection

When the bit is <= 32, we have to use the W register variant for TB(N)Z.

This is because of the way the instruction is encoded.

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

4 years ago[gn build] Port 24962ced814
LLVM GN Syncbot [Wed, 29 Jan 2020 21:06:15 +0000 (21:06 +0000)]
[gn build] Port 24962ced814

4 years ago[Loads] Handle simple cases with same base pointer with constant offsets in FindAvail...
Hiroshi Yamauchi [Tue, 10 Dec 2019 22:41:30 +0000 (14:41 -0800)]
[Loads] Handle simple cases with same base pointer with constant offsets in FindAvailableLoadedValue when AA is null.

Summary:
This will help with devirtualization (store forwarding with vtable pointers in
the presence of other stores into members in the constructor.) During inlining,
we don't have AA.

Reviewers: davidxl

Subscribers: mgorny, Prazek, hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[NFCI][AArch64][SVE] Set default DestructiveInstType in AArch64Inst class
Cameron McInally [Wed, 29 Jan 2020 20:44:04 +0000 (14:44 -0600)]
[NFCI][AArch64][SVE] Set default DestructiveInstType in AArch64Inst class

Some housekeeping for the DestructiveInstType enum before a larger set of patches to support prefixing destructive oeprations with MOVPRFX.

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

4 years ago[PowerPC][Future] Add prefixed loads and stores for future CPU
Victor Huang [Wed, 29 Jan 2020 20:32:13 +0000 (14:32 -0600)]
[PowerPC][Future] Add prefixed loads and stores for future CPU

A previous patch should have added pld and pstd and any support code in
the backend that is required for prefixed load and store type operations.
This patch adds a number of additional prefixed load and store type
instructions for the future CPU.

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

4 years agoRewrite test not to rely on StrEq with StringRef
Benjamin Kramer [Wed, 29 Jan 2020 20:40:19 +0000 (21:40 +0100)]
Rewrite test not to rely on StrEq with StringRef

StrEq has some magic inside that should do the explicit conversion from
StringRef to std::string, but apparently this doesn't work with GCC 5.

Just use EXPECT_EQ, it does the same thing with less magic.

4 years ago[InstCombine] add splat binop tests; NFC
Sanjay Patel [Wed, 29 Jan 2020 20:00:11 +0000 (15:00 -0500)]
[InstCombine] add splat binop tests; NFC

4 years ago[libcxx] [Windows] Store the lconv struct returned from localeconv in locale_t
Martin Storsjö [Mon, 28 Oct 2019 08:39:44 +0000 (10:39 +0200)]
[libcxx] [Windows] Store the lconv struct returned from localeconv in locale_t

This fixes using non-default locales, which currently can crash when
e.g. formatting numbers.

Within the localeconv_l function, the per-thread locale is temporarily
changed with __libcpp_locale_guard, then localeconv() is called,
returning an lconv * struct pointer.

When localeconv_l returns, the __libcpp_locale_guard dtor restores
the per-thread locale back to the original. This invalidates the
contents of the earlier returned lconv struct, and all C strings
that are pointed to within it are also invalidated.

Thus, to have an actually working localeconv_l function, the
function needs to allocate some sort of storage for the returned
contents, that stays valid for as long as the caller needs to use
the returned struct.

Extend the libcxx/win32 specific locale_t class with storage for
a deep copy of a lconv struct, and change localeconv_l to take
a reference to the locale_t, to allow it to store the returned
lconv struct there.

This works fine for libcxx itself, but wouldn't necessarily be right
for a caller that uses libcxx's localeconv_l function.

This fixes around 11 of libcxx's currently failing tests on windows.

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

4 years agoAMDGPU/GlobalISel: Fix tests in release build
Matt Arsenault [Wed, 29 Jan 2020 20:26:13 +0000 (12:26 -0800)]
AMDGPU/GlobalISel: Fix tests in release build

Irritatingly the failure output is different in release vs. debug
because of the legality check is removed without asserts, so a register
ends up constrained only in release builds.

4 years agoAdd IntegerAttr::verifyConstructionInvariants.
Sean Silva [Wed, 29 Jan 2020 00:58:34 +0000 (16:58 -0800)]
Add IntegerAttr::verifyConstructionInvariants.

Summary:
This will help catch improper use of the MLIR API's. In particular, this
catches an error that was manifesting as nondeterministic assertion
failures (the nondeterminism was due to the failure happening only when the
StorageUniquer's DenseMap's probing happened to compare two specific
keys).

No test. The fact that all the existing tests pass with this additional
invariant gives confidence that it is correct/useful.

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

4 years agoPrint discriminators when printing .debug_line in GNU style.
Sterling Augustine [Fri, 24 Jan 2020 01:51:33 +0000 (17:51 -0800)]
Print discriminators when printing .debug_line in GNU style.

Summary:
gnu addr2line prints DWARF line table discriminators like so:

<file>:<line> (discriminator <Number>)

This matches that behavior.

Document how and when --output-style=GNU prints discriminators

Add test for new GNU-style discriminator printing.

Reviewers: rupprecht, labath, jhenderson

Subscribers: aprantl, hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[build] Fix runtimes build after 2e745ba6b0ba
Shoaib Meenai [Wed, 29 Jan 2020 20:16:40 +0000 (12:16 -0800)]
[build] Fix runtimes build after 2e745ba6b0ba

I missed the NOT in the condition; this part is actually responsible for
passing LLVM_ENABLE_RUNTIMES to the per-target runtime configures, which
in turn makes them actually build.

I'll put up a more general solution for review, but restore this in the
meantime to fix the runtimes build.

4 years ago[InstCombine] Support non-splat vectors in icmp eq + add/sub fold
Nikita Popov [Wed, 29 Jan 2020 17:58:48 +0000 (18:58 +0100)]
[InstCombine] Support non-splat vectors in icmp eq + add/sub fold

For the

    icmp eq (add X, C1), C2 => icmp eq X, C2-C1
    icmp eq (sub C1, X), C2 => icmp eq X, C1-C2

folds, this allows C1 to be non-splat and contain undefs.
C2 is still splat, due to the structure of the code.

This is to address the remaining part of the regression in D73411,
where demanded element analysis replaces some elements with undef.

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

4 years ago[InstCombine] Add undef/non-splat tests for add/sub + icmp eq; NFC
Nikita Popov [Wed, 29 Jan 2020 17:57:56 +0000 (18:57 +0100)]
[InstCombine] Add undef/non-splat tests for add/sub + icmp eq; NFC

4 years ago[GlobalISel][IRTranslator] Follow convention and put constant offset of getelementptr...
Amara Emerson [Wed, 29 Jan 2020 17:34:33 +0000 (09:34 -0800)]
[GlobalISel][IRTranslator] Follow convention and put constant offset of getelementptr arithmetic on RHS.

We were needlessly putting known constant values on the LHS of a G_MUL, which
is suboptimal.

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

4 years agoattempt to fix symbolize-paths.s everywhere after cd68f4
Nico Weber [Wed, 29 Jan 2020 19:26:50 +0000 (14:26 -0500)]
attempt to fix symbolize-paths.s everywhere after cd68f4

4 years agoattempt to fix symbolize-paths.s on windows
Nico Weber [Wed, 29 Jan 2020 19:23:00 +0000 (14:23 -0500)]
attempt to fix symbolize-paths.s on windows

4 years agoRevert "[AArch64] Fix data race on RegisterBank initialization."
Huihui Zhang [Wed, 29 Jan 2020 19:17:19 +0000 (11:17 -0800)]
Revert "[AArch64] Fix data race on RegisterBank initialization."

Buildbot failure, revert first while looking at the issue.

This reverts commit a5a4a47d691459afffc552bd3be7abfc86a49793.