oota-llvm.git
9 years agoRevert r239095 incorrect test tree.
Colin LeMahieu [Thu, 4 Jun 2015 21:32:42 +0000 (21:32 +0000)]
Revert r239095 incorrect test tree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239102 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[NVPTX] roll forward r239082
Jingyue Wu [Thu, 4 Jun 2015 21:28:26 +0000 (21:28 +0000)]
[NVPTX] roll forward r239082

NVPTXISelDAGToDAG translates "addrspacecast to param" to
NVPTX::nvvm_ptr_gen_to_param

Added an llc test in bug21465.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239100 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSimplify ARMTargetParser::getArchSynonym
Artyom Skrobov [Thu, 4 Jun 2015 21:26:58 +0000 (21:26 +0000)]
Simplify ARMTargetParser::getArchSynonym

Summary:
1) The only caller, ARMTargetParser::parseArch, uses the results for an "endswith" test; so, including the "arm" prefix into the result is unnecessary.
2) Most ARMTargetParser::parseArch callers pass it the output from ARMTargetParser::getCanonicalArchName; so, make this behaviour the default. Then, including the "arm" prefix into the cases is unnecessary.

Reviewers: rengolin

Reviewed By: rengolin

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239099 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Removing unused variable.
Colin LeMahieu [Thu, 4 Jun 2015 21:22:12 +0000 (21:22 +0000)]
[Hexagon] Removing unused variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239097 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[MachOWriter] Use for-range and roll some duplicated code into loops.
Benjamin Kramer [Thu, 4 Jun 2015 21:17:27 +0000 (21:17 +0000)]
[MachOWriter] Use for-range and roll some duplicated code into loops.

No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239096 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Adding functionality for duplexing. Duplexing is a way to compress commonl...
Colin LeMahieu [Thu, 4 Jun 2015 21:16:16 +0000 (21:16 +0000)]
[Hexagon] Adding functionality for duplexing.  Duplexing is a way to compress commonly used pairs of instructions in order to reduce code size.  The test case duplex.ll normally would be 8 bytes, assign register to 0 and jump to link register.  After duplexing this is only 4 bytes.  This also tests the HexagonMCShuffler code path which is used to make sure duplexed instructions still follow slot requirements.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239095 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert r239082
Jingyue Wu [Thu, 4 Jun 2015 21:07:08 +0000 (21:07 +0000)]
Revert r239082

llc crashed for NVPTX backend

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239094 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove unused argument. NFC.
Rafael Espindola [Thu, 4 Jun 2015 20:55:49 +0000 (20:55 +0000)]
Remove unused argument. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239092 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRe-unique_ptrify LoadedObjectInfo::clone after it was reverted due to some other...
David Blaikie [Thu, 4 Jun 2015 20:54:32 +0000 (20:54 +0000)]
Re-unique_ptrify LoadedObjectInfo::clone after it was reverted due to some other changes that broke on GCC around the same time

Apparently this functionality isn't used in-tree (or I would go & make
the explicit unique_ptr constructions into implicit constructions to
make them more self documenting now that clone doesn't return a raw
owning pointer anymore) but only by the Julia frontend. This isn't
ideal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239091 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTidy comment. NFC.
Diego Novillo [Thu, 4 Jun 2015 20:49:52 +0000 (20:49 +0000)]
Tidy comment. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239090 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoErase constant dbgloc on reuse in PHI node
Sergey Dmitrouk [Thu, 4 Jun 2015 20:48:40 +0000 (20:48 +0000)]
Erase constant dbgloc on reuse in PHI node

Basic block selection involves checking successor BBs for PHI nodes
that depend on the current BB.  In case such BBs are found, the value
being selected is a constant and such constant already exists in
current BB, it's value is reused.

This might lead to wrong locations in some situations, especially if
same constant value ends up being materialized twice in two different
ways, which discards that sharing and leaves us with wrong debug
location in the successor BB.

In code this involves the following sequence of calls:

 SelectionDAGBuilder::HandlePHINodesInSuccessorBlocks ->
 SelectionDAGBuilder::CopyValueToVirtualRegister ->
 SelectionDAGBuilder::getNonRegisterValue

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239089 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRetry defaulting the virtual dtor in LoadedObjectInfo
David Blaikie [Thu, 4 Jun 2015 20:41:51 +0000 (20:41 +0000)]
Retry defaulting the virtual dtor in LoadedObjectInfo

Originally committed in r237975, GCC 4.7 gave a compilation error
regarding "looser throw specification" though it seemed to be pointing
to a virtual defaulted dtor in a base class and an override defaulted
dtor in a derived class - so I'm not quite sure why/how they could end
up with different throw specifications. To simplify and reduce the risk
of this, I've just removed the pointless override in the derived class,
the base class's should be sufficient. *fingers crossed*

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239088 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[GlobalMerge] Take into account minsize on Global users' parents.
Ahmed Bougacha [Thu, 4 Jun 2015 20:39:23 +0000 (20:39 +0000)]
[GlobalMerge] Take into account minsize on Global users' parents.

