1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

113554 Commits

Author SHA1 Message Date
Chandler Carruth
fa7b9ba328 [x86] Teach the shuffle mask equivalence test to look through build
vectors and detect equivalent inputs.

This lets the code match unpck-style instructions when only one of the
inputs are lined up but the other input is a splat and so which lanes we
pull from doesn't matter. Today, this doesn't really happen, but just by
accident. I have a patch that normalizes how we shuffle splats, and with
that patch this will be necessary for a lot of the mask equivalence
tests to work.

I don't really know how to write a test case for this specific change
until the other change lands though.

llvm-svn: 229307
2015-02-15 12:07:55 +00:00
Chandler Carruth
941ec691e8 [x86] Tweak the ordering of unpack matching vs. element insertion, and
don't try to do element insertion for non-zero-index floating point
vectors.

We don't have any useful patterns or lowering for element insertion into
high elements of a floating point vector, and the generic shuffle
lowering will end up being better -- namely it will fall back to unpck.
But we should try to handle other forms of element insertion before
matching unpck patterns.

While this doesn't matter much right now, I'm working on a patch that
makes unpck matching much more powerful, and that patch will break
without this re-ordering.

llvm-svn: 229306
2015-02-15 12:01:14 +00:00
Arnaud A. de Grandmaison
1c6984dc94 [PBQP] Assert conservativelly allocatable nodes are spilled by choice.
llvm-svn: 229302
2015-02-15 10:35:31 +00:00
Chandler Carruth
1d8146cec4 [x86] Stop shuffling zero vectors. =]
I was somewhat surprised this pattern really came up, but it does. It
seems better to just directly handle it than try to special case every
place where we end up forming a shuffle that devolves to a shuffle of
a zero vector.

llvm-svn: 229301
2015-02-15 10:34:52 +00:00
Chandler Carruth
c868c80ecb [x86] Use a more helpful parenthesizing of these comparisons. Silences
a -Wparentheses complaint from GCC.

llvm-svn: 229300
2015-02-15 10:15:20 +00:00
Chandler Carruth
5c0c778648 [x86] When splitting 256-bit vectors into 128-bit vectors, don't extract
subvectors from buildvectors. That doesn't really make any sense and it
breaks all of the down-stream matching of buildvectors to cleverly lower
shuffles.

With this, we now get the shift-based lowering of 256-bit vector
shuffles with AVX1 when we split them into 128-bit vectors. We also do
much better on the zero-extension patterns, although there remains quite
a bit of room for improvement here.

llvm-svn: 229299
2015-02-15 10:12:02 +00:00
Chandler Carruth
5cf2555d91 [x86] Make computing the zeroable elements slightly more powerful, at
least in theory.

I don't actually have a test case that benefits from this, but
theoretically, it could come up, and I don't want to try to think about
whether this is the culprit or something else is, so I'd rather just
make this code powerful. =/ Makes me sad that I can't really test it
though.

llvm-svn: 229298
2015-02-15 09:33:36 +00:00
Michael Kuperstein
c9049f9057 gold-plugin: fix test to allow default visibility on local symbols
GNU ld sets default, not hidden, visibility on local symbols. 
Having default or hidden visibility on local symbols makes no difference in run-time behavior.

Patch by: H.J. Lu <hjl.tools@gmail.com>

llvm-svn: 229297
2015-02-15 09:32:30 +00:00
Chandler Carruth
65b90c2fa8 [x86] Update some tests with the latest version of my script and llc.
This mostly adds some shuffle decode comments and cleans up indentation.

llvm-svn: 229296
2015-02-15 09:26:15 +00:00
Chandler Carruth
8b98b98e16 [x86] Add a slight variation on some of the other generic shuffle
lowerings -- one which decomposes into an initial blend followed by
a permute.

Particularly on newer chips, blends are handled independently of
shuffles and so this is much less bottlenecked on the single port that
floating point shuffles are executed with on Intel.

I'll be adding this lowering to a bunch of other code paths in
subsequent commits to handle still more places where we can effectively
leverage blends when they're available in the ISA.

llvm-svn: 229292
2015-02-15 08:26:30 +00:00
Elena Demikhovsky
79bb080d9c Enabled cost calculation for masked memory operations.
We already have implementation for cost calculation for
masked memory operations. I just call it from the loop vectorizer.

llvm-svn: 229290
2015-02-15 08:08:48 +00:00
Craig Topper
be42a00218 [X86] Add assembly parser support for mnemonic aliases for AVX-512 vpcmp instructions.
llvm-svn: 229287
2015-02-15 07:13:48 +00:00
Chandler Carruth
85a4ad9fb4 [x86] Add a test case for PR22390 which was a dup of PR22377 and fixed
by r229285. This is a nice different test case though, so I'd like to
have the extra testing of these kinds of patterns.

llvm-svn: 229286
2015-02-15 07:05:50 +00:00
Chandler Carruth
6153ae3921 [x86] Fix PR22377, a regression with the new vector shuffle legality
test.

This was just a matter of the DAG combine for vector shuffles being too
aggressive. This is a bit of a grey area, but I think generally if we
can re-use intermediate shuffles, we should. Certainly, given the test
cases I have available, this seems like the right call.

