]> granicus.if.org Git - llvm/log
llvm
8 years agoLoadStoreVectorizer: Split even sized illegal chains properly
Matt Arsenault [Thu, 23 Feb 2017 03:58:53 +0000 (03:58 +0000)]
LoadStoreVectorizer: Split even sized illegal chains properly

Implement isLegalToVectorizeLoadChain for AMDGPU to avoid
producing private address spaces accesses that will need to be
split up later. This was doing the wrong thing in the case
where the queried chain was an even number of elements.

A possible <4 x i32> store was being split into
store <2 x i32>
store i32
store i32

rather than
store <2 x i32>
store <2 x i32>

when legal.

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

8 years ago[X86][IR] In AutoUpgrade, check explicitly for xop.vpcmov and xop.vpcmov.256 instead...
Craig Topper [Thu, 23 Feb 2017 03:22:14 +0000 (03:22 +0000)]
[X86][IR] In AutoUpgrade, check explicitly for xop.vpcmov and xop.vpcmov.256 instead of anything starting with xop.vpcmov

There were some older intrinsics that only existed for less than a month in 2012 that still exist in some out of tree test files that start with this string, but aren't able to be handled by the current upgrade code and fire an assert. Now we'll go back to treating them as not intrinsics at all and just passing them through to output.

Fixes PR32041, sort of.

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

8 years agoTargetOptions: Fix not accounting for NoSignedZerosFPMath in ==
Matt Arsenault [Thu, 23 Feb 2017 03:16:44 +0000 (03:16 +0000)]
TargetOptions: Fix not accounting for NoSignedZerosFPMath in ==

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

8 years agoTest if we can use raw strings on all platforms compiling LLVM.
Matthias Braun [Thu, 23 Feb 2017 01:09:01 +0000 (01:09 +0000)]
Test if we can use raw strings on all platforms compiling LLVM.

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

8 years agoExplicitly state the behavior of inbounds with a null pointer.
Eli Friedman [Thu, 23 Feb 2017 00:48:18 +0000 (00:48 +0000)]
Explicitly state the behavior of inbounds with a null pointer.

See https://llvm.org/bugs/show_bug.cgi?id=31439; this reflects LLVM's
behavior in practice, and should be compatible with C/C++ rules.

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

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

8 years agoAMDGPU: Replace disabled exp inputs with undef
Matt Arsenault [Thu, 23 Feb 2017 00:44:03 +0000 (00:44 +0000)]
AMDGPU: Replace disabled exp inputs with undef

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

8 years agoAMDGPU: Add another BFE pattern
Matt Arsenault [Thu, 23 Feb 2017 00:23:43 +0000 (00:23 +0000)]
AMDGPU: Add another BFE pattern

This is the pattern that falls out of the instruction's
definition if offset == 0.

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

8 years agoAMDGPU: Use clamp with f64
Matt Arsenault [Wed, 22 Feb 2017 23:53:37 +0000 (23:53 +0000)]
AMDGPU: Use clamp with f64

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

8 years agoRevert r295868 because it breaks a different SLP lit test.
Michael Kuperstein [Wed, 22 Feb 2017 23:35:13 +0000 (23:35 +0000)]
Revert r295868 because it breaks a different SLP lit test.

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

8 years agoAMDGPU: Fold FP clamp as modifier bit
Matt Arsenault [Wed, 22 Feb 2017 23:27:53 +0000 (23:27 +0000)]
AMDGPU: Fold FP clamp as modifier bit

The manual is unclear on the details of this. It's not
clear to me if denormals are not allowed with clamp,
or if that is only omod. Not allowing denorms for
fp16 or fp64 isn't useful so I also question if that
is really a restriction. Same with whether this is valid
without IEEE mode enabled.

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

8 years agoAMDGPU : Update TrapCode based on Trap Handler ABI.
Wei Ding [Wed, 22 Feb 2017 23:22:19 +0000 (23:22 +0000)]
AMDGPU : Update TrapCode based on Trap Handler ABI.

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

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

8 years ago[libFuzzer] Update traces hooks test after r293741
Justin Bogner [Wed, 22 Feb 2017 23:12:36 +0000 (23:12 +0000)]
[libFuzzer] Update traces hooks test after r293741

This test now passes on darwin.

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

8 years ago[libFuzzer] Mark a test that infinite loops as unsupported
Justin Bogner [Wed, 22 Feb 2017 23:05:17 +0000 (23:05 +0000)]
[libFuzzer] Mark a test that infinite loops as unsupported

We need to investigate this, but for now it just causes too much
headache when trying to run these tests.

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

8 years agoAMDGPU: Add replacement bfe intrinsics
Matt Arsenault [Wed, 22 Feb 2017 23:04:58 +0000 (23:04 +0000)]
AMDGPU: Add replacement bfe intrinsics

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

8 years ago[InstCombine] don't try SimplifyDemandedInstructionBits from add/sub because it's...
Sanjay Patel [Wed, 22 Feb 2017 23:01:12 +0000 (23:01 +0000)]
[InstCombine] don't try SimplifyDemandedInstructionBits from add/sub because it's slow and unlikely to succeed

