41986 Commits

Author SHA1 Message Date
Sam Parker
50a37dcbc4 [ARM] Replace HasT2ExtractPack with HasDSP
Removed the HasT2ExtractPack feature and replaced its references
with HasDSP. This then allows the Thumb2 extend instructions to be
selected for ARMv8M +dsp. These instruction descriptions have also
been refactored and more target tests have been added for their isel.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295452 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-17 15:42:44 +00:00
Diana Picus
35af78a713 [ARM] GlobalISel: Clean up some helpers
Return invalid opcodes when some of the helpers in the instruction selection
pass can't handle a given combination.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295446 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-17 13:44:19 +00:00
Diana Picus
02bf0b05c5 [ARM] GlobalISel: Check mappings used by reg bank select
Add some asserts to make sure we're using the mappings that we think we're
using. This is to keep us from accidentally breaking functionality while moving
to TableGen'erated mappings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295441 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-17 13:14:25 +00:00
Diana Picus
404e2a5ae0 [ARM] GlobalISel: Use Subtarget in Legalizer
Start using the Subtarget to make decisions about what's legal. In particular,
we only mark floating point operations as legal if we have VFP2, which is
something we should've done from the very start.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295439 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-17 11:25:17 +00:00
Rafael Espindola
675c18fef3 Revert "[Hexagon] Start using regmasks on calls"
This reverts commit r295371.

It broke windows bots:

http://bb.pgr.jp/builders/ninja-clang-i686-msc19-R/builds/11402/steps/test-llvm/logs/stdio

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295402 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-17 02:08:58 +00:00
David Blaikie
c257cb9d41 Fix -Wunused-lambda-capture by removing some unused lambda captures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295373 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 20:55:48 +00:00
Krzysztof Parzyszek
075abc4ae8 [Hexagon] Start using regmasks on calls
All the cool targets are doing it...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295371 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 20:25:23 +00:00
Krzysztof Parzyszek
ff2120a9ec [RDF] Aggregate shadow phi uses into one cluster when propagating live info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295366 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 19:28:06 +00:00
Matt Arsenault
0b229143d8 AMDGPU: Remove llvm.AMDGPU.cube intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295359 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 19:09:04 +00:00
Matt Arsenault
81cfbfa738 AMDGPU: Remove llvm.AMDGPU.rsq intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295358 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 19:08:58 +00:00
Hans Wennborg
a8edb5cd90 Re-apply r282920 "X86: Allow conditional tail calls in Win64 "leaf" functions (PR26302)"
The original commit was reverted in r283329 due to a miscompile in
Chromium. That turned out to be the same issue as PR31257, which was
fixed in r295262.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295357 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 19:04:42 +00:00
Krzysztof Parzyszek
150b7ab23e [RDF] Differentiate between defining and clobbering nodes
Defining nodes should not alias with one another, while clobbering
nodes can. When pushing defs on stacks, push clobbers first, link
non-clobbering defs, then push the defs.

The data flow in a statement is now: uses -> clobbers -> defs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295356 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 18:53:04 +00:00
Krzysztof Parzyszek
62209f2721 [RDF] Move normalize(RegisterRef) to PhysicalRegisterInfo
Remove the duplicate from DFG and make some members of PRI private.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295351 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 18:45:23 +00:00
Andrea Di Biagio
8458f17381 x86 interrupt calling convention: only save xmm registers if the target supports SSE
The existing code always saves the xmm registers for 64-bit targets even if the
target doesn't support SSE (which is common for kernels). Thus, the compiler
inserts movaps instructions which lead to CPU exceptions when an interrupt
handler is invoked.

This commit fixes this bug by returning a register set without xmm registers
from getCalleeSavedRegs and getCallPreservedMask for such targets.