Now that we can look at users, we can trivially do this: when we would
have otherwise disabled GlobalMerge (currently -O<3), we can just run
it for minsize functions, as it's usually a codesize win.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239087 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[docs] Document "LGTM" in the lexicon.
Sean Silva [Thu, 4 Jun 2015 20:28:09 +0000 (20:28 +0000)]
[docs] Document "LGTM" in the lexicon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239085 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMC: Remove obsolete MachO UseAggressiveSymbolFolding.
Jim Grosbach [Thu, 4 Jun 2015 20:27:42 +0000 (20:27 +0000)]
MC: Remove obsolete MachO UseAggressiveSymbolFolding.

Fix the FIXME and remove this old as(1) compat option. It was useful for
bringup of the integrated assembler to diff object files, but now it's
just causing more relocations than strictly necessary to be generated.

rdar://21201804

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239084 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoHaving another go at some simple cleanup from r237975/r237976
David Blaikie [Thu, 4 Jun 2015 20:23:13 +0000 (20:23 +0000)]
Having another go at some simple cleanup from r237975/r237976

I made a few changes here in a couple of commits - breaking them out
into smaller ones in case I hit the GCC oddities again.

I'm still not /entirely/ sure what the issues were, so apologies if any
of these experiments break things again. Feel free to revert
immediately.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239083 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[NVPTX] kernel pointer arguments point to the global address space
Jingyue Wu [Thu, 4 Jun 2015 20:19:38 +0000 (20:19 +0000)]
[NVPTX] kernel pointer arguments point to the global address space

Summary:
With this patch, NVPTXLowerKernelArgs converts a kernel pointer argument to a
pointer in the global address space. This change, along with
NVPTXFavorNonGenericAddrSpaces, allows the NVPTX backend to emit ld.global.*
and st.global.* for accessing kernel pointer arguments.

Minor changes:
1. refactor: extract function convertToPointerInAddrSpace
2. fix a bug in the test case in bug21465.ll

Test Plan: lower-kernel-ptr-arg.ll

Reviewers: eliben, meheff, jholewinski

Reviewed By: jholewinski

Subscribers: wengxt, jholewinski, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239082 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Object, MachO] Don't crash on invalid MachO segment load commands.
Alexey Samsonov [Thu, 4 Jun 2015 20:08:52 +0000 (20:08 +0000)]
[Object, MachO] Don't crash on invalid MachO segment load commands.

Summary:
Properly report the error in segment load commands from MachOObjectFile
constructor instead of crashing the program.

Adjust the test case accordingly.

Test Plan: regression test suite

Reviewers: rafael, filcab

Subscribers: llvm-commits

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239081 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Object, MachO] Don't crash on invalid MachO load commands.
Alexey Samsonov [Thu, 4 Jun 2015 19:57:46 +0000 (19:57 +0000)]
[Object, MachO] Don't crash on invalid MachO load commands.

Summary:
Currently all load commands are parsed in MachOObjectFile constructor.
If the next load command cannot be parsed, or if command size is too
small, properly report it through the error code and fail to construct
the object, instead of crashing the program.

Test Plan: regression test suite

Reviewers: rafael, filcab

Subscribers: llvm-commits

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239080 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[MC] Allowing operands to be erased from MCInst.
Colin LeMahieu [Thu, 4 Jun 2015 19:49:52 +0000 (19:49 +0000)]
[MC] Allowing operands to be erased from MCInst.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239079 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Object, MachO] Don't crash on parsing invalid MachO header.
Alexey Samsonov [Thu, 4 Jun 2015 19:45:22 +0000 (19:45 +0000)]
[Object, MachO] Don't crash on parsing invalid MachO header.

Summary: Instead, properly report this error from MachOObjectFile constructor.

Test Plan: regression test suite

Reviewers: rafael

Subscribers: llvm-commits

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239078 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Object, MachO] Remove some code duplication. NFC.
Alexey Samsonov [Thu, 4 Jun 2015 19:34:14 +0000 (19:34 +0000)]
[Object, MachO] Remove some code duplication. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239077 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CMake] Fixing the check for Ninja
Chris Bieneman [Thu, 4 Jun 2015 19:33:23 +0000 (19:33 +0000)]
[CMake] Fixing the check for Ninja

Enabling Ninja Job Pools needs to be dependent on the CMAKE_MAKE_PROGRAM not the CMAKE_GENERATOR. There are generators (like "Sublime Text 2 - Ninja") that also generate ninja build files. Basing of the CMAKE_MAKE_PROGRAM is the best future-proof way to handle this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239076 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Object, MachO] Cache parsed MachO header in MachOObjectFile. NFC.
Alexey Samsonov [Thu, 4 Jun 2015 19:22:03 +0000 (19:22 +0000)]
[Object, MachO] Cache parsed MachO header in MachOObjectFile. NFC.

