133682 Commits

Author SHA1 Message Date
Sanjay Patel
079ac1edc0 [x86, SSE] update packed FP compare tests for direct translation from builtin to IR
The clang side of this was r272840:
http://reviews.llvm.org/rL272840

A follow-up step would be to auto-upgrade and remove these LLVM intrinsics completely.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272841 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 21:22:15 +00:00
Chad Rosier
357edbc1d6 Address a few coding style issues. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272838 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 21:14:02 +00:00
Kevin Enderby
04195353af Fix llvm-objdump when disassembling a stripped Mach-O binary with the -macho option.
It was printing out nothing in this case.

llvm-objdump tries to disassemble sections a symbol at a time.  In the case of a
fully stripped Mach-O executable the only symbol remaining in the (__TEXT,__text)
section is the special linker defined symbol __mh_execute_header . This
symbol is special in that while it is N_SECT symbol in the (__TEXT,__text)
its address is before the start of the (__TEXT,__text).  It’s address is the
start of the __TEXT segment which is where the mach header is statically
linked. So the code in DisassembleMachO() needs to deal with this case specially.

rdar://26778273


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272837 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 21:14:01 +00:00
Krzysztof Parzyszek
16185a2b7f [Hexagon] Fix/simplify some conditional statements
Fix for PR28138.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272836 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 21:05:04 +00:00
Kevin B. Smith
f258b9a271 [X86]: Fix for uninitialized access introduced in r272797.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272835 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 20:52:19 +00:00
Sanjay Patel
efa2e76536 [x86] delete unnecessary function declarations
Missed this in r272806, r272807.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272834 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 20:51:47 +00:00
George Burgess IV
3cdf3eb380 [CFLAA] Ignore non-pointers, move Attrs to graph nodes.
This patch makes CFLAA ignore non-pointer values, since we can now
sanely do that with the escaping/unknown attributes. Additionally,
StratifiedAttrs make more sense to sit on nodes than edges (since
they're properties of values, and ultimately end up on the nodes of
StratifiedSets). So, this patch puts said attributes on nodes.

Patch by Jia Chen.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272833 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 20:43:41 +00:00
Tim Northover
4d6b849855 AArch64: stop trying to use 32-bit MOVZs when expanding patchpoints.
Of course the assembly was right but because the opcode was MOVZWi it was
encoded as "movz w16, #65535, lsl #32" which is an unallocated encoding and
would go horribly wrong on a CPU.