Patch by Philipp Oppermann.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295347 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 18:25:37 +00:00
Sjoerd Meijer
e61e0955b7 [AArch64] AArch64AsmParser clean up of isImmediate functions. NFC
Regression test neon-diagnostics.s needed changing because it now
produces a more specific diagnostic about the immediate ranges. One
change in the expected error message is not obvious, but there multiple
candidate and it happens to pick the immediate diagnostic.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295331 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 15:52:22 +00:00
Dan Gohman
8073df7f9a [WebAssembly] Add a cast to void to fix an unused private member warning, for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295327 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 15:21:37 +00:00
Simon Pilgrim
d69a69b212 [X86] Remove local areOnlyUsersOf helper and use SDNode::areOnlyUsersOf instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295326 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 15:11:49 +00:00
Diana Picus
f3d4a249cc [ARM] GlobalISel: Select floating point loads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295321 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 14:10:50 +00:00
Diana Picus
0c9edc1bdb [ARM] GlobalISel: Select G_SEQUENCE and G_EXTRACT
Since they're only used for passing around double precision floating point
values into the general purpose registers, we'll lower them to VMOVDRR and
VMOVRRD.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295310 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 12:19:57 +00:00
Diana Picus
126f155f7f [ARM] GlobalISel: Select double G_FADD and copies
Just use VADDD if available, bail out if not.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295309 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 12:19:52 +00:00
Diana Picus
4a21a19ad4 [ARM] GlobalISel: Assert that we don't use the FPR bank if we don't have VFP
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295308 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 11:25:09 +00:00
Diana Picus
6095db1743 [ARM] GlobalISel: Add reg bank mappings for G_SEQUENCE and G_EXTRACT
Support G_SEQUENCE and G_EXTRACT as needed for passing double precision floating
point values in the soft-fp float mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295306 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 11:00:31 +00:00
Diana Picus
bfc030ced0 [ARM] GlobalISel: Make the FPR bank 64-bit wide
Also add mappings for single and double precision FP, and use them for G_FADD
and G_LOAD.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295302 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 10:12:49 +00:00
Diana Picus
b07be54dc6 [ARM] GlobalISel: Legalize 64-bit G_FADD and G_LOAD
For now we just mark them as legal all the time and let the other passes bail
out if they can't handle it. In the future, we'll want to move more of the
brains into the legalizer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295300 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 09:09:49 +00:00
Diana Picus
cb363f5625 [ARM] GlobalISel: Lower double precision FP args
For the hard float calling convention, we just use the D registers.

For the soft-fp calling convention, we use the R registers and move values
to/from the D registers by means of G_SEQUENCE/G_EXTRACT. While doing so, we
make sure to honor the endianness of the target, since the CCAssignFn doesn't do
that for us.

For pure soft float targets, we still bail out because we don't support the
libcalls yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295295 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 07:53:07 +00:00
Craig Topper
fdf5214704 [AVX-512] Remove masked packss/packus intrinsics and autoupgrade to unmasked intrinsics with select instructions. For 512-bit add new unmasked intrinsics.
The new 512-bit unmasked intrinsics will make it easy to handle these with the SSE/AVX intrinsics in InstCombine where we currently have a TODO.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295290 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 06:31:54 +00:00
Matt Arsenault
61239b090d AMDGPU: Remove llvm.SI.sendmsg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295270 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 02:01:17 +00:00
Matt Arsenault
a0240d6d1a AMDGPU: Remove SI_fs_constant and SI_fs_interp intrinsics
Update test uses with expansion in terms of new intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295269 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 02:01:13 +00:00
Hans Wennborg
b6ae6ad928 [X86] Re-enable conditional tail calls and fix PR31257.
This reverts r294348, which removed support for conditional tail calls
due to the PR above. It fixes the PR by marking live registers as
implicitly used and defined by the now predicated tailcall. This is
similar to how IfConversion predicates instructions.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295262 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 00:04:05 +00:00
Tim Northover
5562e17d88 GlobalISel: legalize va_arg on AArch64.
Uses a Custom implementation because the slot sizes being a multiple of the
pointer size isn't really universal, even for the architectures that do have a
simple "void *" va_list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295255 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-15 23:22:50 +00:00
Matt Arsenault
644ed4d33f AMDGPU: Remove dead node definitions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295247 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-15 22:23:04 +00:00
Matt Arsenault
a93bc6c253 AMDGPU: Consolidate sendmsg/sendmsghalt handling and tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295244 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-15 22:17:09 +00:00
Matt Arsenault
7ee9260067 AMDGPU: Replace assert with report_fatal_error
Also use a more refined condition.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295239 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-15 21:50:34 +00:00
Simon Pilgrim
49096c11cb [X86][SSE] Don't call EltsFromConsecutiveLoads if any element is missing.
Minor performance speedup - if any call to getShuffleScalarElt fails to get a result, don't both calling for the remaining elements as EltsFromConsecutiveLoads will fail anyhow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295235 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-15 21:09:00 +00:00
Ahmed Bougacha
b7583bb8b2 [AArch64] Make am_ldrlit an iPTR - not OtherVT - operand. NFC-ish.
am_ldrlit diverged from am_brcond in r207105, but kept the OtherVT
operand type.  It made sense for branch targets, as those are
represented as MVT::Other in SDAG.  But loads operate on pointers.

