OSDN Git Service

android-x86/external-llvm.git
8 years agoFix PR28219: Use profile summary from reader and not compute it
Easwaran Raman [Tue, 21 Jun 2016 19:29:49 +0000 (19:29 +0000)]
Fix PR28219: Use profile summary from reader and not compute it

Differentiaal revision: http://reviews.llvm.org/D21546

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

8 years agoAdd MemoryAccess creation and PHI creation APIs to MemorySSA
Daniel Berlin [Tue, 21 Jun 2016 18:39:20 +0000 (18:39 +0000)]
Add MemoryAccess creation and PHI creation APIs to MemorySSA

Reviewers: george.burgess.iv, gberry, hfinkel

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D21463

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

8 years ago[codeview] Add support for splitting field list records over 64KB
Reid Kleckner [Tue, 21 Jun 2016 18:33:01 +0000 (18:33 +0000)]
[codeview] Add support for splitting field list records over 64KB

The basic structure is that once a list record goes over 64K, the last
subrecord of the list is an LF_INDEX record that refers to the next
record. Because the type record graph must be toplogically sorted, this
means we have to emit them in reverse order. We build the type record in
order of declaration, so this means that if we don't want extra copies,
we need to detect when we were about to split a record, and leave space
for a continuation subrecord that will point to the eventual split
top-level record.

Also adds dumping support for these records.

Next we should make sure that large method overload lists work properly.

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

8 years agollvm-ar: correct typo
Saleem Abdulrasool [Tue, 21 Jun 2016 17:19:28 +0000 (17:19 +0000)]
llvm-ar: correct typo

Default was misspelt.  NFC.

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

8 years ago[AArch64] Fix merge-store.ll regression test after r273271
Silviu Baranga [Tue, 21 Jun 2016 17:15:49 +0000 (17:15 +0000)]
[AArch64] Fix merge-store.ll regression test after r273271

r273271 changed the RUN line of the regression test to use
-march=cyclone instead of -mtriple=aarch64-none-none.

This caused a change in the output syntax for the ext
instruction, causing the test to fail. Change this test
back to using -mtriple=aarch64-none-none.

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

8 years agoFix typo, NFC
Krzysztof Parzyszek [Tue, 21 Jun 2016 16:16:52 +0000 (16:16 +0000)]
Fix typo, NFC

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

8 years ago[StackProtector] Fix computation of GSCookieOffset and EHCookieOffset with SEH4
Etienne Bergeron [Tue, 21 Jun 2016 15:58:55 +0000 (15:58 +0000)]
[StackProtector] Fix computation of GSCookieOffset and EHCookieOffset with SEH4

Summary:
Fix the computation of the offsets present in the scopetable when using the
SEH (__except_handler4).

This patch added an intrinsic to track the position of the allocation on the
stack of the EHGuard. This position is needed when producing the ScopeTable.

```
    struct _EH4_SCOPETABLE {
        DWORD GSCookieOffset;
        DWORD GSCookieXOROffset;
        DWORD EHCookieOffset;
        DWORD EHCookieXOROffset;
        _EH4_SCOPETABLE_RECORD ScopeRecord[1];
    };

    struct _EH4_SCOPETABLE_RECORD {
        DWORD EnclosingLevel;
        long (*FilterFunc)();
            union {
            void (*HandlerAddress)();
            void (*FinallyFunc)();
        };
    };
```

The code to generate the EHCookie is added in `X86WinEHState.cpp`.
Which is adding these instructions when using SEH4.

```
Lfunc_begin0:
# BB#0:                                 # %entry
pushl %ebp
movl %esp, %ebp
pushl %ebx
pushl %edi
pushl %esi
subl $28, %esp
movl %ebp, %eax                <<-- Loading FramePtr
movl %esp, -36(%ebp)
movl $-2, -16(%ebp)
movl $L__ehtable$use_except_handler4_ssp, %ecx
xorl ___security_cookie, %ecx
movl %ecx, -20(%ebp)
xorl ___security_cookie, %eax  <<-- XOR FramePtr and Cookie
movl %eax, -40(%ebp)           <<-- Storing EHGuard
leal -28(%ebp), %eax
movl $__except_handler4, -24(%ebp)
movl %fs:0, %ecx
movl %ecx, -28(%ebp)
movl %eax, %fs:0
movl $0, -16(%ebp)
calll _may_throw_or_crash
LBB1_1:                                 # %cont
movl -28(%ebp), %eax
movl %eax, %fs:0
addl $28, %esp
popl %esi
popl %edi
popl %ebx
popl %ebp
retl

```

And the corresponding offset is computed:
```
Luse_except_handler4_ssp$parent_frame_offset = -36
.p2align 2
L__ehtable$use_except_handler4_ssp:
.long -2                      # GSCookieOffset
.long 0                       # GSCookieXOROffset
.long -40                     # EHCookieOffset    <<----
.long 0                       # EHCookieXOROffset
.long -2                      # ToState
.long _catchall_filt          # FilterFunction
.long LBB1_2                  # ExceptionHandler

```