No idea how this bug survived this long. It seems nobody is using that aspect
of patchpoints.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272831 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 20:33:36 +00:00
Reid Kleckner
0fadb1f37c Axe some trailing whitespace from my last commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272830 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 20:32:42 +00:00
Reid Kleckner
f07202a7aa [codeview] Move deserialization methods out of line
They aren't performance critical and don't need to be inline.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272829 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 20:30:34 +00:00
Sanjay Patel
2df18c8dc0 [x86] add folds for x86 vector compare nodes (PR27924)
Ideally, we can get rid of most x86 LLVM intrinsics by transforming them to IR (and some of that happened 
with http://reviews.llvm.org/rL272807), but it doesn't cost much to have some simple folds in the backend
too while we're working on that and as a backstop.

This fixes:
https://llvm.org/bugs/show_bug.cgi?id=27924

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272828 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 20:26:58 +00:00
Matthias Braun
c882f76cf5 Statistic: Add machine parseable json output
- We lacked a short unique identifier for a statistics, so I renamed the
  current "Name" field that just contained the DEBUG_TYPE name of the
  current file to DebugType and added a new "Name" field that contains
  the C++ identifier of the statistic variable.
- Add the -stats-json option which outputs statistics in json format.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272826 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 20:19:16 +00:00
Davide Italiano
227b804262 [LoopSimplify] Analyses do not need to be member variables.
In preparation for porting this pass to the new PM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272818 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 18:51:25 +00:00
Reid Kleckner
90392dad06 [codeview] Use ArrayRef instead of a non-const vector reference
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272817 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 18:48:35 +00:00
Rui Ueyama
69d870720c [pdbdump] Verify LF_{CLASS,ENUM,INTERFACE,STRUCTURE,UNION} records.
Differential Revision: http://reviews.llvm.org/D21361

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272815 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 18:26:59 +00:00
Kevin B. Smith
42abc92144 [X86]: Updated r272801 to promote 16 bit compares with immediate operand
to 32 bits. This is in response to a comment by Eli Friedman.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272814 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 18:18:05 +00:00
David Majnemer
b372f89f41 [CodeView] Add support for emitting S_UDT for typedefs
Emit a S_UDT record for typedefs.  We still need to do something for
class types.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272813 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 18:00:01 +00:00
Amaury Sechet
a2f727daf6 Add support for string attributes in the C API.
Summary: As per title. This completes the C API Attribute support.

Reviewers: Wallbraker, whitequark, echristo, rafael, jyknight

Subscribers: mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272811 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 17:50:39 +00:00
Pankaj Gode
7d829a30aa Test commit after access grant. Modified comment by adding a period.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272808 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 17:24:52 +00:00
Sanjay Patel
3539217c1c [x86, SSE] remove the GCCBuiltins from the integer min/max intrinsics
This allows us to emit native IR in Clang (next commit).
Also, update the intrinsic tests to show that codegen already knows how to handle
the IR that Clang will soon produce.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272806 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 17:17:27 +00:00
Sanjay Patel
83a669a70f [x86] fix function name; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272805 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 17:12:29 +00:00
David Majnemer
7f26e26d0c [TargetLibraryInfo] Teach isValidProtoForLibFunc about tan
We would fail to validate the type of the tan function which would cause
downstream users of isValidProtoForLibFunc to assert.

This fixes PR28143.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272802 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 16:47:23 +00:00
Kevin B. Smith
746c3b7ff4 [X86]: Quit promoting 8 and 16 bit compares to 32 bit.
Differential Revision: http://reviews.llvm.org/D21144


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272801 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 16:37:46 +00:00
Nirav Dave
63a4b3937b Revert "Preserve DebugInfo when replacing values in DAGCombiner"
Reverting due to assertion failure in
lib/CodeGen/SelectionDAG/InstrEmitter.cpp

This reverts commit r272792.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272799 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 16:08:50 +00:00
Kevin B. Smith
8800861c19 [X86]: Improve Liveness checking for X86FixupBWInsts.cpp
Differential Revision: http://reviews.llvm.org/D21085


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272797 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 16:03:06 +00:00
Adam Nemet
30aa48372a [LV] Add getter function for LoopVectorizationLegality::Strides. NFC
This should help moving Strides to LAA later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272796 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 15:49:46 +00:00
Vasileios Kalintiris
4eebd00d01 [mips] Eliminate unused code for addrRegReg complex pattern. NFC.
Reviewers: dsanders, sdardis

Subscribers: dsanders, sdardis, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272794 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 15:30:07 +00:00
Aaron Ballman
0774f89723 Add llvm_unreachable to silence a "not all control paths" false positive warning from MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272793 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 15:27:53 +00:00
Nirav Dave
d2f1fe5fc1 Preserve DebugInfo when replacing values in DAGCombiner
[DAG] Previously debug values would transfer debuginfo for the selected
start node for a replacement which allows for debug to be dropped.

Push debug value transfer to occur with node/value replacement in
SelectionDAG, remove now extraneous transfers of debug values.

This refixes PR9817 which was being incompletely checked in the
testsuite.

Reviewers: jyknight

Subscribers: dblaikie, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272792 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 14:50:08 +00:00
Ranjeet Singh
a94e734a24 Reverting r272778 because there's an assertion
failure when running the test CodeGen/ARM/intrinsics-coprocessor.ll



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272791 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 14:23:29 +00:00
Craig Topper
4b4f0e3aa3 [AVX512] Remove the GCCBuiltins from the mask pcmpeq/pcmpgt intrinsics so we can emit native IR from clang.
The intrinsics themselves can be removed in a future commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272786 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 14:06:28 +00:00
Valery Pykhtin
2ab3f3b4e1 [AMDGPU] Fix few coding style issues. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272785 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 13:55:09 +00:00
Simon Dardis
b5361d7101 [mips] Missing test case
Add missing testcase from r272666.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272784 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 13:49:58 +00:00
Adam Nemet
77e7a065b2 [LV] Remove more unused functions. NFC
LoopVectorizationLegality::strides_begin/end are also unused.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272781 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 12:26:15 +00:00
Adam Nemet
89bc11c112 [LV] Remove unused function. NFC
LoopVectorizationLegality::mustCheckStrides is unused.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272780 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 12:26:11 +00:00
Ranjeet Singh
c0f8f419a5 [ARM] Add support for mrrc/mrrc2 intrinsics.
Differential Revision: http://reviews.llvm.org/D21178



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272778 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 11:32:24 +00:00
Sean Silva
12d4938ff1 Work around MSVC "friend" semantics.
The error on clang-x86-win2008-selfhost is:

C:\buildbot\slave-config\clang-x86-win2008-selfhost\llvm\lib\Transforms\Vectorize\SLPVectorizer.cpp(955) : error C2248: 'llvm::slpvectorizer::BoUpSLP::ScheduleData' : cannot access private struct declared in class 'llvm::slpvectorizer::BoUpSLP'
        C:\buildbot\slave-config\clang-x86-win2008-selfhost\llvm\lib\Transforms\Vectorize\SLPVectorizer.cpp(608) : see declaration of 'llvm::slpvectorizer::BoUpSLP::ScheduleData'
        C:\buildbot\slave-config\clang-x86-win2008-selfhost\llvm\lib\Transforms\Vectorize\SLPVectorizer.cpp(337) : see declaration of 'llvm::slpvectorizer::BoUpSLP'

I reproduced this locally with both MSVC 2013 and MSVC 2015.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272772 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 10:51:40 +00:00
Daniel Sanders
71a2dfc624 [mips] Replace AdditionalRequires<[IsGP64bit]> with GPR_64. NFC.
Summary: Also fixed one case where HasMips64 was being used instead of IsGP64bit.

Reviewers: sdardis

Subscribers: dsanders, llvm-commits, sdardis

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272771 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 10:36:16 +00:00
Patrik Hagglund
bed36c4198 Use FPasses in opt exactly when it is initialized.
Previously, there was a discrepancy between the population of function
passes in FPasses, and their invocation. Function passes specified on
the command line, after an optimizaton level was simply discared. This
fix PR27509.

Patch by Jesper Antonsson.

Differential Review: http://reviews.llvm.org/D20725

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272770 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 10:32:00 +00:00
Daniel Sanders
5ffd0983e4 [mips] Removed invalid test from o32_cc.ll
MIPS32R1 cannot implement a 64-bit FPU because this was introduced in MIPS32R2.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272769 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 09:47:27 +00:00
Daniel Sanders
52f7566a2f [mips] clang-format Mips16ISelDAGToDAG.{cpp,h}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272768 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 09:44:22 +00:00
Sean Silva
364a1393fa Speculative buildbot fix.
This wasn't failing for me with clang as the compiler. I think GCC may
disagree with clang about whether a friend declaration introduces a
declaration in the enclosing namespace (or something).

Example error:

/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:950:77: error: ‘llvm::raw_ostream& llvm::slpvectorizer::operator<<(llvm::raw_ostream&, const llvm::slpvectorizer::BoUpSLP::ScheduleData&)’ should have been declared inside ‘llvm::slpvectorizer’
                                              const BoUpSLP::ScheduleData &SD) {
                                                                             ^

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272767 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 09:00:33 +00:00
Sean Silva
8847c18e07 [PM] Port SLPVectorizer to the new PM
This uses the "runImpl" approach to share code with the old PM.

Porting to the new PM meant abandoning the anonymous namespace enclosing
most of SLPVectorizer.cpp which is a bit of a bummer (but not a big deal
compared to having to pull the pass class into a header which the new PM
requires since it calls the constructor directly).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272766 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 08:43:40 +00:00
Daniel Sanders
ee9790cc7e [mips][msa] Fix register/register-class mismatches in emitINSERT_DF_VIDX().
Reviewers: sdardis

Subscribers: dsanders, sdardis, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272765 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 08:43:23 +00:00
Zlatko Buljan
1f61965a92 [mips][microMIPS] Add CodeGen support for AND*, OR16, OR*, XOR*, NOT16 and NOR instructions
Differential Revision: http://reviews.llvm.org/D16719


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272764 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 07:46:24 +00:00
Igor Breger
b8387d0ad3 [AVX512] Fix BLENDM lowering patterns. Operands should be swapped to match SELECT behavior.
Use BLENDM instead of masked move instruction.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272763 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 07:30:38 +00:00
Sanjoy Das
6c5ddb159e Push a dependent computation into the assert that uses it; NFC
... instead of explicitly conditioning on NDEBUG.  Also use an easier to
read conditional expression.

(Addresses post-commit review from David Blaikie.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272762 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 07:27:04 +00:00
Nicolai Haehnle
682fc3e780 AMDGPU: Fix MUBUF offset bugs affecting llvm.amdgcn.buffer.* intrinsics
Summary:
This fixes two related bugs. First, the generic optimization passes
unfortunately generate negative constant offsets but the hardware treats
SOffset as an unsigned value.

Second, there is a hardware bug on SI and CI, where address clamping in MUBUF
instructions does not work correctly when SOffset is larger than the buffer
size. This patch works around this bug by never using SOffset.

An alternative workaround would be to do the clamping manually when SOffset
is too large, but generating the required code sequence during instruction
selection would be rather involved, and in any case the resulting code would
probably be worse.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96360

Reviewers: arsenm, tstellarAMD

Subscribers: arsenm, llvm-commits, kzhuravl

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272761 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 07:13:05 +00:00
Sanjoy Das
d2af64ec39 Fix unused variable warning; NFC
TailCallReturnAddrDelta is used only in an assert, so put it under
defined(NDEBUG).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272760 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 06:53:59 +00:00
Sanjoy Das
76a39e9e12 [SCEV] Use dyn_cast<T> instead of dyn_cast<const T>; NFC
The const is unnecessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272759 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15 06:53:55 +00:00