121633 Commits

Author SHA1 Message Date
Zoran Jovanovic
75a08f5633 [mips][microMIPS] Implement BC16, BEQZC16 and BNEZC16 instructions
Differential Revision: http://reviews.llvm.org/D11181


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246963 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-07 11:56:37 +00:00
John Brawn
1c9fa60e24 [ARM] Get rid of SelectT2ShifterOperandReg, NFC
SelectT2ShifterOperandReg has identical behaviour to SelectImmShifterOperand,
so get rid of it and use SelectImmShifterOperand instead.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246962 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-07 11:45:18 +00:00
Zoran Jovanovic
f390c2eb39 [mips][microMIPS] Implement CVT.D.fmt, CVT.L.fmt, CVT.S.fmt, CVT.W.fmt, MAX.fmt, MIN.fmt, MAXA.fmt, MINA.fmt and CMP.condn.fmt instructions
Differential Revision: http://reviews.llvm.org/D12141


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246960 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-07 10:31:31 +00:00
David Majnemer
a35911994e CODE_OWNERS.TXT is supposed to be sorted by surname
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246954 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-07 00:41:40 +00:00
NAKAMURA Takumi
c315a08fee Prune utf8 chars in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246953 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-07 00:26:54 +00:00
Simon Pilgrim
ec601bafc2 [X86][MMX] Added missing stack folding tests for MMX/SSSE3 instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246949 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-06 17:50:15 +00:00
Simon Pilgrim
d2f59e04e0 [X86][AVX512] Added 512-bit vector shift tests.
Only works for avx512f (dq) targets so far - need to add avx512bw tests once char/short shifts are supported.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246943 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-06 13:36:32 +00:00
David Majnemer
8e3ed0b6bc [InstCombine] Don't divide by zero when evaluating a potential transform
Trivial multiplication by zero may survive the worklist.  We tried to
reassociate the multiplication with a division instruction, causing us
to divide by zero; bail out instead.

This fixes PR24726.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246939 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-06 06:49:59 +00:00
Hal Finkel
987b4b6f61 [SelectionDAG] Swap commutative binops before constant-based folding
In searching for a fix for the underlying code-quality bug highlighted by
r246937 (that SDAG simplification can lead to us generating an ISD::OR node
with a constant zero LHS), I ran across this:

We generically canonicalize commutative binary-operation nodes in SDAG getNode
so that, if only one operand is a constant, it will be on the RHS.  However, we
were doing this only after a bunch of constant-based simplification checks that
all assume this canonical form (that any constant will be on the RHS). Moving
the operand-swapping canonicalization prior to these checks seems like the
right thing to do (and, as it turns out, causes SDAG to completely fold away the
computation in test/CodeGen/ARM/2012-11-14-subs_carry.ll, just like InstCombine
would do).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246938 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-06 05:42:13 +00:00
Hal Finkel
9f11e5da34 [PowerPC] Don't commute trivial rlwimi instructions
To commute a trivial rlwimi instructions (meaning one with a full mask and zero
shift), we'd need to ability to form an all-zero mask (instead of an all-one
mask) using rlwimi. We can't represent this, however, and we'll miscompile code
if we try.

The code quality problem that this highlights (that SDAG simplification can
lead to us generating an ISD::OR node with a constant zero LHS) will be fixed
as a follow-up.

Fixes PR24719.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246937 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-06 04:17:30 +00:00
Craig Topper
cb52ea5f9d [TableGen] Use make_unique. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246936 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-06 03:44:50 +00:00
Andrew Wilkins
46dd28e2c0 [bindings] Update Go bindings to DIBuilder
Summary:
Update the Go bindings to DIBuilder to match
the split of creating local variables into
auto and parameter variables.

Reviewers: pcc

Subscribers: llvm-commits, axw

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246935 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-06 02:22:15 +00:00
David Majnemer
6456d06226 [InstCombine] Don't assume m_Mul gives back an Instruction
This fixes PR24713.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246933 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-05 20:44:56 +00:00
Alexandros Lamprineas
1955b207be Added arch extensions and default target features in TargetParser.
Differential: http://reviews.llvm.org/D11590

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246930 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-05 17:05:33 +00:00
Simon Pilgrim
1f3857aad1 [X86] Updated vector lzcnt tests. Added missing vec512 tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246927 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-05 11:56:30 +00:00
Simon Pilgrim
5fcf28d211 [X86] Updated vector tzcnt tests. Added vec512 tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246922 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-05 10:19:07 +00:00
Simon Pilgrim
9929109416 [X86] Updated vector popcnt tests. Added vec512 tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246921 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-05 09:59:59 +00:00
Zoran Jovanovic
2dc8c071ac [mips][microMIPS] Implement ADD.fmt, SUB.fmt, MOV.fmt, MUL.fmt, DIV.fmt, MADDF.fmt, MSUBF.fmt and NEG.fmt instructions
Differential Revision: http://reviews.llvm.org/D11978


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246919 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-05 09:25:30 +00:00
Andrew Wilkins
f5148ebe0a [cmake] rework LLVM_LINK_LLVM_DYLIB option handling
Summary:
This diff attempts to address the concerns raised in
http://reviews.llvm.org/D12488.

