OSDN Git Service
David Majnemer [Mon, 16 Feb 2015 08:41:08 +0000 (08:41 +0000)]
AsmParser: Make sure GlobalVariables have sane types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229364
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 16 Feb 2015 08:38:03 +0000 (08:38 +0000)]
AsmParser: Reject alloca with function type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229363
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 16 Feb 2015 08:22:35 +0000 (08:22 +0000)]
Switch our index sequence away from template aliases and just use
classes. We can't use template aliases because on MSVC they don't appear
to work correctly in the common usage such as Format.h.
Many thanks to Zach for doing all the testing and debugging here. I just
slotted the fix into the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229362
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 16 Feb 2015 08:14:22 +0000 (08:14 +0000)]
Verifier: Diagnose module flags which have null ID operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229361
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 16 Feb 2015 06:29:06 +0000 (06:29 +0000)]
[X86] Add support for lowering shuffles to 256-bit PALIGNR instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229359
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 16 Feb 2015 06:29:02 +0000 (06:29 +0000)]
[X86] Remove some hard tab characters from tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229358
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 16 Feb 2015 06:04:53 +0000 (06:04 +0000)]
DebugInfo: Don't crash if 'Debug Info Version' has a strange value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229356
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 16 Feb 2015 05:41:55 +0000 (05:41 +0000)]
DataLayout: Validate that the pref alignment is at least the ABI align
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229355
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 16 Feb 2015 05:41:53 +0000 (05:41 +0000)]
DataLayout: Report when the datalayout type alignment/width is too large
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229354
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 16 Feb 2015 04:02:09 +0000 (04:02 +0000)]
IR: Properly return nullptr when getAggregateElement is out-of-bounds
We didn't properly handle the out-of-bounds case for
ConstantAggregateZero and UndefValue. This would manifest as a crash
when the constant folder was asked to fold a load of a constant global
whose struct type has no operands.
This fixes PR22595.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229352
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 16 Feb 2015 02:13:30 +0000 (02:13 +0000)]
[CMake] Add RuntimeDyld to libdeps corresponding to r229343.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229351
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 16 Feb 2015 01:52:02 +0000 (01:52 +0000)]
[x86] Teach the 128-bit vector shuffle lowering routines to take
advantage of the existence of a reasonable blend instruction.
The 256-bit vector shuffle lowering has leveraged the general technique
of decomposed shuffles and blends for quite some time, but this never
made it back into the 128-bit code, and there are a large number of
patterns where this is substantially better. For example, this removes
almost all domain crossing in vector shuffles that involve some blend
and some permutation with SSE4.1 and later. See the massive reduction
in 'shufps' for integer test cases in this commit.
This isn't perfect yet for a few reasons:
1) The v8i16 shuffle lowering continues to plague me. We don't always
form an unpack-based blend when that would be better. But the wins
pretty drastically outstrip the losses here.
2) The v16i8 shuffle lowering is just a disaster here. I never went and
implemented blend support here for some terrible reason. I'll do
that next probably. I've not updated it for now.
More variations on this technique are coming as well -- we don't
shuffle-into-unpack or shuffle-into-palignr, both of which would also be
profitable.
Note that some test cases grow significantly in the number of
instructions, but I expect to actually be faster. We use
pshufd+pshufd+blendw instead of a single shufps, but the pshufd's are
very likely to pipeline well (two ports on most modern intel chips) and
the blend is a *very* fast instruction. The domain switch penalty will
essentially always be more than a blend instruction, which is the only
increase in tree height.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229350
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 16 Feb 2015 01:39:50 +0000 (01:39 +0000)]
[x86] Clean up a few test cases with the update script. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229349
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 16 Feb 2015 00:42:36 +0000 (00:42 +0000)]
[X86] Remove gcc builtins for AVX2 psll_dq and psrl_dq intrinsics. Clang no longer needs them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229347
91177308-0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Mon, 16 Feb 2015 00:03:11 +0000 (00:03 +0000)]
[Bitcode reader] Fix a few assertions when reading invalid files
Summary:
When creating {insert,extract}value instructions from a BitcodeReader, we
weren't verifying the fields were valid.
Bugs found with afl-fuzz
Reviewers: rafael
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7325
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229345
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sun, 15 Feb 2015 23:22:43 +0000 (23:22 +0000)]
[ExecutionEngine] Fix dependence issue by moving RTDyldMemoryManager into
RuntimeDyld.
This should fix http://llvm.org/PR22593.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229343
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 15 Feb 2015 23:17:20 +0000 (23:17 +0000)]
MinGW's snprintf is not exposed through std::.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229342
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Sun, 15 Feb 2015 22:54:22 +0000 (22:54 +0000)]
Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the macro. NFC; LLVM edition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229340
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 15 Feb 2015 22:15:41 +0000 (22:15 +0000)]
Format: Modernize using variadic templates.
Introduces a subset of C++14 integer sequences in STLExtras. This is
just enough to support unpacking a std::tuple into the arguments of
snprintf, we can add more of it when it's actually needed.
Also removes an ancient macro hack that leaks a macro into the global
namespace. Clean up users that made use of the convenient hack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229337
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Sun, 15 Feb 2015 22:00:20 +0000 (22:00 +0000)]
Removing LLVM_EXPLICIT, as MSVC 2012 was the last reason for requiring the macro. NFC; LLVM edition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229335
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Sun, 15 Feb 2015 21:21:52 +0000 (21:21 +0000)]
Since MSVC 1800 is our lowest common denominator, we don't need an explicit check for it in these macros any longer; NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229333
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 15 Feb 2015 21:11:25 +0000 (21:11 +0000)]
CommandLine: Use variadic templates to simplify opt constructors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229332
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Sun, 15 Feb 2015 20:37:44 +0000 (20:37 +0000)]
llvm-pdbdump: Fix warning caused by missing sentinel value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229331
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Sun, 15 Feb 2015 20:27:53 +0000 (20:27 +0000)]
llvm-pdbdump: Add flags controlling the type of values to dump.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229330
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 15 Feb 2015 20:12:17 +0000 (20:12 +0000)]
FoldingSet: Replace faux variadics with real variadics. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229328
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 15 Feb 2015 19:34:28 +0000 (19:34 +0000)]
Remove LLVM_HAS_VARIADIC_TEMPLATES and all the faux variadic workarounds guarded by it.
We no longer support compilers without variadic template support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229324
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 15 Feb 2015 19:34:17 +0000 (19:34 +0000)]
Update the docs to require at least MSVC 2013.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229323
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Sun, 15 Feb 2015 19:07:31 +0000 (19:07 +0000)]
Revert 229175
This change is a logical suspect in 22587 and 22590. Given it's of minimal importanance and I can't get clang to build on my home machine, I'm reverting so that I can deal with this next week.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229322
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 15 Feb 2015 18:21:39 +0000 (18:21 +0000)]
Added (still inefficient) shuffle test case for PR21138
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229321
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 15 Feb 2015 17:53:10 +0000 (17:53 +0000)]
Reapply r229185(cbieneman) -- Raising minimum required Visual Studio version to 2013.
This is based on the discussions on: [LLVMdev] [RFC] Raising LLVM minimum required MSVC version to 2013 for trunk
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229320
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sun, 15 Feb 2015 15:51:25 +0000 (15:51 +0000)]
[ADCE] Convert another loop for a range-based for
We can use a range-based for for the operands loop too; NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229319
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sun, 15 Feb 2015 15:51:23 +0000 (15:51 +0000)]
[ADCE] Use inst_range and range-based fors
Convert a few loops to range-based fors; NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229318
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sun, 15 Feb 2015 15:47:52 +0000 (15:47 +0000)]
[ADCE] Fix formatting of pointer types
We prefer to put the * with the variable, not with the type; NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229317
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sun, 15 Feb 2015 15:45:30 +0000 (15:45 +0000)]
[ADCE] Fix capitalization of another local variable
Bring another local variable in compliance with our naming conventions, NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229316
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sun, 15 Feb 2015 15:45:28 +0000 (15:45 +0000)]
[ADCE] Fix capitalization of some local variables
Bring some local variables in compliance with our naming conventions, NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229315
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 15 Feb 2015 15:07:45 +0000 (15:07 +0000)]
Added some test cases of missed opportunities to use unpckl/unpckh shuffles
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229313
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 15 Feb 2015 14:19:29 +0000 (14:19 +0000)]
Coding style fixes to recent patches. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229312
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 15 Feb 2015 13:19:52 +0000 (13:19 +0000)]
[X86][AVX2] vpslldq/vpsrldq byte shifts for AVX2
This patch refactors the existing lowerVectorShuffleAsByteShift function to add support for 256-bit vectors on AVX2 targets.
It also fixes a tablegen issue that prevented the lowering of vpslldq/vpsrldq vec256 instructions.
Differential Revision: http://reviews.llvm.org/D7596
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229311
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 15 Feb 2015 12:45:05 +0000 (12:45 +0000)]
[x86] Add the test case from PR22412, we now get this right even with
the new vector shuffle legality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229310
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 15 Feb 2015 12:42:15 +0000 (12:42 +0000)]
[x86] Teach the decomposed shuffle/blend lowering to use an early blend
when that will allow it to lower with a single permute instead of
multiple permutes.
It tries to detect when it will only have to do a single permute in
either case to maximize folding of loads and such.
This cuts a *lot* of the avx2 shuffle permute counts in half. =]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229309
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 15 Feb 2015 12:18:12 +0000 (12:18 +0000)]
[SDAG] Teach the SelectionDAG to canonicalize vector shuffles of splats
directly into blends of the splats.
These patterns show up even very late in the vector shuffle lowering
where we don't have any chance for DAG combining to kick in, and
blending is a tremendously simpler operation to model. By coercing the
shuffle into a blend we can much more easily match and lower shuffles of
splats.
Immediately with this change there are significantly more blends being
matched in the x86 vector shuffle lowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229308
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 15 Feb 2015 12:07:55 +0000 (12:07 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229307
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 15 Feb 2015 12:01:14 +0000 (12:01 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229306
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnaud A. de Grandmaison [Sun, 15 Feb 2015 10:35:31 +0000 (10:35 +0000)]
[PBQP] Assert conservativelly allocatable nodes are spilled by choice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229302
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 15 Feb 2015 10:34:52 +0000 (10:34 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229301
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 15 Feb 2015 10:15:20 +0000 (10:15 +0000)]
[x86] Use a more helpful parenthesizing of these comparisons. Silences
a -Wparentheses complaint from GCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229300
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 15 Feb 2015 10:12:02 +0000 (10:12 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229299
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 15 Feb 2015 09:33:36 +0000 (09:33 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229298
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Sun, 15 Feb 2015 09:32:30 +0000 (09:32 +0000)]
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>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229297
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 15 Feb 2015 09:26:15 +0000 (09:26 +0000)]
[x86] Update some tests with the latest version of my script and llc.
This mostly adds some shuffle decode comments and cleans up indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229296
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 15 Feb 2015 08:26:30 +0000 (08:26 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229292
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Sun, 15 Feb 2015 08:08:48 +0000 (08:08 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229290
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 15 Feb 2015 07:13:48 +0000 (07:13 +0000)]
[X86] Add assembly parser support for mnemonic aliases for AVX-512 vpcmp instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229287
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 15 Feb 2015 07:05:50 +0000 (07:05 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229286
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 15 Feb 2015 07:01:10 +0000 (07:01 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229285
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 15 Feb 2015 06:37:21 +0000 (06:37 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229284
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 15 Feb 2015 06:20:51 +0000 (06:20 +0000)]
[x86] Remove the now-default-on flag for the new vector shuffle lowering
strategy from a bunch of tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229283
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 15 Feb 2015 04:54:55 +0000 (04:54 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229280
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 15 Feb 2015 04:16:44 +0000 (04:16 +0000)]
[X86] Add the remaining 11 possible exact ModRM formats. This makes their encodings linear which can then be used to simplify some other code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229279
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sun, 15 Feb 2015 04:14:00 +0000 (04:14 +0000)]
FileCheck-ize a test to make it easier to migrate to typeless pointers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229278
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sun, 15 Feb 2015 04:13:58 +0000 (04:13 +0000)]
Update a test to make it easier to migrate to untyped pointers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229277
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sun, 15 Feb 2015 04:13:57 +0000 (04:13 +0000)]
Update a test to use FileCheck so it's easier to migrate to future typeless pointer changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229276
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sun, 15 Feb 2015 04:13:53 +0000 (04:13 +0000)]
Reformat test case to be easier to migrate to typeless pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229275
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 15 Feb 2015 00:08:01 +0000 (00:08 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229268
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 14 Feb 2015 22:40:46 +0000 (22:40 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229267
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 14 Feb 2015 21:54:03 +0000 (21:54 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229266
91177308-0d34-0410-b5e6-
96231b3b80d8
Ramkumar Ramachandra [Sat, 14 Feb 2015 19:37:54 +0000 (19:37 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229265
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 14 Feb 2015 15:36:52 +0000 (15:36 +0000)]
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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229261
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 14 Feb 2015 15:35:43 +0000 (15:35 +0000)]
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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229260
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Sat, 14 Feb 2015 15:11:48 +0000 (15:11 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229258
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 14 Feb 2015 14:10:44 +0000 (14:10 +0000)]
[X86] Ensure integer domain on scalar load/store stack folding tests. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229257
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 14 Feb 2015 13:27:53 +0000 (13:27 +0000)]
Line ending fix. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229256
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 14 Feb 2015 09:43:57 +0000 (09:43 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229251
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 14 Feb 2015 09:14:44 +0000 (09:14 +0000)]
Remove a variable only used in an assert and sink its initializer into
the assert. Fixes -Wunused-variable on non-asserts builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229250
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 14 Feb 2015 09:05:58 +0000 (09:05 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229248
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 14 Feb 2015 09:05:56 +0000 (09:05 +0000)]
[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. =]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229247
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 14 Feb 2015 07:11:25 +0000 (07:11 +0000)]
Revert r229224: Make the 'llvm-lit' utility defend against a system where Python3
Apparantly python2.7 also doesn't work. Awesome.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229245
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 14 Feb 2015 07:05:15 +0000 (07:05 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229244
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Sat, 14 Feb 2015 05:54:56 +0000 (05:54 +0000)]
[modules] Try harder to stop DebugInfo/PDB/DIA being built if not available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229243
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 14 Feb 2015 04:30:08 +0000 (04:30 +0000)]
R600/SI: Implement correct f64 fdiv
This version passes the OpenCL conformance test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229239
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 14 Feb 2015 04:24:28 +0000 (04:24 +0000)]
R600/SI: Use complex operand folding for div_scale
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229238
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 14 Feb 2015 04:22:02 +0000 (04:22 +0000)]
R600/SI: Add tests for div_fmas with inline immediate operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229237
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 14 Feb 2015 04:22:00 +0000 (04:22 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229236
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 14 Feb 2015 04:03:18 +0000 (04:03 +0000)]
R600/SI: Fix schedule model for v_div_scale_{f32|f64}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229235
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 14 Feb 2015 03:54:32 +0000 (03:54 +0000)]
R600/SI: Really fix size of VReg_1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229234
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 14 Feb 2015 03:54:29 +0000 (03:54 +0000)]
R600/SI: Rename encoding field to match docs for VOP3b
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229233
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Sat, 14 Feb 2015 03:54:28 +0000 (03:54 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229232
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Sat, 14 Feb 2015 03:53:56 +0000 (03:53 +0000)]
llvm-pdbdump: Re-order header files according to LLVM style guide.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229231
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 14 Feb 2015 03:40:35 +0000 (03:40 +0000)]
R600/SI: Fix not encoding src2 for v_div_scale_{f32|f64}
This apparently got lost in the VI changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229230
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 14 Feb 2015 03:02:23 +0000 (03:02 +0000)]
R600/SI: Fix VOP3b encoding on VI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229228
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 14 Feb 2015 02:55:57 +0000 (02:55 +0000)]
R600/SI: Fix phys reg copies in SIFoldOperands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229227
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 14 Feb 2015 02:55:56 +0000 (02:55 +0000)]
R600/SI: Fix copies from SGPR to VCC
This shows up without optimizations when vcc is required
to be used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229226
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 14 Feb 2015 02:55:54 +0000 (02:55 +0000)]
R600/SI: Add hack to copy from a VGPR to VCC
This hopefully should be fixed when VReg_1 is removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229225
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 14 Feb 2015 02:54:07 +0000 (02:54 +0000)]
PowerPC: 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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229224
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 14 Feb 2015 02:51:44 +0000 (02:51 +0000)]
R600/SI: Fix size of VReg_1
This is really a 32-bit register, if we try to check the size of it,
we want 32-bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229223
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 14 Feb 2015 02:45:45 +0000 (02:45 +0000)]
R600: 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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229222
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 14 Feb 2015 02:37:48 +0000 (02:37 +0000)]
Mips: 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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229221
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 14 Feb 2015 02:24:44 +0000 (02:24 +0000)]
ARM: 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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229220
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 14 Feb 2015 02:09:06 +0000 (02:09 +0000)]
AArch64: 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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229218
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Sat, 14 Feb 2015 02:05:05 +0000 (02:05 +0000)]
llvm-cov: Actually use the command line arguments when reporting
This code didn't really make sense as is. If a filename is passed in,
the user obviously wants the coverage *for that file*, not *for
everything*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229217
91177308-0d34-0410-b5e6-
96231b3b80d8