35413 Commits

Author SHA1 Message Date
Colin LeMahieu
b939021544 [Hexagon] Fixing mistaken case fallthrough.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251867 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-03 00:21:19 +00:00
Matt Arsenault
142cd116fa AMDGPU: Stop assuming vreg for build_vector
This was causing a variety of test failures when v2i64
is added as a legal type.

SIFixSGPRCopies should correctly handle the case of vector inputs
to a scalar reg_sequence, so this isn't necessary anymore. This
was hiding some deficiencies in how reg_sequence is handled later,
but this shouldn't be a problem anymore since the register class
copy of a reg_sequence is now done before the reg_sequence.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251860 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-02 23:30:48 +00:00
Derek Schuff
93508f2241 [WebAssembly] Make WebAssemblyCodeGen depend on WebAssemblyAsmPrinter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251859 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-02 23:23:16 +00:00
Matt Arsenault
896d6554cb AMDGPU: Error on graphics shaders with HSA
I've found myself pointlessly debugging problems from running
graphics tests with an HSA triple a few times, so stop this from
happening again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251858 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-02 23:23:02 +00:00
Matt Arsenault
bd96659e08 AMDGPU: Distribute SGPR->VGPR copies of REG_SEQUENCE
Make the REG_SEQUENCE be a VGPR, and do the register class
copy first.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251855 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-02 23:15:42 +00:00
Bill Schmidt
5ae08fa0db [PPC64LE] Properly initialize instr-info in PPCVSXSwapRemoval pass
Replace some hacky code with the proper way to get at this data.

No functional change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251848 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-02 22:43:57 +00:00
Tim Northover
8985f872f1 WatchOS: update default CPU for triple after t2dsp -> dsp rename
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251814 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-02 18:21:07 +00:00
Nemanja Ivanovic
ee10ab5e95 Fix for bootstrap bug introduced in r244921
This revision has introduced an issue that only affects bootstrapped compiler
when it is printing the ASM. It turns out that the new code path taken due to
legalizing a scalar_to_vector of i64 -> v2i64 exposes a missing check in a
micro optimization to change a load followed by a scalar_to_vector into a
load and splat instruction on PPC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251798 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-02 14:01:11 +00:00
Igor Breger
9aaefc3baa AVX512: Implemented encoding and intrinsics for VBROADCASTI32x2 and VBROADCASTF32x2 instructions.
Differential Revision: http://reviews.llvm.org/D14216

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251781 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-02 07:39:36 +00:00
Craig Topper
e242e0c920 [X86] Remove assertions that check for valid scale values on scatter/gather intrinsics. Nothing upstream prevented illegal values from getting here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251780 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-02 07:24:40 +00:00
Craig Topper
0bc7f97b9f [X86] Fold 'if' followed by just an llvm_unreachable into an assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251778 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-02 07:24:34 +00:00
Craig Topper
4ed2813163 [X86] Use isa instead of dyn_cast in a bool context. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251777 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-02 07:24:32 +00:00
Craig Topper
b2005d055a [X86] Remove some llvm_unreachables after switches that already have an unreachable in their default case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251776 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-02 07:24:30 +00:00
Craig Topper
4b0b5887e4 [X86] Remove a 'break' after an llvm_unreachable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251775 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-02 07:24:27 +00:00
Craig Topper
257fc78e07 [X86] Use cast instead of dyn_cast and a null check marked unreachable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251774 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-02 07:24:25 +00:00
Craig Topper
81f6c558d7 [X86] Use MVT instead of EVT when the type is known to be simple. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251772 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-02 05:24:22 +00:00
NAKAMURA Takumi
d40a898651 Untabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251769 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-02 01:38:12 +00:00
Elena Demikhovsky
77ab058bf8 AVX-512: Optimized SIMD truncate operations for AVX512F set.
Optimized <8 x i32> to <8 x i16>
<4 x i64> to < 4 x i32>
<16 x i16> to <16 x i8>
All these oprtrations use now AVX512F set (KNL). Before this change it was implemented with AVX2 set.


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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251764 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-01 11:45:47 +00:00
Craig Topper
76b8f7bc0e [X86] Replace getScalarType with getVectorElementType when the type is already known to be a vector. This should result in slightly less code. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251751 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-31 21:44:52 +00:00
Craig Topper
f56dbe97a7 [X86] Convert to MVT instead of calling EVT functions since we already know the type is simple. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251745 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-31 18:14:17 +00:00
Craig Topper
2bdab3b0b7 [X86] Call getScalarSizeInBits() instead of getScalarType().getScalarSizeInBits(). NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251744 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-31 18:14:15 +00:00
Craig Topper
9a297e1923 [X86] Remove two const references to the return value of a constructor and just use normal object creation syntax. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251743 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-31 17:28:02 +00:00
Craig Topper
f042791677 [X86] Replace EVT with MVT in some more places. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251742 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-31 17:27:59 +00:00
Craig Topper
7a8ae34723 [X86] Fix indentation of case statements in switch. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251741 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-31 17:27:56 +00:00
Craig Topper
2d7d45bb20 [X86] Reduce math for index calculation for inserting and extracting subvectors and elements by exploiting the fact that all supported vector types have a power 2 number of elements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251740 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-31 17:27:52 +00:00
JF Bastien
677d6a3a87 [WebAssembly] Fix import statement
Summary:
Imports should be generated like (param i32 f32...) not (param i32) (param f32) ...