Summary:
Avoid parsing object file each time MachOObjectFile::getHeader() is
called. Instead, cache the header in MachOObjectFile constructor, where
it's parsed anyway. In future, we must avoid constructing the object
at all if the header can't be parsed.

Test Plan: regression test suite.

Reviewers: rafael

Subscribers: llvm-commits

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239075 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix buildbot failure on Windows by relaxing test expectations.
Alexey Samsonov [Thu, 4 Jun 2015 19:22:00 +0000 (19:22 +0000)]
Fix buildbot failure on Windows by relaxing test expectations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239074 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[bpf] add big- and host- endian support
Alexei Starovoitov [Thu, 4 Jun 2015 19:15:05 +0000 (19:15 +0000)]
[bpf] add big- and host- endian support

Summary:
-march=bpf    -> host endian
-march=bpf_le -> little endian
-match=bpf_be -> big endian

Test Plan:
v1 was tested by IBM s390 guys and appears to be working there.
It bit rots too fast here.

Reviewers: chandlerc, tstellarAMD

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239071 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[DAGCombiner] Fix wrong folding of a build_vector into a blend with zero.
Andrea Di Biagio [Thu, 4 Jun 2015 19:15:01 +0000 (19:15 +0000)]
[DAGCombiner] Fix wrong folding of a build_vector into a blend with zero.

Method 'visitBUILD_VECTOR' in the DAGCombiner knows how to combine a
build_vector of a bunch of extract_vector_elt nodes and constant zero nodes
into a shuffle blend with a zero vector.

However, method 'visitBUILD_VECTOR' forgot that a floating point
build_vector may contain negative zero as well as positive zero.

Example:

define <2 x double> @example(<2 x double> %A) {
entry:
  %0 = extractelement <2 x double> %A, i32 0
  %1 = insertelement <2 x double> undef, double %0, i32 0
  %2 = insertelement <2 x double> %1, double -0.0, i32 1
  ret <2 x double> %2
}

Before this patch, llc (with -mattr=+sse4.1) wrongly generated
  movq   %xmm0, %xmm0  # xmm0 = xmm0[0],zero

So, the sign bit of the negative zero was effectively lost.

This patch fixes the problem by adding explicit checks for positive zero.

With this patch, llc produces the following code for the example above:
  movhpd .LCPI0_0(%rip), %xmm0

where .LCPI0_0 referes to a 'double -0'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239070 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix the check for Ninja in the CMake build.
Evgeniy Stepanov [Thu, 4 Jun 2015 18:54:16 +0000 (18:54 +0000)]
Fix the check for Ninja in the CMake build.

The current check never passes, because CMAKE_MAKE_PROGRAM, at least on Linux,
includes the full path to the "ninja" binary; this effectively disables
compile/link jobs pools.

Use CMAKE_GENERATOR STREQUAL "Ninja" as a more reliable check.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239069 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake test case more readable: move CHECK-lines next to corresponding RUN-lines.
Alexey Samsonov [Thu, 4 Jun 2015 18:50:04 +0000 (18:50 +0000)]
Make test case more readable: move CHECK-lines next to corresponding RUN-lines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239068 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agollvm-objdump: return non-zero exit code for certain cases of invalid input
Alexey Samsonov [Thu, 4 Jun 2015 18:34:11 +0000 (18:34 +0000)]
llvm-objdump: return non-zero exit code for certain cases of invalid input

* If the input file is missing;
* If the type of input object file can't be recognized;
* If the object file can't be parsed correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239065 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[APInt] Remove special case for i1.
Benjamin Kramer [Thu, 4 Jun 2015 18:19:13 +0000 (18:19 +0000)]
[APInt] Remove special case for i1.

Add a unit test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239062 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTest commit access.
Gabor Ballabas [Thu, 4 Jun 2015 17:30:26 +0000 (17:30 +0000)]
Test commit access.

Fix trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239058 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SDag switch lowering] Simplify code a bit. No functional change intended.
Benjamin Kramer [Thu, 4 Jun 2015 17:07:59 +0000 (17:07 +0000)]
[SDag switch lowering] Simplify code a bit. No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239056 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Reimplement isLegalAddressingMode
Matt Arsenault [Thu, 4 Jun 2015 16:17:42 +0000 (16:17 +0000)]
R600/SI: Reimplement isLegalAddressingMode

Now that we sometimes know the address space, this can
theoretically do a better job.

This needs better test coverage, but this mostly depends on
first updating the loop optimizatiosn to provide the address
space.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239053 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCodeGenPrepare: Provide address space to isLegalAddressingMode
Matt Arsenault [Thu, 4 Jun 2015 16:17:38 +0000 (16:17 +0000)]
CodeGenPrepare: Provide address space to isLegalAddressingMode

Use -1 as the address space if it can't be determined.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239052 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoPass address space to isLegalAddressingMode in DAGCombiner
Matt Arsenault [Thu, 4 Jun 2015 16:17:34 +0000 (16:17 +0000)]
Pass address space to isLegalAddressingMode in DAGCombiner