We introduce a new USE_SHARED option to llvm_config,
which, if set, causes the target to be linked against
libLLVM.

add_llvm_utility now uniformly disables linking against
libLLVM. These utilities are not intended for distribution,
and this keeps the option handling more centralised.

llvm-shlib is now processes before any other "tools"
subdirectories, ensuring the libLLVM target is defined
before its dependents.

One main difference from what was requested: llvm_config
does not prune LLVM_DYLIB_COMPONENTS from the components
passed into explicit_llvm_config. This is because the "all"
component does something special, adding additional
libraries (namely libLTO). Adding the component libraries
after libLLVM should not be a problem, as symbols will be
resolved in libLLVM first.

Finally, I'm not really happy with the
DISABLE_LLVM_LINK_LLVM option, but I'm not sure of a
better way to get the following:
 - link all tools and shared libraries to libLLVM if
   LLVM_LINK_LLVM_DYLIB is set
 - some way of explicitly *not* doing so for utilities
   and libLLVM itself
Suggestions for improvement here are particularly welcome.

Reviewers: beanz

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246918 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-05 08:27:33 +00:00
Craig Topper
d2288b28e1 Fix build warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246908 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-05 04:49:44 +00:00
NAKAMURA Takumi
455c3d818a WinCOFFObjectWriter.cpp: Roll back TimeDateStamp along ENABLE_TIMESTAMPS.
We want a deterministic output. GNU AS leaves it zero.

FIXME: It may be optional by its user, like llc and clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246905 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-05 01:17:49 +00:00
Davide Italiano
537f16ebe4 [MC] Convert other MachO tests from macho-dump to llvm-readobj.
This commit accomplish two goals:
1) it's a step forward to deprecate macho-dump, now less than 40 tests
rely on it.

2) It tests all the MachO specific features introduced in llvm-readobj in
the following commits:  r246789, r246665, r246474.

While the conversion is mostly mechanical (I double-checked all the
tests output one by one, but still), a post-commit review is greatly
appreciated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246904 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-05 01:02:05 +00:00
Andrew Kaylor
b6a09c7428 Fix build warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246903 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-05 01:00:51 +00:00
Hal Finkel
6d7a4a2886 [PowerPC] Fix and(or(x, c1), c2) -> rlwimi generation
PPCISelDAGToDAG has a transformation that generates a rlwimi instruction from
an input pattern that looks like this:

  and(or(x, c1), c2)