Clang is not yet producing function using SEH4, but it's a work in progress.
This patch is a step toward having a valid implementation of SEH4.
Unfortunately, it is not yet fully working. The EH registration block is not
allocated at the right offset on the stack.

Reviewers: rnk, majnemer

Subscribers: llvm-commits, chrisha

Differential Revision: http://reviews.llvm.org/D21231

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

8 years ago[AArch64] Change the preferred alignment for char and short to word alignment
Evandro Menezes [Tue, 21 Jun 2016 15:55:18 +0000 (15:55 +0000)]
[AArch64] Change the preferred alignment for char and short to word alignment

Differential Revision: http://reviews.llvm.org/D21414

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

8 years ago[AArch64] Restore codegen for AArch64 Cortex-A72/A73 after NFCI
Silviu Baranga [Tue, 21 Jun 2016 15:53:54 +0000 (15:53 +0000)]
[AArch64] Restore codegen for AArch64 Cortex-A72/A73 after NFCI

Summary:
Code generation for Cortex-A72/Cortex-A73 was accidentally changed
by r271555, which was a NFCI. The isCortexA57() predicate was not true
for Cortex-A72/Cortex-A73 before r271555 (since it was checking the CPU
string). Because Cortex-A72/Cortex-A73 inherit all features from Cortex-A57,
all decisions previously guarded by isCortexA57() are now taken.

This change restores the behaviour before r271555 by adding separate
ProcA72/ProcA73, which have the required features to preserve code
generation.

Reviewers: kristof.beyls, aadg, mcrosier, rengolin

Subscribers: mcrosier, llvm-commits, aemerson, t.p.northover, MatzeB, rengolin

Differential Revision: http://reviews.llvm.org/D21182

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

8 years agofix indentation
Etienne Bergeron [Tue, 21 Jun 2016 15:21:04 +0000 (15:21 +0000)]
fix indentation

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

8 years ago[AArch64] Switch regression tests to test features not CPUs
Silviu Baranga [Tue, 21 Jun 2016 15:16:34 +0000 (15:16 +0000)]
[AArch64] Switch regression tests to test features not CPUs

Summary:
We have switched to using features for all heuristics, but
the tests for these are still using -mcpu, which means we
are not directly testing the features.

This converts at least some of the existing regression tests
to use the new features.

This still leaves the following features untested:

merge-narrow-ld
predictable-select-expensive
alternate-sextload-cvt-f32-pattern
disable-latency-sched-heuristic

Reviewers: mcrosier, t.p.northover, rengolin

Subscribers: MatzeB, aemerson, llvm-commits, rengolin

Differential Revision: http://reviews.llvm.org/D21288

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

8 years agoThis is part of the effort for asan to support Windows 64 bit.
Etienne Bergeron [Tue, 21 Jun 2016 15:07:29 +0000 (15:07 +0000)]
This is part of the effort for asan to support Windows 64 bit.
The large offset is being tested on Windows 10 (which has larger usable
virtual address space than Windows 8 or earlier)

Patch by:  Wei Wang
Differential Revision: http://reviews.llvm.org/D21523

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

8 years ago[codeview] Fix DenseMap pointer invalidation bug
Reid Kleckner [Tue, 21 Jun 2016 14:56:24 +0000 (14:56 +0000)]
[codeview] Fix DenseMap pointer invalidation bug

When you have a map holding a unique_ptr, hold a reference to the raw
pointer instead of the unique pointer. The unique_ptr will be moved on
rehash.

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

8 years agoStrip trailing whitespace
Simon Pilgrim [Tue, 21 Jun 2016 14:37:39 +0000 (14:37 +0000)]
Strip trailing whitespace

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

8 years agoSwitch to using an API that handles non-ASCII paths appropriately on Windows.
Aaron Ballman [Tue, 21 Jun 2016 14:24:48 +0000 (14:24 +0000)]
Switch to using an API that handles non-ASCII paths appropriately on Windows.

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

8 years agoDefine a isPositionIndependent helper for ARMAsmPrinter. NFC.
Rafael Espindola [Tue, 21 Jun 2016 14:21:53 +0000 (14:21 +0000)]
Define a isPositionIndependent helper for ARMAsmPrinter. NFC.

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

8 years ago[arm+x86] Make GNU variants behave like GNU w.r.t combining sin+cos into sincos.
Daniel Sanders [Tue, 21 Jun 2016 12:29:03 +0000 (12:29 +0000)]
[arm+x86] Make GNU variants behave like GNU w.r.t combining sin+cos into sincos.

Summary:
canCombineSinCosLibcall() would previously combine sin+cos into sincos for
GNUX32/GNUEABI/GNUEABIHF regardless of whether UnsafeFPMath were set or not.
However, GNU would only combine them for UnsafeFPMath because sincos does not
set errno like sin and cos do. It seems likely that this is an oversight.

Reviewers: t.p.northover

Subscribers: t.p.northover, aemerson, llvm-commits, rengolin