No test because I don't know of a target that makes use
of address spaces and indexed load / store.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239051 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Fix some cases for load / store of half
Matt Arsenault [Thu, 4 Jun 2015 16:00:27 +0000 (16:00 +0000)]
R600/SI: Fix some cases for load / store of half

Mostly argument loads were producing broken zextloads
from an FP type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239049 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSwitch lowering: fix assert in buildBitTests (PR23738)
Hans Wennborg [Thu, 4 Jun 2015 15:55:00 +0000 (15:55 +0000)]
Switch lowering: fix assert in buildBitTests (PR23738)

When checking (High - Low + 1).sle(BitWidth), BitWidth would be truncated
to the size of the left-hand side. In the case of this PR, the left-hand
side was i4, so BitWidth=64 got truncated to 0 and the assert failed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239048 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoOmit unused section symbols from the symbol table.
Rafael Espindola [Thu, 4 Jun 2015 15:33:30 +0000 (15:33 +0000)]
Omit unused section symbols from the symbol table.

Section symbols exist as an optimization: instead of having multiple relocations
point to different symbols, many of them can point to a single section symbol.

When that optimization is unused, a section symbol is also unused and adds no
extra information to the object file.

This saves a bit of space on the object files and makes the output of
llvm-objdump -t easier to read and consequently some tests get quite a bit
simpler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239045 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CMake] Add warning for using compile and link pools on unsupported versions of CMake...
Chris Bieneman [Thu, 4 Jun 2015 15:33:08 +0000 (15:33 +0000)]
[CMake] Add warning for using compile and link pools on unsupported versions of CMake or non-ninja generators.

Summary: I've gotten feedback from users on CMake 2.8 that the compile and link pool options were not working. This is expected so I'm adding a warning so we can report invalid configurations to users.

Reviewers: eugenis

Reviewed By: eugenis

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239044 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMove test that depends on x86 to the x86 directory.
Rafael Espindola [Thu, 4 Jun 2015 15:25:47 +0000 (15:25 +0000)]
Move test that depends on x86 to the x86 directory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239043 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoNo need to check the raw relocation bytes if checking the parsed dump.
Rafael Espindola [Thu, 4 Jun 2015 15:21:17 +0000 (15:21 +0000)]
No need to check the raw relocation bytes if checking the parsed dump.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239042 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agollvm-readobj can parse relocations, no need to check the raw bytes.x
Rafael Espindola [Thu, 4 Jun 2015 15:15:12 +0000 (15:15 +0000)]
llvm-readobj can parse relocations, no need to check the raw bytes.x

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239041 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReplace custom fixed endian to raw_ostream emission with EndianStream.
Benjamin Kramer [Thu, 4 Jun 2015 15:03:02 +0000 (15:03 +0000)]
Replace custom fixed endian to raw_ostream emission with EndianStream.

Less code, clearer and more efficient. No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239040 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDisassemble the start of sections even if there is no symbol there.
Rafael Espindola [Thu, 4 Jun 2015 15:01:05 +0000 (15:01 +0000)]
Disassemble the start of sections even if there is no symbol there.

We already handled a section with no symbols, extend that to also handle a
section with symbols that don't include the section start.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239039 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDon't create a MIN/MAX node if the underlying compare has more than one use.
James Molloy [Thu, 4 Jun 2015 13:48:23 +0000 (13:48 +0000)]
Don't create a MIN/MAX node if the underlying compare has more than one use.

If the compare in a select pattern has another use then it can't be removed, so we'd just
be creating repeated code if we created a min/max node.

Spotted by Matt Arsenault!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239037 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReplace string GNU Triples with llvm::Triple in MCAsmInfo subclasses and create*AsmIn...
Daniel Sanders [Thu, 4 Jun 2015 13:12:25 +0000 (13:12 +0000)]
Replace string GNU Triples with llvm::Triple in MCAsmInfo subclasses and create*AsmInfo(). NFC.

Summary:
This is the first of several patches to eliminate StringRef forms of GNU
triples from the internals of LLVM. After this is complete, GNU triples
will be replaced by a more authoratitive representation in the form of
an LLVM TargetTuple.

Reviewers: rengolin

Reviewed By: rengolin

Subscribers: ted, llvm-commits, rengolin, jholewinski

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239036 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoInclude BPF target in CMake builds.
Daniel Sanders [Thu, 4 Jun 2015 12:51:20 +0000 (12:51 +0000)]
Include BPF target in CMake builds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239035 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTidy code in InstrProfiling.cpp. NFC.
Diego Novillo [Thu, 4 Jun 2015 11:45:32 +0000 (11:45 +0000)]
Tidy code in InstrProfiling.cpp. NFC.

Removed the redundant "llvm::" from class names in InstrProfiling.cpp
clang-format is ran on the changes.

Patch from Betul Buyukkurt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239034 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[C API] Add LLVMStructGetTypeAtIndex.
Peter Zotov [Thu, 4 Jun 2015 09:09:53 +0000 (09:09 +0000)]
[C API] Add LLVMStructGetTypeAtIndex.

