35954 Commits

Author SHA1 Message Date
Dan Gohman
079d48b39e [WebAssembly] Make WebAssemblyStoreResults only return true when it has a change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255253 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10 14:17:36 +00:00
Dan Gohman
5b3101aa98 [WebAssembly] Fix WebAssemblyPeephole to set Changed to true when making changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255252 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10 14:16:34 +00:00
Dan Gohman
9e8e46050a [WebAssembly] Declare that WebAssemblyPeephole does not modify the CFG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255251 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10 14:12:04 +00:00
Dan Gohman
4dc8c1b7ed [WebAssembly] Remove an unneeded getAnalysisUsage override.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255250 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10 14:10:04 +00:00
Nemanja Ivanovic
1c23594d2c Bitcasts between FP and INT values using direct moves
This patch corresponds to review:
http://reviews.llvm.org/D15286

LLVM IR frequently contains bitcast operations between floating point and
integer values of the same width. Doing this through memory operations is
quite expensive on PPC. This patch allows the use of direct register moves
between FPRs and GPRs for lowering bitcasts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255246 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10 13:35:28 +00:00
Jonas Paulsson
92969682ea [PostRA scheduling] Allow a target to do scheduling when it wants post RA.
SystemZ needs to do its scheduling after branch relaxation, which can
only happen after block placement, and therefore the standard
PostRAScheduler point in the pass sequence is too early.

TargetMachine::targetSchedulesPostRAScheduling() is a new method that
signals on returning true that target will insert the final scheduling
pass on its own.

Reviewed by Hal Finkel

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255234 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10 09:10:07 +00:00
Craig Topper
224a9299ff [X86] Fix a couple cases were bitwise and logical operations were being mixed. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255224 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10 06:09:41 +00:00
Dan Gohman
54fd4d4360 [WebAssembly] Implement mixed-type ISD::FCOPYSIGN.
ISD::FCOPYSIGN permits its operands to have differing types, and DAGCombiner
uses this. Add some def : Pat rules to expand this out into an explicit
conversion and a normal copysign operation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255220 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10 04:55:31 +00:00
Dan Gohman
cc39a6efb8 [WebAssembly] Implement fma.
It is lowered to a libcall for now, but this is expected to change in the future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255219 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10 04:52:33 +00:00
Tom Stellard
7e9bd658a7 AMDGPU/SI: Fix warning introduced by r255204
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255205 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10 03:10:46 +00:00
Tom Stellard
7d2a810fef AMDGPU/SI: Emit constant arrays in the .text section
Summary:
This allows us to remove the END_OF_TEXT_LABEL hack we had been using
and simplifies the fixups used to compute the address of constant
arrays.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255204 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10 02:13:01 +00:00
Tom Stellard
6052acda66 AMDGPU/SI: Add support for sgpr and vgpr inline assembly constraints
Summary: The 's' constraint represents sgprs and the 'v' constraint represents vgprs.

Reviewers: arsenm, echristo

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255203 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10 02:12:53 +00:00
Dan Gohman
b2d324bc23 [WebAssembly] Fix legalization of f32->f64 EXTLOAD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255202 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10 02:07:53 +00:00
Derek Schuff
b4fe333388 [WebAssembly] Update known test failures
We can now select sign_extend_inreg

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255197 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10 01:09:40 +00:00
Dan Gohman
3384127652 [WebAssembly] Also legalize sign_extend_inreg of i32->i64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255191 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10 01:00:19 +00:00
Derek Schuff
0c2c493a1d [WebAssembly] Update test failure expectations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255190 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10 00:56:18 +00:00
Dan Gohman
a796bb8e0a [WebAssembly] Fix legalization of shift operators with illegal types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255181 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10 00:26:26 +00:00
Dan Gohman
f39d8644fa [WebAssembly] Fix copy+pastos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255180 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10 00:22:40 +00:00
Dan Gohman
492f1085a4 [WebAssembly] Implement anyext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255179 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10 00:17:35 +00:00
Quentin Colombet
d110e2b4a3 [X86] Enable shrink-wrapping by default, but keep it disabled for stack frames
without a frame pointer when unwind may happen.
This is a workaround for a bug in the way we emit the CFI directives for
frameless unwind information. See PR25614.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255175 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-09 23:08:18 +00:00
Dan Gohman
4c8fe28374 [WebAssembly] Reintroduce ARGUMENT moving logic
Reinteroduce the code for moving ARGUMENTS back to the top of the basic block.
While the ARGUMENTS physical register prevents sinking and scheduling from
moving them, it does not appear to be sufficient to prevent SelectionDAG from
moving them down in the initial schedule. This patch introduces a patch that
moves them back to the top immediately after SelectionDAG runs.