Differential Revision: http://reviews.llvm.org/D21431

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

8 years agoreverted the prev commit due to assertion failure
Elena Demikhovsky [Tue, 21 Jun 2016 12:10:11 +0000 (12:10 +0000)]
reverted the prev commit due to assertion failure

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

8 years agoFixed consecutive memory access detection in Loop Vectorizer.
Elena Demikhovsky [Tue, 21 Jun 2016 11:32:01 +0000 (11:32 +0000)]
Fixed consecutive memory access detection in Loop Vectorizer.
It did not handle correctly cases without GEP.

The following loop wasn't vectorized:

for (int i=0; i<len; i++)
  *to++ = *from++;

I use getPtrStride() to find Stride for memory access and return 0 is the Stride is not 1 or -1.

Differential revision: http://reviews.llvm.org/D20789

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

8 years ago[TargetSchedule] Use 'isOutOfOrder' as possible to avoid magic number. NFC.
Junmo Park [Tue, 21 Jun 2016 08:09:58 +0000 (08:09 +0000)]
[TargetSchedule] Use 'isOutOfOrder' as possible to avoid magic number. NFC.

Summary:
Using isOutOfOrder makes the code more clear.

Reviewers: rengolin, atrick, hfinkel.

Differential Revision: http://reviews.llvm.org/D21548

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

8 years ago[AVX512] Add patterns for any-extending a mask that use the def of KMOVW/KMOVB withou...
Craig Topper [Tue, 21 Jun 2016 07:37:32 +0000 (07:37 +0000)]
[AVX512] Add patterns for any-extending a mask that use the def of KMOVW/KMOVB without going through an EXTRACT_SUBREG and a MOVZX.

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

8 years ago[AVX512] Use update_llc_test_checks.py to regenerate a test in preparation for a...
Craig Topper [Tue, 21 Jun 2016 07:37:27 +0000 (07:37 +0000)]
[AVX512] Use update_llc_test_checks.py to regenerate a test in preparation for a future commit.

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

8 years agoRevert "Change RelaxELFRelocations for llc."
James Y Knight [Tue, 21 Jun 2016 05:40:41 +0000 (05:40 +0000)]
Revert "Change RelaxELFRelocations for llc."

This reverts commit r273019.

From email I sent to list:
> I don't think this makes sense. Either the linker you're using supports
> this feature, or it doesn't. Having it enabled for llc if your linker
> doesn't support it is not fun.
>
> Further note that this also affects basically all other code using llvm
> libraries -- other than Clang, which explicitly sets it back to false by
> default, unless you set the ENABLE_X86_RELAX_RELOCATIONS cmake flag to
> true.
>
> If you want to enable the relax mode across all llvm tools in some
> circumstances, I think it should be via moving the cmake flag from clang
> down into llvm.
>
> I'm going to revert this commit, since I both think it intrinsically
> doesn't make sense to do this, and because it's breaking some of our
> tools.

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

8 years agoReplace silly uses of 'signed' with 'int'
David Majnemer [Tue, 21 Jun 2016 05:10:24 +0000 (05:10 +0000)]
Replace silly uses of 'signed' with 'int'

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

8 years ago[TargetLibraryInfo] Reduce code duplication.
Davide Italiano [Tue, 21 Jun 2016 04:32:21 +0000 (04:32 +0000)]
[TargetLibraryInfo] Reduce code duplication.

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

8 years ago[AVX512] Remove the masked vpcmpeq/vcmpgt intrinsics and autoupgrade them to native...
Craig Topper [Tue, 21 Jun 2016 03:53:24 +0000 (03:53 +0000)]
[AVX512] Remove the masked vpcmpeq/vcmpgt intrinsics and autoupgrade them to native icmps.

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

8 years agoTableGen/CodeGenSchedule: Move some getAllDerivedDefinitions() calls out of inner...
Matthias Braun [Tue, 21 Jun 2016 03:24:03 +0000 (03:24 +0000)]
TableGen/CodeGenSchedule: Move some getAllDerivedDefinitions() calls out of inner loops

This cuts the runtime of the two slowest tblgen invocations in aarch64
in half for me...

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

8 years ago[X86] Pre-allocate SmallVector instead of using push_back in a loop. NFC
Craig Topper [Tue, 21 Jun 2016 03:05:40 +0000 (03:05 +0000)]
[X86] Pre-allocate SmallVector instead of using push_back in a loop. NFC

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

8 years agoclang format change /NFC
Xinliang David Li [Tue, 21 Jun 2016 02:39:08 +0000 (02:39 +0000)]
clang format change /NFC

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

8 years ago[ImplicitNullCchecks] NFC cleanup
Sanjoy Das [Tue, 21 Jun 2016 02:10:18 +0000 (02:10 +0000)]
[ImplicitNullCchecks] NFC cleanup

 - Remove unsued constructor
 - Tighten up the interface for NullCheck

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

8 years ago[CFLAA] Be more aggressive with interprocedural analysis.
George Burgess IV [Tue, 21 Jun 2016 01:42:47 +0000 (01:42 +0000)]
[CFLAA] Be more aggressive with interprocedural analysis.

