144381 Commits

Author SHA1 Message Date
Matt Arsenault
8c93ddba10 NVPTX: Fix not preserving volatile when expanding memset
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293851 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 01:20:34 +00:00
Omair Javaid
367ed08f22 Fix LLDB Android AArch64 GCC debug info build
Committing after fixing suggested changes and tested release/debug builds on 
x86_64-linux and arm/aarch64 builds.

Differential revision: https://reviews.llvm.org/D29042



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293850 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 01:17:49 +00:00
Rui Ueyama
57b15082cd Re-submit r293820: Return Error instead of bool from mergeTypeStreams().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293847 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 00:47:10 +00:00
Davide Italiano
861b997813 [IPSCCP] Restore the old behaviour (pre r293799).
It's not clear the change I made a good idea, and it definitely needs
further discussion. Thanks to Eli for pointing out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293846 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 00:46:54 +00:00
Peter Collingbourne
1b5750c5ea X86: Produce @ABS8 symbol modifiers for absolute symbols in range [0,128).
Differential Revision: https://reviews.llvm.org/D28689

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293844 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 00:32:03 +00:00
Matt Arsenault
2eab96a48c InferAddressSpaces: clang-format some things
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293843 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 00:28:25 +00:00
Steven Wu
9a41e59c1f [dsymutil] Fix __LINKEDIT vmsize in dsymutil upgrade path
Summary:
dsymutil upgrade path can change the size of segment and it needs to update
the vmsize of the segment to reflect the size change.

rdar://problem/30290714

Reviewers: friss

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D29433

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293842 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 00:00:13 +00:00
Paul Robinson
2e96f1dea1 Remove an assertion that doesn't hold when mixing -g and -gmlt through
LTO.  Replace it with a related assertion, ensuring that abstract
variables appear only in abstract scopes.
Part of PR31437.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293841 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 23:51:56 +00:00
Dehao Chen
7c5f272224 Remove XFAIL for test/DebugInfo/Generic/gmlt_profiling.ll
Summary: test/DebugInfo/Generic/gmlt_profiling.ll will also pass on darwin, so we should remove the XFAIL in the test.

Reviewers: dblaikie, aprantl

Reviewed By: dblaikie

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D29431

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293840 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 23:28:55 +00:00
Stanislav Mekhanoshin
a1d4ee75a4 [AMDGPU] Account workgroup size in LDS occupancy limits
Functions matching LDS use to occupancy return results for a workgroup
of 64 workitems. The numbers has to be adjusted for bigger workgroups.
For example a workgroup of size 256 already occupies 4 waves just by
itself. Given that all numbers of LDS use in the compiler are per
workgroup, occupancy shall be multiplied by 4 in this case. Each 64
workitems still limited by the same number, but 4 subrgoups 64 workitems
each can afford 4 times more LDS to get the same occupancy.

In addition change initializes LDS size in the subtarget to a real value
for SI+ targets. This is required since LDS size is a variable in these
calculations.

Differential Revision: https://reviews.llvm.org/D29423

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293837 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 22:59:50 +00:00
Eugene Zelenko
faff8226b0 [AArch64] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293836 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 22:56:06 +00:00
Dehao Chen
fe46230d58 Change debug-info-for-profiling from a TargetOption to a function attribute.
Summary: LTO requires the debug-info-for-profiling to be a function attribute.

Reviewers: echristo, mehdi_amini, dblaikie, probinson, aprantl

Reviewed By: mehdi_amini, dblaikie, aprantl

Subscribers: aprantl, probinson, ahatanak, llvm-commits, mehdi_amini

Differential Revision: https://reviews.llvm.org/D29203

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293833 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 22:45:09 +00:00
Marcos Pividori
f7fdc84b39 [libFuzzer] Disable afl tests on non-posix systems.
AflDriver is not supported on non posix systems.

Differential Revision: https://reviews.llvm.org/D29422

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293830 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 22:40:50 +00:00
Marcos Pividori
b2df6a0c9b [libFuzzer] Disable equivalence tests on non posix systems.
We can not run this test until we implement shared memory on Windows.

