oota-llvm.git
6 years agoTurn off lldb debug tuning by default for FreeBSD
Dimitry Andric [Thu, 7 Jan 2016 22:09:12 +0000 (22:09 +0000)]
Turn off lldb debug tuning by default for FreeBSD

Summary:
In rL242338, debugger tuning was introduced, and the tuning for FreeBSD
was set to lldb by default.  However, for the foreseeable future we
still need to default to gdb tuning, since lldb is not ready for all of
FreeBSD's architectures, and some system tools (like objcopy, etc) have
not yet been adapted to cope with the lldb tuned format, which has
.apple sections.

Therefore, let FreeBSD use gdb by default for now.

Reviewers: emaste, probinson

Subscribers: llvm-commits, emaste

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

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

6 years ago[SCCP] Don't violate the lattice invariants
David Majnemer [Thu, 7 Jan 2016 21:36:16 +0000 (21:36 +0000)]
[SCCP] Don't violate the lattice invariants

We marked values which are 'undef' as constant instead of undefined
which violates SCCP's invariants.  If we can figure out that a
computation results in 'undef', leave it in the undefined state.

This fixes PR16052.

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

6 years agoWebAssembly: update expected failures, more assert got resolved.
JF Bastien [Thu, 7 Jan 2016 21:00:37 +0000 (21:00 +0000)]
WebAssembly: update expected failures, more assert got resolved.

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

6 years agoFix crash when printing instructions that have a metadata attached but no parent.
Mehdi Amini [Thu, 7 Jan 2016 20:14:30 +0000 (20:14 +0000)]
Fix crash when printing instructions that have a metadata attached but no parent.

Fix PR24852 (crash with -debug -instcombine)

Patch by Than McIntosh <thanm@google.com>

Summary:
Add guards to the asm writer to prevent crashing
when dumping an instruction that has no basic
block.

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

From: Than McIntosh <thanm@google.com>

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

6 years agoWebAssembly: update expected failures, assert got resolved by r257084.
JF Bastien [Thu, 7 Jan 2016 20:07:21 +0000 (20:07 +0000)]
WebAssembly: update expected failures, assert got resolved by r257084.

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

6 years ago[PGO] Simplify coverage mapping lowering
Xinliang David Li [Thu, 7 Jan 2016 20:05:49 +0000 (20:05 +0000)]
[PGO] Simplify coverage mapping lowering

Coverage mapping data may reference names of functions
that are skipped by FE (e.g, unused inline functions). Since
those functions are skipped, normal instr-prof function lowering
pass won't put those names in the right section, so special
handling is needed to walk through coverage mapping structure
and recollect the references.

With this patch, only names that are skipped are processed. This
simplifies the lowering code and it no longer needs to make
assumptions coverage mapping data layout. It should also be
more efficient.

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

6 years agoRemove junk accidentally commited with r257087
David Majnemer [Thu, 7 Jan 2016 19:30:13 +0000 (19:30 +0000)]
Remove junk accidentally commited with r257087

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

6 years agoAdd test for r256912
David Majnemer [Thu, 7 Jan 2016 19:27:16 +0000 (19:27 +0000)]
Add test for r256912

I forgot to add this with the rest of r256912.

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

6 years ago[SCCP] Can't go from overdefined to constant
David Majnemer [Thu, 7 Jan 2016 19:25:39 +0000 (19:25 +0000)]
[SCCP] Can't go from overdefined to constant

The fix for PR23999 made us mark loads of null as producing the constant
undef which upsets the lattice.  Instead, keep the load as "undefined".
This fixes PR26044.

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

6 years ago[DominatorTree] Remove unnecessary map population. NFC.
Michael Liao [Thu, 7 Jan 2016 19:21:29 +0000 (19:21 +0000)]
[DominatorTree] Remove unnecessary map population. NFC.

- The reason of population these maps seems not valid any more.

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

6 years ago[WebAssembly] Support combining GEP and FrameIndex offsets in memory operand offset...
Derek Schuff [Thu, 7 Jan 2016 18:55:52 +0000 (18:55 +0000)]
[WebAssembly] Support combining GEP and FrameIndex offsets in memory operand offset field

Previously we only supported putting the FI into memory operand offset
fields if there was nothing there already. Now combine them.

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

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

6 years ago[WebAssembly] Use the default private label prefixes.
Dan Gohman [Thu, 7 Jan 2016 18:49:53 +0000 (18:49 +0000)]
[WebAssembly] Use the default private label prefixes.

The MC assembler doesn't like using the empty string as a private label
prefix because then it treats all labels as private. This commit reverts
back to the default prefix, which is .L, which is common in ELF targets
and consistent with the LLVM name mangler.

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

6 years agoAMDGPU/SI: Fold operands with sub-registers
Nicolai Haehnle [Thu, 7 Jan 2016 17:10:29 +0000 (17:10 +0000)]
AMDGPU/SI: Fold operands with sub-registers

Summary:
Multi-dword constant loads generated unnecessary moves from SGPRs into VGPRs,
increasing the code size and VGPR pressure. These moves are now folded away.

Note that this lack of operand folding was not a problem for VMEM loads,
because COPY nodes from VReg_Nnn to VGPR32 are eliminated by the register
coalescer.

Some tests are updated, note that the fsub.ll test explicitly checks that
the move is elided.

With the IR generated by current Mesa, the changes are obviously relatively
minor:

7063 shaders in 3531 tests
Totals:
SGPRS: 351872 -> 352560 (0.20 %)
VGPRS: 199984 -> 200732 (0.37 %)
Code Size: 9876968 -> 9881112 (0.04 %) bytes
LDS: 91 -> 91 (0.00 %) blocks
Scratch: 1779712 -> 1767424 (-0.69 %) bytes per wave
Wait states: 295164 -> 295337 (0.06 %)

Totals from affected shaders:
SGPRS: 65784 -> 66472 (1.05 %)
VGPRS: 38064 -> 38812 (1.97 %)
Code Size: 1993828 -> 1997972 (0.21 %) bytes
LDS: 42 -> 42 (0.00 %) blocks
Scratch: 795648 -> 783360 (-1.54 %) bytes per wave
Wait states: 54026 -> 54199 (0.32 %)

Reviewers: tstellarAMD, arsenm, mareko

Subscribers: arsenm, llvm-commits

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

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

6 years agoAMDGPU/SI: xnack_mask is always reserved on VI
Nicolai Haehnle [Thu, 7 Jan 2016 17:10:20 +0000 (17:10 +0000)]
AMDGPU/SI: xnack_mask is always reserved on VI

Summary:
Somehow, I first interpreted the docs as saying space for xnack_mask is only
reserved when XNACK is enabled via SH_MEM_CONFIG. I felt uneasy about this and
went back to actually test what is happening, and it turns out that xnack_mask
is always reserved at least on Tonga and Carrizo, in the sense that flat_scr
is always fixed below the SGPRs that are used to implement xnack_mask, whether
or not they are actually used.

I confirmed this by writing a shader using inline assembly to tease out the
aliasing between flat_scratch and regular SGPRs. For example, on Tonga, where
we fix the number of SGPRs to 80, s[74:75] aliases flat_scratch (so
xnack_mask is s[76:77] and vcc is s[78:79]).

This patch changes both the calculation of the total number of SGPRs and the
various register reservations to account for this.

It ought to be possible to use the gap left by xnack_mask when the feature
isn't used, but this patch doesn't try to do that. (Note that the same applies
to vcc.)

Note that previously, even before my earlier change in r256794, the SGPRs that
alias to xnack_mask could end up being used as well when flat_scr was unused
and the total number of SGPRs happened to fall on the right alignment
(e.g. highest regular SGPR being used s29 and VCC used would lead to number
of SGPRs being 32, where s28 and s29 alias with xnack_mask). So if there
were some conflict due to such aliasing, we should have noticed that already.

Reviewers: arsenm, tstellarAMD

Subscribers: arsenm, llvm-commits

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

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

6 years ago[avx512] Fix test avx512bw-intrinsics.ll
Michael Zuckerman [Thu, 7 Jan 2016 16:25:42 +0000 (16:25 +0000)]
[avx512] Fix test avx512bw-intrinsics.ll
Change the CHECK lablel into AVX512BW
And fix declare lable of llvm.x86.avx512.mask.psrav32_hi

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

6 years ago[AVX512] add PSLLW and PSLLV Intrinsic
Michael Zuckerman [Thu, 7 Jan 2016 16:02:51 +0000 (16:02 +0000)]
[AVX512] add PSLLW and PSLLV Intrinsic

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

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

6 years agoRevert r257064. It caused failures in some sanitizer tests.
Silviu Baranga [Thu, 7 Jan 2016 15:46:43 +0000 (15:46 +0000)]
Revert r257064. It caused failures in some sanitizer tests.

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

6 years agoFix build after r257064: we should be returning false, not nullptr
Silviu Baranga [Thu, 7 Jan 2016 15:09:22 +0000 (15:09 +0000)]
Fix build after r257064: we should be returning false, not nullptr

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

6 years agoRevert r257055, it caused PR26064.
Nico Weber [Thu, 7 Jan 2016 15:01:46 +0000 (15:01 +0000)]
Revert r257055, it caused PR26064.

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

6 years ago[InstCombine] Look through PHIs, GEPs, IntToPtrs and PtrToInts to expose more constan...
Silviu Baranga [Thu, 7 Jan 2016 14:56:08 +0000 (14:56 +0000)]
[InstCombine] Look through PHIs, GEPs, IntToPtrs and PtrToInts to expose more constants when comparing GEPs

Summary:
When comparing two GEP instructions which have the same base pointer
and one of them has a constant index, it is possible to only compare
indices, transforming it to a compare with a constant. This removes
one use for the GEP instruction with the constant index, can reduce
register pressure and can sometimes lead to removing the comparisson
entirely.

InstCombine was already doing this when comparing two GEPs if the
base pointers were the same. However, in the case where we have
complex pointer arithmetic (GEPs applied to GEPs, PHIs of GEPs,
conversions to or from integers, etc) the value of the original
base pointer will be hidden to the optimizer and this transformation
will be disabled.

This change detects when the two sides of the comparison can be
expressed as GEPs with the same base pointer, even if they don't
appear as such in the IR. The transformation will convert all the
pointer arithmetic to arithmetic done on indices and all the
relevant uses of GEPs to GEPs with a common base pointer. The
GEP comparison will be converted to a comparison done on indices.

Reviewers: majnemer, jmolloy

Subscribers: hfinkel, jevinskie, jmolloy, aadg, llvm-commits

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

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

6 years ago[AVX512] add PSRAV Intrinsic
Michael Zuckerman [Thu, 7 Jan 2016 14:42:20 +0000 (14:42 +0000)]
[AVX512] add PSRAV Intrinsic

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

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