This patch makes us perform interprocedural analysis on functions that
don't have internal linkage. It also removes a test that should've been
deleted in an earlier commit (since other tests now cover everything
that the newly-removed test covers).

Patch by Jia Chen.

Differential Revision: http://reviews.llvm.org/D21513

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

8 years agoUse the same tag type across all PointerLikeTypeTraits specializations
Reid Kleckner [Mon, 20 Jun 2016 23:50:21 +0000 (23:50 +0000)]
Use the same tag type across all PointerLikeTypeTraits specializations

Works around a bug (PR28216) in Clang's MS mangling of templates with
partial specializations.

This mismatch was introduced in about six months ago in r256656.

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

8 years agoSimplify PICStyles.
Rafael Espindola [Mon, 20 Jun 2016 23:41:56 +0000 (23:41 +0000)]
Simplify PICStyles.

The main difference is that StubDynamicNoPIC is gone. The
dynamic-no-pic mode as the name implies is simply not pic. It is just
conservative about what it assumes to be dso local.

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

8 years agoAttempt to make MSVC buildbots happy.
George Burgess IV [Mon, 20 Jun 2016 23:20:49 +0000 (23:20 +0000)]
Attempt to make MSVC buildbots happy.

Broken by r273219.

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

8 years ago[CFLAA] Add interprocedural function summaries.
George Burgess IV [Mon, 20 Jun 2016 23:10:56 +0000 (23:10 +0000)]
[CFLAA] Add interprocedural function summaries.

This patch adds function summaries, so that we don't need to recompute
various properties about function parameters/return values at each
callsite of a function. It also adds many interprocedural tests for
CFLAA.

Patch by Jia Chen.

Differential Revision: http://reviews.llvm.org/D21475#inline-182390

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

8 years ago[X86][SSE] Add cost model for BSWAP of vectors
Simon Pilgrim [Mon, 20 Jun 2016 23:08:21 +0000 (23:08 +0000)]
[X86][SSE] Add cost model for BSWAP of vectors

The BSWAP of vector types is quite efficiently implemented using vector shuffles on SSE/AVX targets, we should reflect the typical cost of this to encourage vectorization.

Differential Revision: http://reviews.llvm.org/D21521

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

8 years ago[X86][X87] Fix issue with sitofp i64 -> fp128 on 32-bit targets
Simon Pilgrim [Mon, 20 Jun 2016 22:41:17 +0000 (22:41 +0000)]
[X86][X87] Fix issue with sitofp i64 -> fp128 on 32-bit targets

Fix for PR27726 - sitofp i64 to fp128 was loading the merged load i64 to a x87 register preventing legalization for conversion to fp128.

Added 32-bit tests for fp128 cast/conversions.

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

8 years agodon't repeat function names in documentation comments; NFC
Sanjay Patel [Mon, 20 Jun 2016 22:40:35 +0000 (22:40 +0000)]
don't repeat function names in documentation comments; NFC

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

8 years agoForgot to svn add one of my test files for the change in r273207.
Kevin Enderby [Mon, 20 Jun 2016 22:27:49 +0000 (22:27 +0000)]
Forgot to svn add one of my test files for the change in r273207.

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

8 years agoAdd support for Darwin’s 64-bit universal files with 64-bit offsets and sizes for...
Kevin Enderby [Mon, 20 Jun 2016 22:16:18 +0000 (22:16 +0000)]
Add support for Darwin’s 64-bit universal files with 64-bit offsets and sizes for the objects.

Darwin added support in its Xcode 8.0 tools (released in the beta) for universal
files where offsets and sizes for the objects are 64-bits to allow support for
objects contained in universal files to be larger then 4gb.  The change is very
straight forward.  There is a new magic number that differs by one bit, much
like the 64-bit Mach-O files.  Then there is a new structure that follow the
fat_header that has the same layout but with the offset and size fields using
64-bit values instead of 32-bit values.

rdar://26899493

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

8 years agoDelete dead code. NFC.
Rafael Espindola [Mon, 20 Jun 2016 22:08:35 +0000 (22:08 +0000)]
Delete dead code. NFC.

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

8 years agoRemove interface to get/set MaxFunctionCount
Easwaran Raman [Mon, 20 Jun 2016 21:36:38 +0000 (21:36 +0000)]
Remove interface to get/set MaxFunctionCount

Differential revision: http://reviews.llvm.org/D19185

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

8 years ago[tsan] Do not instrument accesses to the gcov counters array
Vedant Kumar [Mon, 20 Jun 2016 21:24:26 +0000 (21:24 +0000)]
[tsan] Do not instrument accesses to the gcov counters array

There is a known intended race here. This is a follow-up to r264805,
which disabled tsan instrumentation for updates to instrprof counters.
For more background on this please see the discussion in D18164.

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

