121595 Commits

Author SHA1 Message Date
Matt Arsenault
7e657c85c6 SelectionDAG: Support Expand of f16 extloads
Currently this hits an assert that extload should
always be supported, which assumes integer extloads.

This moves a hack out of SI's argument lowering and
is covered by existing tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247113 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-09 01:12:27 +00:00
Dan Gohman
48a473e770 [WebAssembly] Implement WebAssemblyInstrInfo::copyPhysReg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247110 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-09 00:52:47 +00:00
Matt Arsenault
5b5093b7a1 Fix typos / grammar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247109 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-09 00:38:33 +00:00
Duncan P. N. Exon Smith
9f4d77fcd0 Revert "Bitcode: ArrayRef-ize EmitRecordWithAbbrev(), NFC"
This reverts commit r247107.  Turns out clang calls these functions
directly, and `ArrayRef<T>` doesn't have a working implicit conversion
from `SmallVector<T>`.

http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_build/14247

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247108 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-09 00:37:52 +00:00
Duncan P. N. Exon Smith
3db59a76ef Bitcode: ArrayRef-ize EmitRecordWithAbbrev(), NFC
Change `EmitRecordWithAbbrev()` and friends to take an `ArrayRef<T>`
instead of requiring a `SmallVectorImpl<T>`.  No functionality change
intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247107 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-09 00:34:25 +00:00
Davide Italiano
793616c068 [llvm-readobj] MachO -- dump LinkerOptions load command.
Example output:

Linker Options {
  Size: 32
  Count: 2
  Strings [
    Value: -framework
    Value: Cocoa
  ]
}

There were only two tests using this -- so I converted them as part of
this commit rather than separately.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247106 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-09 00:21:18 +00:00
Reid Kleckner
18329ced97 [WinEH] Avoid creating MBBs for LLVM BBs that cannot contain code
Typically these are catchpads, which hold data used to decide whether to
catch the exception or continue unwinding. We also shouldn't create MBBs
for catchendpads, cleanupendpads, or terminatepads, since no real code
can live in them.

This fixes a problem where MI passes (like the register allocator) would
try to put code into catchpad blocks, which are not executed by the
runtime. In the new world, blocks ending in invokes now have many
possible successors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247102 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 23:28:38 +00:00
Peter Collingbourne
9e5511adf8 Re-apply r247080 with order of evaluation fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247095 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 22:49:35 +00:00
Reid Kleckner
dff75493e8 [WinEH] Emit prologues and epilogues for funclets
Summary:
32-bit funclets have short prologues that allocate enough stack for the
largest call in the whole function. The runtime saves CSRs for the
funclet. It doesn't restore CSRs after we finally transfer control back
to the parent funciton via a CATCHRET, but that's a separate issue.
32-bit funclets also have to adjust the incoming EBP value, which is
what llvm.x86.seh.recoverframe does in the old model.

64-bit funclets need to spill CSRs as normal. For simplicity, this just
spills the same set of CSRs as the parent function, rather than trying
to compute different CSR sets for the parent function and each funclet.
64-bit funclets also allocate enough stack space for the largest
outgoing call frame, like 32-bit.

Reviewers: majnemer

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247092 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 22:44:41 +00:00
Peter Collingbourne
938e129fc2 Revert r247080, "LowerBitSets: Extend pass to support functions as bitset
members." as it causes test failures on a number of bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247088 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 22:33:23 +00:00
Vedant Kumar
52dd30e21b [Bitcode] Add compatibility tests for new instructions
Adds basic compatibility tests for the following instructions:

  catchpad, catchendpad, cleanuppad, cleanupendpad, terminatepad,
  cleanupret, catchret

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247087 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 22:33:23 +00:00
Vedant Kumar
cc0152159f [docs] Fix typo in catchret example
An example usage of catchret omitted the "to" in "to label" in
ExceptionHandling.rst.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247086 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 22:28:38 +00:00
Eric Christopher
628c7c9d5d Fix the PPC CTR Loop pass to look for calls to the intrinsics that
read CTR and count them as reading the CTR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247083 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 22:14:58 +00:00
Peter Collingbourne
ad699c862c LowerBitSets: Extend pass to support functions as bitset members.
This change extends the bitset lowering pass to support bitsets that may
contain either functions or global variables. A function bitset is lowered to
a jump table that is laid out before one of the functions in the bitset.