Differential Revision: https://reviews.llvm.org/D29421

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293829 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 22:40:45 +00:00
Marcos Pividori
98399aa4b2 [libFuzzer] Isolate merge tests that require posix.
Differential Revision: https://reviews.llvm.org/D29420

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293828 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 22:40:40 +00:00
Marcos Pividori
b928b9b13e [libFuzzer] Add features windows and posix for lit tests.
Add 2 features: posix and windows.
Sometimes we want some specific tests only for posix and we use:
 REQUIRES: posix
Sometimes we want some specific tests only for windows and we use:
 REQUIRES: windows

Differential Revision: https://reviews.llvm.org/D29418

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293827 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 22:40:34 +00:00
Marcos Pividori
adb057cab2 [libFuzzer] Accept different extensions.
Differential Revision: https://reviews.llvm.org/D29417

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293826 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 22:40:29 +00:00
Marcos Pividori
1d98b650ef [libFuzzer] Fix test because cmd prompt does not expand wildcard.
Commands should expand the wildcards on Windows, the cmd prompt doesn't.
Because of that sancov was not finding the needed file.
To deal with this, we use ls and xargs from gnu win utils.

Differential Revision: https://reviews.llvm.org/D29374

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293825 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 22:39:55 +00:00
Rui Ueyama
153a261a82 Revert r293820: Return Error instead of bool from mergeTypeStreams().
It broke buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293824 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 22:28:43 +00:00
Sanjay Patel
24d35c93d6 [ValueTracking] remove a FIXME for something we don't want to do; NFC
The comment was added with:
https://reviews.llvm.org/rL293773
...but there would be a cost to implement this and possibly no payoff.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293823 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 22:27:34 +00:00
Rui Ueyama
7aa802198b Return Error instead of bool from mergeTypeStreams().
Previously, mergeTypeStreams returns only true or false, so it was
impossible to know the reason if it failed. This patch changes the
function signature so that it returns an Error object.

Differential Revision: https://reviews.llvm.org/D29362

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293820 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 22:09:34 +00:00
Paul Robinson
94e341c816 Remove an assertion that doesn't hold when mixing -g and -gmlt through
LTO.  Part of PR31437.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293818 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 21:54:50 +00:00
Sanjay Patel
23b374dce0 fix typos; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293816 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 21:38:32 +00:00
Sanjay Patel
06248e4909 [InstCombine] move folds for shift-shift pairs; NFCI
Although this is 'no-functional-change-intended', I'm adding tests
for shl-shl and lshr-lshr pairs because there is no existing test 
coverage for those folds.

It seems like we should be able to remove some code from foldShiftedShift()
at this point because we're handling those patterns on the general path.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293814 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 21:31:34 +00:00
Michael Kuperstein
e7c7da772e Shut up another GCC warning about operator precedence. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293812 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 21:06:33 +00:00
Matt Arsenault
cf0f31bd23 AMDGPU: Allow clustering flat memory operations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293809 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 20:22:51 +00:00
Jun Bum Lim
d44f51cf08 [JumpThread] No need to erase BB from LoopHeaders. NFC.
Summary: No need to try to ease BB from LoopHeaders as we already know that BB is not in LoopHeaders.

Reviewers: hsung, majnemer, mcrosier, haicheng, rengolin

Reviewed By: rengolin

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D29232

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293802 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 19:06:55 +00:00
Davide Italiano
2c0058370a [SCCP] Make sure we get this case right without noinline.
Thanks to Hal for pointing out in the post-commit review of
r293727.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293801 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 19:03:46 +00:00
Davide Italiano
0eeb4b90fe [IPSCCP] Don't propagate return values of functions marked as noinline.
This tries to address what Hal defined (in the post-commit review of
r293727) a long-standing problem with noinline, where we end up
de facto inlining trivial functions e.g.

__attribute__((noinline)) int patatino(void) { return 5; }