8 years ago[InstSimplify] analyze (optionally casted) icmps to eliminate obviously false logic...
Sanjay Patel [Mon, 20 Jun 2016 20:59:59 +0000 (20:59 +0000)]
[InstSimplify] analyze (optionally casted) icmps to eliminate obviously false logic (PR27869)

By moving this transform to InstSimplify from InstCombine, we sidestep the problem/question
raised by PR27869:
https://llvm.org/bugs/show_bug.cgi?id=27869
...where InstCombine turns an icmp+zext into a shift causing us to miss the fold.

Credit to David Majnemer for a draft patch of the changes to InstructionSimplify.cpp.

Differential Revision: http://reviews.llvm.org/D21512

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

8 years agoPass AssumptionCacheTracker from SampleProfileLoader to Inliner
Dehao Chen [Mon, 20 Jun 2016 20:53:40 +0000 (20:53 +0000)]
Pass AssumptionCacheTracker from SampleProfileLoader to Inliner

Summary: Inliner needs ACT when calling InlineFunction. Instead of nullptr, we need to pass it in from SampleProfileLoader

Reviewers: davidxl

Subscribers: eraman, vsk, danielcdh, llvm-commits

Differential Revision: http://reviews.llvm.org/D21205

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

8 years agotest commit: remove trailing whitespace
Thomas Jablin [Mon, 20 Jun 2016 20:43:26 +0000 (20:43 +0000)]
test commit: remove trailing whitespace

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

8 years agoFix a relatively nasty bug with fs::getPathFromOpenFD() on Windows. The GetFinalPathN...
Aaron Ballman [Mon, 20 Jun 2016 20:28:49 +0000 (20:28 +0000)]
Fix a relatively nasty bug with fs::getPathFromOpenFD() on Windows. The GetFinalPathNameByHandle API does not behave as documented; if given a buffer that has enough space for the path but not the null terminator, the call will return the number of characters required *without* the null terminator (despite being documented otherwise) and it will not set GetLastError(). The result was that this function would return a bogus path and no error. Instead, ensure there is sufficient space for a null terminator (we already strip it off manually for compatibility with older versions of Windows).

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

8 years agoRename to be consistent with other type names. NFC
Daniel Berlin [Mon, 20 Jun 2016 20:21:33 +0000 (20:21 +0000)]
Rename to be consistent with other type names. NFC

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

8 years ago[MemorySSA] Clean up unit tests a tiny bit. NFC.
George Burgess IV [Mon, 20 Jun 2016 19:13:07 +0000 (19:13 +0000)]
[MemorySSA] Clean up unit tests a tiny bit. NFC.

We recently made MemorySSA own the walker it creates. As a part of this,
the MSSA test fixture was changed to have a `Walker*` instead of a
`unique_ptr<Walker>`. So, we no longer need to do `&*Walker` in order to
get a `Walker*`.

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

8 years agoInstCombine: Don't strip convergent from intrinsic callsites
Matt Arsenault [Mon, 20 Jun 2016 19:04:44 +0000 (19:04 +0000)]
InstCombine: Don't strip convergent from intrinsic callsites

Specific instances of intrinsic calls may want to be convergent, such
as certain register reads but the intrinsic declaration is not.

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

8 years agoAdd a isPositionIndependent helper to ARMFastISel. NFC.
Rafael Espindola [Mon, 20 Jun 2016 19:00:05 +0000 (19:00 +0000)]
Add a isPositionIndependent helper to ARMFastISel. NFC.

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

8 years ago[InstCombine] consolidate some icmp+logic tests and improve checks
Sanjay Patel [Mon, 20 Jun 2016 18:40:37 +0000 (18:40 +0000)]
[InstCombine] consolidate some icmp+logic tests and improve checks

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

8 years ago[AArch64] Adjust the loop buffer size for Exynos M1 (NFC)
Evandro Menezes [Mon, 20 Jun 2016 18:39:41 +0000 (18:39 +0000)]
[AArch64] Adjust the loop buffer size for Exynos M1 (NFC)

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

8 years ago[Kaleidoscope][BuildingAJIT] Remove some superfluous commas in Chapter 2.
Lang Hames [Mon, 20 Jun 2016 18:37:52 +0000 (18:37 +0000)]
[Kaleidoscope][BuildingAJIT] Remove some superfluous commas in Chapter 2.

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

8 years ago[Kaleidoscope][BuildingAJIT] Fix a punctuation mistake in Chapter 2.
Lang Hames [Mon, 20 Jun 2016 18:34:46 +0000 (18:34 +0000)]
[Kaleidoscope][BuildingAJIT] Fix a punctuation mistake in Chapter 2.

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

8 years agoAMDGPU: Preserve undef flag on vcc when shrinking v_cndmask_b32
Matt Arsenault [Mon, 20 Jun 2016 18:34:00 +0000 (18:34 +0000)]
AMDGPU: Preserve undef flag on vcc when shrinking v_cndmask_b32

The implicit operand is added by the initial instruction construction,
so this was adding an additional vcc use. The original one
was missing the undef flag the original condition had,
so the verifier would complain.

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