Also add support for non-string bitset identifier names. This allows for
distinct metadata nodes to stand in for names with internal linkage,
as done in D11857.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247080 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 21:57:45 +00:00
Ivan Krasin
9e01a11e67 [libFuzzer]Add a test for defeating a hash sum.
Summary:
Add a test for a data followed by 4-byte hash value.
I use a slightly modified Jenkins hash function,
as described in https://en.wikipedia.org/wiki/Jenkins_hash_function

The modification is to ensure that hash(zeros) != 0.

Reviewers: kcc

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247076 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 21:22:52 +00:00
Matt Arsenault
fa7378ca6e AMDGPU/SI: Fix input vcc operand for VOP2b instructions
Adds vcc to output string input for e32. Allows option
of using e64 encoding with assembler.

Also fixes these instructions not implicitly reading exec.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247074 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 21:15:00 +00:00
Artem Belevich
d049b69952 [NVPTX] Added run NVVMReflect pass to NVPTX back-end.
The pass is needed to remove __nvvm_reflect calls when we link in
libdevice bitcode that comes with CUDA.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247072 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 21:04:55 +00:00
Derek Schuff
484f98f066 Fix comments and RUN line in x86-64 stdarg test leftover from last commit
From http://reviews.llvm.org/D12346

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247070 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 20:58:41 +00:00
Derek Schuff
0d89d696f4 x32. Fixes a bug in how struct va_list is initialized in x32
Summary: This patch modifies X86TargetLowering::LowerVASTART so that
struct va_list is initialized with 32 bit pointers in x32. It also
includes tests that call @llvm.va_start() for x32.

Patch by João Porto