6 years agoAdded support for macro emission in dwarf (supporting DWARF version 4).
Amjad Aboud [Thu, 7 Jan 2016 14:28:20 +0000 (14:28 +0000)]
Added support for macro emission in dwarf (supporting DWARF version 4).

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

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

6 years ago[GlobalsAA] Partially back out r248576
James Molloy [Thu, 7 Jan 2016 13:33:28 +0000 (13:33 +0000)]
[GlobalsAA] Partially back out r248576

See PR25822 for a more full summary, but we were conflating the concepts of "capture" and "escape". We were proving nocapture and using that proof to infer noescape, which is not true. Escaped-ness is a function-local property - as soon as a value is used in a call argument it escapes. Capturedness is a related but distinct property. It implies a *temporally limited* escape. Consider:

  static int a;
  int b;
  int g(int * nocapture arg);
  int f() {
    a = 2;  // Even though a escapes to g, it is not captured so can be treated as non-escaping here.
    g(&a);  // But here it must be treated as escaping.
    g(&b);  // Now that g(&a) has returned we know it was not captured so we can treat it as non-escaping again.
  }

The original commit did not sufficiently understand this nuance and so caused PR25822 and PR26046.

r248576 included both a performance improvement (which has been backed out) and a related conformance fix (which has been kept along with its testcase).

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

6 years ago[AVX512] add PSHUFHW and PSHUFLW Intrinsic
Michael Zuckerman [Thu, 7 Jan 2016 12:35:43 +0000 (12:35 +0000)]
[AVX512] add PSHUFHW and PSHUFLW Intrinsic

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

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

6 years ago[X86][AVX] Match broadcast loads through a bitcast
Simon Pilgrim [Thu, 7 Jan 2016 11:34:27 +0000 (11:34 +0000)]
[X86][AVX] Match broadcast loads through a bitcast

AVX1 v8i32/v4i64 shuffles are bitcasted to v8f32/v4f64, this patch peeks through bitcasts to check for a load node to allow broadcasts to occur.

Follow up to D15310

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

6 years agoAdded AVRTargetObjectFile class and AVR.h
Dylan McKay [Thu, 7 Jan 2016 10:53:15 +0000 (10:53 +0000)]
Added AVRTargetObjectFile class and AVR.h

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

6 years agoMark arm as the 32bit variant of aarch64 in Triple
Tamas Berghammer [Thu, 7 Jan 2016 10:41:12 +0000 (10:41 +0000)]
Mark arm as the 32bit variant of aarch64 in Triple

Change Triple::get32BitArchVariant to return arm/armeb as the 32bit
variant of aarch64/aarch64_be and do the same change for the oppoiste
direction in Triple::get64BitArchVariant.

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

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

6 years agoRemove extra whitespace. NFC.
Junmo Park [Thu, 7 Jan 2016 10:26:32 +0000 (10:26 +0000)]
Remove extra whitespace. NFC.

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

6 years ago[X86][SSE} Add INSERTPS as a target shuffle
Simon Pilgrim [Thu, 7 Jan 2016 10:24:19 +0000 (10:24 +0000)]
[X86][SSE} Add INSERTPS as a target shuffle

Follow up to D15378, added INSERTPS to the list of decodable target shuffles and enabled XFormVExtractWithShuffleIntoLoad to handle target shuffles with SentinelZero and tested this with INSERTPS.

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

6 years ago[AVX512] add PSHUFD Intrinsic
Michael Zuckerman [Thu, 7 Jan 2016 09:24:12 +0000 (09:24 +0000)]
[AVX512] add PSHUFD Intrinsic

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

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

6 years agoARM: support TLS accesses on Darwin platforms
Tim Northover [Thu, 7 Jan 2016 09:03:03 +0000 (09:03 +0000)]
ARM: support TLS accesses on Darwin platforms

Darwin TLS accesses most closely resemble ELF's general-dynamic situation,
since they have to be able to handle all possible situations. The descriptors
and so on are obviously slightly different though.

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

6 years agoModernize to range-based loop
Michael Liao [Thu, 7 Jan 2016 07:58:25 +0000 (07:58 +0000)]
Modernize to range-based loop

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

6 years ago[SystemZ] Add hasSideEffects flag on Serialize instruction.
Jonas Paulsson [Thu, 7 Jan 2016 07:20:55 +0000 (07:20 +0000)]
[SystemZ] Add hasSideEffects flag on Serialize instruction.

Serialize will perform a hardware serialization operation, and is
acting as a memory barrier. Therefore it must have the hasSideEffects
flag set so it will be treated as a global memory object.

Reviewed by Ulrich Weigand

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

6 years ago[X86] Remove superfluous mayLoad flag. The pattern already implies it.
Craig Topper [Thu, 7 Jan 2016 06:42:10 +0000 (06:42 +0000)]
[X86] Remove superfluous mayLoad flag. The pattern already implies it.

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

6 years ago[X86] Had hasSideEffects=0 to VBROADCASTI128.
Craig Topper [Thu, 7 Jan 2016 06:37:55 +0000 (06:37 +0000)]
[X86] Had hasSideEffects=0 to VBROADCASTI128.

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

6 years ago[X86] Add OpSize32 to MOVSX32_NOREX instructions to match their other versions.
Craig Topper [Thu, 7 Jan 2016 06:37:52 +0000 (06:37 +0000)]
[X86] Add OpSize32 to MOVSX32_NOREX instructions to match their other versions.

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