8 years agoAMDGPU: Fold more custom nodes to undef
Matt Arsenault [Mon, 20 Jun 2016 18:33:56 +0000 (18:33 +0000)]
AMDGPU: Fold more custom nodes to undef

This will help sneak undefs past GVN into the DAG for
some tests.

Also add missing intrinsic for rsq_legacy, even though the node
was already selected to the instruction. Also start passing
the debug location to intrinsic errors.

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

8 years ago[InstCombine] update to use FileCheck with autogenerated exact checking
Sanjay Patel [Mon, 20 Jun 2016 18:23:40 +0000 (18:23 +0000)]
[InstCombine] update to use FileCheck with autogenerated exact checking

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

8 years agoGeneralize DiagnosticInfoStackSize to support other limits
Matt Arsenault [Mon, 20 Jun 2016 18:13:04 +0000 (18:13 +0000)]
Generalize DiagnosticInfoStackSize to support other limits

Backends may want to report errors on resources other than
stack size.

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

8 years ago[InstCombine] update to use FileCheck with autogenerated exact checking
Sanjay Patel [Mon, 20 Jun 2016 17:56:13 +0000 (17:56 +0000)]
[InstCombine] update to use FileCheck with autogenerated exact checking

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

8 years agoAMDGPU: Use correct method for determining instruction size
Matt Arsenault [Mon, 20 Jun 2016 17:51:32 +0000 (17:51 +0000)]
AMDGPU: Use correct method for determining instruction size

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

8 years agoProperly handle short file names on the command line in Windows [TAKE 2]
Adrian McCarthy [Mon, 20 Jun 2016 17:51:27 +0000 (17:51 +0000)]
Properly handle short file names on the command line in Windows [TAKE 2]

Trying to expand short names with a relative path doesn't work, so this
first gets the module name to get a full path (which can still have short
names).

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

8 years ago[InstCombine] regenerate checks
Sanjay Patel [Mon, 20 Jun 2016 17:48:48 +0000 (17:48 +0000)]
[InstCombine] regenerate checks

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

8 years agoUse shouldAssumeDSOLocal.
Rafael Espindola [Mon, 20 Jun 2016 17:45:33 +0000 (17:45 +0000)]
Use shouldAssumeDSOLocal.

With this ARM fast isel knows that PIE variable are not preemptable.

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

8 years agoAMDGPU: Add support for R_AMDGPU_REL32 relocations
Tom Stellard [Mon, 20 Jun 2016 17:33:43 +0000 (17:33 +0000)]
AMDGPU: Add support for R_AMDGPU_REL32 relocations

Reviewers: arsenm, kzhuravl, rafael

Subscribers: arsenm, llvm-commits, kzhuravl

Differential Revision: http://reviews.llvm.org/D21401

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

8 years agoSimplify. NFC.
Rafael Espindola [Mon, 20 Jun 2016 17:00:13 +0000 (17:00 +0000)]
Simplify. NFC.

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

8 years agoAMDGPU: Emit R_AMDGPU_ABS32_{HI,LO} for scratch buffer relocations
Tom Stellard [Mon, 20 Jun 2016 16:59:44 +0000 (16:59 +0000)]
AMDGPU: Emit R_AMDGPU_ABS32_{HI,LO} for scratch buffer relocations

Reviewers: arsenm, rafael, kzhuravl

Subscribers: rafael, arsenm, llvm-commits, kzhuravl

Differential Revision: http://reviews.llvm.org/D21400

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

8 years ago[ARM] Enable isel of UMAAL
Sam Parker [Mon, 20 Jun 2016 16:47:09 +0000 (16:47 +0000)]
[ARM] Enable isel of UMAAL

TargetLowering and DAGToDAG are used to combine ADDC, ADDE and UMLAL
dags into UMAAL. Selection is split into the two phases because it
is easier to match the two patterns at those different times.

Differential Revision: http://http://reviews.llvm.org/D21461

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

8 years agoAdd a isPositionIndependent predicate.
Rafael Espindola [Mon, 20 Jun 2016 16:43:17 +0000 (16:43 +0000)]
Add a isPositionIndependent predicate.

Reduces a bit of code duplication and clarify where we are interested
just on position independence and no the location of the symbol.

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

8 years agoForgot to update callers of deleteDeadInstruction
David Majnemer [Mon, 20 Jun 2016 16:07:38 +0000 (16:07 +0000)]
Forgot to update callers of deleteDeadInstruction

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

8 years agoReapply "[LoopIdiom] Don't remove dead operands manually"
David Majnemer [Mon, 20 Jun 2016 16:03:25 +0000 (16:03 +0000)]
Reapply "[LoopIdiom] Don't remove dead operands manually"

This reverts commit r273160, reapplying r273132.
RecursivelyDeleteTriviallyDeadInstructions cannot be called on a
parentless Instruction.

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

8 years agoRemoving an unused switch statement that has only a default label. This happens to...
Aaron Ballman [Mon, 20 Jun 2016 15:37:15 +0000 (15:37 +0000)]
Removing an unused switch statement that has only a default label. This happens to also eliminate an instance of switchception. NFC intended.

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