because of return value propagation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293799 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 18:52:20 +00:00
Simon Dardis
28f9c9871d [mips] Parse the 'bopt' and 'nobopt' directives in IAS.
The GAS assembler supports the ".set bopt" directive but according
to the sources it doesn't do anything. It's supposed to optimize
branches by filling the delay slot of a branch with it's target.

This patch teaches the MIPS asm parser to accept both and warn in
the case of 'bopt' that the bopt directive is unsupported.

This resolves PR/31841.

Thanks to Sean Bruno for reporting the issue!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293798 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 18:50:24 +00:00
Zachary Turner
8d4b01ecc0 [pdb] Add a new command for analyzing hash collisions.
This introduces the `analyze` subcommand.  For now there is only
one option, to analyze hash collisions in the type streams.  In
the future, however, we could add many more things here, such
as performing size analyses, compacting, and statistics about
the type of records etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293795 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 18:30:22 +00:00
Michael Kuperstein
3ad5f1a3f2 [X86] Extend single-source shuffle cost test to test more arches. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293793 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 18:09:47 +00:00
Marcos Pividori
12cb357da1 [libFuzzer] Do not use llvm-objdump for disassembling a DSO.
When disassembling a DSO, for calls to functions from the PLT, llvm-objdump only
prints the offset from the PLT, like: <.plt+0x30>.

While objdump and dumpbin print the function name, like:
<__sanitizer_cov_trace_pc_guard@plt>

When analyzing the coverage in libFuzzer we dissasemble and look for the calls
to __sanitizer_cov_trace_pc_guard.

So, this fails when using llvm-objdump on a DSO.

Differential Revision: https://reviews.llvm.org/D29372

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293791 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 17:59:23 +00:00
Marcos Pividori
90e4124e52 [libFuzzer] Properly check if we can use dumpbin.
The flag "/sumary" is necessary, otherwise it returns a non-zero value.

Differential Revision: https://reviews.llvm.org/D29371

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293790 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 17:59:19 +00:00
Sanjoy Das
f8ca514878 [ImplicitNullChecks] NFC Fix the implicit-null-checks.mir test
Summary:
Currently the test implicit-null-checks.mir crashes if we run llc with
-enable-implicit-null-checks -start-before implicit-null-checks
options. Change fixes the RET instruction causing the crash.

Patch by Serguei Katkov!

Reviewers: sanjoy, reames

Reviewed By: sanjoy

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D29390

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293789 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 17:50:40 +00:00
Matthew Simpson
aa96bc9c68 [LV] Move interleaved access helper functions to VectorUtils (NFC)
This patch moves some helper functions related to interleaved access
vectorization out of LoopVectorize.cpp and into VectorUtils.cpp. We would like
to use these functions in a follow-on patch that improves interleaved load and
store lowering in (ARM/AArch64)ISelLowering.cpp. One of the functions was
already duplicated there and has been removed.

Differential Revision: https://reviews.llvm.org/D29398

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293788 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 17:45:46 +00:00
David Blaikie
460d4d4768 Make test case resilient to \ or / directory separators
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293786 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 17:34:41 +00:00
David Blaikie
719dc0e356 Add missing test cases from r293697/D29094
Differential Revision: https://reviews.llvm.org/D29368

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293785 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 17:15:24 +00:00
Sanjoy Das
387f151ad9 [InstCombine] Allow InstCombine to merge adjacent guards
Summary:
If there are two adjacent guards with different conditions, we can
remove one of them and include its condition into the condition of
another one. This patch allows InstCombine to merge them by the
following pattern:

    guard(a); guard(b) -> guard(a & b).

Reviewers: reames, apilipenko, igor-laevsky, anna, sanjoy

Reviewed By: sanjoy

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D29378

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293778 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 16:34:55 +00:00
Simon Pilgrim
299e3e8880 [X86][SSE] Remove unused argument. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293777 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 16:34:50 +00:00
Matt Arsenault
982ff7f443 AMDGPU: Improve nsw/nuw/exact when promoting uniform i16 ops
These were simply preserving the flags of the original operation,
which was too conservative in most cases and incorrect for mul.

