139573 Commits

Author SHA1 Message Date
Reid Kleckner
6f0e74d020 Truncate long names in type records
In the MS ABI, the frontend is supposed to MD5 such pathologically long
names. LLVM should still defend itself from long names, though.

Fixes part of PR29098.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284136 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 17:33:22 +00:00
Vedant Kumar
87963ed606 [unittests] Remove a redundant test fixture (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284135 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 17:22:44 +00:00
Igor Breger
d942282a2f [X86][AVX512] Fix sext v32i1 -> v32i8 lowering.
Fix PR30600.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284134 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 17:20:38 +00:00
Kostya Serebryany
53176d2749 [libFuzzer] reapply r283946: refactoring to speed things up, NFC. Now with a fix for gcc build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284132 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 16:19:09 +00:00
Reid Kleckner
dc99d00be5 Fix for PR30687. Avoid dereferencing MBB.end().
We don't need to return a MachineInstr* from these stack probe insertion
calls anyway. If we ever need to add it back, we can return an iterator
instead.

Based on a patch by David Kreitzer

This bug is a consequence of

r279314 | dexonsmith | 2016-08-19 13:40:12 -0700 (Fri, 19 Aug 2016) | 110 lines

We hit the "Assertion `!NodePtr->isKnownSentinel()' failed" assertion,
but only when inserting a stack probe call at the end of an MBB, which
isn't necessarily a common situation.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284130 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 15:48:48 +00:00
Eric Liu
e0d080d15d Do not delete leading ../ in remove_dots.
Reviewers: bkramer

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284129 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 15:07:14 +00:00
Javed Absar
172d6c078b [ARM]: Assign cost of scaling used in addressing mode for ARM cores
This patch assigns cost of the scaling used in addressing.
On many ARM cores, a negated register offset takes longer than a
non-negated register offset, in a register-offset addressing mode.

For instance:

LDR R0, [R1, R2 LSL #2]
LDR R0, [R1, -R2 LSL #2]

Above, (1) takes less cycles than (2).

By assigning appropriate scaling factor cost, we enable the LLVM
to make the right trade-offs in the optimization and code-selection phase.

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

Reviewers: jmolloy, rengolin




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284127 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 14:57:43 +00:00
Matthew Simpson
a913b4aab2 [LV] Account for predicated stores in instruction costs
This patch ensures that we scale the estimated cost of predicated stores by
block probability. This is a follow-on patch for r284123.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284126 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 14:54:31 +00:00
Sanjay Patel
2061c51e0e [x86] add negate-i1 run for 32-bit target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284124 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 14:27:08 +00:00
Matthew Simpson
262bc1134d [LV] Avoid rounding errors for predicated instruction costs
This patch modifies the cost calculation of predicated instructions (div and
rem) to avoid the accumulation of rounding errors due to multiple truncating
integer divisions. The calculation for predicated stores will be addressed in a
follow-on patch since we currently don't scale the cost of predicated stores by
block probability.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284123 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 14:19:48 +00:00
Simon Pilgrim
97ca021c6f [DAGCombiner] Add vector support to (mul (shl X, Y), Z) -> (shl (mul X, Z), Y) style combines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284122 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 14:04:35 +00:00
Matt Arsenault
c31d80dbf5 AMDGPU: Assume spilling will occur at -O0
Because everything live is spilled at the end of a
block by fast regalloc, assume this will happen and
avoid the copies of the resource descriptor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284119 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 13:10:00 +00:00
Simon Pilgrim
8517cfc997 Copy+pasts typo in comment describing combine test
Repeated the "fold (mul x, 0) -> 0" instead of "fold (mul x, 1) -> x"

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284118 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 12:54:32 +00:00
Simon Pilgrim
9dbdf67986 [DAGCombiner] Add vector support to C2-(A+C1) -> (C2-C1)-A folding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284117 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 12:49:31 +00:00
Matt Arsenault
3339279d4a AMDGPU: Fix truncate to bool warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284116 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 12:45:16 +00:00
Simon Dardis
9f063fb182 [mips] Add IAS support for dvp, evp
These instructions were only defined for microMIPSR6 previously. Add
definitions for MIPSR6, correct definitions for microMIPSR6, flag these
instructions as having unmodelled side effects (they disable/enable
virtual processors) and add missing disassember tests for microMIPSR6.

Reviewers: vkalintiris

Differential Review: https://reviews.llvm.org/D24291


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284115 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 12:12:56 +00:00
Simon Pilgrim
00d9dddfae [DAGCombiner] Add vector support to (sub -1, x) -> (xor x, -1) canonicalization
Improves commutation potential

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284113 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 12:05:20 +00:00
Oren Ben Simhon
4b6c339e4a [X86] Basic additions to support RegCall Calling Convention.
The Register Calling Convention (RegCall) was introduced by Intel to optimize parameter transfer on function call.
This calling convention ensures that as many values as possible are passed or returned in registers.
This commit presents the basic additions to LLVM CodeGen in order to support RegCall in X86.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284108 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 07:53:43 +00:00
Daniel Jasper
c678874ec2 Silence unused warning in non-assert builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284107 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 06:39:44 +00:00
Craig Topper
1c62059ce7 [AVX-512] Fix v16i32 zero extending shuffle test case so it's really zero extend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284106 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 05:41:01 +00:00
Craig Topper
6c06855a1a [AVX-512] Teach shuffle lowering to recognize 512-bit zero extends.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284105 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 05:29:41 +00:00
Craig Topper
c42ce5a0ba [AVX-512] Add tests for basic 512-bit zero extending shuffle patterns. Code will be improved in a future commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284104 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 05:29:37 +00:00
Diana Picus
bc668c9c34 Remove a FIXME that I forgot about. NFC.
Sorry about the noise.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284103 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 05:28:55 +00:00
Craig Topper
350bc2e971 [X86] Simplify the lowering code for extracting and inserting subvectors.
We don't need to check if AVX is enabled. It's implied by the operation action being set to Custom.
We don't need to check both the input and output type widths. We only need to check the type that's being inserted or extracted. The other type is known to be a legal type and we can assume its a different width.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284102 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 04:14:47 +00:00
Sebastian Pop
7c621c7bc8 Memory-SSA: strengthen defClobbersUseOrDef interface
As Danny pointed out, defClobbersUseOrDef should use MemoryLocOrCall to make
sure fences are properly handled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284099 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 03:23:33 +00:00
Sebastian Pop
0d25a932be commit back "GVN-hoist: fix store past load dependence analysis (PR30216, PR30499)"
This is with an extra change to avoid calling MemoryLocation::get() on a call instruction.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284098 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 01:39:10 +00:00
Quentin Colombet
10c508497f [AArch64][RegisterBankInfo] Provide alternative mappings for 64-bit load
This allows RegBankSelect in greedy mode to get rid some of the cross
register bank copies when loads are involved in the chain of
computation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284097 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 01:01:23 +00:00
Reid Kleckner
db2e3264a9 Correct PrivateLinkage for COFF
- Use storage class C_STAT for 'PrivateLinkage' The storage class for
  PrivateLinkage should equal to the Internal Linkage.

- Set 'PrivateGlobalPrefix' from "L" to ".L" for MM_WinCOFF (includes
  x86_64) MM_WinCOFF has empty GlobalPrefix '\0' so PrivateGlobalPrefix
  "L" may conflict to the normal symbol name starting with 'L'.

Based on a patch by Han Sangjin! Manually updated test cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284096 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 00:55:24 +00:00
Quentin Colombet
6837af0c59 [AArch64][RegisterBankInfo] Provide alternative mappings for G_BITCASTs.
Thanks to this patch, RegBankSelect is able to get rid of some register
bank copies as demonstrated in the test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284094 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 00:34:48 +00:00
Reid Kleckner
dd19d1b4f7 Revert "GVN-hoist: fix store past load dependence analysis (PR30216, PR30499)"
This CL didn't actually address the test case in PR30499, and clang
still crashes.

Also revert dependent change "Memory-SSA cleanup of clobbers interface, NFC"

Reverts r283965 and r283967.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284093 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 00:18:26 +00:00
Quentin Colombet
342fb3e27b [AArch64][RegisterBankInfo] Describe cross regbank copies statically.
NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284091 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 00:12:06 +00:00
Quentin Colombet
d8bc7a16c7 [AArch64][RegisterBankInfo] Use static mapping for same bank G_BITCAST.
NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284090 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 00:12:04 +00:00
Quentin Colombet
df3941c1ca [AArch64][MachineLegalizer] Mark more G_BITCAST as legal.
Basically any vector types that fits in a 32-bit register is also valid
as far as copies are concerned.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284089 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 00:12:01 +00:00
Quentin Colombet
7d96cfea3f [AArch64][RegisterBankInfo] Bump the cost of vector loads.
This does not change anything yet, because we do not offer any
alternative mapping.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284088 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 00:11:59 +00:00
Quentin Colombet
d53b5adea4 [AArch64][RegisterBankInfo] Use a proper cost for cross regbank G_BITCASTs.
This does not change anything yet, because we do not offer any
alternative mapping.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284087 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 00:11:57 +00:00
Quentin Colombet
910b53f361 [AArch64][RegisterBankInfo] Provide more realistic copy costs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284086 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 00:11:55 +00:00
Albert Gutowski
c0fa9afe60 fix function label name in addressofreturnaddress test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284085 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 23:58:45 +00:00
Mehdi Amini
d48e8c69be [GitHubMove Doc] Properly nest a subsection in the proposal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284082 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 23:36:11 +00:00
Albert Gutowski
fc61cb55fa fix title underline length
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284078 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 23:10:02 +00:00
Mehdi Amini
d6afe384af Moving to GitHub - Unified Proposal
This document describes the proposal to move to GitHub, and
compare the two proposals through various workflow examples,
presenting the current set of commands following by the ones
involved in each of the two proposals.

It is intended to supersede the previous "submodule proposal"
document entirely, and drive the discussion at the BoF during
the next Dev Meeting.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284077 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 23:02:02 +00:00
Krzysztof Parzyszek
6dcccf4d12 Handle lane masks in LivePhysRegs when adding live-ins
Differential Revision: https://reviews.llvm.org/D25533


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284076 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 22:53:41 +00:00
Tim Northover
5c4187e750 GlobalISel: support G_TRUNC selection on AArch64.
Ahmed's patch again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284075 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 22:49:15 +00:00
Tim Northover
8394d5db03 GlobalISel: support int <-> float conversions on AArch64.
More of Ahmed's work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284074 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 22:49:11 +00:00
Tim Northover
e205ee4f2c GlobalISel: select G_FCMP instructions on AArch64.
Another of Ahmed's patches.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284073 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 22:49:07 +00:00
Tim Northover
7bd256df7f GlobalISel: support selection of G_ICMP on AArch64.
Patch from Ahmed Bougaca again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284072 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 22:49:04 +00:00
Tim Northover
8e4c0619c7 GlobalISel: select G_BRCOND instructions on AArch64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284071 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 22:49:01 +00:00
Tim Northover
110db83eac GlobalISel: mark G_BRCOND on s1 as legal.
It's going to be a TBNZ (at -O0) anyway, so the high bits don't matter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284070 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 22:48:36 +00:00
Vedant Kumar
7c9f5f9286 [unittests] Delete even more copy constructors (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284069 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 22:44:50 +00:00
Vedant Kumar
f466ec4545 [unittests] Delete some copy constructors (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284066 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 22:27:54 +00:00
Vedant Kumar
3d6253492a [unittest] Pass a reference instead of making a copy (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284065 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 22:27:52 +00:00