This shouldn't have an observable effect on any in-tree code, but helps
make the patterns consistent for external users.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295229 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-15 20:38:31 +00:00
Simon Pilgrim
be2cd40ad4 [X86][SSE] Propagate undef upper elements from scalar_to_vector during shuffle combining
Only do this for integer types currently - floats types (in particular insertps) load folding often fails with this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295208 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-15 17:41:33 +00:00
Stanislav Mekhanoshin
aae13371be [AMDGPU] Revert failed scheduling
This patch reverts region's scheduling to the original untouched state
in case if we have have decreased occupancy.

In addition it switches to use TargetRegisterInfo occupancy callback
for pressure limits instead of gradually increasing limits which were
just passed by. We are going to stay with the best schedule so we do
not need to tolerate worsened scheduling anymore.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295206 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-15 17:19:50 +00:00
Simon Pilgrim
a0d03b22c4 [X86][SSE] Allow matchVectorShuffleWithUNPCK to recognise ZERO inputs
Add support for specifying an UNPCK input as ZERO, particularly improves ZEXT cases with non-zero offsets


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295169 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-15 11:46:15 +00:00
Sagar Thakur
22d520c2ac [LLVM][XRAY][MIPS] Support xray on mips/mipsel/mips64/mips64el
Summary: Adds support for xray instrumentation on mips for both 32-bit and 64-bit.

Reviewed by sdardis, dberris
Differential: D27697


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295164 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-15 10:48:11 +00:00
Ayman Musa
84249f9621 [X86][AVX] Remove REX_W from AVX instructions.
There is no meaning for REX_W in VEX encoded AVX instruction.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295157 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-15 08:12:16 +00:00
Craig Topper
53bbf700f8 [X86] Don't create VBROADCAST nodes with 256-bit or 512-bit input types
Summary:
We don't seem to have great rules on what a valid VBROADCAST node looks like. And as a consequence we end up with a lot of patterns to try to catch everything. We have patterns with scalar inputs, 128-bit vector inputs, 256-bit vector inputs, and 512-bit vector inputs.

As you can see from the things improved here we are currently missing patterns for 128-bit loads being extended to 256-bit before the vbroadcast.

I'd like to propose that VBROADCAST should always take a 128-bit vector type as input. As a first step towards that this patch adds an EXTRACT_SUBVECTOR in front of VBROADCAST when the input is 256 or 512-bits. In the future I would like to add scalar_to_vector around all the scalar operations. And maybe we should consider adding a VBROADCAST+load node to avoid separating loads from the broadcasting operation when the load itself isn't foldable.

This requires an additional change in target shuffle combining to look for the extract subvector and look through it to find the original operand. I'm sure this change isn't perfect but was enough to fix a few test failures that were being caused.

Another interesting thing I noticed is that the changes in masked_gather_scatter.ll show cases were we don't remove a useless insert into element 1 before broadcasting element 0.

Reviewers: delena, RKSimon, zvi

Reviewed By: zvi

Subscribers: igorb, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295155 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-15 06:58:47 +00:00
Craig Topper
fc3e843620 [AVX-512] Add PACKSS/PACKUS instructions to load folding tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295154 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-15 06:51:39 +00:00
Stanislav Mekhanoshin
237ec36765 [AMDGPU] Fix MaxWorkGroupsPerCU for large workgroups
This patch corrects the maximum workgroups per CU if we have big
workgroups (more than 128). This calculation contributes to the
occupancy calculation in respect to LDS size.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295134 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-15 01:03:59 +00:00
Simon Dardis
4bdda62fa0 [mips] Correct mips16 return instructions definitions
Correct the definition of MIPS16 instructions that act as return instructions
so that isReturn = 1 as expected.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295109 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-14 21:53:23 +00:00
Tim Northover
07fb294d72 GlobalISel: deal with new G_PTR_MASK instruction on AArch64.
It's just an AND-immediate instruction for us, surprisingly simple to select.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295104 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-14 20:56:29 +00:00
Krzysztof Parzyszek
4c683e4d66 [Hexagon] Remove leftover debugging code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295078 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-14 17:37:44 +00:00
Diego Novillo
270ca404ab Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295065 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-14 16:39:54 +00:00
Simon Pilgrim
2fce16a04e [X86][SSE] Allow matchVectorShuffleWithUNPCK to recognise UNDEF inputs
Add support for specifying an UNPCK input as UNDEF


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295061 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-14 16:22:04 +00:00
Alexander Timofeev
23db8abf86 Revert "[AMDGPU] Fix for SIMachineScheduler crash. SI Scheduler should track"
This reverts commit ce06d9cb99298eb844b66e117f5108a06747c907.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295054 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-14 14:29:05 +00:00
Simon Pilgrim
ae8ad841a5 [X86][SSE] Move unary inputs handling inside matchVectorShuffleWithUNPCK.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295053 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-14 13:47:17 +00:00