6 years ago[X86] Add hasSideEffects=0 and mayLoad=1 to MOVZX64* instructions. While there remove...
Craig Topper [Thu, 7 Jan 2016 05:57:39 +0000 (05:57 +0000)]
[X86] Add hasSideEffects=0 and mayLoad=1 to MOVZX64* instructions. While there remove a superfluous _Q from the instruction names.

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

6 years agollvm/test/CodeGen/X86/statepoint-vector.ll REQUIRES asserts due to a debug option.
NAKAMURA Takumi [Thu, 7 Jan 2016 05:40:37 +0000 (05:40 +0000)]
llvm/test/CodeGen/X86/statepoint-vector.ll REQUIRES asserts due to a debug option.

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

6 years ago[X86] STOSQ without a rep prefix doesn't read or write RCX.
Craig Topper [Thu, 7 Jan 2016 05:18:49 +0000 (05:18 +0000)]
[X86] STOSQ without a rep prefix doesn't read or write RCX.

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

6 years agoUndo spurious change made in r256965
David Majnemer [Thu, 7 Jan 2016 04:31:35 +0000 (04:31 +0000)]
Undo spurious change made in r256965

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

6 years agoOne more attempt at stablizing a test on all platforms.
Philip Reames [Thu, 7 Jan 2016 04:20:52 +0000 (04:20 +0000)]
One more attempt at stablizing a test on all platforms.

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

6 years ago[Statepoints] Add test cases around vectors and stablize test
Philip Reames [Thu, 7 Jan 2016 04:15:31 +0000 (04:15 +0000)]
[Statepoints] Add test cases around vectors and stablize test

Unlike my comment in 257022 said, it turns out we do handle constant vectors in the statepoint lowering, but only because SelectionDAG doesn't actually produce constants for them.  Add a couple of tests which show this working.

Also, add a triple to the same test file to hopefully fix a failing bot.

It turns out we do han

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

6 years ago[AArch64 MachineCombine] Enhance/Add support for general reassociation to reduce...
Haicheng Wu [Thu, 7 Jan 2016 04:01:02 +0000 (04:01 +0000)]
[AArch64 MachineCombine] Enhance/Add support for general reassociation to reduce the critical path

Allow fadd/fmul to be reassociated in aarch64.

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

6 years ago[Statepoints] Initial support for relocating vectors of pointers
Philip Reames [Thu, 7 Jan 2016 03:32:11 +0000 (03:32 +0000)]
[Statepoints] Initial support for relocating vectors of pointers

Currently, we try to split vectors of pointers back into their component pointer elements during rewrite-statepoints-for-gc. This is less than ideal since presumably the vectorizer chose to vectorize for a reason. :) It's also been a source of bugs - in particular, the relocation logic as currently implemented was recently discovered to be wrong.

The alternate approach is to allow gc.relocates of vector-of-pointer type and update the backend to handle them. That's what this patch tries to do. This won't actually enable vector-of-pointers in practice - there are some RS4GC changes needed - but the lowering is standalone and testable so it makes sense to separate.

Note that there are some known cases around vector constants which this patch does not handle. Once this is in, I'll send another patch with individual fixes and test cases.

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

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

6 years ago[WebAssembly] Add -m:e to the target triple.
Dan Gohman [Thu, 7 Jan 2016 03:19:23 +0000 (03:19 +0000)]
[WebAssembly] Add -m:e to the target triple.

This enables ELF-style name mangling, which primarily means using ".L" for
private symbols.

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

6 years ago[Linker] Also treat a DIImportedEntity scope DISubprogram as needed.
Ahmed Bougacha [Thu, 7 Jan 2016 03:14:59 +0000 (03:14 +0000)]
[Linker] Also treat a DIImportedEntity scope DISubprogram as needed.

Follow-up to r257000: DIImportedEntity can reach a DISubprogram via
its entity, but also via its scope. Handle the latter case as well.

PR26037.

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

6 years ago[RS4GC] Add an option to suppress vector splitting
Philip Reames [Thu, 7 Jan 2016 02:20:11 +0000 (02:20 +0000)]
[RS4GC] Add an option to suppress vector splitting

At the moment, this is essentially a diangostic option so that I can start collecting failing test cases, but we will eventually migrate to removing the vector splitting code entirely.

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

6 years ago[libFuzzer] add a position hint to the dictionary-based mutator
Kostya Serebryany [Thu, 7 Jan 2016 01:49:35 +0000 (01:49 +0000)]
[libFuzzer] add a position hint to the dictionary-based mutator

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

6 years ago[ShrinkWrapping] Give up on irreducible CFGs.
Quentin Colombet [Thu, 7 Jan 2016 01:23:49 +0000 (01:23 +0000)]
[ShrinkWrapping] Give up on irreducible CFGs.
We need to know whether or not a given basic block is in a loop for the analysis
to be correct.
Loop information may be incomplete on irreducible CFGs, therefore we may
generate incorrect code if we use it in those situations.

This fixes PR25988.

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

6 years agotools/llvm-config: improve shared library support
Andrew Wilkins [Thu, 7 Jan 2016 00:18:56 +0000 (00:18 +0000)]
tools/llvm-config: improve shared library support

Summary:
r252532 added support for reporting the monolithic library
when LLVM_BUILD_LLVM_DYLIB is used. This would only be done
if the individual components were not found, and the dynamic
library is found.

This diff extends this as follows:
 - If LLVM_LINK_LLVM_DYLIB is set, then prefer the shared
   library, even if all component libraries exist.
 - Two flags, --link-shared and --link-static are introduced
   to provide explicit guidance. If --link-shared is passed
   and the shared library does not exist, an error results.

