Eric Fiselier [Wed, 12 Oct 2016 06:48:31 +0000 (06:48 +0000)]
Revert Add <optional>. Will recommit with better commit message
llvm-svn: 283978
Eric Fiselier [Wed, 12 Oct 2016 06:45:11 +0000 (06:45 +0000)]
Add <optional> header.
This patch is largely thanks to Casey Carter @ Microsoft. He did the initial
work of porting our experimental implementation and tests over to namespace
std.
llvm-svn: 283977
Eric Fiselier [Wed, 12 Oct 2016 04:56:23 +0000 (04:56 +0000)]
Fix two more tests that hang when testing against libstdc++
llvm-svn: 283976
Eric Fiselier [Wed, 12 Oct 2016 04:29:50 +0000 (04:29 +0000)]
Prevent the test suite from hanging when run against libstdc++
llvm-svn: 283975
Quentin Colombet [Wed, 12 Oct 2016 04:12:44 +0000 (04:12 +0000)]
[AArch64][InstructionSelector] Fix unintended test changes in r283973.
I screwed up my merge conflict and lost some of the CHECK lines.
llvm-svn: 283974
Quentin Colombet [Wed, 12 Oct 2016 03:57:52 +0000 (03:57 +0000)]
[AArch64][InstrustionSelector] Teach the selector about G_BITCAST.
llvm-svn: 283973
Quentin Colombet [Wed, 12 Oct 2016 03:57:49 +0000 (03:57 +0000)]
[AArch64][InstructionSelector] Refactor the handling of copies.
Although Copies are not specific to preISel, we still have to assign them
a proper register class. However, given they are not constrained to
anything we do not have to handle the source register at the copy. It
will be properly mapped when reaching the related definition.
In the process, the handlong of G_ANYEXT is slightly modified as those
end up being selected as copy. The difference is that when register size
do not match on both sides, we need to insert SUBREG_TO_REG operation,
otherwise the post RA copy expansion will not be happy!
llvm-svn: 283972
Quentin Colombet [Wed, 12 Oct 2016 03:57:46 +0000 (03:57 +0000)]
[AArch64][InstructionSelector] Fix typos in the related mir file. NFC.
llvm-svn: 283971
Quentin Colombet [Wed, 12 Oct 2016 03:57:43 +0000 (03:57 +0000)]
[AArch64][MachineLegalizer] Mark more bitcasts as legal.
Those are copies, we do not have to do any legalization action for them.
llvm-svn: 283970
Jason Molenda [Wed, 12 Oct 2016 03:53:01 +0000 (03:53 +0000)]
Add an arm64 unit test where the function saves x20 in the
prologue, then loads & stores x20 on the stack from a different
location in the middle of the function, and then restores the
reg in the epilogue. The saving/restoring of x20 in the middle
of the function should be ignored.
llvm-svn: 283969
Brian Gesiak [Wed, 12 Oct 2016 03:35:04 +0000 (03:35 +0000)]
[lit] Run unit tests as part of lit test suite
Summary:
The Python file `utils/lit/lit/ShUtil.py` contains:
1. Logic used by lit itself
2. A set of unit tests for that logic, which can be run by invoking
`python utils/lit/lit/ShUtil.py`
Move these unit tests to a `tests/unit` subdirectory of lit, and run
the tests as part of lit's test suite. This ensures that, should the
lit test suite be included in LLVM's own regression test suite, these
unit tests will also be run.
(Instructions on how to run lit's test suite can be found in
`utils/lit/README.txt`.)
Reviewers: ddunbar, echristo, delcypher, beanz
Subscribers: mehdi_amini, llvm-commits
Differential Revision: https://reviews.llvm.org/D25411
llvm-svn: 283968
Sebastian Pop [Wed, 12 Oct 2016 03:08:40 +0000 (03:08 +0000)]
Memory-SSA cleanup of clobbers interface, NFC
This implements the cleanup that Danny asked to commit separately from the
previous fix to GVN-hoist in https://reviews.llvm.org/D25476#inline-219818
Tested with ninja check on x86_64-linux.
llvm-svn: 283967
Jason Molenda [Wed, 12 Oct 2016 02:46:22 +0000 (02:46 +0000)]
Add a simple frameless function test case to the arm64 unwind unit tests
with return statements in the body of the function.
llvm-svn: 283966
Sebastian Pop [Wed, 12 Oct 2016 02:23:39 +0000 (02:23 +0000)]
GVN-hoist: fix store past load dependence analysis (PR30216, PR30499)
This is a refreshed version of a patch that was reverted: it fixes
the problems reported in both PR30216 and PR30499, and
contains all the test-cases from both bugs.
To hoist stores past loads, we used to search for potential
conflicting loads on the hoisting path by following a MemorySSA
def-def link from the store to be hoisted to the previous
defining memory access, and from there we followed the def-use
chains to all the uses that occur on the hoisting path. The
problem is that the def-def link may point to a store that does
not alias with the store to be hoisted, and so the loads that are
walked may not alias with the store to be hoisted, and even as in
the testcase of PR30216, the loads that may alias with the store
to be hoisted are not visited.
The current patch visits all loads on the path from the store to
be hoisted to the hoisting position and uses the alias analysis
to ask whether the store may alias the load. I was not able to
use the MemorySSA functionality to ask for whether load and
store are clobbered: I'm not sure which function to call, so I
used a call to AA->isNoAlias().
Store past store is still working as before using a MemorySSA
query: I added an extra test to pr30216.ll to make sure store
past store does not regress.
Tested on x86_64-linux with check and a test-suite run.
Differential Revision: https://reviews.llvm.org/D25476
llvm-svn: 283965
Artem Belevich [Wed, 12 Oct 2016 02:08:08 +0000 (02:08 +0000)]
Added REQUIRED triples to the test that fails on some ARM buildbots.
llvm-svn: 283964
Justin Lebar [Wed, 12 Oct 2016 01:30:08 +0000 (01:30 +0000)]
[CUDA] Make touching a kernel from a __host__ __device__ function a deferred error.
Previously, this was an immediate, don't pass go, don't collect $200
error. But this precludes us from writing code like
__host__ __device__ void launch_kernel() {
kernel<<<...>>>();
}
Such code isn't wrong, following our notions of right and wrong in CUDA,
unless it's codegen'ed.
llvm-svn: 283963
Eric Fiselier [Wed, 12 Oct 2016 01:19:16 +0000 (01:19 +0000)]
Fix libc++abi test config after recent libc++ changes
llvm-svn: 283962
Tim Shen [Wed, 12 Oct 2016 00:48:25 +0000 (00:48 +0000)]
[PPCMIPeephole] Fix splat elimination
Summary:
In PPCMIPeephole, when we see two splat instructions, we can't simply do the following transformation:
B = Splat A
C = Splat B
=>
C = Splat A
because B may still be used between these two instructions. Instead, we should make the second Splat a PPC::COPY and let later passes decide whether to remove it or not:
B = Splat A
C = Splat B
=>
B = Splat A
C = COPY B
Fixes PR30663.
Reviewers: echristo, iteratee, kbarton, nemanjai
Subscribers: mehdi_amini, llvm-commits
Differential Revision: https://reviews.llvm.org/D25493
llvm-svn: 283961
Eric Fiselier [Wed, 12 Oct 2016 00:28:14 +0000 (00:28 +0000)]
Add mork workarounds for running the test suite against libstdc++
llvm-svn: 283960
Jim Ingham [Wed, 12 Oct 2016 00:05:36 +0000 (00:05 +0000)]
This test now passes.
llvm-svn: 283959
Eric Fiselier [Wed, 12 Oct 2016 00:00:37 +0000 (00:00 +0000)]
Make it easier to run the libc++ test suite against libstdc++
llvm-svn: 283958
Jim Ingham [Tue, 11 Oct 2016 23:55:13 +0000 (23:55 +0000)]
This was skipped due to a clang PR that has been fixed.
llvm-svn: 283957
Jim Ingham [Tue, 11 Oct 2016 23:30:38 +0000 (23:30 +0000)]
Added a radar on our end for this test's failure.
llvm-svn: 283956
Reid Kleckner [Tue, 11 Oct 2016 23:13:13 +0000 (23:13 +0000)]
Fix _recalloc redefinition link error in ASan RTL
Fixes PR30329
Patch by Hans-Bernhard Broeker!
llvm-svn: 283955
Reid Kleckner [Tue, 11 Oct 2016 23:02:21 +0000 (23:02 +0000)]
Fix the stage2 MSVC 2013 build with less constexpr in RNG
llvm-svn: 283954
Michael Kuperstein [Tue, 11 Oct 2016 22:44:31 +0000 (22:44 +0000)]
[DAG] Fix crash in build_vector -> vector_shuffle combine
Fixes a crash in the build_vector -> vector_shuffle combine
when the first vector input is twice as wide as the output,
and the second input vector is even wider.
llvm-svn: 283953
Tim Northover [Tue, 11 Oct 2016 22:29:23 +0000 (22:29 +0000)]
GlobalISel: support same-size casts on AArch64.
Mostly Ahmed's work again, I'm just sprucing things up slightly before
committing.
llvm-svn: 283952
Eric Fiselier [Tue, 11 Oct 2016 22:18:09 +0000 (22:18 +0000)]
Fix LWG2683 - filesystem::copy() should always clear the user-provided error_code
llvm-svn: 283951
Mike Edwards [Tue, 11 Oct 2016 22:09:13 +0000 (22:09 +0000)]
Revert - When optimizing for size, enable loop rerolling by default
This reverts r283685 as it is causing test failures on Green Dragon.
llvm-svn: 283950
Vedant Kumar [Tue, 11 Oct 2016 21:56:05 +0000 (21:56 +0000)]
[Profile] Update testcase for r283948 (NFC)
Old: "__DATA,__llvm_prf_data"
New: "__DATA,__llvm_prf_data,regular,live_support"
This should fix the following bot failure:
http://bb.pgr.jp/builders/cmake-clang-x86_64-linux/builds/55158
llvm-svn: 283949
Vedant Kumar [Tue, 11 Oct 2016 21:48:48 +0000 (21:48 +0000)]
[profile] Add test for dead_strip+live_support functionality
Differential Revision: https://reviews.llvm.org/D25457
llvm-svn: 283948
Vedant Kumar [Tue, 11 Oct 2016 21:48:16 +0000 (21:48 +0000)]
[InstrProf] Add support for dead_strip+live_support functionality
On Darwin, marking a section as "regular,live_support" means that a
symbol in the section should only be kept live if it has a reference to
something that is live. Otherwise, the linker is free to dead-strip it.
Turn this functionality on for the __llvm_prf_data section.
This means that counters and data associated with dead functions will be
removed from dead-stripped binaries. This will result in smaller
profiles and binaries, and should speed up profile collection.
Tested with check-profile, llvm-lit test/tools/llvm-{cov,profdata}, and
check-llvm.
Differential Revision: https://reviews.llvm.org/D25456
llvm-svn: 283947
Kostya Serebryany [Tue, 11 Oct 2016 21:27:37 +0000 (21:27 +0000)]
[libFuzzer] refactoring to speed things up, NFC
llvm-svn: 283946
Marshall Clow [Tue, 11 Oct 2016 21:24:06 +0000 (21:24 +0000)]
Remove extraneous 'const' in the implementation of is_move_assignable. Howard pleads temporary insanity about this. Discussed at stackoverflow.com/questions/
39986185
llvm-svn: 283945
Eric Fiselier [Tue, 11 Oct 2016 21:22:21 +0000 (21:22 +0000)]
Fix std::pair on FreeBSD
Summary:
FreeBSD ships an old ABI for std::pair which requires that it have non-trivial copy/move constructors. Currently the non-trivial copy/move is achieved by providing explicit definitions of the constructors. This is problematic because it means the constructors don't SFINAE properly. In order to SFINAE copy/move constructors they have to be explicitly defaulted and hense non-trivial.
This patch attempts to provide SFINAE'ing copy/move constructors for std::pair while still making them non-trivial. It does this by adding a base class with a non-trivial copy constructor and then allowing pair's constructors to be generated by the compiler. This also allows the constructors to be constexpr.
Reviewers: emaste, theraven, rsmith, dim
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25389
llvm-svn: 283944
Manman Ren [Tue, 11 Oct 2016 21:18:20 +0000 (21:18 +0000)]
Module: for ObjectiveC, be consistent when checking hidden decls.
In MatchAllMethodDeclarations, when checking a hidden decl, be sure
to allow hidden when searching for methods.
rdar://
28699972
llvm-svn: 283943
Reid Kleckner [Tue, 11 Oct 2016 21:14:03 +0000 (21:14 +0000)]
Re-land "[Thumb] Save/restore high registers in Thumb1 pro/epilogues"
Reverts r283938 to reinstate r283867 with a fix.
The original change had an ArrayRef referring to a destroyed temporary
initializer list. Use plain C arrays instead.
llvm-svn: 283942
Eric Fiselier [Tue, 11 Oct 2016 21:13:44 +0000 (21:13 +0000)]
Fix incorrect exception handling behavior in the uninitialized algorithms
llvm-svn: 283941
Jim Ingham [Tue, 11 Oct 2016 21:08:27 +0000 (21:08 +0000)]
Add the radar number on our end.
llvm-svn: 283940
Kevin Enderby [Tue, 11 Oct 2016 21:04:39 +0000 (21:04 +0000)]
Next set of additional error checks for invalid Mach-O files for the
load commands that uses the MachO::linker_option_command
type but not used in llvm libObject code but used in llvm tool code.
This includes just LC_LINKER_OPTION load command.
llvm-svn: 283939
Reid Kleckner [Tue, 11 Oct 2016 20:54:41 +0000 (20:54 +0000)]
Revert "[Thumb] Save/restore high registers in Thumb1 pro/epilogues"
This reverts r283867.
This appears to be an infinite loop:
while (HiRegToSave != AllHighRegs.end() && CopyReg != AllCopyRegs.end()) {
if (HiRegsToSave.count(*HiRegToSave)) {
...
CopyReg = findNextOrderedReg(++CopyReg, CopyRegs, AllCopyRegs.end());
HiRegToSave =
findNextOrderedReg(++HiRegToSave, HiRegsToSave, AllHighRegs.end());
}
}
llvm-svn: 283938
Tim Northover [Tue, 11 Oct 2016 20:50:21 +0000 (20:50 +0000)]
GlobalISel: support selection of extend operations.
Patch mostly by Ahmed Bougaca.
llvm-svn: 283937
Tim Northover [Tue, 11 Oct 2016 20:50:04 +0000 (20:50 +0000)]
MIRParser: allow types on registers with a RegBank.
This fixes some GlobalISel regression tests.
llvm-svn: 283936
Jordan Rose [Tue, 11 Oct 2016 20:39:16 +0000 (20:39 +0000)]
Re-apply "Disallow ArrayRef assignment from temporaries."
This re-applies r283798, disabled in r283803, with the static_assert
tests disabled under MSVC. The deleted functions still seem to catch
mistakes in MSVC, so it's not a significant loss.
Part of rdar://problem/
16375365
llvm-svn: 283935
Kyle Butt [Tue, 11 Oct 2016 20:36:43 +0000 (20:36 +0000)]
Codegen: Tail-duplicate during placement.
The tail duplication pass uses an assumed layout when making duplication
decisions. This is fine, but passes up duplication opportunities that
may arise when blocks are outlined. Because we want the updated CFG to
affect subsequent placement decisions, this change must occur during
placement.
In order to achieve this goal, TailDuplicationPass is split into a
utility class, TailDuplicator, and the pass itself. The pass delegates
nearly everything to the TailDuplicator object, except for looping over
the blocks in a function. This allows the same code to be used for tail
duplication in both places.
This change, in concert with outlining optional branches, allows
triangle shaped code to perform much better, esepecially when the
taken/untaken branches are correlated, as it creates a second spine when
the tests are small enough.
Issue from previous rollback fixed, and a new test was added for that
case as well. Issue was worklist/scheduling/taildup issue in layout.
Issue from 2nd rollback fixed, with 2 additional tests. Issue was
tail merging/loop info/tail-duplication causing issue with loops that share
a header block.
Issue with early tail-duplication of blocks that branch to a fallthrough
predecessor fixed with test case: tail-dup-branch-to-fallthrough.ll
Differential revision: https://reviews.llvm.org/D18226
llvm-svn: 283934
Arnold Schwaighofer [Tue, 11 Oct 2016 20:34:06 +0000 (20:34 +0000)]
Swift Calling Convention: Parameters are allowed after the
swift_error/swift_context parameter
We need to be able to decelare witness functions which append the self type and
the self witness tables at the end of the parameter list.
rdar://
28720996
llvm-svn: 283933
Arnold Schwaighofer [Tue, 11 Oct 2016 20:34:03 +0000 (20:34 +0000)]
Pass the end of a component to SwiftAggLowering's enumerateComponents callback
This is usefull for determining whether components overlap.
llvm-svn: 283932
Rui Ueyama [Tue, 11 Oct 2016 20:15:36 +0000 (20:15 +0000)]
Fix a test to pacify llvm-clang-lld-x86_64-scei-ps4-windows10pro bot.
I don't really understand why we get a larger .rodata section only
on this bot. I guess it may be picking up a library which contains
a .rodata. I removed the specific values since their values are not
important for this test case.
llvm-svn: 283931
Sanjay Patel [Tue, 11 Oct 2016 20:15:20 +0000 (20:15 +0000)]
[x86] add tests for negate bool
llvm-svn: 283930
Jim Ingham [Tue, 11 Oct 2016 20:09:40 +0000 (20:09 +0000)]
This test now passes.
llvm-svn: 283929
Reid Kleckner [Tue, 11 Oct 2016 20:02:57 +0000 (20:02 +0000)]
Avoid braced initialization for default member initializers for MSVC 2013
llvm-svn: 283928
Arnold Schwaighofer [Tue, 11 Oct 2016 19:49:29 +0000 (19:49 +0000)]
Silence -Wunused-but-set-variable warning
llvm-svn: 283927
Rui Ueyama [Tue, 11 Oct 2016 19:45:07 +0000 (19:45 +0000)]
Re-submit r283825: Add section header stream to PDB.
It was reverted because the change that depends on was reverted.
Now it was submitted as r283925, so we can submit this as well.
llvm-svn: 283926
Rui Ueyama [Tue, 11 Oct 2016 19:43:12 +0000 (19:43 +0000)]
Re-submit r283823: Define DbiStreamBuilder::addDbgStream to add stream.
The previous commit was failing because we filled empty slots of
the debug stream index with kInvalidStreamIndex. It should've been 0.
llvm-svn: 283925
Kostya Serebryany [Tue, 11 Oct 2016 19:36:50 +0000 (19:36 +0000)]
[sanitizer-coverage] use private linkage for coverage guards, delete old commented-out code.
llvm-svn: 283924
Jim Ingham [Tue, 11 Oct 2016 19:29:25 +0000 (19:29 +0000)]
Added a bugreport tracking the failure to get float return values
on i386.
llvm-svn: 283923
Rui Ueyama [Tue, 11 Oct 2016 19:28:56 +0000 (19:28 +0000)]
Fix build error on LP64 platforms.
llvm-svn: 283922
Zachary Turner [Tue, 11 Oct 2016 19:24:45 +0000 (19:24 +0000)]
[raw_ostream] Raise some helper functions out of raw_ostream.
Low level functionality to format numbers were embedded in the
implementation of raw_ostream. I have need to use these through
an interface other than the overloaded stream operators, so they
need to be raised to a level that they can be used from either
raw_ostream operators or other code.
llvm-svn: 283921
Mehdi Amini [Tue, 11 Oct 2016 19:04:24 +0000 (19:04 +0000)]
Revert "Change Builtins name to be stored as StringRef instead of raw pointers (NFC)"
This reverts commit r283802. It introduces temporarily static
initializers, because StringRef ctor isn't (yet) constexpr for
string literals.
I plan to get there this week, but apparently GCC is so terrible
with these static initializer right now (10 min+ extra codegen
time was reported) that I'll hold on to this patch till the
constexpr one is ready, and land these at the same time.
llvm-svn: 283920
Konstantin Zhuravlyov [Tue, 11 Oct 2016 18:58:22 +0000 (18:58 +0000)]
[AMDGPU] Refactor waitcnt encoding
- Refactor bit packing/unpacking
- Calculate bit mask given bit shift and bit width
- Introduce function for decoding bits of waitcnt
- Introduce function for encoding bits of waitcnt
- Introduce function for getting waitcnt mask (instead of using bare numbers)
- Introduce function fot getting max waitcnt(s) (instead of using bare numbers)
Differential Revision: https://reviews.llvm.org/D25298
llvm-svn: 283919
Dehao Chen [Tue, 11 Oct 2016 18:53:00 +0000 (18:53 +0000)]
Allow Switch instruction to have extractProfTotalWeight called as it can terminate a basic block. (NFC)
llvm-svn: 283918
Bruno Cardoso Lopes [Tue, 11 Oct 2016 18:38:33 +0000 (18:38 +0000)]
[Driver] Use -fsyntax-only in test/Driver/show-option-names.c
Make the test less expensive, follow up from r283915.
llvm-svn: 283917
Reid Kleckner [Tue, 11 Oct 2016 18:35:13 +0000 (18:35 +0000)]
Avoid unnecessary constexpr to appease MSVC 2013
llvm-svn: 283916
Bruno Cardoso Lopes [Tue, 11 Oct 2016 18:31:45 +0000 (18:31 +0000)]
[Driver] Fix test from r283913 to unbreak bots
Followup from r283913 & r283827
http://bb.pgr.jp/builders/cmake-clang-x86_64-linux/builds/55135
llvm-svn: 283915
Mehdi Amini [Tue, 11 Oct 2016 18:22:41 +0000 (18:22 +0000)]
Fix "static initialization order fiasco" for the XCore Target.
I fixed all the other Targets in r283702, and interestingly the
sanitizers are only now "sometimes" catching this bug on the only
one I missed.
llvm-svn: 283914
Bruno Cardoso Lopes [Tue, 11 Oct 2016 18:21:26 +0000 (18:21 +0000)]
Reapply [Driver][Diagnostics] Make 'show option names' default for driver warnings
Reapply r283827 by fixing the tests to not be target specific
Currently, driver level warnings do not show option names (e.g. warning:
complain about foo [-Woption-name]) in a diagnostic unless
-fdiagnostics-show-option is explictly specified. OTOH, the driver by
default turn this option on for CC1. Change the logic to show option
names by default in the driver as well.
Differential Revision: https://reviews.llvm.org/D24516
rdar://problem/
27300909
llvm-svn: 283913
Zachary Turner [Tue, 11 Oct 2016 18:17:26 +0000 (18:17 +0000)]
[Support] Fix undefined behavior in RandomNumberGenerator.
This has existed pretty much forever AFAICT, but the code was
never being exercised because nobody was using the class. A
user of this class surfaced, and now we're breaking with UB.
The code was obviously wrong, so it's fixed here.
llvm-svn: 283912
Konstantin Zhuravlyov [Tue, 11 Oct 2016 18:16:56 +0000 (18:16 +0000)]
[AMDGPU] Fix test that was broken by rL283893
llvm-svn: 283911
Rui Ueyama [Tue, 11 Oct 2016 17:46:48 +0000 (17:46 +0000)]
Make variable name consistent with other -z options.
llvm-svn: 283910
NAKAMURA Takumi [Tue, 11 Oct 2016 17:38:30 +0000 (17:38 +0000)]
ARMMachineFunctionInfo.cpp: Add an initializer of ARMFunctionInfo::ReturnRegsCount in the explicit ctor.
It caused crash since r283867.
llvm-svn: 283909
NAKAMURA Takumi [Tue, 11 Oct 2016 17:38:25 +0000 (17:38 +0000)]
Reformat.
llvm-svn: 283908
Justin Lebar [Tue, 11 Oct 2016 17:36:03 +0000 (17:36 +0000)]
[CUDA] Re-land support for <complex> (r283683 and r283680).
These were reverted in r283753 and r283747.
The first patch added a header to the root 'Headers' install directory,
instead of into 'Headers/cuda_wrappers'. This was fixed in the second
patch, but by then the damage was done: The bad header stayed in the
'Headers' directory, continuing to break the build.
We reverted both patches in an attempt to fix things, but that still
didn't get rid of the header, so the Windows boostrap build remained
broken.
It's probably worth fixing up our cmake logic to remove things from the
install dirs, but in the meantime, re-land these patches, since we
believe they no longer have this bug.
llvm-svn: 283907
Reid Kleckner [Tue, 11 Oct 2016 17:24:09 +0000 (17:24 +0000)]
Fix the build with MSVC 2013 after r283856
llvm-svn: 283906
Sanjay Patel [Tue, 11 Oct 2016 17:05:52 +0000 (17:05 +0000)]
[DAG] add fold for masked negated sign-extended bool
This enhances the fold added with:
https://reviews.llvm.org/rL283900
llvm-svn: 283905
Sean Callanan [Tue, 11 Oct 2016 16:57:21 +0000 (16:57 +0000)]
Clarified the explanation of expr --top-level.
llvm-svn: 283904
Sanjay Patel [Tue, 11 Oct 2016 16:49:52 +0000 (16:49 +0000)]
[x86] add sext variants of tests added with r283894
llvm-svn: 283903
Bernard Ogden [Tue, 11 Oct 2016 16:34:49 +0000 (16:34 +0000)]
Let test pass for builds that support X86, but do not default to it
Differential Revision: https://reviews.llvm.org/D25471
llvm-svn: 283902
Bernard Ogden [Tue, 11 Oct 2016 16:32:37 +0000 (16:32 +0000)]
Fix test on non-x86 hosts
Summary:
This test is allowed to run on non-x86 hosts and thus must use
llvm-nm rather than nm.
Differential Revision: https://reviews.llvm.org/D25473
llvm-svn: 283901
Sanjay Patel [Tue, 11 Oct 2016 16:26:36 +0000 (16:26 +0000)]
[DAG] add fold for masked negated extended bool
The non-obvious motivation for adding this fold (which already happens in InstCombine)
is that we want to canonicalize IR towards select instructions and canonicalize DAG
nodes towards boolean math. So we need to recreate some folds in the DAG to handle that
change in direction.
An interesting implementation difference for cases like this is that InstCombine
generally works top-down while the DAG goes bottom-up. That means we need to detect
different patterns. In this case, the SimplifyDemandedBits fold prevents us from
performing a zext to sext fold that would then be recognized as a negation of a sext.
llvm-svn: 283900
Daniel Jasper [Tue, 11 Oct 2016 16:22:36 +0000 (16:22 +0000)]
Silence unused warning in non-assert builds.
llvm-svn: 283899
Adam Nemet [Tue, 11 Oct 2016 16:20:40 +0000 (16:20 +0000)]
[opt-viewer] Remove unnecessary call to demangle
llvm-svn: 283898
Adam Nemet [Tue, 11 Oct 2016 16:20:38 +0000 (16:20 +0000)]
[opt-viewer] Print hotness as percentage of the maximum hotness
llvm-svn: 283897
Adam Nemet [Tue, 11 Oct 2016 16:19:06 +0000 (16:19 +0000)]
[opt-viewer] Convert another HTML output to use a multiline string
llvm-svn: 283896
Zachary Turner [Tue, 11 Oct 2016 16:06:32 +0000 (16:06 +0000)]
Fix clang-offload-bundler test.
A recent change to llvm::cl slightly changed the format of
the help output, and it broke this test. NFC
llvm-svn: 283895
Sanjay Patel [Tue, 11 Oct 2016 16:04:37 +0000 (16:04 +0000)]
[x86] add tests to show missed folds for masked bools
llvm-svn: 283894
Changpeng Fang [Tue, 11 Oct 2016 16:00:47 +0000 (16:00 +0000)]
AMDGPU/SI: Update ISA version numbers for Tonga and Polaris10/11.
Differential Revision:
http://reviews.llvm.org/D25454
Reviewers:
tstellarAMD
llvm-svn: 283893
Zachary Turner [Tue, 11 Oct 2016 15:58:48 +0000 (15:58 +0000)]
[cl] Don't print subcommand help when no subcommands present.
Previously we would print
USAGE: <exe> [subcommand] [options]
Even if no subcommands were present. This changes the output
format to only print "[subcommand]" if there is at least one
subcommand.
Fixes llvm.org/pr30598
Patch by Serge Guelton
llvm-svn: 283892
Yaxun Liu [Tue, 11 Oct 2016 15:53:28 +0000 (15:53 +0000)]
[OpenCL] Allow partial initializer for array and struct
Currently Clang allows partial initializer for C99 but not for OpenCL, e.g.
float a[16][16] = {1.0f, 2.0f};
is allowed in C99 but not allowed in OpenCL.
This patch fixes that.
Differential Revision: https://reviews.llvm.org/D25335
llvm-svn: 283891
Vassil Vassilev [Tue, 11 Oct 2016 15:51:06 +0000 (15:51 +0000)]
Revert r283887 and r283882, until the issue is understood and fixed.
llvm-svn: 283890
Davide Italiano [Tue, 11 Oct 2016 15:32:34 +0000 (15:32 +0000)]
[ThinLTO/tests] Check we don't fail if --thinlto-jobs is not passed.
While here, fix the CHECK lines of an existing test.
llvm-svn: 283889
Mehdi Amini [Tue, 11 Oct 2016 15:15:32 +0000 (15:15 +0000)]
Use StringRef instead of raw pointer in SourceManagerInternals LineTableInfo API (NFC)
llvm-svn: 283888
Vassil Vassilev [Tue, 11 Oct 2016 15:09:26 +0000 (15:09 +0000)]
r283882 followup. Don't demote ParmVarDecls. This should fix our module builds.
llvm-svn: 283887
Malcolm Parsons [Tue, 11 Oct 2016 14:49:24 +0000 (14:49 +0000)]
[clang-tidy] Ignore empty members and bases in cppcoreguidelines-pro-type-member-init
Summary: Empty/incomplete variables/members/bases don't need to be initialized
Reviewers: mgehre, aaron.ballman, alexfh
Subscribers: nemanjai, cfe-commits
Differential Revision: https://reviews.llvm.org/D25238
llvm-svn: 283886
Sanjay Patel [Tue, 11 Oct 2016 14:14:30 +0000 (14:14 +0000)]
[DAG] simplify logic; NFC
llvm-svn: 283885
Sanjay Patel [Tue, 11 Oct 2016 14:04:24 +0000 (14:04 +0000)]
[DAG] hoist DL(N) and fix formatting; NFC
llvm-svn: 283884
Simon Pilgrim [Tue, 11 Oct 2016 14:01:38 +0000 (14:01 +0000)]
[X86][SSE] Regenerate scalar i64 uitofp test
Added 32-bit target test
llvm-svn: 283883
Vassil Vassilev [Tue, 11 Oct 2016 13:57:36 +0000 (13:57 +0000)]
[modules] PR28752: Do not instantiate variable declarations which are not visible.
https://reviews.llvm.org/D24508
Patch developed in collaboration with Richard Smith!
llvm-svn: 283882
Simon Pilgrim [Tue, 11 Oct 2016 13:55:49 +0000 (13:55 +0000)]
[X86][SSE] Regenerate vector load-trunc test
llvm-svn: 283881
Simon Pilgrim [Tue, 11 Oct 2016 13:51:44 +0000 (13:51 +0000)]
[X86][SSE] Regenerate vsplit and tests
To make it more obvious how bad some of that truncation code is....
llvm-svn: 283880
Haojian Wu [Tue, 11 Oct 2016 13:50:34 +0000 (13:50 +0000)]
[clang-tidy] Fix template agrument false positives in unused-using-decls.
Summary:
* Fix a false postive when an using class is used in an explicit template instantiation.
* Fix a false postive when an using template class is used as template argument.
Reviewers: aaron.ballman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25437
llvm-svn: 283879