OSDN Git Service

android-x86/external-llvm.git
5 years ago[x86] lower shuffle of extracts to AVX2 vperm instructions
Sanjay Patel [Wed, 16 Jan 2019 14:15:18 +0000 (14:15 +0000)]
[x86] lower shuffle of extracts to AVX2 vperm instructions

I was trying to prevent shuffle regressions while matching more horizontal ops
and ended up here:
  shuf (extract X, 0), (extract X, 4), Mask --> extract (shuf X, undef, Mask'), 0

The affected tests were added for:
https://bugs.llvm.org/show_bug.cgi?id=34380

This patch won't change the examples in the bug report itself, but we should be
able to extend this to catch more types.

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

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

5 years ago[MSP430] Emit a separate section for every interrupt vector
Anton Korobeynikov [Wed, 16 Jan 2019 14:03:41 +0000 (14:03 +0000)]
[MSP430] Emit a separate section for every interrupt vector

This is LLVM part of D56663

Linker scripts shipped by TI require to have every
interrupt vector in a separate section with a specific name:

 SECTIONS
 {
   __interrupt_vector_XX   : { KEEP (*(__interrupt_vector_XX )) } > VECTXX
   ...
 }

Follow the requirement emit the section for every vector
which contain address of interrupt handler:

  .section  __interrupt_vector_XX,"ax",@progbits
  .word %isr%

Patch by Kristina Bessonova!

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

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

5 years ago[X86][SSE] Add additional PR40318 shuffle test cases
Simon Pilgrim [Wed, 16 Jan 2019 13:15:59 +0000 (13:15 +0000)]
[X86][SSE] Add additional PR40318 shuffle test cases

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

5 years agoRevert r351324 "Build LLVM-C.dll by default on windows and enable in release package"
Hans Wennborg [Wed, 16 Jan 2019 12:36:28 +0000 (12:36 +0000)]
Revert r351324 "Build LLVM-C.dll by default on windows and enable in release package"

This broke the build, ending up with too long command-lines when invoking gen-mscv-exports.py.

> As it says in the subject, should have gone long enough now that this
> should be safe. This will greatly simplify dealing with LLVM for people
> that just want to use the C API on windows. This is a follow up from
> D35077.
>
> Patch by Jakob Bornecrantz!
>
> Differential revision: https://reviews.llvm.org/D56774

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

5 years agoAssertion in isAllocaPromotable due to extra bitcast goes into lifetime marker
Gabor Buella [Wed, 16 Jan 2019 12:06:17 +0000 (12:06 +0000)]
Assertion in isAllocaPromotable due to extra bitcast goes into lifetime marker

For the given test SROA detects possible replacement and creates a correct alloca. After that SROA is adding lifetime markers for this new alloca. The function getNewAllocaSlicePtr is trying to deduce the pointer type based on the original alloca, which is split, to use it later in lifetime intrinsic.

For the test we ended up with such code (rA is initial alloca [10 x float], which is split, and rA.sroa.0.0 is a new split allocation)

```
%rA.sroa.0.0.rA.sroa_cast = bitcast i32* %rA.sroa.0 to [10 x float]*    <----- this one causing the assertion and is an extra bitcast
%5 = bitcast [10 x float]* %rA.sroa.0.0.rA.sroa_cast to i8*
call void @llvm.lifetime.start.p0i8(i64 4, i8* %5)
```

isAllocaPromotable code assumes that a user of alloca may go into lifetime marker through bitcast but it must be the only one bitcast to i8* type. In the test it's not a i8* type, return false and throw the assertion.

As we are creating a pointer, which will be used in lifetime markers only, the proposed fix is to create a bitcast to i8* immediately to avoid extra bitcast creation.

The test is a greatly simplified to just reproduce the assertion.

Author: Igor Tsimbalist <igor.v.tsimbalist@intel.com>

Reviewers: chandlerc, craig.topper

Reviewed By: chandlerc

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

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

5 years agoBuild LLVM-C.dll by default on windows and enable in release package
Hans Wennborg [Wed, 16 Jan 2019 11:47:56 +0000 (11:47 +0000)]
Build LLVM-C.dll by default on windows and enable in release package

As it says in the subject, should have gone long enough now that this
should be safe. This will greatly simplify dealing with LLVM for people
that just want to use the C API on windows. This is a follow up from
D35077.

Patch by Jakob Bornecrantz!

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

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

5 years ago[MSan] Apply the ctor creation scheme of TSan
Philip Pfaffe [Wed, 16 Jan 2019 11:14:07 +0000 (11:14 +0000)]
[MSan] Apply the ctor creation scheme of TSan

Summary: To avoid adding an extern function to the global ctors list, apply the changes of D56538 also to MSan.

Reviewers: chandlerc, vitalybuka, fedor.sergeev, leonardchan

Subscribers: hiraditya, bollu, llvm-commits

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

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

5 years agoBump the trunk version to 9.0.0svn
Hans Wennborg [Wed, 16 Jan 2019 10:57:02 +0000 (10:57 +0000)]
Bump the trunk version to 9.0.0svn

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

5 years ago[SelectionDAG] Update check in createOperands to reflect max() is a valid value.
Florian Hahn [Wed, 16 Jan 2019 10:06:04 +0000 (10:06 +0000)]
[SelectionDAG] Update check in createOperands to reflect max() is a valid value.

The value returned by max() is the last valid value, adjust the
comparison accordingly.

The code added in D55073 creates TokenFactors with max() operands.

Reviewers: aemerson, efriedma, RKSimon, craig.topper

Reviewed By: aemerson

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

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

5 years ago[Support] Remove error return value from one overload of fs::make_absolute
Pavel Labath [Wed, 16 Jan 2019 09:55:32 +0000 (09:55 +0000)]
[Support] Remove error return value from one overload of fs::make_absolute

Summary:
The version of make_absolute which accepted a specific directory to use
as the "base" for the computation could never fail, even though it
returned a std::error_code. The reason for that seems to be historical
-- the CWD flavour (which can fail due to failure to retrieve CWD) was
there first, and the new version was implemented by extending that.

This removes the error return value from the non-CWD overload and
reimplements the CWD version on top of that. This enables us to remove
some dead code where people were pessimistically trying to handle the
errors returned from this function.

Reviewers: zturner, sammccall

Subscribers: hiraditya, kristina, llvm-commits

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

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

5 years ago[NewPM][TSan] Reiterate the TSan port
Philip Pfaffe [Wed, 16 Jan 2019 09:28:01 +0000 (09:28 +0000)]
[NewPM][TSan] Reiterate the TSan port

Summary:
Second iteration of D56433 which got reverted in rL350719. The problem
in the previous version was that we dropped the thunk calling the tsan init
function. The new version keeps the thunk which should appease dyld, but is not
actually OK wrt. the current semantics of function passes. Hence, add a
helper to insert the functions only on the first time. The helper
allows hooking into the insertion to be able to append them to the
global ctors list.

Reviewers: chandlerc, vitalybuka, fedor.sergeev, leonardchan

Subscribers: hiraditya, bollu, llvm-commits

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

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

5 years ago[DAGCombine] Fix ReduceLoadWidth for shifted offsets
Sam Parker [Wed, 16 Jan 2019 08:40:12 +0000 (08:40 +0000)]
[DAGCombine] Fix ReduceLoadWidth for shifted offsets

ReduceLoadWidth can trigger using a shifted mask is used and this
requires that the function return a shl node to correct for the
offset. However, the way that this was implemented meant that the
returned result could be an existing node, which would be incorrect.
This fixes the method of inserting the new node and replacing uses.

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

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

5 years agoInclude lldb in Win snapshots again (PR37307)
Hans Wennborg [Wed, 16 Jan 2019 08:38:28 +0000 (08:38 +0000)]
Include lldb in Win snapshots again (PR37307)

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

5 years ago[llvm-rc] Support '--' for delimiting options from input paths
Martin Storsjo [Wed, 16 Jan 2019 08:09:22 +0000 (08:09 +0000)]
[llvm-rc] Support '--' for delimiting options from input paths

This allows avoiding conflicts between paths that begin with the same
chars as some llvm-rc options (which can be used with either slashes
or dashes).

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

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

5 years ago[llvm-symbolizer] Add -C as a short alias to -demangle
Dmitry Venikov [Wed, 16 Jan 2019 07:05:58 +0000 (07:05 +0000)]
[llvm-symbolizer] Add -C as a short alias to -demangle

Summary: Provides -C as alias to -demangle. Motivation: https://bugs.llvm.org/show_bug.cgi?id=40069.

Reviewers: jhenderson, ruiu, rnk, fjricci

Reviewed By: jhenderson, ruiu

Subscribers: rupprecht, erik.pilkington, llvm-commits

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

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

5 years ago[WebAssembly] COWS has been renamed to WASI.
Dan Gohman [Wed, 16 Jan 2019 05:23:52 +0000 (05:23 +0000)]
[WebAssembly] COWS has been renamed to WASI.

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

5 years agoOnly promote args when function attributes are compatible
Tom Stellard [Wed, 16 Jan 2019 05:15:31 +0000 (05:15 +0000)]
Only promote args when function attributes are compatible

Summary:
Check to make sure that the caller and the callee have compatible
function arguments before promoting arguments.  This uses the same
TargetTransformInfo queries that are used to determine if attributes
are compatible for inlining.

The goal here is to avoid breaking ABI when a called function's ABI
depends on a target feature that is not enabled in the caller.

This is a very conservative fix for PR37358.  Ideally we would have a more
sophisticated check for ABI compatiblity rather than checking if the
attributes are compatible for inlining.

Reviewers: echristo, chandlerc, eli.friedman, craig.topper

Reviewed By: echristo, chandlerc

Subscribers: nikic, xbolva00, rkruppe, alexcrichton, llvm-commits

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

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

5 years ago[InstCombine]Avoid introduction of unaligned mem access
Serguei Katkov [Wed, 16 Jan 2019 04:36:26 +0000 (04:36 +0000)]
[InstCombine]Avoid introduction of unaligned mem access

InstCombine is able to transform mem transfer instrinsic to alone store or store/load pair.
It might result in generation of unaligned atomic load/store which later in backend
will be transformed to libcall. It is not an evident gain and it is better to keep intrinsic as is
and handle it at backend.

Reviewers: reames, anna, apilipenko, mkazantsev
Reviewed By: reames
Subscribers: t.p.northover, jfb, llvm-commits
Differential Revision: https://reviews.llvm.org/D56582

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

5 years agogn build: Merge r351283.
Peter Collingbourne [Wed, 16 Jan 2019 02:27:12 +0000 (02:27 +0000)]
gn build: Merge r351283.

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

5 years ago[WebAssembly] Store section alignment as a power of 2
Sam Clegg [Wed, 16 Jan 2019 01:34:48 +0000 (01:34 +0000)]
[WebAssembly] Store section alignment as a power of 2

This change bumps for version number of the wasm object file
metadata.

See https://github.com/WebAssembly/tool-conventions/pull/92

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

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

5 years ago[GISel]: Add support for CSEing continuously during GISel passes.
Aditya Nandakumar [Wed, 16 Jan 2019 00:40:37 +0000 (00:40 +0000)]
[GISel]: Add support for CSEing continuously during GISel passes.

https://reviews.llvm.org/D52803

This patch adds support to continuously CSE instructions during
each of the GISel passes. It consists of a GISelCSEInfo analysis pass
that can be used by the CSEMIRBuilder.

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

5 years ago[EH] Rename llvm.x86.seh.recoverfp intrinsic to llvm.eh.recoverfp
Mandeep Singh Grang [Wed, 16 Jan 2019 00:37:13 +0000 (00:37 +0000)]
[EH] Rename llvm.x86.seh.recoverfp intrinsic to llvm.eh.recoverfp

Summary:
Make recoverfp intrinsic target-independent so that it can be implemented for AArch64, etc.
Refer D53541 for the context. Clang counterpart D56748.

Reviewers: rnk, efriedma

Reviewed By: rnk, efriedma

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

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

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

5 years ago[LangRef] Fix typo adress->address. NFC
Craig Topper [Wed, 16 Jan 2019 00:21:59 +0000 (00:21 +0000)]
[LangRef] Fix typo adress->address. NFC

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

5 years ago[X86] Rename SHRUNKBLEND ISD node to BLENDV.
Craig Topper [Wed, 16 Jan 2019 00:20:30 +0000 (00:20 +0000)]
[X86] Rename SHRUNKBLEND ISD node to BLENDV.

That's really what it is. If we didn't use intrinsics for BLENDVPS/BLENDVPD/PBLENDVB all the way to isel, this is the node we would use.

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

5 years agogn build: Add check-hwasan target.
Peter Collingbourne [Wed, 16 Jan 2019 00:15:25 +0000 (00:15 +0000)]
gn build: Add check-hwasan target.

The Android sanitizer tests are currently some of the most difficult
to run correctly, requiring at least 3 build directories which have
to be configured in just the right way and built in the correct order
(see e.g. [1] and the functions that it calls).

This patch adds a check-hwasan target which greatly simplifies running
the hwasan tests for gn users, taking advantage of its support for
multiple toolchains. With this the tests can be run simply by setting
an NDK path and running "ninja check-hwasan" with a compatible Android
device connected. The Linux/x86_64 and Android/aarch64 targets are
tested in parallel.

[1] https://github.com/llvm/llvm-zorg/blob/master/zorg/buildbot/builders/sanitizers/buildbot_android.sh

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

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

5 years ago[X86] Add avx512 scatter intrinsics that use a vXi1 mask instead of a scalar integer.
Craig Topper [Tue, 15 Jan 2019 23:36:25 +0000 (23:36 +0000)]
[X86] Add avx512 scatter intrinsics that use a vXi1 mask instead of a scalar integer.

We're trying to have the vXi1 types in IR as much as possible. This prevents the need for bitcasts when the producer of the mask was already a vXi1 value like an icmp. The bitcasts can be subject to code motion and interfere with basic block at a time isel in bad ways.

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

5 years agoAMDGPU: Raise the priority of MAD24 in instruction selection.
Changpeng Fang [Tue, 15 Jan 2019 23:12:36 +0000 (23:12 +0000)]
AMDGPU: Raise the priority of MAD24 in instruction selection.

Summary:
  We have seen performance regression when v_add3 is generated. The major reason is that the v_mad pattern
is broken when v_add3 is generated. We also see the register pressure increased. While we could not properly
estimate register pressure during instruction selection, we can give mad a higher priority.

In this work, we raise the priority for mad24 in selection and resolve the performance regression.

Reviewers:
  rampitec

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

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

5 years ago[VFS] Add getter for mapping entries.
Jonas Devlieghere [Tue, 15 Jan 2019 22:36:56 +0000 (22:36 +0000)]
[VFS] Add getter for mapping entries.

When generating a reproducer in LLDB we build up the mapping but don't
immediately copy over the files on the file system.

Rather than keeping a separate data structure with real and virtual
paths, we might as well reuse the entries already stored in the
YAMLVFSWriter to lazily copy over the files when needed.

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

5 years ago[VFS] Move RedirectingFileSystem interface into header (NFC)
Jonas Devlieghere [Tue, 15 Jan 2019 22:36:41 +0000 (22:36 +0000)]
[VFS] Move RedirectingFileSystem interface into header (NFC)

This moves the RedirectingFileSystem into the header so it can be
extended. This is needed in LLDB we need a way to obtain the external
path to deal with FILE* and file descriptor APIs.

Discussion on the mailing list:
http://lists.llvm.org/pipermail/llvm-dev/2018-November/127755.html

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

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

5 years ago[libObject] Tweak expected error output from llvm-ar
Jordan Rupprecht [Tue, 15 Jan 2019 22:03:08 +0000 (22:03 +0000)]
[libObject] Tweak expected error output from llvm-ar

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

5 years agogn build: Add a stage2 host toolchain and make the hwasan runtime buildable on x86_64...
Peter Collingbourne [Tue, 15 Jan 2019 22:02:12 +0000 (22:02 +0000)]
gn build: Add a stage2 host toolchain and make the hwasan runtime buildable on x86_64 Linux.

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

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

5 years ago[llvm-ar] Resubmit recursive thin archive test with fix for full path names and bette...
Jordan Rupprecht [Tue, 15 Jan 2019 21:52:31 +0000 (21:52 +0000)]
[llvm-ar] Resubmit recursive thin archive test with fix for full path names and better error messages

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

5 years agogn build: Add a resource_dir.gni file.
Peter Collingbourne [Tue, 15 Jan 2019 21:44:59 +0000 (21:44 +0000)]
gn build: Add a resource_dir.gni file.

The path to the resource directory will end up being used in several
more places once the support for running check-hwasan lands. This
moves the definition to a central location so that it can be used
from those places.

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

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

5 years ago[X86] Add the GCCBuiltin name back to the deprecated avx512 gather intrinsics until...
Craig Topper [Tue, 15 Jan 2019 21:41:31 +0000 (21:41 +0000)]
[X86] Add the GCCBuiltin name back to the deprecated avx512 gather intrinsics until the clang side patch for the new versions is approved.

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

5 years agoX86DAGToDAGISel::matchBitExtract() with truncation (PR36419)
Roman Lebedev [Tue, 15 Jan 2019 21:31:18 +0000 (21:31 +0000)]
X86DAGToDAGISel::matchBitExtract() with truncation (PR36419)

Summary:
Previously in D54095 i have added support for extraction of `lshr` from `X` if we are to produce `BEXTR`.
That was good, but the fix was partial, there was still [[ https://bugs.llvm.org/show_bug.cgi?id=36419 | PR36419 ]].

That pattern can also appear, roughly, when you have a large (64-bit) storage, and the consume bits from it.
It will not be unexpected if you will be doing further computations in 32-bit width.
And then the current code breaks, as the tests show.

The basic idea/pattern here is following:
1. We have `i64` input
2. We perform `i64` right-shift on it.
3. We `trunc`ate that shifted value
4. We do all further work (masking) in `i32`

Since we see `trunc`ation and not `lshr`, we give up, and stop trying to extract that right-shift.
BUT. The mask is `i32`, therefore we can extend both of the operands of the masking (`and`) to `i64`
and truncate the result after masking: https://rise4fun.com/Alive/K4B
```
Name: @bextr64_32_b1 -> @bextr64_32_b0
  %shiftedval = lshr i64 %val, %numskipbits
  %truncshiftedval = trunc i64 %shiftedval to i32
  %widenumlowbits1 = zext i8 %numlowbits to i32
  %notmask1 = shl nsw i32 -1, %widenumlowbits1
  %mask1 = xor i32 %notmask1, -1
  %res = and i32 %truncshiftedval, %mask1
=>
  %shiftedval = lshr i64 %val, %numskipbits
  %widenumlowbits = zext i8 %numlowbits to i64
  %notmask = shl nsw i64 -1, %widenumlowbits
  %mask = xor i64 %notmask, -1
  %wideres = and i64 %shiftedval, %mask
  %res = trunc i64 %wideres to i32
```

Thus, we are again able to extract that `lshr` into `BEXTR`'s control.

Now, the perf (via `llvm-exegesis`) of the snippet suggests that it is not a good idea:
```
$ cat /tmp/old.s
# bextr64_32_b1
# LLVM-EXEGESIS-LIVEIN RSI
# LLVM-EXEGESIS-LIVEIN EDX
# LLVM-EXEGESIS-LIVEIN RDI
movq %rsi, %rcx
shrq %cl, %rdi
shll $8, %edx
bextrl %edx, %edi, %eax
$ cat /tmp/old.s | ./bin/llvm-exegesis -mode=latency -snippets-file=-
Check generated assembly with: /usr/bin/objdump -d /tmp/snippet-1e0082.o
---
mode:            latency
key:
  instructions:
    - 'MOV64rr RCX RSI'
    - 'SHR64rCL RDI RDI'
    - 'SHL32ri EDX EDX i_0x8'
    - 'BEXTR32rr EAX EDI EDX'
  config:          ''
  register_initial_values: []
cpu_name:        bdver2
llvm_triple:     x86_64-unknown-linux-gnu
num_repetitions: 10000
measurements:
  - { key: latency, value: 0.6638, per_snippet_value: 2.6552 }
error:           ''
info:            ''
assembled_snippet: 4889F148D3EFC1E208C4E268F7C74889F148D3EFC1E208C4E268F7C74889F148D3EFC1E208C4E268F7C74889F148D3EFC1E208C4E268F7C7C3
...
$ cat /tmp/old.s | ./bin/llvm-exegesis -mode=uops -snippets-file=-
Check generated assembly with: /usr/bin/objdump -d /tmp/snippet-43e346.o
---
mode:            uops
key:
  instructions:
    - 'MOV64rr RCX RSI'
    - 'SHR64rCL RDI RDI'
    - 'SHL32ri EDX EDX i_0x8'
    - 'BEXTR32rr EAX EDI EDX'
  config:          ''
  register_initial_values: []
cpu_name:        bdver2
llvm_triple:     x86_64-unknown-linux-gnu
num_repetitions: 10000
measurements:
  - { key: PdFPU0, value: 0, per_snippet_value: 0 }
  - { key: PdFPU1, value: 0, per_snippet_value: 0 }
  - { key: PdFPU2, value: 0, per_snippet_value: 0 }
  - { key: PdFPU3, value: 0, per_snippet_value: 0 }
  - { key: NumMicroOps, value: 1.2571, per_snippet_value: 5.0284 }
error:           ''
info:            ''
assembled_snippet: 4889F148D3EFC1E208C4E268F7C74889F148D3EFC1E208C4E268F7C74889F148D3EFC1E208C4E268F7C74889F148D3EFC1E208C4E268F7C7C3
...
```
vs
```
$ cat /tmp/new.s
# bextr64_32_b1
# LLVM-EXEGESIS-LIVEIN RDX
# LLVM-EXEGESIS-LIVEIN SIL
# LLVM-EXEGESIS-LIVEIN RDI
shlq $8, %rdx
movzbl %sil, %eax
orq %rdx, %rax
bextrq %rax, %rdi, %rax
$ cat /tmp/new.s | ./bin/llvm-exegesis -mode=latency -snippets-file=-
Check generated assembly with: /usr/bin/objdump -d /tmp/snippet-8944f1.o
---
mode:            latency
key:
  instructions:
    - 'SHL64ri RDX RDX i_0x8'
    - 'MOVZX32rr8 EAX SIL'
    - 'OR64rr RAX RAX RDX'
    - 'BEXTR64rr RAX RDI RAX'
  config:          ''
  register_initial_values: []
cpu_name:        bdver2
llvm_triple:     x86_64-unknown-linux-gnu
num_repetitions: 10000
measurements:
  - { key: latency, value: 0.7454, per_snippet_value: 2.9816 }
error:           ''
info:            ''
assembled_snippet: 48C1E208400FB6C64809D0C4E2F8F7C748C1E208400FB6C64809D0C4E2F8F7C748C1E208400FB6C64809D0C4E2F8F7C748C1E208400FB6C64809D0C4E2F8F7C7C3
...
$ cat /tmp/new.s | ./bin/llvm-exegesis -mode=uops -snippets-file=-
Check generated assembly with: /usr/bin/objdump -d /tmp/snippet-da403c.o
---
mode:            uops
key:
  instructions:
    - 'SHL64ri RDX RDX i_0x8'
    - 'MOVZX32rr8 EAX SIL'
    - 'OR64rr RAX RAX RDX'
    - 'BEXTR64rr RAX RDI RAX'
  config:          ''
  register_initial_values: []
cpu_name:        bdver2
llvm_triple:     x86_64-unknown-linux-gnu
num_repetitions: 10000
measurements:
  - { key: PdFPU0, value: 0, per_snippet_value: 0 }
  - { key: PdFPU1, value: 0, per_snippet_value: 0 }
  - { key: PdFPU2, value: 0, per_snippet_value: 0 }
  - { key: PdFPU3, value: 0, per_snippet_value: 0 }
  - { key: NumMicroOps, value: 1.2571, per_snippet_value: 5.0284 }
error:           ''
info:            ''
assembled_snippet: 48C1E208400FB6C64809D0C4E2F8F7C748C1E208400FB6C64809D0C4E2F8F7C748C1E208400FB6C64809D0C4E2F8F7C748C1E208400FB6C64809D0C4E2F8F7C7C3
...
```
^ latency increased (worse).

Except //maybe// not really.
Like with all synthetic benchmarks, they //may// be misleading.

Let's take a look on some actual real-world hotpath.
In this case it's 'my' [[ https://github.com/darktable-org/rawspeed | RawSpeed ]]'s `BitStream<>::peekBitsNoFill()`, in [[ https://github.com/darktable-org/rawspeed/blob/e3316dc85127c2c29baa40f998f198a7b278bf36/src/librawspeed/decompressors/VC5Decompressor.cpp#L814 | GoPro VC5 decompressor ]]:
```
raw.pixls.us-unique/GoPro/HERO6 Black$ /usr/src/googlebenchmark/tools/compare.py -a benchmarks ~/rawspeed/build-clangs1-{old,new}/src/utilities/rsbench/rsbench --benchmark_counters_tabular=true --benchmark_min_time=0.00000001 --benchmark_repetitions=128 GOPR9172.GPR
RUNNING: /home/lebedevri/rawspeed/build-clangs1-old/src/utilities/rsbench/rsbench --benchmark_counters_tabular=true --benchmark_min_time=0.00000001 --benchmark_repetitions=128 GOPR9172.GPR --benchmark_display_aggregates_only=true --benchmark_out=/tmp/tmplwbKEM
2018-12-22 21:23:03
Running /home/lebedevri/rawspeed/build-clangs1-old/src/utilities/rsbench/rsbench
Run on (8 X 4012.81 MHz CPU s)
CPU Caches:
  L1 Data 16K (x8)
  L1 Instruction 64K (x4)
  L2 Unified 2048K (x4)
  L3 Unified 8192K (x1)
Load Average: 3.41, 2.41, 2.03
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Benchmark                                        Time           CPU Iterations  CPUTime,s CPUTime/WallTime     Pixels Pixels/CPUTime Pixels/WallTime Raws/CPUTime Raws/WallTime WallTime,s
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
GOPR9172.GPR/threads:8/real_time_mean           40 ms         40 ms        128   0.322244          7.96974        12M       37.4457M        298.534M      3.12047       24.8778   0.040465
GOPR9172.GPR/threads:8/real_time_median         39 ms         39 ms        128   0.312606          7.99155        12M        38.387M        306.788M      3.19891       25.5656   0.039115
GOPR9172.GPR/threads:8/real_time_stddev          4 ms          3 ms        128  0.0271557         0.130575          0        2.4941M        21.3909M     0.207842       1.78257   3.81081m
RUNNING: /home/lebedevri/rawspeed/build-clangs1-new/src/utilities/rsbench/rsbench --benchmark_counters_tabular=true --benchmark_min_time=0.00000001 --benchmark_repetitions=128 GOPR9172.GPR --benchmark_display_aggregates_only=true --benchmark_out=/tmp/tmpWAkan9
2018-12-22 21:23:08
Running /home/lebedevri/rawspeed/build-clangs1-new/src/utilities/rsbench/rsbench
Run on (8 X 4013.1 MHz CPU s)
CPU Caches:
  L1 Data 16K (x8)
  L1 Instruction 64K (x4)
  L2 Unified 2048K (x4)
  L3 Unified 8192K (x1)
Load Average: 3.78, 2.50, 2.06
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Benchmark                                        Time           CPU Iterations  CPUTime,s CPUTime/WallTime     Pixels Pixels/CPUTime Pixels/WallTime Raws/CPUTime Raws/WallTime WallTime,s
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
GOPR9172.GPR/threads:8/real_time_mean           39 ms         39 ms        128   0.311533          7.97323        12M       38.6828M        308.471M      3.22356        25.706  0.0390928
GOPR9172.GPR/threads:8/real_time_median         38 ms         38 ms        128   0.304231          7.99005        12M       39.4437M        315.527M      3.28698        26.294  0.0380316
GOPR9172.GPR/threads:8/real_time_stddev          3 ms          3 ms        128  0.0229149         0.133814          0       2.26225M        19.1421M     0.188521       1.59517   3.13671m
Comparing /home/lebedevri/rawspeed/build-clangs1-old/src/utilities/rsbench/rsbench to /home/lebedevri/rawspeed/build-clangs1-new/src/utilities/rsbench/rsbench
Benchmark                                                 Time             CPU      Time Old      Time New       CPU Old       CPU New
--------------------------------------------------------------------------------------------------------------------------------------
GOPR9172.GPR/threads:8/real_time_pvalue                 0.0000          0.0000      U Test, Repetitions: 128 vs 128
GOPR9172.GPR/threads:8/real_time_mean                  -0.0339         -0.0316            40            39            40            39
GOPR9172.GPR/threads:8/real_time_median                -0.0277         -0.0274            39            38            39            38
GOPR9172.GPR/threads:8/real_time_stddev                -0.1769         -0.1267             4             3             3             3
```
I.e. this results in //roughly// -3% improvements in perf.

While this will help [[ https://bugs.llvm.org/show_bug.cgi?id=36419 | PR36419 ]], it won't address it fully.

Reviewers: RKSimon, craig.topper, andreadb, spatel

Reviewed By: craig.topper

Subscribers: courbet, llvm-commits

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

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

5 years agotreat invoke like call
David Callahan [Tue, 15 Jan 2019 21:26:51 +0000 (21:26 +0000)]
treat invoke like call

Summary:
InvokeInst should be treated like CallInst and
assigned a separate discriminator. This is particularly
import when an Invoke is converted to a Call
during compilation and so can invalidate sample profile
data collected wtih different link time optimizations

Reviewers: twoh, Kader, danielcdh, wmi

Reviewed By: wmi

Subscribers: llvm-commits

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

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

5 years agogn build: Move target flags from toolchain to a .gni file.
Peter Collingbourne [Tue, 15 Jan 2019 21:24:00 +0000 (21:24 +0000)]
gn build: Move target flags from toolchain to a .gni file.

While here, add a use_lld flag and default it to true when using
clang on non-mac.

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

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

5 years ago[SanitizerCoverage] Don't create comdat for interposable functions.
Matt Morehouse [Tue, 15 Jan 2019 21:21:01 +0000 (21:21 +0000)]
[SanitizerCoverage] Don't create comdat for interposable functions.

Summary:
Comdat groups override weak symbol behavior, allowing the linker to keep
the comdats for weak symbols in favor of comdats for strong symbols.

Fixes the issue described in:
https://bugs.chromium.org/p/chromium/issues/detail?id=918662

Reviewers: eugenis, pcc, rnk

Reviewed By: pcc, rnk

Subscribers: smeenai, rnk, bd1976llvm, hiraditya, llvm-commits

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

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

5 years agogn build: Add build files for compiler-rt/lib/{hwasan,interception,sanitizer_common...
Peter Collingbourne [Tue, 15 Jan 2019 21:08:21 +0000 (21:08 +0000)]
gn build: Add build files for compiler-rt/lib/{hwasan,interception,sanitizer_common,ubsan}.

This allows the hwasan runtime to be built for Android aarch64.

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

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

5 years agogn build: Merge r351216, r351228.
Peter Collingbourne [Tue, 15 Jan 2019 21:02:49 +0000 (21:02 +0000)]
gn build: Merge r351216, r351228.

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

5 years ago[SLP] Added test for PR40310, NFC.
Alexey Bataev [Tue, 15 Jan 2019 20:54:44 +0000 (20:54 +0000)]
[SLP] Added test for PR40310, NFC.

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

5 years agollvm-objdump -m -D should disassemble all text segments
Michael Trent [Tue, 15 Jan 2019 20:41:30 +0000 (20:41 +0000)]
llvm-objdump -m -D should disassemble all text segments

Summary:
When running llvm-objdump with the -macho option objdump will by default
disassemble only the __TEXT,__text section (or __TEXT_EXEC,__text when
disassembling MH_KEXT_BUNDLE files). The -disassemble-all option is
treated no diferently than -disassemble.

This change upates llvm-objdump's MachO parsing code to disassemble all
__text sections found in a file when -disassemble-all is specified. This
is useful for disassembling files with more than one __text section, or
when disassembling files whose __text section is not present in __TEXT.

I added a lit test case that verifies "llvm-objdump -m -d" and
"llvm-objdump -m -D" produce the expected results on a reference binary.
I also updated the CommandGuide documentation for llvm-objdump.rst and
verified it renders correctly as man and html.

rdar://42899338

Reviewers: ab, pete, lhames

Reviewed By: lhames

Subscribers: rupprecht, llvm-commits

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

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

5 years ago[X86] Add versions of the avx512 gather intrinsics that take the mask as a vXi1 vecto...
Craig Topper [Tue, 15 Jan 2019 20:12:33 +0000 (20:12 +0000)]
[X86] Add versions of the avx512 gather intrinsics that take the mask as a vXi1 vector instead of a scalar

In keeping with our general direction of having the vXi1 type present in IR, this patch converts the mask argument for avx512 gather to vXi1. This can avoid k-register to GPR to k-register transitions late in codegen.

I left the existing intrinsics behind because they have many out of tree users such as ISPC. They generate their own code and don't go through the autoupgrade path which only works for bitcode and ll parsing. Ideally we will get them to migrate to target independent intrinsics, but it might be easier for them to migrate to these new intrinsics.

I'll work on scatter and gatherpf/scatterpf next.

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

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

5 years ago[MSP430] Recognize '{' as a line separator
Anton Korobeynikov [Tue, 15 Jan 2019 20:10:46 +0000 (20:10 +0000)]
[MSP430] Recognize '{' as a line separator

msp430-as supports multiple assembly statements on the same line
separated by a '{' character.

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

5 years ago[Nios2] Remove Nios2 backend
Craig Topper [Tue, 15 Jan 2019 19:59:19 +0000 (19:59 +0000)]
[Nios2] Remove Nios2 backend

As mentioned here http://lists.llvm.org/pipermail/llvm-dev/2019-January/129121.html This backend is incomplete and has not been maintained in several months.

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

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

5 years agoReapply "[CodeGen][X86] Expand USUBSAT to UMAX+SUB, also for vectors"
Nikita Popov [Tue, 15 Jan 2019 18:43:41 +0000 (18:43 +0000)]
Reapply "[CodeGen][X86] Expand USUBSAT to UMAX+SUB, also for vectors"

Related to https://bugs.llvm.org/show_bug.cgi?id=40123.

Rather than scalarizing, expand a vector USUBSAT into UMAX+SUB,
which produces much better code for X86.

Reapplying with updated SLPVectorizer tests.

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

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

5 years ago[WebAssembly] Fix updating/moving DBG_VALUEs in RegStackify
Yury Delendik [Tue, 15 Jan 2019 18:14:12 +0000 (18:14 +0000)]
[WebAssembly] Fix updating/moving DBG_VALUEs in RegStackify

Summary:
As described in PR40209, there can be issues in DBG_VALUEs handling when multiple defs present in a BB. This patch
adds logic for detection of related to def DBG_VALUEs and localizes register update and movement to found DBG_VALUEs.

Reviewers: aheejin

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

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

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

5 years ago[WebAssembly] Update release notes
Derek Schuff [Tue, 15 Jan 2019 17:54:42 +0000 (17:54 +0000)]
[WebAssembly] Update release notes

Summary:
Explicitly note that multithreading support is not included in the stable
ABI.

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

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

5 years agoWe can improve the performance (generally) by memo-izing the action to map a debug...
David Callahan [Tue, 15 Jan 2019 17:45:54 +0000 (17:45 +0000)]
We can improve the performance (generally) by memo-izing the action to map a debug location to its function summary.

Summary:
Here are timings (as reported by "opt -time-passes") for
sample-profile pass for some files holding hot functions from a major
service©r. Average 17% reduction. Delta column is 100*(old-new)/old.

```
Old    New    Delta
0.0537 0.0538 -0.2%
0.8155 0.6522 20.0%
0.0779 0.0751  3.6%
0.0727 0.0913 -25.6%
0.1622 0.1302 19.7%
0.0627 0.0594  5.3%
0.0766 0.0744  2.9%
0.6426 0.4387 31.7%
0.3521 0.2776 21.2%
0.3549 0.2721 23.3%
0.0912 0.0904  0.9%
0.1236 0.1059 14.3%
0.0854 0.0866 -1.4%
0.0757 0.0722  4.6%
0.1293 0.1147 11.3%
0.1354 0.1122 17.1%
0.0767 0.0770 -0.4%
0.1135 0.0968 14.7%
0.0524 0.0608 -16.0%
0.1279 0.1106 13.5%
==========
3.6820 3.0520 17.1% Total
```

Reviewers: twoh, Kader, danielcdh, wmi

Reviewed By: wmi

Subscribers: dblaikie, llvm-commits

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

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

5 years ago[SelectionDAG] Check membership of register in class for single
Nirav Dave [Tue, 15 Jan 2019 17:09:23 +0000 (17:09 +0000)]
[SelectionDAG] Check membership of register in class for single
register constraints. NFCI.

Now that X86's ST(7) constraints are fixed this check can be
reinstated.

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

5 years ago[X86] Fix register class for assembly constraints to ST(7). NFCI.
Nirav Dave [Tue, 15 Jan 2019 17:09:14 +0000 (17:09 +0000)]
[X86] Fix register class for assembly constraints to ST(7). NFCI.

Modify getRegForInlineAsmConstraint to return special singleton
register class when a constraint references ST(7) not RFP80 for which
ST(7) is not a member.

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

5 years ago[llvm-readelf] Allow single-letter flags to be merged.
Jordan Rupprecht [Tue, 15 Jan 2019 17:04:40 +0000 (17:04 +0000)]
[llvm-readelf] Allow single-letter flags to be merged.

Summary:
This patch adds support for merged arguments (e.g. -SW == -S -W) for llvm-readelf.

No changes are intended for llvm-readobj. There are a few short flags (-sd, -sr, -st, -dt) that would conflict with grouped single letter flags, and having only some grouped flags might be confusing. So, allow merged flags for readelf compatibility, but force separate args for llvm-readobj. From what I can tell, these two-letter flags are only used with llvm-readobj, not llvm-readelf.

This fixes PR40064.

Reviewers: jhenderson, kristina, echristo, phosek

Reviewed By: jhenderson

Subscribers: llvm-commits

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

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

5 years ago[llvm-objcopy] Use SHT_NOTE for added note sections.
Jordan Rupprecht [Tue, 15 Jan 2019 16:57:23 +0000 (16:57 +0000)]
[llvm-objcopy] Use SHT_NOTE for added note sections.

Summary:
Fix llvm-objcopy to add .note sections as SHT_NOTEs. GNU objcopy overrides section flags for special sections. For `.note` sections (with the exception of `.note.GNU-stack`), SHT_NOTE is used.

Many other sections are special cased by libbfd, but `.note` is the only special section I can seem to find being used with objcopy --add-section.

See `.note` in context of the full list of special sections here: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=bfd/elf.c;h=eb3e1828e9c651678b95a1dcbc3b124783d1d2be;hb=HEAD#l2675

Reviewers: jhenderson, alexshap, jakehehrlich, espindola

Reviewed By: jhenderson

Subscribers: emaste, arichardson, llvm-commits

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

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

5 years ago[X86] Bailout of lowerVectorShuffleAsPermuteAndUnpack for shuffle-with-zero (PR40306)
Simon Pilgrim [Tue, 15 Jan 2019 16:56:55 +0000 (16:56 +0000)]
[X86] Bailout of lowerVectorShuffleAsPermuteAndUnpack for shuffle-with-zero (PR40306)

If we're shuffling with a zero vector, then we are better off not doing VECTOR_SHUFFLE(UNPCK()) as we lose track of those zero elements.

We were already doing this for SSSE3 targets as we have PSHUFB, but its worth doing for all targets.

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

5 years agogn build: Don't assume valgrind.h exists on Linux
Hans Wennborg [Tue, 15 Jan 2019 16:51:45 +0000 (16:51 +0000)]
gn build: Don't assume valgrind.h exists on Linux

It didn't on my machine, so defaulting it to off seems better.

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

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

5 years ago[X86] Add PR40318 shuffle test case
Simon Pilgrim [Tue, 15 Jan 2019 16:31:10 +0000 (16:31 +0000)]
[X86] Add PR40318 shuffle test case

The other test case is already covered by the PR40306 test case, which was mainly concerned with SSSE3 codegen.

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

5 years agoRemove irrelevant references to legacy git repositories from
James Y Knight [Tue, 15 Jan 2019 16:18:52 +0000 (16:18 +0000)]
Remove irrelevant references to legacy git repositories from
compiler identification lines in test-cases.

(Doing so only because it's then easier to search for references which
are actually important and need fixing.)

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

5 years ago[SLP][X86] Split prefer-256-bit 'AVX256BW' tests from AVX2 checks
Simon Pilgrim [Tue, 15 Jan 2019 16:13:37 +0000 (16:13 +0000)]
[SLP][X86] Split prefer-256-bit 'AVX256BW' tests from AVX2 checks

Fixes SLP test issue with D56636

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

5 years ago[DAGCombiner] reduce buildvec of zexted extracted element to shuffle
Sanjay Patel [Tue, 15 Jan 2019 16:11:05 +0000 (16:11 +0000)]
[DAGCombiner] reduce buildvec of zexted extracted element to shuffle

The motivating case for this is shown in the first regression test. We are
transferring to scalar and back rather than just zero-extending with 'vpmovzxdq'.

That's a special-case for a more general pattern as shown here. In all tests,
we're avoiding the vector-scalar-vector moves in favor of vector ops.

We aren't producing optimal shuffle code in some cases though, so the patch is
limited to reduce regressions.

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

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

5 years agoRevert r351138 "[ORC] Move ORC Core symbol map and set types into their own
Lang Hames [Tue, 15 Jan 2019 15:21:13 +0000 (15:21 +0000)]
Revert r351138 "[ORC] Move ORC Core symbol map and set types into their own
header: CoreTypes.h."

This commit broke some bots. Reverting while I investigate.

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

5 years agoUpdate year in license files
Hans Wennborg [Tue, 15 Jan 2019 15:10:32 +0000 (15:10 +0000)]
Update year in license files

In last year's update (D48219) it was suggested that the release manager
might want to do this, so here we go.

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

5 years ago[SimpleLoopUnswitch] Increment stats counter for unswitching switch instruction
Zaara Syeda [Tue, 15 Jan 2019 15:08:01 +0000 (15:08 +0000)]
[SimpleLoopUnswitch] Increment stats counter for unswitching switch instruction

Increment statistics counter NumSwitches at unswitchNontrivialInvariants() for
unswitching a non-trivial switch instruction. This is to fix a bug that it
increments NumBranches even for the case of switch instruction.
There is no functional change in this patch.

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

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

5 years ago[llvm-obdump] - Fix the help lines for -stop-address and -z.
George Rimar [Tue, 15 Jan 2019 14:03:50 +0000 (14:03 +0000)]
[llvm-obdump] - Fix the help lines for -stop-address and -z.

It was broken by me by mistake in r350823 during addressing the
review comment before committing (changed not the right text line).

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

5 years ago[InstCombine] Don't undo 0 - (X * Y) canonicalization when combining subs.
Florian Hahn [Tue, 15 Jan 2019 11:18:21 +0000 (11:18 +0000)]
[InstCombine] Don't undo 0 - (X * Y) canonicalization when combining subs.

Otherwise instcombine gets stuck in a cycle. The canonicalization was
added in D55961.

This patch fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12400

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

5 years ago[NFC] Remove some code duplication
Max Kazantsev [Tue, 15 Jan 2019 11:16:14 +0000 (11:16 +0000)]
[NFC] Remove some code duplication

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

5 years ago[NFC] Remove obsolete enum RangeCheckKind
Max Kazantsev [Tue, 15 Jan 2019 10:48:45 +0000 (10:48 +0000)]
[NFC] Remove obsolete enum RangeCheckKind

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

5 years ago[NFC][X86] extract-bits.ll: add test with truncation with extra-use.
Roman Lebedev [Tue, 15 Jan 2019 10:36:20 +0000 (10:36 +0000)]
[NFC][X86] extract-bits.ll: add test with truncation with extra-use.

That extra-use *should* prevent D56052 from looking past the trunc.

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

5 years ago[NFC] Decrease if nest
Max Kazantsev [Tue, 15 Jan 2019 10:01:46 +0000 (10:01 +0000)]
[NFC] Decrease if nest

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

5 years ago[NFC] Move some functions to LoopUtils
Max Kazantsev [Tue, 15 Jan 2019 09:51:34 +0000 (09:51 +0000)]
[NFC] Move some functions to LoopUtils

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

5 years ago[llvm][IRBuilder] Introspection for CreateAlignmentAssumption*() functions
Roman Lebedev [Tue, 15 Jan 2019 09:44:13 +0000 (09:44 +0000)]
[llvm][IRBuilder] Introspection for CreateAlignmentAssumption*() functions

Summary:
Clang calls these functions to produce IR for assume-aligned attributes.
I would like to teach UBSAN to verify these assumptions.
For that, i need to access the final pointer on which the check is performed,
and the actual `icmp` that does the check.

The alternative to this would be to fully re-implement this in clang.

This is a second commit, the original one was r351104,
which was mass-reverted in r351159 because 2 compiler-rt tests were failing.

Reviewers: spatel, dneilson, craig.topper, dblaikie, hfinkel

Reviewed By: hfinkel

Subscribers: hfinkel, llvm-commits

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

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

5 years ago[llvm-objcopy] [COFF] Implement --strip-all[-gnu] for symbols
Martin Storsjo [Tue, 15 Jan 2019 09:34:55 +0000 (09:34 +0000)]
[llvm-objcopy] [COFF] Implement --strip-all[-gnu] for symbols

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

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

5 years ago[llvm-objcopy] [COFF] Remove pointless comment chars from .test files. NFC.
Martin Storsjo [Tue, 15 Jan 2019 09:34:45 +0000 (09:34 +0000)]
[llvm-objcopy] [COFF] Remove pointless comment chars from .test files. NFC.

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

5 years ago[llvm-objdump] - Cleanup the code. NFCI.
George Rimar [Tue, 15 Jan 2019 09:19:18 +0000 (09:19 +0000)]
[llvm-objdump] - Cleanup the code. NFCI.

This is a cosmetic cleanup for the llvm-objdump code.

This patch:
* Renames things to match the official LLVM code style (lower case -> upper case).
* Removes few obviously excessive variables.
* Moves a few lines closer to the place of use, reorders the code a bit to simplify it,
to avoid doing excessive returns and to avoid using 'else` after returns.

I focused only on a llvm-objdump.h/llvm-objdump.cpp files. Few changes in the
MachODump.cpp and COFFDump.cpp are a result of llvm-objdump.h modification.

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

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

5 years agogn build: Rename llvm_host_triple to llvm_current_triple and have it use current_...
Peter Collingbourne [Tue, 15 Jan 2019 08:20:29 +0000 (08:20 +0000)]
gn build: Rename llvm_host_triple to llvm_current_triple and have it use current_{cpu,os}.

This makes e.g. ToolChain::isCrossCompiling() in
clang/lib/Driver/ToolChain.cpp return the correct result
if the compiler was cross-compiled. This change also affects
llvm_default_target_triple, so cross-compiled compilers default to
targeting the cross-compilation target, which makes more sense than
the host that the compiler was compiled on.

This change will also be necessary in order for the correct triples
to appear in generated lit files for non-native targets.

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

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

5 years agogn build: Make a couple of improvements to the unix toolchain.
Peter Collingbourne [Tue, 15 Jan 2019 08:14:38 +0000 (08:14 +0000)]
gn build: Make a couple of improvements to the unix toolchain.

Add an asm tool (will be required for building sanitizer_common on
x64) and set a soname for DSOs so that anything that links against
them gets the correct DT_NEEDED.

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

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

5 years agogn build: Switch to using current_os in lib/Support/BUILD.gn.
Peter Collingbourne [Tue, 15 Jan 2019 07:17:03 +0000 (07:17 +0000)]
gn build: Switch to using current_os in lib/Support/BUILD.gn.

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

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

5 years ago[X86] Upgrade some avx512bw shift intrinsics that were removed a while ago. NFC
Craig Topper [Tue, 15 Jan 2019 07:15:20 +0000 (07:15 +0000)]
[X86] Upgrade some avx512bw shift intrinsics that were removed a while ago. NFC

Masking was removed from these intrinsics and I guess we didn't update the tests then.

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

5 years ago[WebAssembly] Support multilibs for wasm32 and add a wasm OS that uses it
Dan Gohman [Tue, 15 Jan 2019 06:58:13 +0000 (06:58 +0000)]
[WebAssembly] Support multilibs for wasm32 and add a wasm OS that uses it

This adds support for multilib paths for wasm32 targets, following
[Debian's Multiarch conventions], and also adds an experimental OS name in
order to test it.

[Debian's Multiarch conventions]: https://wiki.debian.org/Multiarch/

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

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

5 years ago[X86] Add test cases for D56695. NFC
Craig Topper [Tue, 15 Jan 2019 06:39:51 +0000 (06:39 +0000)]
[X86] Add test cases for D56695. NFC

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

5 years ago[X86] Switch the triple on avx2-intrinsics-x86.ll to be -unknown-unknown instead...
Craig Topper [Tue, 15 Jan 2019 06:39:49 +0000 (06:39 +0000)]
[X86] Switch the triple on avx2-intrinsics-x86.ll to be -unknown-unknown instead of darwin so the constant pool entries will be filtered better by the script.

Darwin uses LCPI instead of .LCPI so the filter doesn't work.

This is silly, but it will help reduce some future some test diffs.

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

5 years agoRevert alignment assumptions changes
Vlad Tsyrklevich [Tue, 15 Jan 2019 03:38:02 +0000 (03:38 +0000)]
Revert alignment assumptions changes

Revert r351104-6, r351109, r351110, r351119, r351134, and r351153. These
changes fail on the sanitizer bots.

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

5 years agogn build: Split no-RTTI flag into a config.
Peter Collingbourne [Tue, 15 Jan 2019 02:43:33 +0000 (02:43 +0000)]
gn build: Split no-RTTI flag into a config.

Some of the sanitizer runtime code needs to be built with RTTI;
this allows that code to opt in to RTTI.

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

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

5 years agogn build: Stop defining LLVM_ON_UNIX globally.
Peter Collingbourne [Tue, 15 Jan 2019 02:42:47 +0000 (02:42 +0000)]
gn build: Stop defining LLVM_ON_UNIX globally.

This macro is already being defined in llvm-config.h.

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

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

5 years ago[WebAssembly] Expand SIMD shifts while V8's implementation disagrees
Thomas Lively [Tue, 15 Jan 2019 02:16:03 +0000 (02:16 +0000)]
[WebAssembly] Expand SIMD shifts while V8's implementation disagrees

Summary:
V8 currently implements SIMD shifts as taking an immediate operation,
which disagrees with the spec proposal and the toolchain
implementation. As a stopgap measure to get things working, unroll all
vector shifts. Since this is a temporary measure, there are no tests.

Reviewers: aheejin, dschuff

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

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

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

5 years agoAMDGPU: Add a fast path for icmp.i1(src, false, NE)
Marek Olsak [Tue, 15 Jan 2019 02:13:18 +0000 (02:13 +0000)]
AMDGPU: Add a fast path for icmp.i1(src, false, NE)

Summary:
This allows moving the condition from the intrinsic to the standard ICmp
opcode, so that LLVM can do simplifications on it. The icmp.i1 intrinsic
is an identity for retrieving the SGPR mask.

And we can also get the mask from and i1, or i1, xor i1.

Reviewers: arsenm, nhaehnle

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

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

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

5 years ago[AArch64] Adjust the feature set for Exynos
Evandro Menezes [Tue, 15 Jan 2019 01:53:49 +0000 (01:53 +0000)]
[AArch64] Adjust the feature set for Exynos

Enable the fusion of arithmetic and logic instructions for Exynos M4.

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

5 years ago[X86] Avoid clobbering ESP/RSP in the epilogue.
Reid Kleckner [Tue, 15 Jan 2019 01:24:18 +0000 (01:24 +0000)]
[X86] Avoid clobbering ESP/RSP in the epilogue.

Summary:
In r345197 ESP and RSP were added to GR32_TC/GR64_TC, allowing them to
be used for tail calls, but this also caused `findDeadCallerSavedReg` to
think they were acceptable targets for clobbering. Filter them out.

Fixes PR40289.

Patch by Geoffry Song!

Reviewed By: rnk

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

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

5 years ago[AArch64] Fix typo (NFC)
Evandro Menezes [Tue, 15 Jan 2019 00:58:59 +0000 (00:58 +0000)]
[AArch64] Fix typo (NFC)

Fix another typo, this time in the `RUN` line, which used a syntax not
universally supported, in test case added by D56572.

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

5 years ago[AArch64] Fix typo (NFC)
Evandro Menezes [Tue, 15 Jan 2019 00:20:57 +0000 (00:20 +0000)]
[AArch64] Fix typo (NFC)

Fix typo in test case added by D56572 (rL351139).

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

5 years ago[EarlyIfConversion] Don't if-convert unconditional branches.
Eli Friedman [Tue, 15 Jan 2019 00:19:46 +0000 (00:19 +0000)]
[EarlyIfConversion] Don't if-convert unconditional branches.

A block ending in an unconditional branch can have two successors if one
is a landing pad.  In practice, I think this only has an effect on
Windows because landing pads are never empty for Itanium unwinding.

(Alternatively, I could add a check to
AArch64InstrInfo::canInsertSelect, but this seems more obvious.)

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

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

5 years ago[AArch64] Explicitly use v1i64 type for llvm.aarch64.neon.abs.i64 .
Eli Friedman [Tue, 15 Jan 2019 00:15:24 +0000 (00:15 +0000)]
[AArch64] Explicitly use v1i64 type for llvm.aarch64.neon.abs.i64 .

Otherwise, with D56544, the intrinsic will be expanded to an integer
csel, which is probably not what the user expected.  This matches the
general convention of using "v1" types to represent scalar integer
operations in vector registers.

While I'm here, also add some error checking so we don't generate
illegal ABS nodes.

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

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

5 years ago[AArch64] Add new target feature to fuse arithmetic and logic operations
Evandro Menezes [Mon, 14 Jan 2019 23:54:36 +0000 (23:54 +0000)]
[AArch64] Add new target feature to fuse arithmetic and logic operations

This feature enables the fusion of some arithmetic and logic instructions
together.

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

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

5 years ago[ORC] Move ORC Core symbol map and set types into their own header: CoreTypes.h.
Lang Hames [Mon, 14 Jan 2019 23:49:13 +0000 (23:49 +0000)]
[ORC] Move ORC Core symbol map and set types into their own header: CoreTypes.h.

This will allow other utilities (including a future RuntimeDyld replacement) to
use these types without pulling in the major Core types (JITDylib, etc.).

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

5 years ago[X86] Fix unused variable warning in Release builds. NFC.
Benjamin Kramer [Mon, 14 Jan 2019 23:29:54 +0000 (23:29 +0000)]
[X86] Fix unused variable warning in Release builds. NFC.

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

5 years agoUpdate GettingStarted guide to recommend that people use the new
James Y Knight [Mon, 14 Jan 2019 22:27:32 +0000 (22:27 +0000)]
Update GettingStarted guide to recommend that people use the new
official Git repository.

Remove the directions for using git-svn, and demote the prominence of
the svn instructions.

Also, fix a few other issues while I'm in there:

* Mention LLVM_ENABLE_PROJECTS more.
* Getting started doesn't need to mention test-suite, but should
  mention clang and the other projects.
* Remove mentions of "configure", since that's long gone.

I've also adjusted a few other mentions of svn to point to github, but
have not done so comprehensively.

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

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

5 years agoRevert "[CodeGen][X86] Expand USUBSAT to UMAX+SUB, also for vectors"
Nikita Popov [Mon, 14 Jan 2019 22:18:39 +0000 (22:18 +0000)]
Revert "[CodeGen][X86] Expand USUBSAT to UMAX+SUB, also for vectors"

This reverts commit r351125.

I missed test changes in an SLPVectorizer test, due to the cost model
changes. Reverting for now.

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

5 years ago[Object] Return a symbol_iterator, rather than a basic_symbol_iterator, from
Lang Hames [Mon, 14 Jan 2019 22:05:12 +0000 (22:05 +0000)]
[Object] Return a symbol_iterator, rather than a basic_symbol_iterator, from
MachOObjectFile::getSymbolByIndex.

ObjectFile derivatives should prefer symbol_iterator/SymbolRef over
basic_symbol_iterator/BasicSymbolRef where possible, as the former
retain their link to the ObjectFile (rather than a SymbolicFile) and provide
more functionality.

No test for this: Existing code is working, and we don't have (m)any libObject
unit tests. I'll think about how we can test more systematically going forward.

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

5 years ago[WebAssembly][FastISel] Do not assume naive CmpInst lowering
Thomas Lively [Mon, 14 Jan 2019 22:03:43 +0000 (22:03 +0000)]
[WebAssembly][FastISel] Do not assume naive CmpInst lowering

Summary:
Fixes https://bugs.llvm.org/show_bug.cgi?id=40172. See
test/CodeGen/WebAssembly/PR40172.ll for an explanation.

Reviewers: dschuff, aheejin

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

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

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

5 years ago[llvm-ar] Temporarily remove failing test which is breaking buildbots
Jordan Rupprecht [Mon, 14 Jan 2019 21:58:15 +0000 (21:58 +0000)]
[llvm-ar] Temporarily remove failing test which is breaking buildbots

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

5 years ago[CodeGen][X86] Expand USUBSAT to UMAX+SUB, also for vectors
Nikita Popov [Mon, 14 Jan 2019 21:43:30 +0000 (21:43 +0000)]
[CodeGen][X86] Expand USUBSAT to UMAX+SUB, also for vectors

Related to https://bugs.llvm.org/show_bug.cgi?id=40123.

Rather than scalarizing, expand a vector USUBSAT into UMAX+SUB,
which produces much better code for X86.

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

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