Additionally, changed the expected shared library names from
(e.g.) LLVM-3.8.0 to LLVM-3.8. The former exists only in an
installation (and then only in CMake builds I think?), and not
in the build tree; this breaks usage of llvm-config during
builds, e.g. by llvm-go.

Reviewers: DiamondLovesYou, beanz

Subscribers: llvm-commits

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

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

6 years agoAlways treat DISubprogram reached by DIImportedEntity as needed.
Teresa Johnson [Thu, 7 Jan 2016 00:06:27 +0000 (00:06 +0000)]
Always treat DISubprogram reached by DIImportedEntity as needed.

It is illegal to have a null entity in a DIImportedEntity, so
we must link in a DISubprogram metadata node referenced by one,
even if the associated function is not linked in or inlined anywhere.

Fixes PR26037.

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

6 years agoFix PR26051: Memcpy optimization should introduce a call to memcpy before the store...
Mehdi Amini [Wed, 6 Jan 2016 23:50:22 +0000 (23:50 +0000)]
Fix PR26051: Memcpy optimization should introduce a call to memcpy before the store destination position

This is a conservative fix, I expect Amaury to relax this.
Follow-up for r256923

From: Mehdi Amini <mehdi.amini@apple.com>

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

6 years agorangify; NFCI
Sanjay Patel [Wed, 6 Jan 2016 23:45:05 +0000 (23:45 +0000)]
rangify; NFCI

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

6 years ago[X86] Determine if target shuffle can contain zero elements
Simon Pilgrim [Wed, 6 Jan 2016 23:24:40 +0000 (23:24 +0000)]
[X86] Determine if target shuffle can contain zero elements

getTargetShuffleMask may return shuffle masks with SM_SentinelZero (-2) values (currently just for PSHUFB but VPERM2X128 as well with this patch). Although some calling functions can make use of this (mainly for shuffle combining), others can not and their inclusion makes shuffle mask comparisons more difficult.

This patch adds a flag to getTargetShuffleMask to indicate if the calling function can't handle SM_SentinelZero; getTargetShuffleMask will then return false if it occurs to make handling much easier.

I've tidied up some uses of getTargetShuffleMask to better indicate what is going on - more could be done but at present I don't have test cases to demonstrate it.

Some upcoming patches will make use of this to both support more uses where SM_SentinelZero is not permitted (e.g. combineShuffleToAddSub), and also will allow us to add INSERTPS support to getTargetShuffleMask as part of better zero handling discussed in D14261.

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

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

6 years ago[Bitcode] Remove superflous compatibility tests
Vedant Kumar [Wed, 6 Jan 2016 23:22:38 +0000 (23:22 +0000)]
[Bitcode] Remove superflous compatibility tests

With r256990, bogner introduced comprehensive tests for constant arrays
and vectors. We no longer need the existing ones because they are
redundant.

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

6 years agoBitcode: Move these tests into compatibility.ll
Justin Bogner [Wed, 6 Jan 2016 23:16:37 +0000 (23:16 +0000)]
Bitcode: Move these tests into compatibility.ll

I added a couple of tests in r256982, but vedantk suggested that they
fit better into compatibility.ll, since they could catch format breaks
later on there.

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

6 years agoRecommit r256952 "Filtering IR printing for print-after-all/print-before-all"
Weiming Zhao [Wed, 6 Jan 2016 22:55:03 +0000 (22:55 +0000)]
Recommit r256952 "Filtering IR printing for print-after-all/print-before-all"

Fix lit test fail due to outputting an extra line.

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

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

6 years agoBitcode: Fix reading and writing of ConstantDataVectors of halfs
Justin Bogner [Wed, 6 Jan 2016 22:31:32 +0000 (22:31 +0000)]
Bitcode: Fix reading and writing of ConstantDataVectors of halfs

In r254991 I allowed ConstantDataVectors to contain elements of
HalfTy, but I missed updating the bitcode reader and writer to handle
this, so now we crash if we try to emit bitcode on programs that have
constant vectors of half.

This fixes the issue and adds test coverage for reading and writing
constant sequences in bitcode.

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

6 years agoAMDGPU/SI: Fix crash when inline assembly is used in a graphics shader
Nicolai Haehnle [Wed, 6 Jan 2016 22:01:04 +0000 (22:01 +0000)]
AMDGPU/SI: Fix crash when inline assembly is used in a graphics shader

Summary:
This is admittedly something that you could only run into by manually
playing around with shader assembly because the SITypeWriter pass is
skipped for compute.

Reviewers: arsenm, tstellarAMD

Subscribers: arsenm, llvm-commits

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

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

6 years ago[LibCallSimplifier] less indenting; NFCI
Sanjay Patel [Wed, 6 Jan 2016 20:52:21 +0000 (20:52 +0000)]
[LibCallSimplifier] less indenting; NFCI

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

6 years ago[SplitLandingPadPredecessors] Create a PHINode for the original landingpad only if...
Chen Li [Wed, 6 Jan 2016 20:32:05 +0000 (20:32 +0000)]
[SplitLandingPadPredecessors] Create a PHINode for the original landingpad only if it has some uses

Summary: This patch adds a check in SplitLandingPadPredecessors to see if the original landingpad instruction has any uses. If not, we don't need to create a PHINode for it in the joint block since it's gonna be a dead code anyway. The motivation for this patch is that we found a bug that SplitLandingPadPredecessors created a PHINode of token type landingpad, which failed the verifier since PHINode can not be token type. However, the created PHINode will never be used in our code pattern. This patch will workaround this bug, and we might add supports in SplitLandingPadPredecessors to handle token type landingpad with uses in the future.