Patch by deadalnix (Amaury SECHET).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239029 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAVX-512: I brought back vector-shuffle-512-v8.ll test.
Elena Demikhovsky [Thu, 4 Jun 2015 07:49:56 +0000 (07:49 +0000)]
AVX-512: I brought back vector-shuffle-512-v8.ll test.
I re-generated it after all AVX-512 shuffle optimizations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239026 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[TableGen] Replace a couple if/else chains with a switch. NFC
Craig Topper [Thu, 4 Jun 2015 07:40:16 +0000 (07:40 +0000)]
[TableGen] Replace a couple if/else chains with a switch. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239023 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[TableGen] Use range-based for loops. NFC
Craig Topper [Thu, 4 Jun 2015 07:40:14 +0000 (07:40 +0000)]
[TableGen] Use range-based for loops. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239022 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[TableGen] Merge single prefix bit in RecordVal into PointerIntPair with Name to...
Craig Topper [Thu, 4 Jun 2015 07:40:12 +0000 (07:40 +0000)]
[TableGen] Merge single prefix bit in RecordVal into PointerIntPair with Name to reduce memory usage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239021 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTest commit
Igor Breger [Thu, 4 Jun 2015 07:23:38 +0000 (07:23 +0000)]
Test commit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239019 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake the test introduced in r239015 more targeted.
David Majnemer [Thu, 4 Jun 2015 07:21:42 +0000 (07:21 +0000)]
Make the test introduced in r239015 more targeted.

We don't need to go through LSR to trigger this bug.  Instead,
hand-craft a tricky GEP and get the constant folder to hack on it when
parsing the IR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239017 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAVX-512: added all SKX forms of VPERMW/D/Q instructions.
Elena Demikhovsky [Thu, 4 Jun 2015 07:07:13 +0000 (07:07 +0000)]
AVX-512: added all SKX forms of VPERMW/D/Q instructions.
Added all forms of VPERMPS/PD instrcuctions.
Added encoding tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239016 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ConstantFold] Don't skip the first gep index when folding geps
David Majnemer [Thu, 4 Jun 2015 07:01:56 +0000 (07:01 +0000)]
[ConstantFold] Don't skip the first gep index when folding geps

We neglected to check if the first index made the GEP ineligible for
'inbounds'.

This fixes PR23753.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239015 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemoved {}, NFC.
Elena Demikhovsky [Thu, 4 Jun 2015 07:01:29 +0000 (07:01 +0000)]
Removed {}, NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239014 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoBring back r239006 with a fix.
Rafael Espindola [Thu, 4 Jun 2015 05:59:23 +0000 (05:59 +0000)]
Bring back r239006 with a fix.

The fix is just that getOther had not been updated for packing the st_other
values in fewer bits and could return spurious values:

-  unsigned Other = (getFlags() & (0x3f << ELF_STO_Shift)) >> ELF_STO_Shift;
+  unsigned Other = (getFlags() & (0x7 << ELF_STO_Shift)) >> ELF_STO_Shift;

Original message:

Pack the MCSymbolELF bit fields into MCSymbol's Flags.

This reduces MCSymolfELF from 64 bytes to 56 bytes on x86_64.

While at it, also make getOther/setOther easier to use by accepting unshifted
STO_* values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239012 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd testcase that would crash before the previous revert.
Rafael Espindola [Thu, 4 Jun 2015 05:51:13 +0000 (05:51 +0000)]
Add testcase that would crash before the previous revert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239011 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "Pack the MCSymbolELF bit fields into MCSymbol's Flags."
Rafael Espindola [Thu, 4 Jun 2015 05:00:12 +0000 (05:00 +0000)]
Revert "Pack the MCSymbolELF bit fields into MCSymbol's Flags."

This reverts commit r239006.

I am debugging the powerpc failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239010 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoPack the MCSymbolELF bit fields into MCSymbol's Flags.
Rafael Espindola [Thu, 4 Jun 2015 02:32:20 +0000 (02:32 +0000)]
Pack the MCSymbolELF bit fields into MCSymbol's Flags.

This reduces MCSymolfELF from 64 bytes to 56 bytes on x86_64.

While at it, also make getOther/setOther easier to use by accepting unshifted
STO_* values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239006 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PM/AA] Start refactoring AliasAnalysis to remove the analysis group and
Chandler Carruth [Thu, 4 Jun 2015 02:03:15 +0000 (02:03 +0000)]
[PM/AA] Start refactoring AliasAnalysis to remove the analysis group and
port it to the new pass manager.

All this does is extract the inner "location" class used by AA into its
own full fledged type. This seems *much* cleaner as MemoryDependence and
soon MemorySSA also use this heavily, and it doesn't make much sense
being inside the AA infrastructure.

This will also make it much easier to break apart the AA infrastructure
into something that stands on its own rather than using the analysis
group design.

