OSDN Git Service
Kostya Serebryany [Thu, 17 Mar 2016 19:59:39 +0000 (19:59 +0000)]
[libFuzzer] deprecate several flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263739
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 17 Mar 2016 19:42:35 +0000 (19:42 +0000)]
[libFuzzer] add __attribute__((no_sanitize_memory)) to two functions that may be called from signal handler(s) or from msan. This will hopefully avoid msan false reports which I can't reproduce
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263737
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Thu, 17 Mar 2016 19:16:54 +0000 (19:16 +0000)]
[msan fix] unitalized variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263736
91177308-0d34-0410-b5e6-
96231b3b80d8
Guozhi Wei [Thu, 17 Mar 2016 18:47:20 +0000 (18:47 +0000)]
[InstCombine] Combine A->B->A BitCast
This patch enhances InstCombine to handle following case:
A -> B bitcast
PHI
B -> A bitcast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263734
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Thu, 17 Mar 2016 18:42:17 +0000 (18:42 +0000)]
[Statepoints] Export a magic constant into a header; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263733
91177308-0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Thu, 17 Mar 2016 18:27:33 +0000 (18:27 +0000)]
[lit] Enqueue tests on a separate thread to not hit limits on parallel queues
Summary:
The multiprocessing.Queue.put() call can hang if we try queueing all the
tests before starting to take them out of the queue.
The current implementation hangs if tests exceed 2^^15, on Mac OS X.
This might happen with a ninja check-all if one has a bunch of llvm
projects.
Reviewers: delcypher, bkramer
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D17609
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263731
91177308-0d34-0410-b5e6-
96231b3b80d8
Valery Pykhtin [Thu, 17 Mar 2016 17:56:33 +0000 (17:56 +0000)]
[AMDGPU] add VI disassembler tests. NFC.
Autogenerated from the corresponding assembler tests with a few FIXME added (will fix soon).
Differential Revision: http://reviews.llvm.org/D18249
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263729
91177308-0d34-0410-b5e6-
96231b3b80d8
Petar Jovanovic [Thu, 17 Mar 2016 17:11:33 +0000 (17:11 +0000)]
[PowerPC] Disable CTR loops optimization for soft float operations
This patch prevents CTR loops optimization when using soft float operations
inside loop body. Soft float operations use function calls, but function
calls are not allowed inside CTR optimized loops.
Patch by Aleksandar Beserminji.
Differential Revision: http://reviews.llvm.org/D17600
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263727
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Thu, 17 Mar 2016 17:00:29 +0000 (17:00 +0000)]
[WebAssembly] Stackify code emitted by eliminateFrameIndex and SP writeback
Summary:
MRI::eliminateFrameIndex can emit several instructions to do address
calculations; these can usually be stackified. Because instructions with
FI operands can have subsequent operands which may be expression trees,
find the top of the leftmost tree and insert the code before it, to keep
the LIFO property.
Also use stackified registers when writing back the SP value to memory
in the epilog; it's unnecessary because SP will not be used after the
epilog, and it results in better code.
Differential Revision: http://reviews.llvm.org/D18234
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263725
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 17 Mar 2016 16:55:18 +0000 (16:55 +0000)]
[COFF] Refactor section alignment calculation
Section alignment isn't completely trivial, let it live in one place so
that we may reuse it in LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263722
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 17 Mar 2016 16:55:11 +0000 (16:55 +0000)]
Forgot to commit this with r263692
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263721
91177308-0d34-0410-b5e6-
96231b3b80d8
Changpeng Fang [Thu, 17 Mar 2016 16:43:50 +0000 (16:43 +0000)]
AMDGPU/SI: Do not generate s_waitcnt after ds_permute/ds_bpermute
Symmary:
ds_permute/ds_bpermute do not read memory so s_waitcnt is not needed.
Reviewers
arsenm, tstellarAMD
Subscribers
llvm-commits, arsenm
Differential Revision:
http://reviews.llvm.org/D18197
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263720
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolai Haehnle [Thu, 17 Mar 2016 16:21:59 +0000 (16:21 +0000)]
AMDGPU: mark atomic instructions as sources of divergence
Summary:
As explained by the comment, threads will typically see different values
returned by atomic instructions even if the arguments are equal.
Reviewers: arsenm, tstellarAMD
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D18156
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263719
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 17 Mar 2016 15:59:36 +0000 (15:59 +0000)]
[X86][SSE] Simplified blend-with-zero combining
We were being too aggressive in trying to combine a shuffle into a blend-with-zero pattern, often resulting in a endless loop of contrasting combines
This patch stops the combine if we already have a blend in place (means we miss some domain corrections)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263717
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 17 Mar 2016 15:30:52 +0000 (15:30 +0000)]
propagate 'unpredictable' metadata on select instructions
This is similar to D18133 where we allowed profile weights on select instructions.
This extends that change to also allow the 'unpredictable' attribute of branches to apply to selects.
A test to check that 'unpredictable' metadata is preserved when cloning instructions was checked in at:
http://reviews.llvm.org/rL263648
Differential Revision: http://reviews.llvm.org/D18220
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263716
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Thu, 17 Mar 2016 14:10:49 +0000 (14:10 +0000)]
ARM: Revert SVN r253865, 254158, fix windows division
The two changes together weakened the test and caused a regression with division
handling in MSVC mode. They were applied to avoid an assertion being triggered
in the block frequency analysis. However, the underlying problem was simply
being masked rather than solved properly. Address the actual underlying problem
and revert the changes. Rather than analyze the cause of the assertion, the
division failure was assumed to be an overflow.
The underlying issue was a subtle bug in the BB construction in the emission of
the div-by-zero check (WIN__DBZCHK). We did not construct the proper successor
information in the basic blocks, nor did we update the PHIs associated with the
basic block when we split them. This would result in assertions being triggered
in the block frequency analysis pass.
Although the original tests are being removed, the tests themselves performed
very little in terms of validation but merely tested that we did not assert when
generating code. Update this with new tests that actually ensure that we do not
regress on the code generation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263714
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Thu, 17 Mar 2016 11:09:21 +0000 (11:09 +0000)]
[llvm-objdump] Add REQUIRES x86 directive to fix buildbots
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263708
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Thu, 17 Mar 2016 10:43:44 +0000 (10:43 +0000)]
[llvm-objdump] Add '0x' prefix to a target displacement number to accent its hex format
It might be hard to recognize a hexadecimal number without '0x' prefix.
Besides that '0x' prefix corresponds to GNU objdump behaviour.
Differential Revision: http://reviews.llvm.org/D18207
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263705
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Thu, 17 Mar 2016 10:43:36 +0000 (10:43 +0000)]
[mips] Use `formatImm` call to print immediate value in the `MipsInstPrinter`
That allows, for example, to print hex-formatted immediates using
llvm-objdump --print-imm-hex command line option.
Differential Revision: http://reviews.llvm.org/D18195
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263704
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Egerton [Thu, 17 Mar 2016 10:37:51 +0000 (10:37 +0000)]
[mips] Eliminate instances of "potentially uninitialised local variable" warnings, NFC
Summary:
This should eliminate all occurrences of this within LLVMMipsAsmParser.
This patch is in response to http://reviews.llvm.org/D17983. I was unable
to reproduce the warnings on my machine so please advise if this fixes the
warnings.
Reviewers: ariccio, vkalintiris, dsanders
Subscribers: dblaikie, dsanders, llvm-commits
Differential Revision: http://reviews.llvm.org/D18087
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263703
91177308-0d34-0410-b5e6-
96231b3b80d8
Wilfred Hughes [Thu, 17 Mar 2016 10:20:58 +0000 (10:20 +0000)]
Remove obselete reference to TypeResolve from the tutorial.
TypeResolve went away in r134829 in 2011.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263702
91177308-0d34-0410-b5e6-
96231b3b80d8
Wilfred Hughes [Thu, 17 Mar 2016 10:18:13 +0000 (10:18 +0000)]
Minor grammar fix in kaleidoscope tutorial.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263700
91177308-0d34-0410-b5e6-
96231b3b80d8
Wilfred Hughes [Thu, 17 Mar 2016 09:26:45 +0000 (09:26 +0000)]
Further typo fixes in kaleidoscope tutorial.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263697
91177308-0d34-0410-b5e6-
96231b3b80d8
Wilfred Hughes [Thu, 17 Mar 2016 09:09:07 +0000 (09:09 +0000)]
Fix typo in kaleidoscope tutorial.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263696
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 17 Mar 2016 05:43:26 +0000 (05:43 +0000)]
[yaml2obj, COFF] Correctly handle section alignment
The section alignment field was marked optional but not provided a
default value: initialize it with 0.
While we are here, ensure that the section alignment is plausible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263692
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Thu, 17 Mar 2016 01:56:10 +0000 (01:56 +0000)]
[Statepoints] Separate out logic for statepoint directives; NFC
This splits out the logic that maps the `"statepoint-id"` attribute into
the actual statepoint ID, and the `"statepoint-num-patch-bytes"`
attribute into the number of patchable bytes the statpeoint is lowered
into. The new home of this logic is in IR/Statepoint.cpp, and this
refactoring will support similar functionality when lowering calls with
deopt operand bundles in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263685
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Thu, 17 Mar 2016 01:15:27 +0000 (01:15 +0000)]
[Statepoint] Remove unused header; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263684
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Thu, 17 Mar 2016 00:47:18 +0000 (00:47 +0000)]
[Statepoints] Minor NFC cleanups
Mostly code simplifcations, and bringing up IR/Statepoints.cpp up to
LLVM coding style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263683
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Thu, 17 Mar 2016 00:47:14 +0000 (00:47 +0000)]
[SelectionDAG] Remove visitStatepoint; NFC
This way we have a single entry point into StatepointLowering. The
method was a direct dispatch to LowerStatepoint anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263682
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Thu, 17 Mar 2016 00:34:54 +0000 (00:34 +0000)]
Require allocator parameter to YAML traits.
The allocator here can still be a nullptr, but this atleast makes the
single caller which needed nullptr be explicit about it.
Note, lld started always passing a parameter here as of r263680. If
anything builds out of sync, that would be why errors may occur.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263681
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 16 Mar 2016 23:39:37 +0000 (23:39 +0000)]
use FileCheck for tighter checking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263679
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Wed, 16 Mar 2016 23:29:31 +0000 (23:29 +0000)]
Add optional allocator to YAML code to avoid leaking lld atoms.
In lld we allocate atoms on an allocator and so don't run their
destructors. This means we also shouldn't allocate memory inside
them without that also being on an allocator.
Reviewed by Lang Hames and Rafael Espindola.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263676
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 16 Mar 2016 23:22:01 +0000 (23:22 +0000)]
reduce check strings; no need to check IR comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263675
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 16 Mar 2016 23:20:20 +0000 (23:20 +0000)]
use FileCheck for tighter checking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263674
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Wed, 16 Mar 2016 23:17:54 +0000 (23:17 +0000)]
Upgrade TBAA *before* upgrading intrinsics
Summary: If TBAA is on an intrinsic and it gets upgraded and drops the TBAA we hit an odd assert. We should just upgrade the TBAA first because it doesn't have side-effects.
Reviewers: reames, apilipenko, manmanren
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D18229
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263673
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 16 Mar 2016 23:11:21 +0000 (23:11 +0000)]
Fix indentation; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263672
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 16 Mar 2016 23:08:00 +0000 (23:08 +0000)]
Extract out a SelectionDAGBuilder::LowerAsStatepoint; NFC
Summary:
This is a step towards implementing "direct" lowering of calls and
invokes with deopt operand bundles into STATEPOINT nodes (as opposed to
having them mandatorily pass through RewriteStatepointsForGC, which is
the case today).
This change extracts out a `SelectionDAGBuilder::LowerAsStatepoint`
helper function that is able to lower a "statepoint like thing", and
uses it to lower `gc.statepoint` calls. This is an NFC now, but in a
later change we will use `LowerAsStatepoint` to directly lower calls and
invokes with operand bundles without going through an intermediate
`gc.statepoint` IR representation.
FYI: I expect `SelectionDAGBuilder::StatepointInfo` will evolve as I add
support for lowering non gc.statepoints, right now it is fairly tightly
coupled with an IR level `gc.statepoint`.
Reviewers: reames, pgavlin, JosephTremoulet
Subscribers: sanjoy, mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D18106
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263671
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 16 Mar 2016 22:34:57 +0000 (22:34 +0000)]
use FileCheck for tighter checking
I'm testing out a script that auto-generates the check lines.
It's 98% copied from utils/update_llc_test_checks.py.
If others think this is useful, please let me know.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263668
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 16 Mar 2016 22:29:07 +0000 (22:29 +0000)]
use FileCheck for tighter checking
I'm testing out a script that auto-generates the check lines.
It's 98% copied from utils/update_llc_test_checks.py.
If others think this is useful, please let me know.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263667
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Wed, 16 Mar 2016 22:13:41 +0000 (22:13 +0000)]
Variable name cleanup /NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263666
91177308-0d34-0410-b5e6-
96231b3b80d8
James Y Knight [Wed, 16 Mar 2016 22:12:04 +0000 (22:12 +0000)]
Tweak some atomics functions in preparation for larger changes; NFC.
- Rename getATOMIC to getSYNC, as llvm will soon be able to emit both
'__sync' libcalls and '__atomic' libcalls, and this function is for
the '__sync' ones.
- getInsertFencesForAtomic() has been replaced with
shouldInsertFencesForAtomic(Instruction), so that the decision can be
made per-instruction. This functionality will be used soon.
- emitLeadingFence/emitTrailingFence are no longer called if
shouldInsertFencesForAtomic returns false, and thus don't need to
check the condition themselves.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263665
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 16 Mar 2016 20:49:31 +0000 (20:49 +0000)]
[SelectionDAG] Extract out populateCallLoweringInfo; NFC
SelectionDAGBuilder::populateCallLoweringInfo is now used instead of
SelectionDAGBuilder::lowerCallOperands. The populateCallLoweringInfo
interface is more composable in face of design changes like
http://reviews.llvm.org/D18106
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263663
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Wed, 16 Mar 2016 20:49:26 +0000 (20:49 +0000)]
[ProfileData] Make a utility method public, NFC
The swift frontend needs to be able to look up PGO function name
variables based on the original raw function name. That's because it's
not possible to create PGO function name variables while emitting swift
IR. Instead, we have to create the name variables while lowering swift
IR to llvm IR, at which point we fix up all calls to the increment
intrinsic to point to the right name variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263662
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolai Haehnle [Wed, 16 Mar 2016 20:14:33 +0000 (20:14 +0000)]
AMDGPU: Prevent uniform loops from becoming infinite
Summary:
Uniform loops where the branch leaving the loop is predicated on VCCNZ
must be skipped if EXEC = 0, otherwise they will be infinite.
Reviewers: tstellarAMD, arsenm
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D18137
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263658
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Wed, 16 Mar 2016 20:00:38 +0000 (20:00 +0000)]
[Hexagon] Adding missing break in switch statement. Extra operands would have been appended to the end.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263657
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 16 Mar 2016 19:48:42 +0000 (19:48 +0000)]
[SLP] Make DataLayout a member variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263656
91177308-0d34-0410-b5e6-
96231b3b80d8
Geoff Berry [Wed, 16 Mar 2016 19:21:47 +0000 (19:21 +0000)]
Revert "[LSR] Create fewer redundant instructions."
This reverts commit r263644. Investigating bootstrap failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263655
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 16 Mar 2016 18:37:44 +0000 (18:37 +0000)]
Removed trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263650
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 16 Mar 2016 18:32:44 +0000 (18:32 +0000)]
[X86] Reduced alignment of widened vector load/stores to better match PR26953 cases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263649
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 16 Mar 2016 18:15:34 +0000 (18:15 +0000)]
add checks for 'unpredictable' metadata preservation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263648
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 16 Mar 2016 18:00:09 +0000 (18:00 +0000)]
fix function names; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263646
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Wed, 16 Mar 2016 17:39:17 +0000 (17:39 +0000)]
[msan] Add a comment with a bug link.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263645
91177308-0d34-0410-b5e6-
96231b3b80d8
Geoff Berry [Wed, 16 Mar 2016 17:29:49 +0000 (17:29 +0000)]
[LSR] Create fewer redundant instructions.
Summary:
Fix LSRInstance::HoistInsertPosition() to check the original insert
position block first for a canonical insertion point that is dominated
by all inputs. This leads to SCEV being able to reuse more instructions
since it currently tracks the instructions it creates for reuse by
keeping a table of <Value, insert point> pairs.
Reviewers: atrick
Subscribers: mcrosier, mzolotukhin, llvm-commits
Differential Revision: http://reviews.llvm.org/D18001
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263644
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 16 Mar 2016 15:33:43 +0000 (15:33 +0000)]
[X86] Regenerated + extended widened vector conversion tests
- Ensure we test X86 + X64
- sitopfp / uitofp requires testing for SSE2 and SSE42 as well (part of the fix for PR26953)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263640
91177308-0d34-0410-b5e6-
96231b3b80d8
Michel Danzer [Wed, 16 Mar 2016 09:10:42 +0000 (09:10 +0000)]
AMDGPU: Verify instructions in non-debug builds as well
And emit an error if it fails.
This prevents illegal instructions from getting sent to the GPU, which
would potentially result in a hang.
This is a candidate for the stable branch(es).
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263627
91177308-0d34-0410-b5e6-
96231b3b80d8
Michel Danzer [Wed, 16 Mar 2016 09:10:35 +0000 (09:10 +0000)]
AMDGPU/SI: Clean up indentation in SIInstrInfo::getDefaultRsrcDataFormat
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263626
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Wed, 16 Mar 2016 08:48:26 +0000 (08:48 +0000)]
AVX512BW: Fix SRA v64i8 lowering. Use PCMPGTM (cmp result in k register) for 512bit vector because PCMPGT supported only for 128/256bit.
Differential Revision: http://reviews.llvm.org/D18204
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263624
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Wed, 16 Mar 2016 05:43:03 +0000 (05:43 +0000)]
[Bitcode] Add compatibility test for the 3.8 release
Fork off compatibility.ll for the 3.8 release. The *.bc file in this
commit was produced using a Release build of the release_38 branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263620
91177308-0d34-0410-b5e6-
96231b3b80d8
Haicheng Wu [Wed, 16 Mar 2016 04:52:52 +0000 (04:52 +0000)]
[JumpThreading] See through Cast Instructions
To capture more jump-thread opportunity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263618
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 16 Mar 2016 01:20:54 +0000 (01:20 +0000)]
[Support] Update Error unit test to remove implementation specific behaviour.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263610
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 16 Mar 2016 01:02:46 +0000 (01:02 +0000)]
[Support] Add the 'Error' class for structured error handling.
This patch introduces the Error classs for lightweight, structured,
recoverable error handling. It includes utilities for creating, manipulating
and handling errors. The scheme is similar to exceptions, in that errors are
described with user-defined types. Unlike exceptions however, errors are
represented as ordinary return types in the API (similar to the way
std::error_code is used).
For usage notes see the LLVM programmer's manual, and the Error.h header.
Usage examples can be found in unittests/Support/ErrorTest.cpp.
Many thanks to David Blaikie, Mehdi Amini, Kevin Enderby and others on the
llvm-dev and llvm-commits lists for lots of discussion and review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263609
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 16 Mar 2016 00:41:21 +0000 (00:41 +0000)]
[X86] Regenerated widen load tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263608
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 16 Mar 2016 00:13:36 +0000 (00:13 +0000)]
[X86][SSE41] Additional tests for extracting zeroable shuffle elements
We can currently only match zeroable vector elements of the same size as the shuffle type - these tests demonstrate the problem and a solution will be shortly added in an updated D14261
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263606
91177308-0d34-0410-b5e6-
96231b3b80d8
Haicheng Wu [Tue, 15 Mar 2016 23:38:47 +0000 (23:38 +0000)]
Revert "[JumpThreading] Simplify Instructions first in ComputeValueKnownInPredecessors()"
Not sure it handles undef properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263605
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Tue, 15 Mar 2016 22:37:25 +0000 (22:37 +0000)]
llvm-bcanalyzer: Fix handling of attribute group entries
These were printing as "UnknownCode3", since we were looking for them
inside PARAMATTR blocks instead of PARAMATTR_GROUP blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263597
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Tue, 15 Mar 2016 22:26:12 +0000 (22:26 +0000)]
Turn LoopLoadElimination on again
The latent bug that LLE exposed in the LoopVectorizer was resolved
(PR26952).
The pass can be disabled with -mllvm -enable-loop-load-elim=0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263595
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Aizatsky [Tue, 15 Mar 2016 21:47:21 +0000 (21:47 +0000)]
[libfuzzer] speeding up corpus load
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263591
91177308-0d34-0410-b5e6-
96231b3b80d8
Bjorn Steinbrink [Tue, 15 Mar 2016 20:57:07 +0000 (20:57 +0000)]
Also handle the new Rust pers fn to isCatchAll()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263585
91177308-0d34-0410-b5e6-
96231b3b80d8
Bjorn Steinbrink [Tue, 15 Mar 2016 20:35:45 +0000 (20:35 +0000)]
Add Rust's personality function to the list of known personality functions
Reviewers: majnemer
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D18192
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263581
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Tue, 15 Mar 2016 20:25:47 +0000 (20:25 +0000)]
[msan] Don't put module constructors in comdats.
There is something strange going on with debug info (.eh_frame_hdr)
disappearing when msan.module_ctor are placed in comdat sections.
Moving this functionality under flag, disabled by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263579
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Tue, 15 Mar 2016 20:17:55 +0000 (20:17 +0000)]
Add missing error handling in llvm-lto
Annoyingly, ErrorOr allows to *not check* the error when things go
well. It will crash badly when there is an error though. It should
runtime assert when it is used without being checked!
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263577
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Tue, 15 Mar 2016 19:35:45 +0000 (19:35 +0000)]
[ThinLTO] Record all global variable defs in the summary
Record all variable defs with a summary record to aid in building a
complete reference graph and locating constant variable defs to import.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263576
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 15 Mar 2016 18:31:29 +0000 (18:31 +0000)]
[MIR] Add a test case for the diagnostic of a wrongly typed generic instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263573
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 15 Mar 2016 18:30:00 +0000 (18:30 +0000)]
[AArch64] Move GlobalISel test cases into a GlobalISel subdirectory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263572
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Tue, 15 Mar 2016 18:07:46 +0000 (18:07 +0000)]
[CMake] Add PACKAGE_VENDOR for customizing version output
Summary: This change adds a PACKAGE_VENDOR variable. When set it makes the version output more closely resemble the clang version output.
Reviewers: aprantl, bogner
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D18159
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263566
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Tue, 15 Mar 2016 18:06:20 +0000 (18:06 +0000)]
[LV] Preserve LoopInfo when store predication is used
This was a latent bug that got exposed by the change to add LoopSimplify
as a dependence to LoopLoadElimination. Since LoopInfo was corrupted
after LV, LoopSimplify mis-compiled nbench in the test-suite (more
details in the PR).
The problem was that when we create the blocks for predicated stores we
didn't add those to any loops.
The original testcase for store predication provides coverage for this
assuming we verify LI on the way out of LV.
Fixes PR26952.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263565
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Tue, 15 Mar 2016 17:29:52 +0000 (17:29 +0000)]
[MC] Rename TLSDESC as it's not ARM specific.
Similarly to what was done for TLSCALL in r263515.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263564
91177308-0d34-0410-b5e6-
96231b3b80d8
Changpeng Fang [Tue, 15 Mar 2016 17:28:44 +0000 (17:28 +0000)]
AMDGPU/SI: Implement GroupStaticSize Intrinsic for Dynamic LDS
Summary:
Static LDS size is saved in MachineFunctionInfo::LDSSize,
We define a pseudo instruction with usesCustomInserter bit set. Then, in EmitInstrWithCustomInserter,
we replace this pseudo instruction with a mov of MachineFunctionInfo::LDSSize.
Reviewers:
arsenm
tstellarAMD
Subscribers
llvm-commits, arsenm
Differential Revision:
http://reviews.llvm.org/D18064
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263563
91177308-0d34-0410-b5e6-
96231b3b80d8
Hemant Kulkarni [Tue, 15 Mar 2016 17:25:31 +0000 (17:25 +0000)]
[llvm-readobj] Impl GNU style printing of sections and relocations
Differential Revision: http://reviews.llvm.org/D17523
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263561
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Katzman [Tue, 15 Mar 2016 16:41:47 +0000 (16:41 +0000)]
Myriad: Add new sparc CPU kinds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263557
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 15 Mar 2016 14:18:26 +0000 (14:18 +0000)]
[GlobalOpt] Don't look through aliases when sorting names of globals.
If both are different aliases to the same value the sorting becomes
non-deterministic as array_pod_sort is not stable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263550
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 15 Mar 2016 13:27:58 +0000 (13:27 +0000)]
[SLP] Update comment to reflect reality. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263548
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikolay Haustov [Tue, 15 Mar 2016 07:44:57 +0000 (07:44 +0000)]
[AMDGPU] Assembler: Update SOP* tests
Add VI encodings.
Reformat sopp.s to match style of other files.
Differential Revision: http://reviews.llvm.org/D18084
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263540
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 15 Mar 2016 06:14:01 +0000 (06:14 +0000)]
[llvm-objdump] Add support for dumping the PE TLS directory
The PE TLS directory contains information about where the TLS data
resides in the image, what functions should be executed when threads are
created, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263537
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Wilkins [Tue, 15 Mar 2016 05:04:06 +0000 (05:04 +0000)]
bindings/go: reinstate TargetMachine.TargetData
Summary:
LLVMGetTargetDataLayout was removed from the C API,
and then TargetMachine.TargetData was removed. Later,
LLVMCreateTargetMachineData was added to the C API,
and we now expose this via the Go API.
Reviewers: deadalnix, pcc
Subscribers: cierniak, llvm-commits, axw
Differential Revision: http://reviews.llvm.org/D18173
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263530
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 15 Mar 2016 04:20:49 +0000 (04:20 +0000)]
[MachO] Extend the alt_entry support for aliases added in r263521 to
expressions of the form 'a = .' and 'a = Ltmp'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263528
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 15 Mar 2016 03:01:31 +0000 (03:01 +0000)]
Use some braces to format this a little better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263527
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Tue, 15 Mar 2016 02:41:29 +0000 (02:41 +0000)]
BitcodeWriter dyn_cast cleanup for r263275 (NFC)
Address review suggestions from dblaikie: change a few dyn_cast to cast
and fold a cast into if condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263526
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 15 Mar 2016 02:19:06 +0000 (02:19 +0000)]
Fix llvm/llvm/lib/Transforms/Utils/LoopUnroll.cpp:285:53: error: suggest
parentheses around '&&' within '||' [-Werror=parentheses].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263525
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Tue, 15 Mar 2016 02:13:19 +0000 (02:13 +0000)]
Move global ID computation from Function to GlobalValue (NFC)
Since the static getGlobalIdentifier and getGUID methods are now called
for global values other than functions, reflect that by moving these
methods to the GlobalValue class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263524
91177308-0d34-0410-b5e6-
96231b3b80d8
Fiona Glaser [Tue, 15 Mar 2016 01:50:46 +0000 (01:50 +0000)]
DenseMap: make .resize() do the intuitive thing
In some places, like InstCombine, we resize a DenseMap to fit the elements
we intend to put in it, then insert those elements (to avoid continual
reallocations as it grows). But .resize(foo) doesn't actually do what
people think; it resizes to foo buckets (which is really an
implementation detail the user of DenseMap probably shouldn't care about),
not the space required to fit foo elements. DenseMap grows if 3/4 of its
buckets are full, so this actually causes one forced reallocation every
time instead of avoiding a reallocation.
This patch makes .resize(foo) do the intuitive thing: it grows to the size
necessary to fit foo elements without new allocations.
Also include a test to verify that .resize() actually does what we think it
does.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263522
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 15 Mar 2016 01:43:05 +0000 (01:43 +0000)]
[MachO] Add MachO alt-entry directive support.
This patch adds support for the MachO .alt_entry assembly directive, and uses
it for global aliases with non-zero GEP offsets. The alt_entry flag indicates
that a symbol should be layed out immediately after the preceding symbol.
Conceptually it introduces an alternate entry point for a function or data
structure. E.g.:
safe_foo:
// check preconditions for foo
.alt_entry fast_foo
fast_foo:
// body of foo, can assume preconditions.
The .alt_entry flag is also implicitly set on assembly aliases of the form:
a = b + C
where C is a non-zero constant, since these have the same effect as an
alt_entry symbol: they introduce a label that cannot be moved relative to the
preceding one. Setting the alt_entry flag on aliases of this form fixes
http://llvm.org/PR25381.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263521
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 15 Mar 2016 01:28:00 +0000 (01:28 +0000)]
[libFuzzer] use max_len exactly equal to the max size of input. Fix 32-bit build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263518
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 15 Mar 2016 01:16:31 +0000 (01:16 +0000)]
[StatepointLowering] Move an assertion; NFCI
Instead of running an explicit loop over `gc.relocate` calls hanging off
of a `gc.statepoint`, assert the validity of the type of the value being
relocated in `visitRelocate`.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263516
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Tue, 15 Mar 2016 00:25:22 +0000 (00:25 +0000)]
[MC] Rename TLSCALL as it's not ARM specific.
`MCSymbolRefExpr` variant kind for TLSCALL is prefixed with
_ARM_ since this is how it was originally implemented.
The X86_64 version is exactly the same so there's no reason
to create a new variant, we can just rename the existing
one to be machine-independent.
This generalization is the first step to implement support
for GNU2 TLS dialect in MC.
Differential Revision: http://reviews.llvm.org/D18160
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263515
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Tue, 15 Mar 2016 00:04:37 +0000 (00:04 +0000)]
[ThinLTO] Renaming of function index to module summary index (NFC)
(Resubmitting after fixing missing file issue)
With the changes in r263275, there are now more than just functions in
the summary. Completed the renaming of data structures (started in
r263275) to reflect the wider scope. In particular, changed the
FunctionIndex* data structures to ModuleIndex*, and renamed related
variables and comments. Also renamed the files to reflect the changes.
A companion clang patch will immediately succeed this patch to reflect
this renaming.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263513
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 14 Mar 2016 23:59:57 +0000 (23:59 +0000)]
Temporarily Revert "[X86][SSE] Simplify vector LOAD + EXTEND on
pre-SSE41 hardware" as it seems to be causing crashes during code
generation in halide. PR forthcoming.
This reverts commit r263303.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263512
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Mon, 14 Mar 2016 23:15:34 +0000 (23:15 +0000)]
[LoopUnroll] Respect the convergent attribute.
Summary:
Specifically, when we perform runtime loop unrolling of a loop that
contains a convergent op, we can only unroll k times, where k divides
the loop trip multiple.
Without this change, we'll happily unroll e.g. the following loop
for (int i = 0; i < N; ++i) {
if (i == 0) convergent_op();
foo();
}
into
int i = 0;
if (N % 2 == 1) {
convergent_op();
foo();
++i;
}
for (; i < N - 1; i += 2) {
if (i == 0) convergent_op();
foo();
foo();
}.
This is unsafe, because we've just added a control-flow dependency to
the convergent op in the prelude.
In general, runtime unrolling loops that contain convergent ops is safe
only if we don't have emit a prelude, which occurs when the unroll count
divides the trip multiple.
Reviewers: resistor
Subscribers: llvm-commits, mzolotukhin
Differential Revision: http://reviews.llvm.org/D17526
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263509
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 14 Mar 2016 23:11:28 +0000 (23:11 +0000)]
MathExtrasTest.cpp: Use EXPECT_DOUBLE_EQ here, instead of EXPECT_FLOAT_EQ.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263508
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Mon, 14 Mar 2016 22:58:21 +0000 (22:58 +0000)]
Object: Add ELF types to ELFType.
These types are defined in ELFFile, so in order to use them, you have
to write ELFFile<ELFT>::SomeType. But there seems to be no reason to have
ELFFile have these types. This patch allows you to write ELFT::SomeType
instead.
This simplifies libObject users.
This is an example: http://reviews.llvm.org/D18129
http://reviews.llvm.org/D18130
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263504
91177308-0d34-0410-b5e6-
96231b3b80d8