Subscribers: llvm-commits, hjl.tools
Differential Revision: http://reviews.llvm.org/D12346

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247069 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 20:51:31 +00:00
Kostya Serebryany
88d071c626 [libFuzzer] remove a piece of stale code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247067 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 20:40:10 +00:00
Kostya Serebryany
e96dc98acb [libFuzzer] be more robust when dealing with files on disk (e.g. don't crash if a file was there but disappeared)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247066 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 20:36:33 +00:00
Dan Gohman
21b2bb4054 [WebAssembly] Support running without a register allocator in the default CodeGen passes
This allows backends which don't use a traditional register allocator,
but do need PHI lowering and other passes, to use the default
TargetPassConfig::addFastRegAlloc and
TargetPassConfig::addOptimizedRegAlloc implementations.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247065 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 20:36:33 +00:00
Matt Arsenault
55478a8b79 Add const overload of findRegisterUseOperand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247063 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 20:21:29 +00:00
Vedant Kumar
b74d92d82d [docs] Update documentation for the landingpad instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247062 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 20:16:35 +00:00
Sanjay Patel
8a6f3c5646 refactor matches for De Morgan's Laws; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247061 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 20:14:13 +00:00
Matt Arsenault
55ec9f281c AMDGPU: Mark s_barrier as a high latency instruction
These were marked as WriteSALU, which is low latency.
I'm guessing at the value to use, but it should probably
be considered the highest latency instruction.

I'm not sure this has any actual effect since hasSideEffects
probably is preventing any moving of these.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247060 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 19:54:32 +00:00
Matt Arsenault
33f41ffd1f AMDGPU: Fix s_barrier flags
This should be convergent. This is not a
barrier in the isBarrier sense, nor
hasCtrlDep.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247059 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 19:54:25 +00:00
Derek Schuff
c76507d03c x32. Fixes a bug in i8mem_NOREX declaration.
The old implementation assumed LP64 which is broken for x32.  Specifically, the
MOVE8rm_NOREX and MOVE8mr_NOREX, when selected, would cause a 'Cannot emit
physreg copy instruction' error message to be reported.

This patch also enable the h-register*ll tests for x32.

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

Patch by João Porto

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247058 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 19:47:15 +00:00
Matt Arsenault
626338d11e AMDGPU: Handle sub of constant for DS offset folding
sub C, x - > add (sub 0, x), C for DS offsets.

This is mostly to fix regressions that show up when
SeparateConstOffsetFromGEP is enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247054 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 19:34:22 +00:00
Diego Novillo
965f2c2437 Fix PR 24723 - Handle 0-mass backedges in irreducible loops
This corner case happens when we have an irreducible SCC that is
deeply nested.  As we work down the tree, the backedge masses start
getting smaller and smaller until we reach one that is down to 0.

Since we distribute the incoming mass using the backedge masses as
weight, the distributor does not allow zero weights.  So, we simply
ignore them (which will just use the weights of the non-zero nodes).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247050 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 19:22:17 +00:00
Davide Italiano
5bd1a50ca2 [MC/ELF] Accept zero for .align directive
.align directive refuses alignment 0 -- a comment in the code hints this is
done for GNU as compatibility, but it seems GNU as accepts .align 0
(and silently rounds up alignment to 1).

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247048 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 18:59:47 +00:00
David Blaikie
46f5c11bed Fix CPP Backend for GEP API changes for opaque pointer types
Based on a patch by Jerome Witmann.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247047 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 18:42:29 +00:00
Benjamin Kramer
8f85748178 Merge or combine tests and convert to FileCheck.
- Move tests only exercising instsimplify to instsimplify's apint-or.ll
- Actually test the CHECK lines in instsimplify's apint-or.ll
- Merge the remaining tests in apint-or1.ll and apint-or2.ll, use FileCheck

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247045 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 18:36:56 +00:00
Evgeniy Stepanov
242f547927 Fix isDiscardableIfUnused to include available_externally linkage.
AvailableExternally functions are discardable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247044 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 18:25:20 +00:00
Sanjay Patel
20a294ea5b remove function names from comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247043 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 18:24:36 +00:00
Andrew Kaylor
b25ffb37c6 Fix for bz24500: Avoid non-deterministic code generation triggered by the x86 call frame optimization
Patch by Dave Kreitzer

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247042 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 18:18:46 +00:00
Sanjay Patel
16098c386c add tests for De Morgan instcombines based on PR22723
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247040 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 18:13:03 +00:00
Sanjay Patel
c832b3af78 fix typos, remove noise; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247035 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 17:58:22 +00:00
Kostya Serebryany
828d315fd6 [libFuzzer] better documentatio for -save_minimized_corpus=1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247033 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 17:43:51 +00:00
Vedant Kumar
32a41ddf2d [Bitcode] Add compatibility test for llvm 3.7.0
This patch adds llvm-3.7 IR and generated bitcode for our compatibility
test (in accordance with the developer policy).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247031 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 17:39:21 +00:00
Kostya Serebryany
06465a68cc [libFuzzer] remove -iterations as redundant (there is also -num_runs)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247030 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 17:30:35 +00:00
JF Bastien
13b1346197 WebAssembly: NFC rename shr/sar
Renamed from: https://github.com/WebAssembly/design/pull/332

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247028 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 17:21:21 +00:00
Kostya Serebryany
872c556fa8 [libFuzzer] add one more mutator: Mutate_ChangeASCIIInteger
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247027 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 17:19:31 +00:00
Jun Bum Lim
3d88beedef Remove white space (test commit)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247021 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 16:11:22 +00:00
Zoran Jovanovic
7e31683981 [mips][microMIPS] Implement LLE, LUI, LW and LWE instructions
Differential Revision: http://reviews.llvm.org/D1179


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247017 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 15:02:50 +00:00
Dan Gohman
5710177500 [WebAssembly] Temporarily disable this test, as it depends on additional patches that aren't yet checked in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247011 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 13:21:12 +00:00
Igor Breger
b23094366e AVX512: kunpck encoding implementation
Added tests for encoding.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247010 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 13:10:00 +00:00
Dan Gohman
2e6ca7df3a [WebAssembly] Enable SSA lowering and other pre-regalloc passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247008 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 12:39:25 +00:00
Elena Demikhovsky
1c82e5f791 Removed an old comment, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247006 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 12:22:22 +00:00
Alex Lorenz
0aeea88439 MIRLangRef: Add documentation for the subregister indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247005 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-08 11:39:47 +00:00