Notably, no regression tests change when we remove these calls, and these are expensive calls.

The motivation comes from the general acknowledgement that the compiler is getting slower:
http://lists.llvm.org/pipermail/llvm-dev/2017-January/109188.html
http://lists.llvm.org/pipermail/llvm-dev/2016-December/108279.html

And specifically the test case attached to PR32037:
https://bugs.llvm.org//show_bug.cgi?id=32037

Profiling the middle-end (opt) part of the compile:
$ ./opt -O2 row_common.bc -o /dev/null

...visitAdd and visitSub are near the top of the instcombine list, and the calls to SimplifyDemandedInstructionBits()
are high within each of those. Those calls account for 1%+ of the opt time in either debug or release profiles. And
that's the rough win I see from this patch when testing opt built release from r295864 on an iMac with Haswell 4GHz
(model 4790K).

It seems unlikely that we'd be able to eliminate add/sub or change their operands given that add/sub normally affect
all bits, and the PR32037 example shows no IR difference after this change using -O2.

Also worth noting - the code comment in visitAdd:
// This handles stuff like (X & 254)+1 -> (X&254)|1
...isn't true. That transform is handled later with a call to haveNoCommonBitsSet().

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

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

8 years ago[AVR] Disable integrated assembler for a few tests
Dylan McKay [Wed, 22 Feb 2017 22:41:13 +0000 (22:41 +0000)]
[AVR] Disable integrated assembler for a few tests

Fixes the build.

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

8 years ago[CodeGen] Fix some Clang-tidy modernize and Include What You Use warnings; other...
Eugene Zelenko [Wed, 22 Feb 2017 22:32:51 +0000 (22:32 +0000)]
[CodeGen] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

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

8 years ago[Hexagon] Implement @llvm.readcyclecounter()
Krzysztof Parzyszek [Wed, 22 Feb 2017 22:28:47 +0000 (22:28 +0000)]
[Hexagon] Implement @llvm.readcyclecounter()

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

8 years agoAMDGPU: Don't add emergency stack slot if all spills are SGPR->VGPR
Matt Arsenault [Wed, 22 Feb 2017 22:23:32 +0000 (22:23 +0000)]
AMDGPU: Don't add emergency stack slot if all spills are SGPR->VGPR

This should avoid reporting any stack needs to be allocated in the
case where no stack is truly used. An unused stack slot is still
left around in other cases where there are real stack objects
but no spilling occurs.

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

8 years agoPredicateInfo: Support switch statements
Daniel Berlin [Wed, 22 Feb 2017 22:20:58 +0000 (22:20 +0000)]
PredicateInfo: Support switch statements

Summary:
Depends on D29606 and D29682

Makes us pass GVN's edge.ll (we also will pass a few other testcases
they just need cleaning up).