8 years agoRevert "[LoopIdiom] Don't remove dead operands manually"
Cong Liu [Mon, 20 Jun 2016 15:22:15 +0000 (15:22 +0000)]
Revert "[LoopIdiom] Don't remove dead operands manually"

This reverts commit r273132.
Breaks multiple test under /llvm/test:Transforms (e.g.
llvm/test:Transforms/LoopIdiom/basic.ll.test) under asan.

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

8 years ago[X86][F16C] Added half <-> double conversion tests
Simon Pilgrim [Mon, 20 Jun 2016 12:51:55 +0000 (12:51 +0000)]
[X86][F16C] Added half <-> double conversion tests

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

8 years agoFix formatting of r273144. NFC.
Patrik Hagglund [Mon, 20 Jun 2016 11:19:58 +0000 (11:19 +0000)]
Fix formatting of r273144. NFC.

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

8 years ago[AARCH64] Add support for Broadcom Vulcan
Pankaj Gode [Mon, 20 Jun 2016 11:13:31 +0000 (11:13 +0000)]
[AARCH64] Add support for Broadcom Vulcan

Adding core tuning support for new Broadcom Vulcan core (ARMv8.1A).

Differential Revision: http://reviews.llvm.org/D21500

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

8 years agoAvoid output indeterminism between GCC and Clang builds.
Patrik Hagglund [Mon, 20 Jun 2016 10:19:04 +0000 (10:19 +0000)]
Avoid output indeterminism between GCC and Clang builds.

Remove dependency of the evalution order of function arguments, which
is unspecified.

Patch by David Stenberg.

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

8 years agoAvoid output indeterminism between GCC and Clang builds.
Patrik Hagglund [Mon, 20 Jun 2016 10:19:00 +0000 (10:19 +0000)]
Avoid output indeterminism between GCC and Clang builds.

Remove dependency of the evalution order of function arguments, which
is unspecified.