llvm-svn: 229285
2015-02-15 07:01:10 +00:00
Chandler Carruth
635ad2f50d [x86] Switch a collection of tests explicitly to the new vector shuffle
legality test (essentially, everything is legal).

I'm planning to make this the default shortly, but I'd like to fix
a collection of the bugs it exposes first, and this will let me easily
test them. It also showcases both the improvements and a few of the
regressions triggered by the change. The biggest improvements by far are
the significantly reduced shuffling and domain crossing in the combining
test case. The biggest regressions are missing some clever blending
patterns.

llvm-svn: 229284
2015-02-15 06:37:21 +00:00
Chandler Carruth
83f63dfef3 [x86] Remove the now-default-on flag for the new vector shuffle lowering
strategy from a bunch of tests.

llvm-svn: 229283
2015-02-15 06:20:51 +00:00
Craig Topper
e9ad59aeaf [X86] Add assembler predicates for the rest of the AVX512 feature flags. This makes the assembly matching consistent across all AVX512 instructions. Without this we were allowing some AVX512 instructions to be parsed always, but not the foundation instructions.
llvm-svn: 229280
2015-02-15 04:54:55 +00:00
Craig Topper
dc76cc8405 [X86] Add the remaining 11 possible exact ModRM formats. This makes their encodings linear which can then be used to simplify some other code.
llvm-svn: 229279
2015-02-15 04:16:44 +00:00
David Blaikie
9f95d71989 FileCheck-ize a test to make it easier to migrate to typeless pointers
llvm-svn: 229278
2015-02-15 04:14:00 +00:00
David Blaikie
d4624d6acc Update a test to make it easier to migrate to untyped pointers
llvm-svn: 229277
2015-02-15 04:13:58 +00:00
David Blaikie
ddfea60e4d Update a test to use FileCheck so it's easier to migrate to future typeless pointer changes
llvm-svn: 229276
2015-02-15 04:13:57 +00:00
David Blaikie
d5022c864c Reformat test case to be easier to migrate to typeless pointers.
llvm-svn: 229275
2015-02-15 04:13:53 +00:00
Chandler Carruth
03e6ddc10c [x86] Teach my test updating script about another quirk of the printed
asm and port the mmx vector shuffle test to it.

Not thrilled with how it handles the stack manipulation logic, but I'm
much less bothered by that than I am by updating the test manually. =]
If anyone wants to teach the test checks management script about stack
adjustment patterns, that'd be cool too.

llvm-svn: 229268
2015-02-15 00:08:01 +00:00
Simon Pilgrim
df7da0ee6e [X86][XOP] Enable commutation for XOP instructions
Patch to allow XOP instructions (integer comparison and integer multiply-add) to be commuted. The comparison instructions sometimes require the compare mode to be flipped but the remaining instructions can use default commutation modes.

This patch also sets the SSE domains of all the XOP instructions.

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

llvm-svn: 229267
2015-02-14 22:40:46 +00:00
Craig Topper
aadc93bf08 [X86] Improve parsing support AVX/SSE floating point compare instruction mnemonic aliases. They'll now print with the alias the parser received instead of converting to the explicit immediate form.
llvm-svn: 229266
2015-02-14 21:54:03 +00:00
Ramkumar Ramachandra
af4f23c6ae InstCombine: propagate deref via new addDereferenceableAttr
The "dereferenceable" attribute cannot be added via .addAttribute(),
since it also expects a size in bytes. AttrBuilder#addAttribute or
AttributeSet#addAttribute is wrapped by classes Function, InvokeInst,
and CallInst. Add corresponding wrappers to
AttrBuilder#addDereferenceableAttr.

Having done this, propagate the dereferenceable attribute via
gc.relocate, adding a test to exercise it. Note that -datalayout is
required during execution over and above -instcombine, because
InstCombine only optionally requires DataLayoutPass.

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

llvm-svn: 229265
2015-02-14 19:37:54 +00:00
Duncan P. N. Exon Smith
2c6654d226 Target: Canonicalize access to function attributes, NFC
Canonicalize access to function attributes to use the simpler API.

getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind)
  => getFnAttribute(Kind)

getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind)
  => hasFnAttribute(Kind)

llvm-svn: 229261
2015-02-14 15:36:52 +00:00
Duncan P. N. Exon Smith
317d1b73cd NVPTX: Canonicalize access to function attributes, NFC
Canonicalize access to function attributes to use the simpler API.

getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind)
  => getFnAttribute(Kind)

getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind)
  => hasFnAttribute(Kind)

llvm-svn: 229260
2015-02-14 15:35:43 +00:00
Andrea Di Biagio
d0ba37a3e6 [optnone] Skip pass Constant Hoisting on optnone functions.
Added test CodeGen/X86/constant-hoisting-optnone.ll to verify that
pass Constant Hoisting is not run on optnone functions.

