132134 Commits

Author SHA1 Message Date
Simon Pilgrim
7cea10a7cf [X86][SSE42] Added fast-isel tests to sync with clang/test/CodeGen/sse42-builtins.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269929 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 14:28:54 +00:00
Simon Pilgrim
d6f9ab1e40 [X86][SSE41] Sync with clang/test/CodeGen/sse41-builtins.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269925 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 13:46:10 +00:00
Bryan Chan
5137cfa191 [SystemZ] Fix register ordering for BinaryRRF instructions
Summary:
The ordering of registers in BinaryRRF instructions are wrong, and
affects the copysign instruction (CPSDR). This results in the wrong
magnitude and sign being set.

Author: zhanjunl

Reviewers: kbarton, uweigand

Subscribers: llvm-commits

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269922 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 13:24:57 +00:00
Simon Pilgrim
ddbf9200f0 [X86][SSE3] Sync with clang/test/CodeGen/sse3-builtins.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269920 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 13:16:31 +00:00
Rafael Espindola
ae88dc47a7 White space cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269919 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 13:10:27 +00:00
Aaron Ballman
3b69c0e412 Removing an unused variable introduced in r269911; NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269915 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 12:52:04 +00:00
Daniel Sanders
8d706cc7df Try again to fix pdbdump-headers.test on big-endian hosts after r269861.
r269898 fixed the problem with HashBuckets but the same issue occurred with
AddressMap and ThunkMap too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269913 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 12:36:25 +00:00
Ashutosh Nema
1db659ede4 Add new flag and intrinsic support for MWAITX and MONITORX instructions
Summary:

MONITORX/MWAITX instructions provide similar capability to the MONITOR/MWAIT
pair while adding a timer function, such that another termination of the MWAITX
instruction occurs when the timer expires. The presence of the MONITORX and
MWAITX instructions is indicated by CPUID 8000_0001, ECX, bit 29.

The MONITORX and MWAITX instructions are intercepted by the same bits that
intercept MONITOR and MWAIT. MONITORX instruction establishes a range to be
monitored. MWAITX instruction causes the processor to stop instruction execution
and enter an implementation-dependent optimized state until occurrence of a
class of events.

Opcode of MONITORX instruction is "0F 01 FA". Opcode of MWAITX instruction is
"0F 01 FB". These opcode information is used in adding tests for the
disassembler.

These instructions are enabled for AMD's bdver4 architecture.

Patch by Ganesh Gopalasubramanian!

Reviewers: echristo, craig.topper, RKSimon
Subscribers: RKSimon, joker.eph, llvm-commits
Differential Revision: http://reviews.llvm.org/D19795


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269911 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 11:59:12 +00:00
Rafael Espindola
2dc637165b Don't pass a Reloc::Model to MC.
MC only needs to know if the output is PIC or not. It never has to
decide about creating GOTs and PLTs for example. The only thing that
MC itself uses this information for is expanding "macros" in sparc and
mips. The rest I am pretty sure could be moved to CodeGen.

This is a cleanup and isolates the code from future changes to
Reloc::Model.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269909 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 11:58:50 +00:00
James Molloy
9c1a0c965c [VectorUtils] Fix nasty use-after-free
In truncateToMinimalBitwidths() we were RAUW'ing an instruction then erasing it. However, that intruction could be cached in the map we're iterating over. The first check is "I->use_empty()" which in most cases would return true, as the (deleted) object was RAUW'd first so would have zero use count. However in some cases the object could have been polluted or written over and this wouldn't be the case. Also it makes valgrind, asan and traditionalists who don't like their compiler to crash sad.

No testcase as there are no externally visible symptoms apart from a crash if the stars align.

Fixes PR26509.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269908 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 11:57:58 +00:00
Dylan McKay
f313ca4a81 [AVR] Remove the 'AVRConfig.h' header
It defined the LLVM_AVR_GCC_COMPAT constant, which would enable/disable
certain GCC-specific behaviours.