There are a few places where this makes APIs not make sense -- they were
taking an AliasAnalysis pointer just to build locations. I'll try to
clean those up in follow-up commits.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239003 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agomake reciprocal estimate code generation more flexible by adding command-line options...
Sanjay Patel [Thu, 4 Jun 2015 01:32:35 +0000 (01:32 +0000)]
make reciprocal estimate code generation more flexible by adding command-line options (3rd try)

The first try (r238051) to land this was reverted due to ExecutionEngine build failure;
that was hopefully addressed by r238788.

The second try (r238842) to land this was reverted due to BUILD_SHARED_LIBS failure;
that was hopefully addressed by r238953.

This patch adds a TargetRecip class for processing many recip codegen possibilities.
The class is intended to handle both command-line options to llc as well
as options passed in from a front-end such as clang with the -mrecip option.

The x86 backend is updated to use the new functionality.
Only -mcpu=btver2 with -ffast-math should see a functional change from this patch.
All other x86 CPUs continue to *not* use reciprocal estimates by default with -ffast-math.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239001 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600: Re-enable sub-reg liveness
Tom Stellard [Thu, 4 Jun 2015 01:20:04 +0000 (01:20 +0000)]
R600: Re-enable sub-reg liveness

The bug in the R600 backend that this uncovered has been fixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238999 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove MCELFSymbolFlags.h. It is now internal to MCSymbolELF.
Rafael Espindola [Thu, 4 Jun 2015 00:47:43 +0000 (00:47 +0000)]
Remove MCELFSymbolFlags.h. It is now internal to MCSymbolELF.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238996 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoImprove test added in r238481.
Alexey Samsonov [Wed, 3 Jun 2015 22:36:17 +0000 (22:36 +0000)]
Improve test added in r238481.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238985 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Object, MachO] Introduce MachOObjectFile::load_commands() range iterator.
Alexey Samsonov [Wed, 3 Jun 2015 22:19:36 +0000 (22:19 +0000)]
[Object, MachO] Introduce MachOObjectFile::load_commands() range iterator.

Summary:
Now users don't have to manually deal with getFirstLoadCommandInfo() /
getNextLoadCommandInfo(), calculate the number of load segments, etc.

No functionality change.

Test Plan: regression test suite

Reviewers: rafael, lhames, loladiro

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238983 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemember if a weakref of a symbol has been used.
Rafael Espindola [Wed, 3 Jun 2015 21:52:06 +0000 (21:52 +0000)]
Remember if a weakref of a symbol has been used.

This avoids yet another last minute patching of the binding.

While at it, also simplify the weakref implementation a bit by not walking
past it in the expression evaluation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238982 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoStore whether a symbol is a comdat signature in MCSymbolELF.
Rafael Espindola [Wed, 3 Jun 2015 21:41:59 +0000 (21:41 +0000)]
Store whether a symbol is a comdat signature in MCSymbolELF.

With this getBinging can now return the correct answer for all cases not
involving a .symver and the elf writer doesn't need to patch it last minute.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238980 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRecord in a MCSymbolELF if it has been used in a relocation.
Rafael Espindola [Wed, 3 Jun 2015 21:30:10 +0000 (21:30 +0000)]
Record in a MCSymbolELF if it has been used in a relocation.

No functionality change, just saves an on the side map.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238979 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSimplify the logic in ELFObjectWriter::isInSymtab. NFC.
Rafael Espindola [Wed, 3 Jun 2015 21:23:21 +0000 (21:23 +0000)]
Simplify the logic in ELFObjectWriter::isInSymtab. NFC.

_GLOBAL_OFFSET_TABLE_ is not magical and we can now directly check for a
symbol never getting an explicit binding.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238978 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoConvert BindingExplicitlySet into a MCSymbolELF field.
Rafael Espindola [Wed, 3 Jun 2015 21:18:03 +0000 (21:18 +0000)]
Convert BindingExplicitlySet into a MCSymbolELF field.

I will pack it better in a followup patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238975 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReapply r238941 - [dsymutil] Accept a YAML debug map as input instead of a binary.
Frederic Riss [Wed, 3 Jun 2015 20:29:24 +0000 (20:29 +0000)]
Reapply r238941 - [dsymutil] Accept a YAML debug map as input instead of a binary.

With a couple more constructors that GCC thinks are necessary.

Original commit message:

[dsymutil] Accept a YAML debug map as input instead of a binary.

To do this, the user needs to pass the new -y flag.
As it wasn't tested before, the debug map YAML deserialization was
completely buggy (mainly because the DebugMapObject has a dual
mapping that allows to search by name and by address, but only the
StringMap got populated). It's fixed and tested in this commit by
augmenting some test with a 2 stage dwarf link: a frist llvm-dsymutil
reads the debug map and pipes it in a second instance that does the
actual link without touching the initial binary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238959 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Fix tests with triples in them
Matt Arsenault [Wed, 3 Jun 2015 20:04:05 +0000 (20:04 +0000)]
R600/SI: Fix tests with triples in them

Only set the triple from the command line options.
Some of these were still testing SI features and using the
old r600-- triple.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238958 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoadd missing dependency on Target lib for tools
Sanjay Patel [Wed, 3 Jun 2015 19:07:51 +0000 (19:07 +0000)]
add missing dependency on Target lib for tools