Thoughts on the Predicate* hiearchy of classes especially welcome :)
(it's not clear to me how best to organize it, and currently, the getBlock* seems ... uglier than maybe wasting a field somewhere or something).

Reviewers: davide

Subscribers: llvm-commits

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

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

8 years agoAdd pair conversion functions to BasicBlockEdge.
Daniel Berlin [Wed, 22 Feb 2017 22:20:53 +0000 (22:20 +0000)]
Add pair conversion functions to BasicBlockEdge.

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

8 years agoMove updating functions to MemorySSAUpdater.
Daniel Berlin [Wed, 22 Feb 2017 22:19:55 +0000 (22:19 +0000)]
Move updating functions to MemorySSAUpdater.
Add updater to passes that now need it.
Move around code in MemorySSA to expose needed functions.

Summary: Mostly cleanup

Reviewers: george.burgess.iv

Subscribers: llvm-commits, Prazek

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

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

8 years ago[LV] Update floating-point induction test checks (NFC)
Matthew Simpson [Wed, 22 Feb 2017 21:56:02 +0000 (21:56 +0000)]
[LV] Update floating-point induction test checks (NFC)

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

8 years ago[LSR] Canonicalize formula and put recursive Reg related with current loop in ScaledReg.
Wei Mi [Wed, 22 Feb 2017 21:47:08 +0000 (21:47 +0000)]
[LSR] Canonicalize formula and put recursive Reg related with current loop in ScaledReg.

After rL294814, LSR formula can have multiple SCEVAddRecExprs inside of its BaseRegs.
Previous canonicalization will swap the first SCEVAddRecExpr in BaseRegs with ScaledReg.
But now we want to swap the SCEVAddRecExpr Reg related with current loop with ScaledReg.
Otherwise, we may generate code like this: RegA + lsr.iv + RegB, where loop invariant
parts RegA and RegB are not grouped together and cannot be promoted outside of loop.
With this patch, it will ensure lsr.iv to be generated later in the expr:
RegA + RegB + lsr.iv, so that RegA + RegB can be promoted outside of loop.

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

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

8 years ago[RDF] Support for partial structural aliases in RegisterAggr
Krzysztof Parzyszek [Wed, 22 Feb 2017 21:42:15 +0000 (21:42 +0000)]
[RDF] Support for partial structural aliases in RegisterAggr

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

8 years ago[Support] Re-add the special OSX flags on mmap.
Zachary Turner [Wed, 22 Feb 2017 21:24:06 +0000 (21:24 +0000)]
[Support] Re-add the special OSX flags on mmap.

The problem appears to be that these flags can only be used
when mapping a file for read-only, not for readwrite.  So
we do that here.

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

8 years ago[Hexagon] Add intrinsics for masked vector stores
Krzysztof Parzyszek [Wed, 22 Feb 2017 21:23:09 +0000 (21:23 +0000)]
[Hexagon] Add intrinsics for masked vector stores

Patch by Harsha Jagasia.

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

8 years agoAMDGPU: Don't look at chain users when adjusting writemask
Matt Arsenault [Wed, 22 Feb 2017 21:16:41 +0000 (21:16 +0000)]
AMDGPU: Don't look at chain users when adjusting writemask

Fixes not adjusting using new intrinsics with chains.

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

8 years agoAMDGPU: Always allocate emergency stack slot at offset 0
Matt Arsenault [Wed, 22 Feb 2017 21:05:25 +0000 (21:05 +0000)]
AMDGPU: Always allocate emergency stack slot at offset 0

This allows us to ensure that 0 is never a valid pointer
to a user object, and ensures that the offset is always legal
without needing a register to access it. This comes at the cost
of usable offsets and wasted stack space.

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

8 years ago[WebAssembly] Update llvm-readobj tests for switch to version 0x1
Derek Schuff [Wed, 22 Feb 2017 21:01:17 +0000 (21:01 +0000)]
[WebAssembly] Update llvm-readobj tests for switch to version 0x1

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

8 years agoAMDGPU: Change exp with compr bit printing
Matt Arsenault [Wed, 22 Feb 2017 20:37:12 +0000 (20:37 +0000)]
AMDGPU: Change exp with compr bit printing

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

8 years agoRevert "AMDGPU : Update TrapCode based on Trap Handler ABI."
Wei Ding [Wed, 22 Feb 2017 20:29:22 +0000 (20:29 +0000)]
Revert "AMDGPU : Update TrapCode based on Trap Handler ABI."

This reverts commit r295867.

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

8 years ago[WebAssembly] Update llvm-objdump tests for the new wasm version number.
Dan Gohman [Wed, 22 Feb 2017 20:24:16 +0000 (20:24 +0000)]
[WebAssembly] Update llvm-objdump tests for the new wasm version number.

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

8 years ago[SLP] Fix for PR32036: Vectorized horizontal reduction returning wrong result
Alexey Bataev [Wed, 22 Feb 2017 20:06:40 +0000 (20:06 +0000)]
[SLP] Fix for PR32036: Vectorized horizontal reduction returning wrong result

Summary:
If the same value is used several times as an extra value, SLP
vectorizer takes it into account only once instead of actual number of
using.
For example:
```
int val = 1;
for (int y = 0; y < 8; y++) {
  for (int x = 0; x < 8; x++) {
    val = val + input[y * 8 + x] + 3;
  }
}
```
We have 2 extra rguments: `1` - initial value of horizontal reduction
and `3`, which is added 8*8 times to the reduction. Before the patch we
added `1` to the reduction value and added once `3`, though it must be
added 64 times.

Reviewers: mkuper, mzolotukhin

Subscribers: llvm-commits

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

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

8 years agoAMDGPU : Update TrapCode based on Trap Handler ABI.
Wei Ding [Wed, 22 Feb 2017 20:05:06 +0000 (20:05 +0000)]
AMDGPU : Update TrapCode based on Trap Handler ABI.

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

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

8 years agoMove llvm_unreachable out of switch.
Rafael Espindola [Wed, 22 Feb 2017 19:42:14 +0000 (19:42 +0000)]
Move llvm_unreachable out of switch.

This should make gcc happy and still produce a clang warning if we add
another value to the enum.

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

8 years agoBring back 2>&1 redirection for this test
Matthias Braun [Wed, 22 Feb 2017 19:16:33 +0000 (19:16 +0000)]
Bring back 2>&1 redirection for this test

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

8 years ago[AArch64] Extend AArch64RedundantCopyElimination to do simple copy propagation.
Geoff Berry [Wed, 22 Feb 2017 19:10:45 +0000 (19:10 +0000)]
[AArch64] Extend AArch64RedundantCopyElimination to do simple copy propagation.

Summary:
Extend AArch64RedundantCopyElimination to catch cases where the register
that is known to be zero is COPY'd in the predecessor block.  Before
this change, this pass would catch cases like:

      CBZW %W0, <BB#1>
  BB#1:
      %W0 = COPY %WZR // removed

After this change, cases like the one below are also caught:

      %W0 = COPY %W1
      CBZW %W1, <BB#1>
  BB#1:
      %W0 = COPY %WZR // removed

This change results in a 4% increase in static copies removed by this
pass when compiling the llvm test-suite.  It also fixes regressions
caused by doing post-RA copy propagation (a separate change to be put up
for review shortly).

Reviewers: junbuml, mcrosier, t.p.northover, qcolombet, MatzeB

Subscribers: aemerson, rengolin, llvm-commits

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

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

8 years ago[LV] Add scalar floating-point induction test (NFC)
Matthew Simpson [Wed, 22 Feb 2017 19:09:38 +0000 (19:09 +0000)]
[LV] Add scalar floating-point induction test (NFC)

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

8 years ago[ModuleSummaryAnalysis] Don't crash when referencing unnamed globals.
Davide Italiano [Wed, 22 Feb 2017 18:53:38 +0000 (18:53 +0000)]
[ModuleSummaryAnalysis] Don't crash when referencing unnamed globals.

Instead, just be conservative as these are unfrequent enough. Thanks
to Peter Collingbourne for the discussion about this on IRC.

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

8 years ago[WebAssembly] Implement the wasm binary container header.
Dan Gohman [Wed, 22 Feb 2017 18:50:20 +0000 (18:50 +0000)]
[WebAssembly] Implement the wasm binary container header.

Also, update the version number to 0x1, which is what engines are now
expecting.

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

8 years agoMIRTests: Remove unnecessary 2>&1 redirection
Matthias Braun [Wed, 22 Feb 2017 18:47:41 +0000 (18:47 +0000)]
MIRTests: Remove unnecessary 2>&1 redirection

llc mir output goes to stdout nowadays, so the 2>&1 is not necessary
anymore for most tests.

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

8 years ago[LoopVectorize] Added address space check when analysing interleaved accesses
Karl-Johan Karlsson [Wed, 22 Feb 2017 18:37:36 +0000 (18:37 +0000)]
[LoopVectorize] Added address space check when analysing interleaved accesses

Prevent memory objects of different address spaces to be part of
the same load/store groups when analysing interleaved accesses.

This is fixing pr31900.

Reviewers: HaoLiu, mssimpso, mkuper

Reviewed By: mssimpso, mkuper

Subscribers: llvm-commits, efriedma, mzolotukhin

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

This reverts r295042 (re-applies r295038) with an additional fix for the
buildbot problem.

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

8 years ago[WebAssembly] Define a table of function signatures for runtime library calls.
Dan Gohman [Wed, 22 Feb 2017 18:34:16 +0000 (18:34 +0000)]
[WebAssembly] Define a table of function signatures for runtime library calls.

LLVM CodeGen emits references to external symbols that are never declared in
LLVM IR level, so they have no declared signature. However, WebAssembly requires
all functions be declared with signatures. This patch adds a table for providing
signatures for known runtime libcalls that will be used in subsequent patches to
emit declarations for such functions.

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

8 years ago[RDF] Skip undef uses when calculating kill flags
Krzysztof Parzyszek [Wed, 22 Feb 2017 18:29:16 +0000 (18:29 +0000)]
[RDF] Skip undef uses when calculating kill flags

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

8 years ago[RDF] Only access block live-ins when tracking liveness
Krzysztof Parzyszek [Wed, 22 Feb 2017 18:27:36 +0000 (18:27 +0000)]
[RDF] Only access block live-ins when tracking liveness

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

8 years ago[Support] Provide linux/magic.h fallback for older kernels
Michal Gorny [Wed, 22 Feb 2017 18:09:15 +0000 (18:09 +0000)]
[Support] Provide linux/magic.h fallback for older kernels

The function for distinguishing local and remote files added in r295768
unconditionally uses linux/magic.h header to provide necessary
filesystem magic numbers. However, in kernel headers predating 2.6.18
the magic numbers are spread throughout multiple include files.
Furthermore, LLVM did not require kernel headers being installed so far.

To increase the portability across different versions of Linux kernel
and different Linux systems, add CMake header checks for linux/magic.h
and -- if it is missing -- the linux/nfs_fs.h and linux/smb.h headers
which contained the numbers previously.

Furthermore, since the numbers are static and the feature does not seem
critical enough to make LLVM require kernel headers at all, add fallback
constants for the case when none of the necessary headers is available.

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

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

8 years ago[SLP] Test with extra argument used several times.
Alexey Bataev [Wed, 22 Feb 2017 17:47:28 +0000 (17:47 +0000)]
[SLP] Test with extra argument used several times.

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

8 years agoFix an obvious bug in SampleProfileReaderGCC.
Dehao Chen [Wed, 22 Feb 2017 17:27:21 +0000 (17:27 +0000)]
Fix an obvious bug in SampleProfileReaderGCC.

Summary: The CallTargetProfile should be added to FProfile to be consistent with other profile readers.

Reviewers: dnovillo, davidxl

Reviewed By: davidxl

Subscribers: llvm-commits

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

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

8 years ago[WebAssembly] Configure codegen to legalize f16 values.
Dan Gohman [Wed, 22 Feb 2017 16:28:00 +0000 (16:28 +0000)]
[WebAssembly] Configure codegen to legalize f16 values.

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

8 years ago[DAGCombiner] revert r295336
Bill Seurer [Wed, 22 Feb 2017 16:27:33 +0000 (16:27 +0000)]
[DAGCombiner] revert r295336

r295336 causes a bootstrapped clang to fail for many compilations on
powerpc BE.  See
http://lab.llvm.org:8011/builders/clang-ppc64be-linux-multistage/builds/2315
for example.

Reverting as per the developer's request.

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

8 years ago[X86][SSE] getTargetConstantBitsFromNode - insert constant bits directly into masks.
Simon Pilgrim [Wed, 22 Feb 2017 15:38:13 +0000 (15:38 +0000)]
[X86][SSE] getTargetConstantBitsFromNode - insert constant bits directly into masks.

Minor optimization, don't create temporary mask APInts that are just going to be OR'd into the accumulate masks - insert directly instead.

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

8 years ago[X86][SSE] Use APInt::getBitsSet() instead of APInt::getLowBitsSet().shl() separately...
Simon Pilgrim [Wed, 22 Feb 2017 15:04:55 +0000 (15:04 +0000)]
[X86][SSE] Use APInt::getBitsSet() instead of APInt::getLowBitsSet().shl() separately. NFCI.

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

8 years ago[Support] XFAIL is_local for mips
Simon Dardis [Wed, 22 Feb 2017 14:34:45 +0000 (14:34 +0000)]
[Support] XFAIL is_local for mips

is_local can't pass on some our buildbots as some of our buildbots use network
shares for building and testing LLVM.

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

8 years ago* [AMDGPU][mc][tests] Updated coverage/smoke tests for gfx7 and gfx8; minor test...
Dmitry Preobrazhensky [Wed, 22 Feb 2017 13:59:39 +0000 (13:59 +0000)]
* [AMDGPU][mc][tests] Updated coverage/smoke tests for gfx7 and gfx8; minor test corrections.

NB: several old tests have been corrected because they violated constant bus limitations

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

8 years agoFix -Wunused-but-set-variable warning by removing unused 'aggregateIsPacked' checking
Simon Pilgrim [Wed, 22 Feb 2017 13:37:31 +0000 (13:37 +0000)]
Fix -Wunused-but-set-variable warning by removing unused 'aggregateIsPacked' checking

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

8 years ago[GlobalISel] Fix compiler warnings and make assert assert something.
Benjamin Kramer [Wed, 22 Feb 2017 12:59:47 +0000 (12:59 +0000)]
[GlobalISel] Fix compiler warnings and make assert assert something.

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

8 years ago[SLP] Remove unused initial value from the variable, NFC.
Alexey Bataev [Wed, 22 Feb 2017 12:57:58 +0000 (12:57 +0000)]
[SLP] Remove unused initial value from the variable, NFC.

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

8 years ago[X86][GlobalISel] Initial implementation , select G_ADD gpr, gpr
Igor Breger [Wed, 22 Feb 2017 12:25:09 +0000 (12:25 +0000)]
[X86][GlobalISel] Initial implementation , select G_ADD gpr, gpr

Summary: Initial implementation for X86InstructionSelector. Handle selection COPY and G_ADD/G_SUB gpr, gpr .

Reviewers: qcolombet, rovka, zvi, ab

Reviewed By: rovka

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

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

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

8 years ago[X86] Regenerate CSE test with codegen instead of just the instruction count
Simon Pilgrim [Wed, 22 Feb 2017 10:12:46 +0000 (10:12 +0000)]
[X86] Regenerate CSE test with codegen instead of just the instruction count

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

8 years ago[ARM] Fix constant islands pass.
Roger Ferrer Ibanez [Wed, 22 Feb 2017 09:06:21 +0000 (09:06 +0000)]
[ARM] Fix constant islands pass.

The pass tries to fix a spill of LR that turns out to be unnecessary.
So it removes the tPOP but forgets to remove tPUSH.
This causes the stack be misaligned upon returning the function.

Thus, remove the tPUSH as well in this case.

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

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

8 years agoWrite to a temporary file in test instead of random file in the test directory.
Benjamin Kramer [Wed, 22 Feb 2017 09:02:27 +0000 (09:02 +0000)]
Write to a temporary file in test instead of random file in the test directory.

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

8 years ago[X86] Fix memory operands definition for some instructions.
Ayman Musa [Wed, 22 Feb 2017 08:06:29 +0000 (08:06 +0000)]
[X86] Fix memory operands definition for some instructions.

Change integer memory operands to FP memory operands to some FP instructions.

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

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

8 years agoOptDiag: Add const to some interfaces that don't modify anything. NFC
Justin Bogner [Wed, 22 Feb 2017 07:38:17 +0000 (07:38 +0000)]
OptDiag: Add const to some interfaces that don't modify anything. NFC

This needed a const_cast for the dominator tree recalculation in
OptimizationRemarkEmitter, but we do that all over the place already
and it's safe.

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

8 years ago[ARM] Classification Improvements to ARM Sched-Models. NFCI.
Javed Absar [Wed, 22 Feb 2017 07:22:57 +0000 (07:22 +0000)]
[ARM] Classification Improvements to ARM Sched-Models. NFCI.

This patch adds missing sched classes for Thumb2 instructions.
This has been missing so far, and as a consequence, machine
scheduler models for individual sub-targets have tended to
be larger than they needed to be. These patches should help
write schedulers better and faster in the future
for ARM sub-targets.

Reviewer: Diana Picus
Differential Revision: https://reviews.llvm.org/D29953

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

8 years ago[AVX-512] Allow legacy scalar min/max intrinsics to select EVEX instructions when...
Craig Topper [Wed, 22 Feb 2017 06:54:18 +0000 (06:54 +0000)]
[AVX-512] Allow legacy scalar min/max intrinsics to select EVEX instructions when available

This patch introduces new X86ISD::FMAXS and X86ISD::FMINS opcodes. The legacy intrinsics now lower to this node. As do the AVX-512 masked intrinsics when the rounding mode is CUR_DIRECTION.

I've merged a copy of the tablegen multiclass avx512_fp_scalar into avx512_fp_scalar_sae. avx512_fp_scalar still needs to support CUR_DIRECTION appearing as a rounding mode for X86ISD::FADD_ROUND and others.

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

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

8 years ago[ValueTracking] Make poison propagation more aggressive
Sanjoy Das [Wed, 22 Feb 2017 06:52:32 +0000 (06:52 +0000)]
[ValueTracking] Make poison propagation more aggressive

Summary:
Motivation: fix PR31181 without regression (the actual fix is still in
progress).  However, the actual content of PR31181 is not relevant
here.

This change makes poison propagation more aggressive in the following
cases:

 1. poision * Val == poison, for any Val.  In particular, this changes
    existing intentional and documented behavior in these two cases:
     a. Val is 0
     b. Val is 2^k * N
 2. poison << Val == poison, for any Val
 3. getelementptr is poison if any input is poison

I think all of these are justified (and are axiomatically true in the
new poison / undef model):

1a: we need poison * 0 to be poison to allow transforms like these:

  A * (B + C) ==> A * B + A * C

If poison * 0 were 0 then the above transform could not be allowed
since e.g. we could have A = poison, B = 1, C = -1, making the LHS

  poison * (1 + -1) = poison * 0 = 0

and the RHS

  poison * 1 + poison * -1 = poison + poison = poison

1b: we need e.g. poison * 4 to be poison since we want to allow

  A * 4 ==> A + A + A + A

If poison * 4 were a value with all of their bits poison except the
last four; then we'd not be able to do this transform since then if A
were poison the LHS would only be "partially" poison while the RHS
would be "full" poison.

2: Same reasoning as (1b), we'd like have the following kinds
transforms be legal:

  A << 1 ==> A + A

Reviewers: majnemer, efriedma

Subscribers: mcrosier, llvm-commits

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

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

8 years agoUse const-ref in range-loop for to avoid copying pairs of std::string
Sean Silva [Wed, 22 Feb 2017 06:34:04 +0000 (06:34 +0000)]
Use const-ref in range-loop for to avoid copying pairs of std::string

No reason to create temporaries.

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

Patch by sergio.martins!

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

8 years ago[WebAssembly] Add skeleton MC support for the Wasm container format
Dan Gohman [Wed, 22 Feb 2017 01:23:18 +0000 (01:23 +0000)]
[WebAssembly] Add skeleton MC support for the Wasm container format

This just adds the basic skeleton for supporting a new object file format.
All of the actual encoding will be implemented in followup patches.

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

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

8 years agoFix -Wcovered-switch-default.
Rui Ueyama [Wed, 22 Feb 2017 01:01:45 +0000 (01:01 +0000)]
Fix -Wcovered-switch-default.

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

8 years agoAMDGPU: Add cvt.pkrtz intrinsic
Matt Arsenault [Wed, 22 Feb 2017 00:27:34 +0000 (00:27 +0000)]
AMDGPU: Add cvt.pkrtz intrinsic

Convert llvm.SI.packf16 test uses

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

8 years ago[LoopUnroll] Enable PGO-based loop peeling by default.
Michael Kuperstein [Wed, 22 Feb 2017 00:27:34 +0000 (00:27 +0000)]
[LoopUnroll] Enable PGO-based loop peeling by default.

This enables peeling of loops with low dynamic iteration count by default,
when profile information is available.

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

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

8 years agoAMDGPU: Remove some uses of llvm.SI.export in tests
Matt Arsenault [Wed, 22 Feb 2017 00:02:21 +0000 (00:02 +0000)]
AMDGPU: Remove some uses of llvm.SI.export in tests

Merge some of the old, smaller tests into more complete versions.

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

8 years agoAMDGPU: Remove llvm.AMDGPU.clamp intrinsic
Matt Arsenault [Tue, 21 Feb 2017 23:46:04 +0000 (23:46 +0000)]
AMDGPU: Remove llvm.AMDGPU.clamp intrinsic

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

8 years agoAMDGPU: Redefine clamp node as clamp 0.0-1.0
Matt Arsenault [Tue, 21 Feb 2017 23:35:48 +0000 (23:35 +0000)]
AMDGPU: Redefine clamp node as clamp 0.0-1.0

Change implementation to use max instead of add.
min/max/med3 do not flush denormals regardless of the mode,
so it is OK to use it whether or not they are enabled.

Also allow using clamp with f16, and use knowledge
of dx10_clamp.

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

8 years ago[NVPTX] Unify vectorization of load/stores of aggregate arguments and return values.
Artem Belevich [Tue, 21 Feb 2017 22:56:05 +0000 (22:56 +0000)]
[NVPTX] Unify vectorization of load/stores of aggregate arguments and return values.

Original code only used vector loads/stores for explicit vector arguments.
It could also do more loads/stores than necessary (e.g v5f32 would
touch 8 f32 values). Aggregate types were loaded one element at a time,
even the vectors contained within.

This change attempts to generalize (and simplify) parameter space
loads/stores so that vector loads/stores can be used more broadly.
Functionality of the patch has been verified by compiling thrust
test suite and manually checking the differences between PTX
generated by llvm with and without the patch.

General algorithm:
* ComputePTXValueVTs() flattens input/output argument into a flat list
  of scalars to load/store and returns their types and offsets.
* VectorizePTXValueVTs() uses that data to create vectorization plan
  which returns an array of flags marking boundaries of vectorized
  load/stores. Scalars are represented as 1-element vectors.
* Code that generates loads/stores implements a simple state machine
  that constructs a vector according to the plan.

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

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

8 years agoAMDGPU: Formatting fixes
Matt Arsenault [Tue, 21 Feb 2017 22:50:41 +0000 (22:50 +0000)]
AMDGPU: Formatting fixes

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

8 years agoDAG: Check if extract_vector_elt is legal or custom
Matt Arsenault [Tue, 21 Feb 2017 22:47:27 +0000 (22:47 +0000)]
DAG: Check if extract_vector_elt is legal or custom

Avoids test regressions in future AMDGPU commits when
more vector types are custom lowered.

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

8 years ago[AArch64, X86] Add statistics for the MacroFusion pass
Evandro Menezes [Tue, 21 Feb 2017 22:16:13 +0000 (22:16 +0000)]
[AArch64, X86] Add statistics for the MacroFusion pass

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

8 years ago[AArch64, X86] Guard against both instrs being wild cards
Evandro Menezes [Tue, 21 Feb 2017 22:16:11 +0000 (22:16 +0000)]
[AArch64, X86] Guard against both instrs being wild cards

If both instrs are wild cards, the result can be a crash.

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

8 years ago[AArch64] Add test case for fusion of literal generation
Evandro Menezes [Tue, 21 Feb 2017 22:16:09 +0000 (22:16 +0000)]
[AArch64] Add test case for fusion of literal generation

Add test case from https://reviews.llvm.org/D28698 that was somehow lost in
transit.

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

8 years ago[AArch64] Add test case for fusion of AES crypto operations
Evandro Menezes [Tue, 21 Feb 2017 22:16:06 +0000 (22:16 +0000)]
[AArch64] Add test case for fusion of AES crypto operations

Add test case from https://reviews.llvm.org/D28491 that was somehow lost in
transit.

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

8 years ago[CodeGen] Fix some Clang-tidy modernize and Include What You Use warnings; other...
Eugene Zelenko [Tue, 21 Feb 2017 22:07:52 +0000 (22:07 +0000)]
[CodeGen] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

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

8 years agoTry to fix the buildbot on OSX.
Zachary Turner [Tue, 21 Feb 2017 21:31:28 +0000 (21:31 +0000)]
Try to fix the buildbot on OSX.

Since I'm only seeing failures on OSX, and it's saying
permission denied, I'm suspecting this is due to the addition
of the MAP_RESILIENT_CODESIGN and/or MAP_RESILIENT_MEDIA flags.
Speculatively trying to remove those to get the bots working.

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

8 years agoTry to fix Android build.
Zachary Turner [Tue, 21 Feb 2017 21:13:10 +0000 (21:13 +0000)]
Try to fix Android build.

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

8 years ago[Support] Add a function to check if a file resides locally.
Zachary Turner [Tue, 21 Feb 2017 20:55:47 +0000 (20:55 +0000)]
[Support] Add a function to check if a file resides locally.

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

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

8 years agoMake default value for disable-licm-promotion in licm explicit.
Xin Tong [Tue, 21 Feb 2017 20:53:48 +0000 (20:53 +0000)]
Make default value for disable-licm-promotion in licm explicit.

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

8 years agoDon't modify archive members unless really needed.
Rafael Espindola [Tue, 21 Feb 2017 20:40:54 +0000 (20:40 +0000)]
Don't modify archive members unless really needed.

For whatever reason ld64 requires that member headers (not the member
themselves) should be aligned. The only way to do that is to edit the
previous member so that it ends at an aligned boundary.

Since modifying data put in an archive is an undesirable property,
llvm-ar should only do it when it is absolutely necessary.

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

8 years agoFix PR31896.
Evgeniy Stepanov [Tue, 21 Feb 2017 20:17:34 +0000 (20:17 +0000)]
Fix PR31896.

Address of an alias of a global with offset is incorrectly lowered as an address of the global (i.e. ignoring offset).

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

8 years agoTry to fix line endings.
Zachary Turner [Tue, 21 Feb 2017 19:52:57 +0000 (19:52 +0000)]
Try to fix line endings.

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

8 years ago[InstCombine] canonicalize non-obivous forms of integer min/max
Sanjay Patel [Tue, 21 Feb 2017 19:33:53 +0000 (19:33 +0000)]
[InstCombine] canonicalize non-obivous forms of integer min/max

This is part of trying to clean up our handling of min/max patterns in IR.
By converting these to canonical form, we're more likely to recognize them
because there are various places in InstCombine that don't use
matchSelectPattern or m_SMax and friends.

The backend fixups referenced in the now deleted TODO comment were added with:
https://reviews.llvm.org/rL291392
https://reviews.llvm.org/rL289738

If there's any codegen fallout from this change, we should be able to address
it in DAGCombiner or target-specific lowering.

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

8 years agoAMDGPU: Remove dead declarations in tests
Matt Arsenault [Tue, 21 Feb 2017 19:31:33 +0000 (19:31 +0000)]
AMDGPU: Remove dead declarations in tests

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

8 years agoRemove svn:eol-style property from 2 files.
Zachary Turner [Tue, 21 Feb 2017 19:29:56 +0000 (19:29 +0000)]
Remove svn:eol-style property from 2 files.

There are still over 3400 files remaining with this property set, but there are tens of thousands more with the property not set.  Until we decide what to do on a global scale, this at least unblocks me temporarily.

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

8 years agoAMDGPU: Remove dead declarations from MIR tests
Matt Arsenault [Tue, 21 Feb 2017 19:27:36 +0000 (19:27 +0000)]
AMDGPU: Remove dead declarations from MIR tests

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

8 years agoAMDGPU: Remove llvm.AMDGPU.flbit intrinsic
Matt Arsenault [Tue, 21 Feb 2017 19:27:33 +0000 (19:27 +0000)]
AMDGPU: Remove llvm.AMDGPU.flbit intrinsic

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

8 years agoAMDGPU: Don't use stack space for SGPR->VGPR spills
Matt Arsenault [Tue, 21 Feb 2017 19:12:08 +0000 (19:12 +0000)]
AMDGPU: Don't use stack space for SGPR->VGPR spills

Before frame offsets are calculated, try to eliminate the
frame indexes used by SGPR spills. Then we can delete them
after.

I think for now we can be sure that no other instruction
will be re-using the same frame indexes. It should be easy
to notice if this assumption ever breaks since everything
asserts if it tries to use a dead frame index later.

The unused emergency stack slot seems to still be left behind,
so an additional 4 bytes is still wasted.

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

8 years ago[LoopSimplify] Simplify how we compute UniqueExit
Xin Tong [Tue, 21 Feb 2017 19:10:58 +0000 (19:10 +0000)]
[LoopSimplify] Simplify how we compute UniqueExit

Summary: Simplify how we compute UniqueExit. Reuse ExitBlockSet.

Reviewers: sanjoy, efriedma, hfinkel

Subscribers: llvm-commits

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

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

8 years agoMore comments for getUniqueExitBlocks. NFCI
Xin Tong [Tue, 21 Feb 2017 19:08:03 +0000 (19:08 +0000)]
More comments for getUniqueExitBlocks. NFCI

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

8 years agoTeach the IR verifier to reject conflicting debug info for function arguments.
Adrian Prantl [Tue, 21 Feb 2017 19:03:15 +0000 (19:03 +0000)]
Teach the IR verifier to reject conflicting debug info for function arguments.

Conflicting debug info for function arguments causes hard-to-debug
assertions in the DWARF backend, so the Verifier should reject it.
For performance reasons this only checks function arguments from
non-inlined debug intrinsics for now.

rdar://problem/30520286

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

8 years ago[CodeGenPrepare] Sink and duplicate more 'and' instructions.
Geoff Berry [Tue, 21 Feb 2017 18:53:14 +0000 (18:53 +0000)]
[CodeGenPrepare] Sink and duplicate more 'and' instructions.

Summary:
Rework the code that was sinking/duplicating (icmp and, 0) sequences
into blocks where they were being used by conditional branches to form
more tbz instructions on AArch64.  The new code is more general in that
it just looks for 'and's that have all icmp 0's as users, with a target
hook used to select which subset of 'and' instructions to consider.
This change also enables 'and' sinking for X86, where it is more widely
beneficial than on AArch64.

The 'and' sinking/duplicating code is moved into the optimizeInst phase
of CodeGenPrepare, where it can take advantage of the fact the
OptimizeCmpExpression has already sunk/duplicated any icmps into the
blocks where they are used.  One minor complication from this change is
that optimizeLoadExt needed to be updated to always mark 'and's it has
determined should be in the same block as their feeding load in the
InsertedInsts set to avoid an infinite loop of hoisting and sinking the
same 'and'.

This change fixes a regression on X86 in the tsan runtime caused by
moving GVNHoist to a later place in the optimization pipeline (see
PR31382).

Reviewers: t.p.northover, qcolombet, MatzeB

Subscribers: aemerson, mcrosier, sebpop, llvm-commits

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

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