The following test previously failed when built with GCC (but succeded
when built with Clang):

  ; RUN: opt -sroa -S < %s | FileCheck %s

  target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
  target triple = "x86_64-unknown-linux-gnu"

  %A = type {i16}

  @a = global %A* null
  @b = global i16 0

  ; CHECK-LABEL: @f1(
  ; CHECK: alloca %A
  ; CHECK-NEXT: extractvalue %A
  ; CHECK-NEXT: getelementptr inbounds %A

  define void @f1 (%A %a) {
    %1 = alloca %A
    store %A %a, %A* %1
    %2 = load i16, i16* @b
    %3 = icmp ne i16 %2, 0
    br i1 %3, label %bb1, label %bb2
  bb1:
    store %A* %1, %A** @a
    br label %bb2
  bb2:
    ret void
  }

Patch by David Stenberg.

Differential Revision: http://reviews.llvm.org/D21226

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

8 years agoFix for PR27940
Patrik Hagglund [Mon, 20 Jun 2016 09:10:10 +0000 (09:10 +0000)]
Fix for PR27940

After a store has been eliminated, when making sure that the
instruction iterator points to a valid instruction, dbg intrinsics are
now ignored as a new instruction.

Patch by Henric Karlsson.

Reviewed by Daniel Berlin.

Differential Revision: http://reviews.llvm.org/D21076

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

8 years ago[codeview] Add an extra check for TPI hash values.
Rui Ueyama [Mon, 20 Jun 2016 07:31:29 +0000 (07:31 +0000)]
[codeview] Add an extra check for TPI hash values.

This patch adds a function that corresponds to `fUDTAnon`
and use that to compute TPI hash values as the reference does.

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

8 years ago[AVX512] [AVX512/AVX][Intrinsics] Fix Variable Bit Shift Right Arithmetic intrinsic...
Igor Breger [Mon, 20 Jun 2016 07:05:43 +0000 (07:05 +0000)]
[AVX512] [AVX512/AVX][Intrinsics] Fix Variable Bit Shift Right Arithmetic intrinsic lowering.

Differential Revision: http://reviews.llvm.org/D20897

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

8 years ago[X86] Pass the SDLoc and Mask ArrayRef down from lowerVectorShuffle through all of...
Craig Topper [Mon, 20 Jun 2016 04:00:55 +0000 (04:00 +0000)]
[X86] Pass the SDLoc and Mask ArrayRef down from lowerVectorShuffle through all of the other routines instead of recreating them in the handlers for each type. NFC

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

8 years ago[X86] Use existing ArrayRef variable instead of calling SVOp->getMask() repeatedly...
Craig Topper [Mon, 20 Jun 2016 04:00:53 +0000 (04:00 +0000)]
[X86] Use existing ArrayRef variable instead of calling SVOp->getMask() repeatedly. Remove nearby else after return as well. NFC

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

8 years ago[X86] Avoid making a copy of a shuffle mask until we're sure we really need to. And...
Craig Topper [Mon, 20 Jun 2016 04:00:50 +0000 (04:00 +0000)]
[X86] Avoid making a copy of a shuffle mask until we're sure we really need to. And just use a SmallVector to do the copy because its easy.

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

8 years agoFix dynamically linked debug builds.
Eli Friedman [Mon, 20 Jun 2016 02:48:11 +0000 (02:48 +0000)]
Fix dynamically linked debug builds.

On the surface, this might not look like it does anything... but
actually it brings in the declaration "extern template class
AnalysisManager<Loop>;", which suppresses the instantiation of the
constructor, which avoids the funny interaction between "extern
template" and -fvisibility-inlines-hidden.

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

8 years ago[LoopIdiom] Don't remove dead operands manually
David Majnemer [Mon, 20 Jun 2016 02:33:29 +0000 (02:33 +0000)]
[LoopIdiom] Don't remove dead operands manually

Removing dead instructions requires remembering which operands have
already been removed.  RecursivelyDeleteTriviallyDeadInstructions has
this logic, don't partially reimplement it in LoopIdiomRecognize.

This fixes PR28196.

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

8 years agoReformat blank lines.
NAKAMURA Takumi [Mon, 20 Jun 2016 01:05:15 +0000 (01:05 +0000)]
Reformat blank lines.

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

8 years agoTrailing whitespace.
NAKAMURA Takumi [Mon, 20 Jun 2016 00:49:20 +0000 (00:49 +0000)]
Trailing whitespace.

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

8 years agoUntabify.
NAKAMURA Takumi [Mon, 20 Jun 2016 00:37:41 +0000 (00:37 +0000)]
Untabify.

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

8 years ago[InstSimplify] add tests for PR27689; regenerate checks
Sanjay Patel [Sun, 19 Jun 2016 21:40:12 +0000 (21:40 +0000)]
[InstSimplify] add tests for PR27689; regenerate checks

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

8 years agoAddress Eli's post-commit comments
David Majnemer [Sun, 19 Jun 2016 21:36:35 +0000 (21:36 +0000)]
Address Eli's post-commit comments

Use an APInt to handle pointers of arbitrary width, let
accumulateConstantOffset handle overflow issues.

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

8 years ago[X86][AVX512] Added 512-bit BITREVERSE tests and enabled AVX512BW lowering support
Simon Pilgrim [Sun, 19 Jun 2016 20:59:19 +0000 (20:59 +0000)]
[X86][AVX512] Added 512-bit BITREVERSE tests and enabled AVX512BW lowering support

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

8 years agoStrip trailing whitespace. NFCI.
Simon Pilgrim [Sun, 19 Jun 2016 20:22:43 +0000 (20:22 +0000)]
Strip trailing whitespace. NFCI.

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

8 years agoFixed signed/unsigned warning.
Simon Pilgrim [Sun, 19 Jun 2016 18:20:44 +0000 (18:20 +0000)]
Fixed signed/unsigned warning.

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

8 years ago[X86][SSE] Allow target shuffle combining to match masks with SM_Sentinel values
Simon Pilgrim [Sun, 19 Jun 2016 18:03:52 +0000 (18:03 +0000)]
[X86][SSE] Allow target shuffle combining to match masks with SM_Sentinel values

We currently only allow exact matches of shuffle mask patterns during target shuffle combining.

This patch relaxes this to permit SM_SentinelUndef in the combined shuffle to always be accepted as well as allowing exact matching of the SM_SentinelZero value.

I've adjusted some tests that were requiring exact shuffle masks to now include undef values.

Differential Revision: http://reviews.llvm.org/D21495

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

8 years agofix formatting, typo; NFC
Sanjay Patel [Sun, 19 Jun 2016 17:20:27 +0000 (17:20 +0000)]
fix formatting, typo; NFC

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

8 years ago[X86] Add an assert to ensure that a routine is only used with 128-bit vectors. Reduc...
Craig Topper [Sun, 19 Jun 2016 15:37:39 +0000 (15:37 +0000)]
[X86] Add an assert to ensure that a routine is only used with 128-bit vectors. Reduce SmallVector size accordingly.

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

8 years ago[X86] Make is128BitLaneRepeatedShuffleMask correct the indices of the second vector...
Craig Topper [Sun, 19 Jun 2016 15:37:37 +0000 (15:37 +0000)]
[X86] Make is128BitLaneRepeatedShuffleMask correct the indices of the second vector for the smaller mask. This removes some custom correction code and can potentially provide other benefits in the future.

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

8 years ago[X86] Remove a dead path through one of the shuffle lowering routines. It's only...
Craig Topper [Sun, 19 Jun 2016 15:37:35 +0000 (15:37 +0000)]
[X86] Remove a dead path through one of the shuffle lowering routines. It's only called on single input shuffles masks already. Add an assert instead to verify.

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

8 years ago[X86] Pre-allocate a SmallVector instead of using push_back in a loop. NFC
Craig Topper [Sun, 19 Jun 2016 15:37:33 +0000 (15:37 +0000)]
[X86] Pre-allocate a SmallVector instead of using push_back in a loop. NFC

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