This was exposed by r238842 (which was reverted by r238900)
when doing a CMake build with -DBUILD_SHARED_LIBS=ON.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238953 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove getOrCreateSymbolData. There is no MCSymbolData anymore.
Rafael Espindola [Wed, 3 Jun 2015 19:03:11 +0000 (19:03 +0000)]
Remove getOrCreateSymbolData. There is no MCSymbolData anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238952 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRuntimeDyld: override EH frame registration with trivial version.
Tim Northover [Wed, 3 Jun 2015 18:26:52 +0000 (18:26 +0000)]
RuntimeDyld: override EH frame registration with trivial version.

llvm-rtdyld was relying on the default memory manager's EH frame registration,
which is host-dependent rather than target-dependent. As a result, big-endian
ELF Mips EH frames were being registered on OS X (and elsewhere). This is a
really bad idea.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238951 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Test doesn't work on all platforms. At any rate the uninitialized variable...
Colin LeMahieu [Wed, 3 Jun 2015 18:00:45 +0000 (18:00 +0000)]
[Hexagon] Test doesn't work on all platforms.  At any rate the uninitialized variable issue was fixed.  Removing re-registering ASM backend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238949 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Reapply 238772 OSABI was not correctly set, added empty_elf test to make...
Colin LeMahieu [Wed, 3 Jun 2015 17:34:16 +0000 (17:34 +0000)]
[Hexagon] Reapply 238772 OSABI was not correctly set, added empty_elf test to make sure it is.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238947 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "[dsymutil] Accept a YAML debug map as input instead of a binary."
Frederic Riss [Wed, 3 Jun 2015 17:08:42 +0000 (17:08 +0000)]
Revert "[dsymutil] Accept a YAML debug map as input instead of a binary."

This reverts commit r238941 while I figure out the bot issues.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238943 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[dsymutil] Accept a YAML debug map as input instead of a binary.
Frederic Riss [Wed, 3 Jun 2015 16:57:16 +0000 (16:57 +0000)]
[dsymutil] Accept a YAML debug map as input instead of a binary.

To do this, the user needs to pass the new -y flag.
As it wasn't tested before, the debug map YAML deserialization was
completely buggy (mainly because the DebugMapObject has a dual
mapping that allows to search by name and by address, but only the
StringMap got populated). It's fixed and tested in this commit by
augmenting some test with a 2 stage dwarf link: a frist llvm-dsymutil
reads the debug map and pipes it in a second instance that does the
actual link without touching the initial binary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238941 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[dsymutil] Replace -parse-only option with -dump-debug-map
Frederic Riss [Wed, 3 Jun 2015 16:57:12 +0000 (16:57 +0000)]
[dsymutil] Replace -parse-only option with -dump-debug-map

As the serialized debug map is becoming a first class citizen, a way
to cleanly dump it is required. We used -parse-only combined with
-v for that purpose before, but it dumps a lot of unrelated debug
stuff. Dumping the debug map was the only use of the -parse-only flag
anyway, so replace it with a more useful option.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238940 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[dsymutil] Reflow option declarations to be more readable.
Frederic Riss [Wed, 3 Jun 2015 16:57:07 +0000 (16:57 +0000)]
[dsymutil] Reflow option declarations to be more readable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238939 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoARM: Thumb2 LDRD/STRD supports independent input/output regs
Matthias Braun [Wed, 3 Jun 2015 16:30:24 +0000 (16:30 +0000)]
ARM: Thumb2 LDRD/STRD supports independent input/output regs

The existing code would unnecessarily break LDRD/STRD apart with
non-adjacent registers, on thumb2 this is not necessary.

Ideally on thumb2 we shouldn't match for ldrd/strd pre-regalloc anymore
as there is not reason to set register hints anymore, changing that is
something for a future patch however.

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

Recommiting after the revert in r238821, the buildbot still failed with
the patch removed so there seems to be another reason for the breakage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238935 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix typo in comment. NFC.
Diego Novillo [Wed, 3 Jun 2015 16:22:12 +0000 (16:22 +0000)]
Fix typo in comment. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238933 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Statepoints] Mark statepoint intrinsic with Throws attribute
Igor Laevsky [Wed, 3 Jun 2015 16:18:58 +0000 (16:18 +0000)]
[Statepoints] Mark statepoint intrinsic with Throws attribute

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238932 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[arm] Fix r238921. We must handle Constraint_i too.
Daniel Sanders [Wed, 3 Jun 2015 14:17:18 +0000 (14:17 +0000)]
[arm] Fix r238921. We must handle Constraint_i too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238925 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agore-apply 238809
Asaf Badouh [Wed, 3 Jun 2015 13:41:48 +0000 (13:41 +0000)]
re-apply 238809
AVX-512: Implemented GETEXP instruction for KNL and SKX
Added rounding mode modifier for SQRTPS/PD
Added tests for encoding and intrinsics.
CR:
http://reviews.llvm.org/D9991

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238923 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[arm] Distinguish the /U[qytnms]/, 'Uv', 'Q', and 'm' inline assembly memory constraints.
Daniel Sanders [Wed, 3 Jun 2015 12:33:56 +0000 (12:33 +0000)]
[arm] Distinguish the /U[qytnms]/, 'Uv', 'Q', and 'm' inline assembly memory constraints.