There is no point conditionally turning it on/off, as it will always be
turned on, and we have to maintain both code paths anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269904 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 11:20:48 +00:00
Simon Pilgrim
d097069506 [X86][SSSE3] Sync with clang/test/CodeGen/ssse3-builtins.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269903 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 11:19:17 +00:00
Simon Pilgrim
adac53f19e [X86][SSE4A] Sync with clang/test/CodeGen/sse4a-builtins.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269902 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 11:14:58 +00:00
Dylan McKay
ea9e0d46c4 [AVR] Add missing CMake dependencies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269901 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 11:11:51 +00:00
Dylan McKay
af292693ca [AVR] Fix a few compile errors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269900 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 11:11:38 +00:00
Simon Dardis
2366631516 [PATCH] [mips] Restrict the creation of compact branches
Restrict the creation of compact branches so that they do meet the ISA
requirements. Notably do not permit $zero to be used as a operand for compact
branches and ensure that some other branches fulfil the requirement that
rs != rt.

Fixup cases where $rs > $rt for bnec and beqc.

Recommit of rL269893 with reviewers comments.

Reviewers: dsanders, vkalintiris

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269899 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 10:38:01 +00:00
Daniel Sanders
adcd739c2e Attempt to fix pdbdump-headers.test on big-endian hosts after r269861.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269898 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 09:59:14 +00:00
Simon Dardis
c0a6ad42eb Revert "[mips] Restrict the creation of compact branches"
This reverts commit rL269893.

Incorrect patch applied.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269897 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 09:51:37 +00:00
Dylan McKay
6a867d0312 [AVR] Convert C style comments to C++
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269895 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 09:43:01 +00:00
Simon Dardis
79149b9fae [mips] Restrict the creation of compact branches
Restrict the creation of compact branches so that they meet the ISA encoding
requirements. Notably do not permit $zero to be used as a operand for compact
branches and ensure that some other branches fulfil the requirement that
rs != rt.

Fixup cases where $rs > $rt for bnec and beqc.

Reviewers: dsanders, vkalintiris

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269893 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 09:21:44 +00:00
Chris Dewhurst
06dac21852 [Sparc] Add Soft Float support
This change adds support for software floating point operations for Sparc targets.

This is the first in a set of patches to enable software floating point on Sparc. The next patch will enable the option to be used with Clang.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269892 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 09:14:13 +00:00
Igor Kudrin
24466cded7 [Coverage] Ensure that coverage mapping data has an expected alignment in 'covmapping' files.
Coverage mapping data is organized in a sequence of blocks, each of which is expected
to be aligned by 8 bytes. This feature is used when reading those blocks, see
VersionedCovMapFuncRecordReader::readFunctionRecords(). If a misaligned covearge
mapping data has more than one block, it causes llvm-cov to fail.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269887 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 07:43:27 +00:00
Craig Topper
4e48490d80 [AVX512] Strengthen type constraints on my rounding mode inputs and some immediate inputs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269886 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 06:56:01 +00:00
Craig Topper
87b374bca7 [AVX512] Strengthen type checks on the X86ISD::SELECT node. Saves over 800 bytes in the DAG isel table by removing type checks for the condition operand which is always a vector or scalar of i1 matching the the number of elements in the other operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269885 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 06:55:59 +00:00
Craig Topper
d20d564523 Strengthen type assertion for ISD::VSELECT ensuring that the condition has the name number of elements as the destination type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269884 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 06:55:55 +00:00
Zlatko Buljan
4b34e977df [mips][microMIPS] Implement LH, LHE, LHU and LHUE instructions and add CodeGen support
Differential Revision: http://reviews.llvm.org/D15418


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269883 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 06:54:59 +00:00
Lang Hames
1c01e2defe [RuntimeDyld] Thread Error through some APIs, remove calls to report_fatal_error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269881 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 05:31:24 +00:00
Craig Topper
f673dcd8f1 [X86] Remove GCC builtin from add/sub/mul/div ss/sd intrinsics. These haven't been used as builtins in clang for a long time.
Can probably remove the intrinsics entirely, but that will require more work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269876 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 01:36:25 +00:00
Rafael Espindola
36f243d8fa Delete default in fully covered switch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269872 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 00:31:06 +00:00
Rafael Espindola
214e8d3f06 Don't pass relocation-model= to tests that don't need it.
Very few things in MC itself use the option. Most of the code that that
uses it could be move to CodeGen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269871 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 00:27:17 +00:00
Zachary Turner
6f44b1d369 [codeview] Move Symbol / Type enum defs into CodeView.h
This fixes a build breakage that would otherwise only be fixable
through a circular header dependency.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269868 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17 23:57:10 +00:00
Zachary Turner
60ce11fcce [codeview] Some cleanup of Symbol Records.
* Reworks the CVSymbolTypes.def to work similarly to TypeRecords.def.
* Moves some enums from SymbolRecords.h to CodeView.h to maintain
  consistency with how we do type records.