Reviewers: reames

Subscribers: llvm-commits

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

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

6 years agoPromote aggregate store to memset when possible
Amaury Sechet [Wed, 6 Jan 2016 19:47:24 +0000 (19:47 +0000)]
Promote aggregate store to memset when possible

Summary: As per title. This will allow the optimizer to pick up on it.

Reviewers: craig.topper, spatel, dexonsmith, Prazek, chandlerc, joker.eph, majnemer

Subscribers: llvm-commits

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

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

6 years agoRemove useless DEBUG
Amaury Sechet [Wed, 6 Jan 2016 19:45:09 +0000 (19:45 +0000)]
Remove useless DEBUG

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

6 years agoConsolidate MemRefs handling from BranchFolding and correct latent bug
Philip Reames [Wed, 6 Jan 2016 19:33:12 +0000 (19:33 +0000)]
Consolidate MemRefs handling from BranchFolding and correct latent bug

Move the logic from BranchFolding to use the shared infrastructure for merging MMOs introduced in 256909. This has the effect of making BranchFolding more capable.

In the process, fix a latent bug. The existing handling for merging didn't handle the case where one of the instructions being merged had overflowed and dropped MemRefs. This was a latent bug in the places the code was commoned from, but potentially reachable in BranchFolding.

Once this is in, we're left with a single place to consider implementing MMO unique-ing as proposed in http://reviews.llvm.org/D15230.

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

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

6 years ago[WinEH] Remove calculateCatchReturnSuccessorColors
David Majnemer [Wed, 6 Jan 2016 19:26:30 +0000 (19:26 +0000)]
[WinEH] Remove calculateCatchReturnSuccessorColors

The functionality that calculateCatchReturnSuccessorColors provides was
once non-trivial: it was a computation layered on top of funclet
coloring.

These days, LLVM IR directly encodes what
calculateCatchReturnSuccessorColors computed, obsoleting the need for
it.

No functionality change is intended.

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

6 years ago[LibCallSimplifier] use instruction-level fast-math-flags for tan/atan transform
Sanjay Patel [Wed, 6 Jan 2016 19:23:35 +0000 (19:23 +0000)]
[LibCallSimplifier] use instruction-level fast-math-flags for tan/atan transform

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

6 years ago[X86] Correctly model TLS calls w.r.t. frame requirements.
Quentin Colombet [Wed, 6 Jan 2016 19:09:26 +0000 (19:09 +0000)]
[X86] Correctly model TLS calls w.r.t. frame requirements.
TLS calls need the stack frame to be properly set up and this
implies that such calls need ADJUSTSTACK_xxx markers.

Fixes PR25820.

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

6 years agoMake WinCOFFObjectWriter.cpp's timestamp writing not use ENABLE_TIMESTAMPS
Nico Weber [Wed, 6 Jan 2016 19:05:19 +0000 (19:05 +0000)]
Make WinCOFFObjectWriter.cpp's timestamp writing not use ENABLE_TIMESTAMPS

LLVM_ENABLE_TIMESTAMPS controls if timestamps are embedded into llvm's
binaries. Turning it off is useful for deterministic builds.

r246905 made it so that the define suddenly also controls if the binaries that
the llvm binaries _create_ embed timestamps or not – but this shouldn't be a
configure-time option. r256203/r256204 added a driver option to toggle this on
and off, so this patch now passes this driver option in LLVM_ENABLE_TIMESTAMPS
builds so that if LLVM_ENABLE_TIMESTAMPS is set, the build of LLVM is
deterministic – but the built clang can still write timestamps into other
executables when requested.

This also allows removing some of the test machinery added in r292012 to work
around this problem.

See PR24740 for background.
http://reviews.llvm.org/D15783

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

6 years agorefactor divrem8 lowering; NFCI
Sanjay Patel [Wed, 6 Jan 2016 18:47:09 +0000 (18:47 +0000)]
refactor divrem8 lowering; NFCI

The code duplication contributed to PR25754:
https://llvm.org/bugs/show_bug.cgi?id=25754

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

6 years ago[ShrinkWrap] Fix FindIDom to only have one kind of failure.
Michael Kuperstein [Wed, 6 Jan 2016 18:40:11 +0000 (18:40 +0000)]
[ShrinkWrap] Fix FindIDom to only have one kind of failure.

FindIDom() can fail in two different ways - it can either return nullptr or the
block itself, depending on the circumstances. Some users of FindIDom() check
one error condition, while others check the other.

Change it to always return nullptr on failure.
This fixes PR26004.

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

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

6 years agoRevert r256952 due to lit test fails.
Weiming Zhao [Wed, 6 Jan 2016 18:31:44 +0000 (18:31 +0000)]
Revert r256952 due to lit test fails.

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

6 years ago[WebAssembly] Don't use range-based loop for a list that's being modified
Dan Gohman [Wed, 6 Jan 2016 18:29:35 +0000 (18:29 +0000)]
[WebAssembly] Don't use range-based loop for a list that's being modified

The first instruction in a block is what the rend() iterator points to, so
if it moves, we need to re-evaluate rend() so that we continue to iterate
through the rest of the instructions.

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

6 years agoFiltering IR printing for print-after-all/print-before-all
Weiming Zhao [Wed, 6 Jan 2016 18:20:25 +0000 (18:20 +0000)]
Filtering IR printing for print-after-all/print-before-all