but the associated logic does not work if there are bits that are 1 in c1 but 0
in c2 (these are normally canonicalized away, but that can't happen if the 'or'
has other users. Make sure we abort the transformation if such bits are
discovered.

Fixes PR24704.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246900 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-05 00:02:59 +00:00
Andrew Kaylor
b1b15ace48 Fix build warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246899 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 23:58:32 +00:00
Evgeniy Stepanov
4b83fd92f3 Fix passed env var name in lit for Android tests.
The variable is actually called ANDROID_SERIAL.
This was not exercised on the bots until today.
Should fix the sanitizer-x86_64-linux failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246898 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 23:52:04 +00:00
Andrew Kaylor
701765a22c Fixing bad test syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246897 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 23:47:34 +00:00
Andrew Kaylor
580f34a883 [WinEH] Teach SimplfyCFG to eliminate empty cleanup pads.
Differential Revision: http://reviews.llvm.org/D12434



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246896 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 23:39:40 +00:00
Kostya Serebryany
87e6608466 [libFuzzer] more accurate logic for traces, 80-char fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246888 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 22:32:25 +00:00
Davide Italiano
cdd5f6d41a [llvm-readobj] MachO: dump the correct field.
This was found while converting a test from macho-dump to llvm-readobj
and will once I commit the converted test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246868 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 20:43:00 +00:00
Yaron Keren
e0517c5848 Remove two unused includes and C++11 rangify for loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246865 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 20:24:24 +00:00
Simon Pilgrim
51a8f7d972 [X86][AVX] Test tidyup + regeneration. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246863 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 19:47:56 +00:00
Peter Collingbourne
c8df682a2f Add powerpc64 to parallel.ll unsupported architecture list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246862 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 19:45:36 +00:00
Ben Craig
2354b37ae0 Adding full stops to comments
Also, test commit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246855 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 15:28:13 +00:00
Chad Rosier
7ab65d6098 Typo. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246851 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 12:34:55 +00:00
Silviu Baranga
347db8255c Simplify testcase added in r246759. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246848 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 11:37:20 +00:00
David Majnemer
e9fc16d638 [MC] Replace comparison with isUInt<32>.
Casting to unsigned long can cause the time to get truncated to 32-bits,
making it appear to be a valid timestamp.  Just use isUInt<32> instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246840 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 07:22:36 +00:00
NAKAMURA Takumi
25059fcca0 WinCOFFObjectWriter.cpp: Appease a warning in checking std::time_t. [-Wsign-compare]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246839 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 05:19:37 +00:00
Richard Smith
c8dacf406f Fix APInt value initialization to give a zero value as any sane integer type
should, rather than giving a broken value that doesn't even zero/sign-extend
properly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246836 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 04:08:36 +00:00
Steven Wu
123b024141 Fix the testcase in r246790
Using generic neon syntax to avoid test failure on apple platforms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246833 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 01:39:24 +00:00
Kostya Serebryany
c18fae603d [libFuzzer] when a single mutation fails try a few more times with other mutations before returning un-mutated data
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246828 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 00:40:29 +00:00
Kostya Serebryany
6cc3ed7cdd [libFuzzer] actually make the dictionaries work (+docs)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246825 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 00:12:11 +00:00
Hal Finkel
f606a6ed99 [PowerPC] Enable interleaved-access vectorization
This adds a basic cost model for interleaved-access vectorization (and a better
default for shuffles), and enables interleaved-access vectorization by default.
The relevant difference from the default cost model for interleaved-access
vectorization, is that on PPC, the shuffles that end up being used are *much*
cheaper than modeling the process with insert/extract pairs (which are
quite expensive, especially on older cores).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246824 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-04 00:10:41 +00:00
Hal Finkel
738216def6 [PowerPC] Always use aggressive interleaving on the A2
On the A2, with an eye toward QPX unaligned-load merging, we should always use
aggressive interleaving. It is generally superior to only using concatenation
unrolling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246819 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 23:23:00 +00:00
Hal Finkel
e1cc054190 [PowerPC] Try harder to find a base+offset when looking for consecutive accesses
When forming permutation-based unaligned vector loads, we need to know whether
it is valid to read ahead of the requested address by a full vector length.
Doing so is more efficient (and allows for more CSE with later loads), but
could trigger a page fault if invalid. To determine validity, we look for other
loads in the same block that access the relevant address range.

The relevant point here is that we need to do this as part of the process of
forming permutation-based vector loads, and this happens quite early in the
SDAG pipeline - specifically before many of the address calculations are fully
canonicalized. As a result, we need to try harder to recognize base+offset
address computations, because they still might appear as chain of adds
(base+offset+offset, for example). To account for this, we'll look through
chains of adds, accumulating the constant offsets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246813 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 22:37:44 +00:00
Sanjoy Das
dc0eb17133 [IR] Have AttrBuilder::clear clear TargetDepAttrs.
Test case attached -- currently the parser smears the "foo bar" to all
of the formal arguments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246812 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 22:27:42 +00:00
Philip Reames
383054783d [RewriteStatepointsForGC] Extract common code, comment, and fix a build warning [NFC]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246810 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 21:57:40 +00:00
Philip Reames
f95c45d16f [RewriteStatepointsForGC] Strengthen invariants around BDVs
As a first step towards a new implementation of the base pointer inference algorithm, introduce an abstraction for BDVs, strengthen the assertions around them, and rewrite the BDV relation code in terms of the abstraction which includes an explicit notion of whether the BDV is also a base. The later is motivated by the fact we had a bug where insertelement was always assumed to be a base pointer even though the BDV code knew it wasn't. The strengthened assertions in this patch would have caught that bug.

The next step will be to separate the DefiningValueMap into a BDV use list cache (entirely within findBasePointers) and a base pointer cache. Having the former will allow me to use a deterministic visit order when visiting BDVs in the inference algorithm and remove a bunch of ordering related hacks. Before actually doing the last step, I'm likely going to extend the lattice with a 'BaseN' (seen only base inputs) state so that I can kill the post process optimization step.

Phabricator Revision: http://reviews.llvm.org/D12608



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246809 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 21:34:30 +00:00
Kostya Serebryany
bf6bd487d5 [libFuzzer] refactor the mutation functions so that they are now methods of a class. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246808 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 21:24:19 +00:00
Hal Finkel
ecebcfc3a1 [PowerPC] Include the permutation cost for unaligned vector loads
Pre-P8, when we generate code for unaligned vector loads (for Altivec and QPX
types), even when accounting for the combining that takes place for multiple
consecutive such loads, there is at least one load instructions and one
permutation for each load. Make sure the cost reported reflects the cost of the
permutes as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246807 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-03 21:23:18 +00:00