nsw/nuw may be needed for some combines to cleanup messes when
intermediate sext_inregs are introduced later.

Tested valid combinations with alive.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293776 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 16:25:23 +00:00
Sanjoy Das
2e079eaf6b [ImplicitNullCheck] Extend canReorder scope
Summary:
This change allows a re-order of two intructions if their uses
are overlapped.

Patch by Serguei Katkov!

Reviewers: reames, sanjoy

Reviewed By: sanjoy

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D29120

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293775 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 16:04:21 +00:00
Sanjay Patel
ab1df8f850 [ValueTracking] avoid crashing from bad assumptions (PR31809)
A program may contain llvm.assume info that disagrees with other analysis. 
This may be caused by UB in the program, so we must not crash because of that.

As noted in the code comments:
https://llvm.org/bugs/show_bug.cgi?id=31809
...we can do better, but this at least avoids the assert/crash in the bug report.

Differential Revision: https://reviews.llvm.org/D29395


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293773 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 15:41:32 +00:00
Simon Dardis
537adc9cac [mips] Fix an initialization issue with MipsABIInfo in MipsTargetELFStreamer
DebugInfoDWARFTests is the only user so far which initializes the
MCObjectStreamer without initializing the ASMParser. The MIPS backend
relies on the ASMParser to initialize the MipsABIInfo object and to
update the target streamer with it. This should turn the mips buildbots
green.

Reviewers: atanasyan, zoran.jovanovic

Differential Revision: https://reviews.llvm.org/D28025



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293772 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 15:39:23 +00:00
Kit Barton
447c100995 [PowerPC] Fix sjlj pseduo instructions to use G8RC_NOX0 register class
The the following instructions:
  - LD/LWZ (expanded from sjLj pseudo-instructions)
  - LXVL/LXVLL vector loads
  - STXVL/STXVLL vector stores
all require G8RC_NO0X class registers for RA.

Differential Revision: https://reviews.llvm.org/D29289

Committed for Lei Huang

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293769 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 14:33:57 +00:00
Simon Pilgrim
30afc90a60 [X86][SSE] Merge SSE2 PINSRW lowering with SSE41 PINSRB/PINSRW lowering. NFCI.
These are identical apart from the extra SSE41 guard for PINSRB.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293766 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 13:32:19 +00:00
Florian Hahn
47d1df4cfd [legalizetypes] Push fp16 -> fp32 extension node to worklist.
Summary:
This way, the type legalization machinery will take care of registering
the result of this node properly.

This patches fixes all failing fp16 test cases  with expensive checks.
(CodeGen/ARM/fp16-promote.ll, CodeGen/ARM/fp16.ll, CodeGen/X86/cvt16.ll
CodeGen/X86/soft-fp.ll) 


Reviewers: t.p.northover, baldrick, olista01, bogner, jmolloy, davidxl, ab, echristo, hfinkel

Reviewed By: hfinkel

Subscribers: mehdi_amini, hfinkel, davide, RKSimon, aemerson, llvm-commits

Differential Revision: https://reviews.llvm.org/D28195

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293765 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 13:01:33 +00:00
Sam Parker
1cc548752f [ARM] const cast fix for ARMAttributeParser test
GCC 4.8 produced a cast qualifier warning, so replaced with C++ style
const cast.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293764 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 12:58:57 +00:00
Artur Pilipenko
38847f25fe [LoopPredication] Add a new line to debug output in LoopPredication pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293762 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 12:25:38 +00:00
Javed Absar
bddaeb4ffb [ARM] Enable Cortex-M23 and Cortex-M33 support.
Add both cores to the target parser and TableGen. Test that eabi
attributes are set correctly for both cores. Additionally, test the
absence and presence of MOVT in Cortex-M23 and Cortex-M33, respectively.

Committed on behalf of Sanne Wouda.
Reviewers : rengolin, olista01.

Differential Revision: https://reviews.llvm.org/D29073



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293761 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 11:55:03 +00:00