Summary:
This patch implements "-print-funcs" option to support function filtering for IR printing like -print-after-all, -print-before etc.
Examples:
  -print-after-all -print-funcs=foo,bar

Reviewers: mcrosier, joker.eph

Subscribers: tejohnson, joker.eph, llvm-commits

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

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

6 years agoFix option desc in FunctionAttrs; NFC
Weiming Zhao [Wed, 6 Jan 2016 18:18:16 +0000 (18:18 +0000)]
Fix option desc in FunctionAttrs; NFC

Summary: The example in desc should match with actual option name

Reviewers: jmolloy

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

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

6 years agoScheduleDAGInstrs: Bug fix for missed memory dependency.
Geoff Berry [Wed, 6 Jan 2016 18:14:26 +0000 (18:14 +0000)]
ScheduleDAGInstrs: Bug fix for missed memory dependency.

Summary:
In buildSchedGraph(), when adding memory dependencies for loads, move
the call to adjustChainDeps() after the call to
addChainDependency(AliasChain) to handle the case where
addChainDependency(AliasChain) ends up not adding a dependency and
instead putting the SU on the RejectMemNodes list.  The call to
adjustChainDeps() must be done after the call to addChainDependency() in
order to process the SU added to the RejectMemNodes list to create
memory dependencies for it.

Reviewers: hfinkel, atrick, jonpa, resistor

Subscribers: mcrosier, llvm-commits

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

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

6 years ago[BasicAA] Extract WriteOnly predicate on parameters [NFC]
Philip Reames [Wed, 6 Jan 2016 18:10:35 +0000 (18:10 +0000)]
[BasicAA] Extract WriteOnly predicate on parameters [NFC]

Since writeonly is the only missing attribute and special case left for the memset/memcpy family of intrinsics, rearrange the code to make that much more clear.

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

6 years agoWebAssembly: add missing expected failures exposed by r256890
JF Bastien [Wed, 6 Jan 2016 17:08:56 +0000 (17:08 +0000)]
WebAssembly: add missing expected failures exposed by r256890

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

6 years ago[WebAssembly] Add -asm-verbose=false to llc tests.
Dan Gohman [Wed, 6 Jan 2016 16:45:05 +0000 (16:45 +0000)]
[WebAssembly] Add -asm-verbose=false to llc tests.

In general, disabling comments in the output reduces the chances of a
CHECK line accidentally matching a comment instead of its intended text.

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

6 years agoWebAssembly: add new expected failures exposed by r256890
JF Bastien [Wed, 6 Jan 2016 16:15:51 +0000 (16:15 +0000)]
WebAssembly: add new expected failures exposed by r256890

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

6 years agoAdd unittest for new CanReplace flag on MDNodes
Teresa Johnson [Wed, 6 Jan 2016 15:02:40 +0000 (15:02 +0000)]
Add unittest for new CanReplace flag on MDNodes

This adds a unittest for the support added in r256648 to add
a flag that can be used to prevent RAUW on temporary metadata
used as a map key.

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

6 years ago[Hexagon] Add system instructions for cache manipulation
Krzysztof Parzyszek [Wed, 6 Jan 2016 14:22:22 +0000 (14:22 +0000)]
[Hexagon] Add system instructions for cache manipulation

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

6 years agoRevert "GlobalsAA: Take advantage of ArgMemOnly, InaccessibleMemOnly and Inaccessible...
Amaury Sechet [Wed, 6 Jan 2016 13:23:52 +0000 (13:23 +0000)]
Revert "GlobalsAA: Take advantage of ArgMemOnly, InaccessibleMemOnly and InaccessibleMemOrArgMemOnly attributes"

Summary:
This reverts commit 5a9e526f29cf8510ab5c3d566fbdcf47ac24e1e9.

As per discussion in D15665

This also add a test case so that regression introduced by that diff are not reintroduced.

Reviewers: vaivaswatha, jmolloy, hfinkel, reames

Subscribers: llvm-commits

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

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

6 years ago[LV] Avoid creating empty reduction entries (NFC)
Matthew Simpson [Wed, 6 Jan 2016 12:50:29 +0000 (12:50 +0000)]
[LV] Avoid creating empty reduction entries (NFC)

This patch prevents us from unintentionally creating entries in the reductions
map for PHIs that are not actually reductions. This is currently not an issue
since we bail out if we encounter PHIs other than inductions or reductions.
However the behavior could become problematic as we add support for additional
recurrence types.

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

6 years agoPR25754: avoid generating UDIVREM8_ZEXT_HREG nodes with i64 result
Artyom Skrobov [Wed, 6 Jan 2016 09:41:10 +0000 (09:41 +0000)]
PR25754: avoid generating UDIVREM8_ZEXT_HREG nodes with i64 result

Reviewers: spatel, srking

Subscribers: llvm-commits

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

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

6 years agoImprove load/store to memcpy for aggregate
Amaury Sechet [Wed, 6 Jan 2016 09:30:39 +0000 (09:30 +0000)]
Improve load/store to memcpy for aggregate

Summary: It turns out that if we don't try to do it at the store location, we can do it before any operation that alias the load, as long as no operation alias the store.

Reviewers: craig.topper, spatel, dexonsmith, Prazek, chandlerc, joker.eph

Subscribers: llvm-commits

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

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

6 years ago[X86][SSE] There is no zmm addsubpd/addsubps instruction.
Simon Pilgrim [Wed, 6 Jan 2016 09:08:49 +0000 (09:08 +0000)]
[X86][SSE] There is no zmm addsubpd/addsubps instruction.