This is still hopefully a temporary solution. http://reviews.llvm.org/D14750 is
one alternative, though the review has not been favorable, and proposed
alternatives are longer-term and have other downsides.

This fixes the main outstanding -verify-machineinstrs failures, so it adds
-verify-machineinstrs to several tests.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255125 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-09 16:23:59 +00:00
Tim Northover
6d8e50b6e2 ARM: don't use a deleted node as the BaseReg in complex pattern.
We mutated the DAG, which invalidated the node we were trying to use
as a base register. Sometimes we got away with it, but other times the
node really did get deleted before it was finished with.

Should fix PR25733

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255120 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-09 15:54:50 +00:00
JF Bastien
fecb71a6a4 WebAssembly: add missing failure to the list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255119 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-09 15:52:57 +00:00
Oliver Stannard
43ecf2d4d1 [AArch64] Fix FP16 vector instructions that should only accept low registers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255113 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-09 14:32:11 +00:00
Daniel Sanders
43638210b8 [mips][ias] Range check uimm10 operands
Summary:

Reviewers: vkalintiris

Subscribers: dsanders, llvm-commits

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255112 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-09 13:48:05 +00:00
JF Bastien
f58b104ec7 WebAssembly: add known failures
The bots are now running the torture tests properly. Bin all failures from the GCC C torture tests so that we can tackle failures and make the tree go red on regressions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255111 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-09 13:29:32 +00:00
Vasileios Kalintiris
b204acc525 [mips] Use multiclass patterns for f32/f64 comparisons and i32 selects.
Summary:
Although the multiclass for i32 selects might seem redundant as it has
only one instantiation, we will use it to replace the correspondent
patterns in Mips64r6InstrInfo.td in follow-up commits.

Reviewers: dsanders

Subscribers: llvm-commits, dsanders

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255110 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-09 13:24:22 +00:00
Zlatko Buljan
d2c7ea53a6 Revert r254897 "[mips][microMIPS] Implement LH, LHE, LHU and LHUE instructions"
Commited patch was intended to implement LH, LHE, LHU and LHUE instructions.
After commit test-suite failed with error message in the form of:
fatal error: error in backend: Cannot select: t124: i32,ch = load<LD2[%d](tbaa=<0x94acc48>), sext from i16> t0, t2, undef:i32
For that reason I decided to revert commit r254897 and make new patch which besides implementation and standard regression tests will also have dedicated tests (CodeGen) for the above error. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255109 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-09 13:07:45 +00:00
Ahmed Bougacha
65422bf239 [AArch64][ARM] Don't base interleaved op legality on type alloc size.
Otherwise, we think that most types that look like they'd fit in a
legal vector type are legal (so, basically, *any* vector type with a
size between 33 and 128 bits, I think, since we use pow2 alignment;
e.g., v2i25, v3f32, ...).

DataLayout::getTypeAllocSize rounds up based on alignment.
When checking for target intrinsic legality, that's not what we want:
if rounding makes a difference, the type isn't legal, and the
target intrinsics shouldn't be used, as they are always assumed legal.

One could make the argument that alloc size is ultimately the most
relevant here, since we're dealing with LD/ST intrinsics. That's only
true if we did legalize them though; that's a problem for another day.

Use DataLayout::getTypeSizeInBits instead of getTypeAllocSizeInBits.
Type::getSizeInBits can't be used because that'd gratuitously break
pointer vector support.

Some of these uses are currently fine, because we only hit them when
the type is already known legal (e.g., r114454). Update them for
consistency. It's faster to avoid the rounding anyway!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255089 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-09 01:19:50 +00:00
Vyacheslav Klochkov
a23ddb7891 X86-FMA3: Defined the ExeDomain property for Scalar FMA3 opcodes.
Reviewer: Simon Pilgrim.
Differential Revision: http://reviews.llvm.org/D15317


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255080 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-09 00:12:13 +00:00
Pirama Arumuga Nainar
46994bcf9c Define selection for v4f16, v8f16 scalar_to_vector
Summary:
This fixes failure when trying to select
    insertelement <4 x half> undef, half %a, i64 0
which gets transformed to a scalar_to_vector node.

The accompanying v4 and v8 tests fail instruction selection without this
patch.

Reviewers: ab, jmolloy