Author: binji
Reviewers: jfb
Subscribers: jfb, dschuff

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251714 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-30 16:41:21 +00:00
Craig Topper
63aaa1e62a [X86] Use is128BitVector/is256BitVector/is512BitVector in place of getSizeInBits == in some places. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251687 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-30 04:31:18 +00:00
Craig Topper
9c17547123 [X86] Minor formatting fixes. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251686 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-30 04:31:14 +00:00
Craig Topper
e05ab11150 [X86] Use MVT instead of EVT in some places. NFC
Prior to this the compiled code probably had extra checks for extended types that won't ever execute.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251682 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-30 03:19:12 +00:00
Simon Pilgrim
d63f887b3e [X86][SSE] Shuffle blends with zero
This patch generalizes the zeroing of vector elements with the BLEND instructions. Currently a zero vector will only blend if the shuffled elements are correctly inline, this patch recognises when a vector input is zero (or zeroable) and modifies a local copy of the shuffle mask to support a blend. As a zeroable vector input may not be all zeroes, the zeroable vector is regenerated if necessary.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251659 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-29 22:11:28 +00:00
Jonas Paulsson
ea81d62d37 [SystemZ] Make the CCRegs regclass non-allocatable.
This was discovered to be necessary while running memchr-01.ll with
-verify-machinstrs, because it is not allowed to have a phys reg live
accross block boundaries while on SSA form, if the register is
allocatable (expect in entry block and landing pads).

In this test case, stringRRE pseudos are expanded after isel by adding
a loop block which produces a live out CC register. To make the test
pass, it was also necessary to not say that StringRRELoop pseudo uses
R0L, this is only true for the StringRRE opcode.

-verify-machineinstrs added to memchr-01.ll test.