Summary:
But still handle them the same way since I don't know how they differ on
this target.

Of these, /U[qytnms]/ do not have backend tests but are accepted by clang.

No functional change intended.

Reviewers: t.p.northover

Reviewed By: t.p.northover

Subscribers: t.p.northover, aemerson, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238921 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAVX-512: More code improvements in shuffles, NFC
Elena Demikhovsky [Wed, 3 Jun 2015 12:05:03 +0000 (12:05 +0000)]
AVX-512: More code improvements in shuffles, NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238919 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAVX-512: VSHUFPD instruction selection - code improvements
Elena Demikhovsky [Wed, 3 Jun 2015 11:21:01 +0000 (11:21 +0000)]
AVX-512: VSHUFPD instruction selection - code improvements

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238918 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAVX-512: Implemented SHUFF32x4/SHUFF64x2/SHUFI32x4/SHUFI64x2 instructions for SKX...
Elena Demikhovsky [Wed, 3 Jun 2015 10:56:40 +0000 (10:56 +0000)]
AVX-512: Implemented SHUFF32x4/SHUFF64x2/SHUFI32x4/SHUFI64x2 instructions for SKX and KNL.
Added tests for encoding.

By Igor Breger (igor.breger@intel.com)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238917 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoX86: Added MPX feature and bound registers.
Elena Demikhovsky [Wed, 3 Jun 2015 10:30:57 +0000 (10:30 +0000)]
X86: Added MPX feature and bound registers.
IntelĀ® Memory Protection Extensions (IntelĀ® MPX) is a new feature in Skylake.
It is a part of KNL and SKX sets. It is also a part of Skylake client.

I added definition of %bnd0 - %bnd3 registers, each register is a pair of 64-bit integers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238916 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRe-commit r238838, r238844 with fix for host/target endian mismatch and windows buildbot.
Daniel Sanders [Wed, 3 Jun 2015 10:27:28 +0000 (10:27 +0000)]
Re-commit r238838, r238844 with fix for host/target endian mismatch and windows buildbot.

The windows buildbot originally failed because the check expressions are
evaluated as 64-bit values, even for 32-bit symbols. Fixed this by comparing
bottom 32-bits of the expressions.

The host/target endian mismatch issue is that it's invalid to read/write target
values using a host pointer without taking care of endian differences between
the target and host. Most (if not all) instances of
reinterpret_cast<uint32_t*>() in the RuntimeDyld are examples of this bug.
This has been fixed for Mips using the endian aware read/write functions.

The original commits were:
r238838:
[mips] Add RuntimeDyld tests for currently supported O32 relocations.

Reviewers: petarj, vkalintiris

Reviewed By: vkalintiris

Subscribers: vkalintiris, llvm-commits

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

r238844:
[mips][mcjit] Add support for R_MIPS_PC32.

Summary:
This allows us to resolve relocations for DW_EH_PE_pcrel TType encodings
in the exception handling LSDA.

Also fixed a nearby typo.

Reviewers: petarj, vkalintiris

Reviewed By: vkalintiris

Subscribers: vkalintiris, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238915 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove stray semicolon. NFC.
Vasileios Kalintiris [Wed, 3 Jun 2015 08:51:30 +0000 (08:51 +0000)]
Remove stray semicolon. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238908 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Removed (unused) FSRL x86 operation
Simon Pilgrim [Wed, 3 Jun 2015 08:32:36 +0000 (08:32 +0000)]
[X86] Removed (unused) FSRL x86 operation

This patch removes the old X86ISD::FSRL op - which allowed float vectors to use the byte right shift operations (causing a domain switch....).

Since the refactoring of the shuffle lowering code this no longer has any use.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238906 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoThis reverts commit r238838, r238844 and r238888.
Rafael Espindola [Wed, 3 Jun 2015 05:39:59 +0000 (05:39 +0000)]
This reverts commit r238838, r238844 and r238888.

Trying to bring back a windows bot:

http://lab.llvm.org:8011/builders/clang-x86-win2008-selfhost/builds/1224/steps/ninja%20check%202/logs/FAIL%3A%20LLVM%3A%3AELF_O32_PIC_relocations.s

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238903 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "make reciprocal estimate code generation more flexible by adding command...
Rafael Espindola [Wed, 3 Jun 2015 05:32:44 +0000 (05:32 +0000)]
Revert "make reciprocal estimate code generation more flexible by adding command-line options (2nd try)"

This reverts commit r238842.

It broke -DBUILD_SHARED_LIBS=ON build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238900 91177308-0d34-0410-b5e6-96231b3b80d8