Subscribers: srhines, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255072 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-08 23:07:06 +00:00
Simon Pilgrim
029bc0f70a [X86][AVX] Fold loads + splats into broadcast instructions
On AVX and AVX2, BROADCAST instructions can load a scalar into all elements of a target vector.

This patch improves the lowering of 'splat' shuffles of a loaded vector into a broadcast - currently the lowering only works for cases where we are splatting the zero'th element, which is now generalised to any element.

Fix for PR23022

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255061 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-08 22:17:11 +00:00
Artyom Skrobov
d10549743a Fix ARMv4T (Thumb1) epilogue generation
Summary:
Before ARMv5T, Thumb1 code could not pop PC, as described at D14357 and D14986;
so we need the special fixup in the epilogue.

Reviewers: jroelofs, qcolombet

Subscribers: aemerson, llvm-commits, rengolin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255047 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-08 19:59:01 +00:00
Tim Northover
81bf65619f X86: produce more friendly errors during MachO relocation handling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255036 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-08 18:31:35 +00:00
Renato Golin
a0beb06ac9 [ARM] Allowing SP/PC for AND/BIC mod_imm_not
AND/BIC instructions do accept SP/PC, so the register class should be
more generic (rGPR -> GPR) to cope with that case. Adding more tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255034 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-08 18:10:58 +00:00
Ron Lieberman
b691e2ed74 [Hexagon] Add NewValueJump support for C4_cmpneq, C4_cmplte, C4_cmplteu
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255027 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-08 16:28:32 +00:00
Daniel Sanders
fd031a51c3 [mips][ias] Range check uimm8 operands
Summary:

Reviewers: vkalintiris

Subscribers: llvm-commits, dsanders

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255018 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-08 14:42:10 +00:00
Daniel Sanders
5a34e2eef2 [mips][ias] Range check uimm6 operands and fix a bug this revealed.
Summary:
We don't check the size operand on ext/dext*/ins/dins* yet because the
permitted range depends on the pos argument and we can't check that using
this mechanism.

The bug was that dextu/dinsu accepted 0..31 in the pos operand instead of 32..63.

Reviewers: vkalintiris

Subscribers: llvm-commits, dsanders

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255015 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-08 13:49:19 +00:00
Oliver Stannard
59ad77e46e [AArch64] Add ARMv8.2-A FP16 vector instructions
ARMv8.2-A adds 16-bit floating point versions of all existing SIMD
floating-point instructions. This is an optional extension, so all of
these instructions require the FeatureFullFP16 subtarget feature.

Note that VFP without SIMD is not a valid combination for any version of
ARMv8-A, but I have ensured that these instructions all depend on both
FeatureNEON and FeatureFullFP16 for consistency.

The ".2h" vector type specifier is now legal (for the scalar pairwise
reduction instructions), so some unrelated tests have been modified as
different error messages are emitted. This is not a problem as the
invalid operands are still caught.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255010 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-08 12:16:10 +00:00
Dan Gohman
4474471834 [WebAssembly] Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254999 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-08 03:43:03 +00:00
Dan Gohman
ca9fa31c8c [WebAssembly] Remove an unneeded static_cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254998 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-08 03:42:50 +00:00
Dan Gohman
7710c66ebd [WebAssembly] Fix an emacs syntax highlighting comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254997 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-08 03:36:00 +00:00
Dan Gohman
1acb0660c3 [WebAssembly] Convert a file-level comment to doxygen style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254996 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-08 03:33:51 +00:00
Dan Gohman
55a29f75fd [WebAssembly] Assert MRI.isSSA() in passes that depend on SSA form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254995 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-08 03:30:42 +00:00
Dan Gohman
579ccfd983 [WebAssembly] Trim some unneeded #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254994 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-08 03:25:35 +00:00
Dan Gohman
c2d82ef29f [WebAssembly] Remove the override of haveFastSqrt.
The default implementation in BasicTTI already checks TLI and does
the right thing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254993 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-08 03:22:33 +00:00
Manman Ren
23ae772671 [CXX TLS calling convention] Add support for AArch64.
rdar://9001553


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254978 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-08 00:14:38 +00:00
Kit Barton
4e2c148ec8 [PPC64] Convert bool literals to i32
Convert i1 values to i32 values if they should be allocated in GPRs instead of CRs.

Phabricator: http://reviews.llvm.org/D14064

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254942 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 20:50:29 +00:00
Sanjay Patel
3317c77cea don't repeat function names in comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254930 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 19:31:34 +00:00
Sanjay Patel
322ee9e421 fix 'the the '; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254928 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 19:21:39 +00:00