llvm-svn: 229258
2015-02-14 15:11:48 +00:00
Simon Pilgrim
a54a8084e8 [X86] Ensure integer domain on scalar load/store stack folding tests. NFC
llvm-svn: 229257
2015-02-14 14:10:44 +00:00
Simon Pilgrim
a1ef8537d2 Line ending fix. NFC.
llvm-svn: 229256
2015-02-14 13:27:53 +00:00
Chandler Carruth
735d694283 [gold] Consolidate the gold plugin options and actually search for
a gold binary explicitly. Substitute this binary into the tests rather
than just directly executing the 'ld' binary.

This should allow folks to inject a cross compiling gold binary, or in
my case to use a gold binary built and installed somewhere other than
/usr/bin/ld. It should also allow the tests to find 'ld.gold' so that
things work even if gold isn't the default on the system.

I've only stubbed out support in the makefile to preserve the existing
behavior with none of the fancy logic. If someone else wants to add
logic here, they're welcome to do so.

llvm-svn: 229251
2015-02-14 09:43:57 +00:00
Chandler Carruth
089a46756b Remove a variable only used in an assert and sink its initializer into
the assert. Fixes -Wunused-variable on non-asserts builds.

llvm-svn: 229250
2015-02-14 09:14:44 +00:00
Chandler Carruth
3630f2ba2d Back out two accidental changes that snuck in with r229245. Sorry these
snuck in, they weren't ready for prime time and had *nothing* to do
with that commit.

llvm-svn: 229248
2015-02-14 09:05:58 +00:00
Chandler Carruth
4f134e940d [lit] Make the gold plugin support testing work with a python3
interpreter. Seems that's a better path than pinning to python2.7.

Thanks to Justin for prodding me toward a fix. =]

llvm-svn: 229247
2015-02-14 09:05:56 +00:00
Chandler Carruth
24dcfa7652 Revert r229224: Make the 'llvm-lit' utility defend against a system where Python3
Apparantly python2.7 also doesn't work. Awesome.

llvm-svn: 229245
2015-02-14 07:11:25 +00:00
Chandler Carruth
062f9a81a9 [lit] Make the 'llvm-lit' utility defend against a system where Python3
is the default.

The lit.cfg files are not all valid Python3 and I've no idea if anyone
is really prepared to update them. The easiest way I know of to ensure
that this script uses Python 2 is to use 'python2.7' in the command. Mac
and Linux are definitely fine with this and I think other platforms will
be as well, but if anyone struggles with this set up and has better
ideas, let me know.

llvm-svn: 229244
2015-02-14 07:05:15 +00:00
Richard Smith
a95b03186b [modules] Try harder to stop DebugInfo/PDB/DIA being built if not available.
llvm-svn: 229243
2015-02-14 05:54:56 +00:00
Matt Arsenault
508c2e2382 R600/SI: Implement correct f64 fdiv
This version passes the OpenCL conformance test.

llvm-svn: 229239
2015-02-14 04:30:08 +00:00
Matt Arsenault
7955f656e8 R600/SI: Use complex operand folding for div_scale
llvm-svn: 229238
2015-02-14 04:24:28 +00:00
Matt Arsenault
d03c0adada R600/SI: Add tests for div_fmas with inline immediate operands
llvm-svn: 229237
2015-02-14 04:22:02 +00:00
Matt Arsenault
9c682e9039 R600/SI: Fix implicit vcc operand to v_div_fmas_*
This should allow finally fixing the f64 fdiv implementation.

Test is disabled for VI since there seems to be a problem with one
of the buffer load instructions on it.

llvm-svn: 229236
2015-02-14 04:22:00 +00:00
Matt Arsenault
70c438bf73 R600/SI: Fix schedule model for v_div_scale_{f32|f64}
llvm-svn: 229235
2015-02-14 04:03:18 +00:00
Matt Arsenault
cbb2f8b24d R600/SI: Really fix size of VReg_1
llvm-svn: 229234
2015-02-14 03:54:32 +00:00
Matt Arsenault
ad4ed3f463 R600/SI: Rename encoding field to match docs for VOP3b
llvm-svn: 229233
2015-02-14 03:54:29 +00:00
Zachary Turner
ee319cd955 llvm-pdbdump: Only dump whitelisted global symbols.
Dumping the global scope contains a lot of very uninteresting
things and is generally polluted with a lot of random junk.
Furthermore, it dumps values unsorted, making it hard to read.
This patch dumps known interesting types only, and as a side
effect sorts the list by symbol type.

llvm-svn: 229232
2015-02-14 03:54:28 +00:00
Zachary Turner
3145a0d73d llvm-pdbdump: Re-order header files according to LLVM style guide.
llvm-svn: 229231
2015-02-14 03:53:56 +00:00
Matt Arsenault
ff22fe9dd3 R600/SI: Fix not encoding src2 for v_div_scale_{f32|f64}
This apparently got lost in the VI changes.

llvm-svn: 229230
2015-02-14 03:40:35 +00:00
Matt Arsenault
89584f899a R600/SI: Fix VOP3b encoding on VI
llvm-svn: 229228
2015-02-14 03:02:23 +00:00
Matt Arsenault
a23cdb45f6 R600/SI: Fix phys reg copies in SIFoldOperands
llvm-svn: 229227
2015-02-14 02:55:57 +00:00