Replace the assert in combineShuffleToAddSub with an early out.

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

6 years ago[X86][SSE] An empty target shuffle mask is always a failure.
Simon Pilgrim [Wed, 6 Jan 2016 08:59:32 +0000 (08:59 +0000)]
[X86][SSE] An empty target shuffle mask is always a failure.

As discussed on D15378, move the mask.empty() tests to after the switch statement and consider any shuffle decode where the extracted target shuffle mask is empty as a failure.

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

6 years ago[X86] Use PS instead of TB for instructions that have PD/XS/XD variations. Use OpSize...
Craig Topper [Wed, 6 Jan 2016 06:18:41 +0000 (06:18 +0000)]
[X86] Use PS instead of TB for instructions that have PD/XS/XD variations. Use OpSize32 on an instruction that has an OpSize16 variant.

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

6 years ago[X86] Fix an incorrect usage of In32BitMode that should have been Not64BitMode.
Craig Topper [Wed, 6 Jan 2016 06:18:37 +0000 (06:18 +0000)]
[X86] Fix an incorrect usage of In32BitMode that should have been Not64BitMode.

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

6 years agoFix a warning [NFC]
Philip Reames [Wed, 6 Jan 2016 05:53:09 +0000 (05:53 +0000)]
Fix a warning [NFC]

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

6 years agoAdd != to YAMLParser's basic_collection_iterator.
Jordan Rose [Wed, 6 Jan 2016 05:17:12 +0000 (05:17 +0000)]
Add != to YAMLParser's basic_collection_iterator.

...and mark it as merely an input_iterator rather than a forward_iterator,
since it is destructive. And then rewrite == to take advantage of that.

Patch by Alex Denisov!

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

6 years ago[SimplifyLibCalls] Teach SimplifyLibCalls about operand bundles
David Majnemer [Wed, 6 Jan 2016 05:01:34 +0000 (05:01 +0000)]
[SimplifyLibCalls] Teach SimplifyLibCalls about operand bundles

If we replace one call-site with another, be sure to move over any
operand bundles that lingered on the old call-site.

This fixes PR26036.

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

6 years ago[BasicAA] Remove special casing of memset_pattern16 in favor of generic attribute...
Philip Reames [Wed, 6 Jan 2016 04:53:16 +0000 (04:53 +0000)]
[BasicAA] Remove special casing of memset_pattern16 in favor of generic attribute inference

Most of the properties of memset_pattern16 can be now covered by the generic attributes and inferred by InferFunctionAttrs.  The only exceptions are:
- We don't yet have a writeonly attribute for the first argument.
- We don't have an attribute for modeling the access size facts encoded in MemoryLocation.cpp.

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

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

6 years ago[BasicAA] Delete dead code related to memset/memcpy/memmove intrinsics [NFCI]
Philip Reames [Wed, 6 Jan 2016 04:43:03 +0000 (04:43 +0000)]
[BasicAA] Delete dead code related to memset/memcpy/memmove intrinsics [NFCI]

We only need to describe the writeonly property of one of the arguments. All of the rest of the semantics are nicely described by existing attributes in Intrinsics.td.

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

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

6 years agoExtract helper function to merge MemoryOperand lists [NFC]
Philip Reames [Wed, 6 Jan 2016 04:39:03 +0000 (04:39 +0000)]
Extract helper function to merge MemoryOperand lists [NFC]

In the discussion on http://reviews.llvm.org/D15730, Andy pointed out we had a utility function for merging MMO lists. Since it turned we actually had two copies and there's another review in progress (http://reviews.llvm.org/D15230) which needs the same, extract it into a utility function and clean up the interfaces to make it easier to use with a MachineInstBuilder.

I introduced a pair here to track size and allocation together. I think we should probably move in the direction of the MachineOperandsRef helper class, but I'm leaving that for further work. I want to get the poison state introduced before I make major changes to the interface.

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

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

6 years agoDelete trailing whitespace; NFC
Junmo Park [Wed, 6 Jan 2016 03:53:36 +0000 (03:53 +0000)]
Delete trailing whitespace; NFC

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

6 years agoDelete trailing whitespace; NFC
Junmo Park [Wed, 6 Jan 2016 03:41:30 +0000 (03:41 +0000)]
Delete trailing whitespace; NFC

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

6 years agoDo not define NOGDI. Mingw defines LOGFONTW type in wingdi.h and the mingw
Yunzhong Gao [Wed, 6 Jan 2016 03:01:10 +0000 (03:01 +0000)]
Do not define NOGDI. Mingw defines LOGFONTW type in wingdi.h and the mingw
version of shlobj.h includes shobjidl.h and the latter uses the LOGFONTW type.

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

6 years agoAnother attempt at fixing the i686-mingw32-RA-on-linux buildbot. I am getting
Yunzhong Gao [Wed, 6 Jan 2016 02:48:42 +0000 (02:48 +0000)]
Another attempt at fixing the i686-mingw32-RA-on-linux buildbot. I am getting
confused with what version of mingw is actually installed on the buildbot, and
for now I will just assume this is an unknown version which does not ship with
VersionHelpers.h.

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

6 years agoAnother attempt at fixing the i686-mingw32-RA-on-linux buildbot.
Yunzhong Gao [Wed, 6 Jan 2016 02:32:31 +0000 (02:32 +0000)]
Another attempt at fixing the i686-mingw32-RA-on-linux buildbot.

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