New test case int-cmp-51.ll to test that MachineCSE can eliminate
an identical compare (which it couldn't do before).

Reviewed by Ulrich Weigand

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251634 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-29 16:13:55 +00:00
Marek Olsak
40e7b16d54 AMDGPU/SI: handle undef for llvm.SI.packf16
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251632 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-29 15:29:09 +00:00
Marek Olsak
595eb2bbd1 AMDGPU/SI: use S_OR for fneg (fabs f32)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251631 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-29 15:29:05 +00:00
Marek Olsak
bbc32e3efd AMDGPU/SI: use S_AND for i1 trunc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251630 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-29 15:05:03 +00:00
Zoran Jovanovic
1a6d92e562 [mips] wrong opcode for ll/sc instructions on mipsr6 when -integrated-as is used
Summary:
This commit resolves wrong opcodes for ll and sc instructions for r6 architecutres, which were generated in method MipsTargetLowering::emitAtomicBinary.

Author: Jelena.Losic

Reviewers: dsanders

Subscribers: dsanders, llvm-commits

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251629 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-29 14:40:19 +00:00
Artyom Skrobov
775c498599 Recognize that ARM1176JZ[F]-S support TrustZone
Summary:
ARMv6KZ cores were set up incorrectly in ARM.td; also, the SMI mnemonic
(the old name for SMC, as defined in ARMv6KZ) wasn't supported.

Reviewers: jmolloy, rengolin

Subscribers: aemerson, rengolin, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251627 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-29 13:56:19 +00:00
Vasileios Kalintiris
8bbd2ffc7c [mips] Check the register class before replacing materializations of zero with $zero in microMIPS.
Summary:
The microMIPS register class GPRMM16 does not contain the $zero register.
However, MipsSEDAGToDAGISel::replaceUsesWithZeroReg() would replace uses
of the $dst register:

  [d]addiu, $dst, $zero, 0

with the $zero register, without checking for membership in the register
class of the target machine operand.

Reviewers: dsanders

Subscribers: llvm-commits, dsanders

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251622 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-29 10:17:16 +00:00
JF Bastien
0c4ea613c4 [WebAssembly] Update opcode name format for conversions
Summary:
Conversion opcode name format should be f64.convert_u/i64 not f64_convert_u

Author: s3ththompson
Reviewers: jfb
Subscribers: sunfish, jfb, llvm-commits, dschuff
Differential Revision: http://reviews.llvm.org/D14160

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251613 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-29 04:10:52 +00:00
Benjamin Kramer
348dec3280 Remove CRLF line endings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251594 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-29 02:33:05 +00:00
Hal Finkel
b93a3a1757 [PowerPC] Recurse through constants when looking for TLS globals
We cannot form ctr-based loops around function calls, including calls to
__tls_get_addr used for PIC TLS variables. References to such TLS variables,
however, might be buried within constant expressions, and so we need to search
the entire constant expression to be sure that no references to such TLS
variables exist.

Fixes PR25256, reported by Eric Schweitz. This is a slightly-modified version
of the patch suggested by Eric in the bug report, and a test case I created.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251582 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-28 23:43:00 +00:00
Hal Finkel
75c3afbe05 [PowerPC] Don't return unsupported register classes for asm constraints
As a follow-up to r251566, do the same for the other optionally-supported
register classes (mostly for vector registers). Don't return an unavailable
register class (which would cause an assert later), but fail cleanly when
provided an unsupported inline asm constraint.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251575 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-28 23:03:45 +00:00
Tim Northover
ed754ee4a7 ARM: add support for WatchOS's compact unwind information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251573 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-28 22:56:36 +00:00
Tim Northover
7b7ff9e152 ARM: teach backend about WatchOS and TvOS libcalls.
The most substantial changes are again for watchOS: libcalls are hard-float if
needed and sincos has a different calling convention.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251571 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-28 22:51:16 +00:00
Tim Northover
26541ec6e9 ARM: add backend support for the ABI used in WatchOS
At the LLVM level this ABI is essentially a minimal modification of AAPCS to
support 16-byte alignment for vector types and the stack.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251570 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-28 22:46:43 +00:00
Tim Northover
856a038026 ARM: support .watchos_version_min and .tvos_version_min.
These MachO file directives are used by linkers and other tools to provide
compatibility information, much like the existing .ios_version_min and
.macosx_version_min.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251569 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-28 22:36:05 +00:00
Hal Finkel
16624bec2f [PowerPC] Cleanly reject asm crbit constraint with -crbits
When crbits are disabled, cleanly reject the constraint (return the register
class only to cause an assert later).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251566 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-28 22:25:52 +00:00
Cong Hou
76481a8326 [X86] A small fix in X86/X86TargetTransformInfo.cpp: check a value type is simple before calling getSimpleVT().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251538 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-28 18:15:46 +00:00
Artyom Skrobov
d024add676 [ARM] Allow SP in rGPR, starting from ARMv8
Summary:
This patch handles assembly and disassembly, but not codegen, as of yet.

Additionally, it fixes a bug whereby SP and PC as shifted-reg operands
were treated as predictable in ARMv7 Thumb; and it enables the tests
for invalid and unpredictable instructions to run on both ARMv7 and ARMv8.

Reviewers: jmolloy, rengolin

Subscribers: aemerson, rengolin, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251516 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-28 13:58:36 +00:00
Benjamin Kramer
52482cc241 Put global classes into the appropriate namespace.
Most of the cases belong into an anonymous namespace. No
functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251515 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-28 13:54:36 +00:00
Hrvoje Varga
c0d607b9ac [mips][microMIPS] Implement PAUSE, RDHWR, RDPGPR, SDBBP, SSNOP, SYNC, SYNCI and WAIT instructions
Differential Revision: http://reviews.llvm.org/D12628


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251510 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-28 11:04:29 +00:00