* Generalize a few simple things like the record prefix
* Define the leaf enum and the kind enum similar to how we do with tyep
  records.

Differential Revision: http://reviews.llvm.org/D20342
Reviewed By: amccarth, rnk

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269867 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17 23:50:21 +00:00
David Blaikie
f84af69256 llvm-dwp: remove some unused error handling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269866 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17 23:44:13 +00:00
Zachary Turner
8e5ffc9803 Revert "[obj2yaml] [yaml2obj] Support MachO section and section_64
structs"

This reverts commits r269845, r269846, and r269850 as they
introduce a crash in obj2yaml when trying to do a roundtrip.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269865 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17 23:38:22 +00:00
David Blaikie
34ab13fd25 llvm-dwp: Move error handling code closer to use
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269864 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17 23:37:44 +00:00
Dan Gohman
51510adcfa [WebAssembly] Rename $discard to $drop in the assembly output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269862 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17 23:19:03 +00:00
Rui Ueyama
dce33b5457 pdbdump: Print out more strcutures.
I don't yet fully understand the meaning of these data strcutures,
but at least it seems that their sizes and types are correct.
With this change, we can read publics streams till end.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269861 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17 23:07:48 +00:00
Paul Robinson
329de212c7 [DwarfDebug] Make tuning predicates private, should be used only in ctor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269859 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17 22:53:20 +00:00
Peter Collingbourne
e6b948e54d docs: Update and clean up BitCodeFormat.rst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269857 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17 22:30:58 +00:00
Dan Gohman
b9fa981c8a [WebAssembly] Model the stack evaluation order more precisely.
We currently don't represent get_local and set_local explicitly; they
are just implied by virtual register use and def. This avoids a lot of
clutter, but it does complicate stackifying: get_locals read their
operands at their position in the stack evaluation order, rather than
at their parent instruction. This patch adds code to walk the stack to
determine the precise ordering, when needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269854 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17 22:24:18 +00:00
Rafael Espindola
c27d8b42ef Delete deprecated function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269853 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17 22:07:45 +00:00
David Blaikie
7fdce00ff3 llvm-dwp: Add error handling for multiple type sections in a dwp file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269851 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17 22:00:57 +00:00
Chris Bieneman
d640f9183d Fixing a test case that I broke by fixing r269846
This should fix the bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269850 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17 21:55:45 +00:00
Lang Hames
47ad42e0ee [Object] Move isNotObjectErrorInvalidFileType out of header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269848 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17 21:38:53 +00:00
Justin Bogner
9c81a3f598 [PM] Port DSE to the new pass manager
Patch by JakeVanAdrighem. Thanks!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269847 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17 21:38:13 +00:00
Chris Bieneman
20b603a8a3 [obj2yaml][yaml2obj] Fixing dyld_info_command mappings
Apparently I mucked up the mappings here, which was causing some binary differences in round tripping.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269846 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17 21:33:59 +00:00
Chris Bieneman
b04144c7d6 [obj2yaml] [yaml2obj] Support MachO section and section_64 structs
This patch adds round trip support for MachO section structs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269845 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17 21:31:02 +00:00
Lang Hames
79f152aca1 Remove unnecessary header include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269844 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17 21:15:50 +00:00
Dan Gohman
e5abbb2bf0 [WebAssembly] Don't stackify calls past stack pointer modifications.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269843 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17 21:14:26 +00:00
Adrian Prantl
888bd0bf87 Debug Info: Introduce a DwarfDebug::UseDWARF2Bitfields flag
instead of having DwarfUnit query the debugger tuning options.

Follow-up commmit to r269827.
Thanks to Paul Robinson for pointing this out!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269840 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17 21:07:16 +00:00