Commit Graph

329306 Commits

Author SHA1 Message Date
Petr Hosek 34a3b24a90 [libc++] Fix linker script generation
Handle the case when libc++abi and libunwind are being built together
with libc++ in the runtimes build. This logic was used in the previous
implementation but dropped in r374116.

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

llvm-svn: 374510
2019-10-11 04:54:35 +00:00
Craig Topper ccc85ac855 [X86] Add a DAG combine to turn v16i16->v16i8 VTRUNCUS+store into a saturating truncating store.
llvm-svn: 374509
2019-10-11 04:16:49 +00:00
Craig Topper 4b9947e2e7 [X86] Add test case for trunc_packus_v16i32_v16i8_store to min-legal-vector-width.ll
We aren't folding the vpmovuswb into the store.

llvm-svn: 374507
2019-10-11 04:02:04 +00:00
Philip Reames 2d5820cd72 [CVP] Remove a masking operation if range information implies it's a noop
This is really a known bits style transformation, but known bits isn't context sensitive. The particular case which comes up happens to involve a range which allows range based reasoning to eliminate the mask pattern, so handle that case specifically in CVP.

InstCombine likes to generate the mask-by-low-bits pattern when widening an arithmetic expression which includes a zext in the middle.

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

llvm-svn: 374506
2019-10-11 03:48:56 +00:00
Craig Topper 32097c2696 [X86] Add more packus/ssat/usat truncate tests from legal vectors to less than 128-bit vectors.
Some of these have sub-optimal codegen for avx512 relative to avx2.

llvm-svn: 374505
2019-10-11 03:46:39 +00:00
Volodymyr Sapsai 109bfb7b32 [Polly] Fix formatting violation. NFC.
llvm-svn: 374504
2019-10-11 03:09:24 +00:00
Nico Weber d38332981f Revert 374481 "[tsan,msan] Insert module constructors in a module pass"
CodeGen/sanitizer-module-constructor.c fails on mac and windows, see e.g.
http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/11424

llvm-svn: 374503
2019-10-11 02:44:20 +00:00
Yaxun Liu c1f8e04eee [CUDA][HIP} Add a test for constexpr default ctor
Differential Revision: https://reviews.llvm.org/D68753

llvm-svn: 374502
2019-10-11 02:43:28 +00:00
Volodymyr Sapsai 126158f096 [Stats] More polly fixes following llvm::Statistic changes in r374490.
llvm-svn: 374501
2019-10-11 02:42:16 +00:00
Lang Hames e5c61cee44 [JITLink] Disable the MachO/AArch64 testcase while investigating bot failures.
The windows bots are failing due to a memory layout error. Temporarily disabling
while I investigate whether this can be worked around, or whether the test
should be disabled on Windows.

llvm-svn: 374500
2019-10-11 01:58:12 +00:00
Lang Hames b453593870 [JITLink] Fix MachO/arm64 GOTPAGEOFF encoding.
The original implementation failed to shift the immediate down.

This should fix some of the bot failures due to r374476.

llvm-svn: 374499
2019-10-11 01:50:31 +00:00
Johannes Doerfert 8fa56c49df [Attributor][FIX] Do not replace musstail calls with constant
llvm-svn: 374498
2019-10-11 01:45:32 +00:00
Volodymyr Sapsai e90cc03a85 [Stats] Fix polly build due to change in llvm::Statistic constructor in r374490.
llvm-svn: 374497
2019-10-11 01:43:36 +00:00
Richard Smith 9d1eba184e Fix assertion failure for a cv-qualified array as a non-type template
parameter type.

We were both failing to decay the array type to a pointer and failing to
remove the top-level cv-qualifications. Fix this by decaying array
parameters even if the parameter type is dependent.

llvm-svn: 374496
2019-10-11 01:29:53 +00:00
Matt Arsenault 4227c62bc7 AMDGPU: Move SelectFlatOffset back into AMDGPUISelDAGToDAG
llvm-svn: 374495
2019-10-11 01:28:27 +00:00
Jordan Rose 7b5c879243 Get ClangdXPC.framework building (barely) with CMake's Xcode generator
The output directories for CMake's Xcode project generator are
specific to the configuration, and so looking in
CMAKE_LIBRARY_OUTPUT_DIRECTORY isn't going to work. Fortunately, CMake
already provides generator expressions to find the output of a given
target.

I call this "barely" building because the built framework isn't going
to respect the configuration; that is, I can't have both Debug and
RelWithDebInfo variants of ClangdXPC.framework at the same time like I
can with normal library or executable targets. To do that we'd have to
put the framework in a configuration-specific output directory or use
CMake's native support for frameworks instead.

https://reviews.llvm.org/D68846

llvm-svn: 374494
2019-10-11 01:23:56 +00:00
Volodymyr Sapsai adb203feda [Stats] Add ALWAYS_ENABLED_STATISTIC enabled regardless of LLVM_ENABLE_STATS.
The intended usage is to measure relatively expensive operations. So the
cost of the statistic is negligible compared to the cost of a measured
operation and can be enabled all the time without impairing the
compilation time.

rdar://problem/55715134

Reviewers: dsanders, bogner, rtereshin

Reviewed By: dsanders

Subscribers: hiraditya, jkorous, dexonsmith, ributzka, cfe-commits, llvm-commits

Tags: #llvm

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

llvm-svn: 374490
2019-10-11 00:57:41 +00:00
Richard Smith 63835f3ac7 Include whether the destructor is constexpr in -ast-dump output for a
clss.

llvm-svn: 374488
2019-10-11 00:40:08 +00:00
Craig Topper b560fd6c52 [X86] Improve the AVX512 bailout in combineTruncateWithSat to allow pack instructions in more situations.
If we don't have VLX we won't end up selecting a saturating
truncate for 256-bit or smaller vectors so we should just use
the pack lowering.

llvm-svn: 374487
2019-10-11 00:38:51 +00:00
Craig Topper 4dc27c69b6 [X86] Update trunc_packus_v32i32_v32i8 test in min-legal-vector-width.ll to use a load for the large type and add the min-legal-vector-width attribute.
The attribute is needed to avoid zmm registers. Using memory
avoids argument splitting for large vectors.

llvm-svn: 374486
2019-10-11 00:38:41 +00:00
Richard Smith 91aeacc06b Move most CXXRecordDecl::DefinitionData bit-fields out into a separate
file.

Reduces duplication and thereby reduces the risk that someone will
forget to update one of these places, as I did when adding
DefaultedDestructorIsConstexpr (though I've been unable to produce
a testcase for which that matters so far).

llvm-svn: 374484
2019-10-11 00:29:04 +00:00
Haibo Huang 7b9900dff3 Clean up format in cmake file
Summary: Makes the indent consistent to other part of the file.

Subscribers: mgorny, lldb-commits

Tags: #lldb

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

llvm-svn: 374483
2019-10-11 00:12:20 +00:00
GN Sync Bot 85ec603d9e gn build: Merge r374476
llvm-svn: 374482
2019-10-10 23:49:59 +00:00
Vitaly Buka 5c72aa232e [tsan,msan] Insert module constructors in a module pass
Summary:
If we insert them from function pass some analysis may be missing or invalid.
Fixes PR42877.

Reviewers: eugenis, leonardchan

Reviewed By: leonardchan

Subscribers: hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

llvm-svn: 374481
2019-10-10 23:49:10 +00:00
Vitaly Buka c2b7737b34 [msan, NFC] Move option parsing into constructor
llvm-svn: 374480
2019-10-10 23:49:07 +00:00
Michael Liao 6fa082fb00 Fix compilation warning due to typo.
llvm-svn: 374479
2019-10-10 23:48:56 +00:00
Michael Liao 1f62ae8635 [tooling] Fix assertion on MacOSX.
llvm-svn: 374478
2019-10-10 23:45:20 +00:00
Lang Hames 3cc04f6a41 [JITLink] Add an initial implementation of JITLink for MachO/AArch64.
This implementation has support for all relocation types except TLV.

Compact unwind sections are not yet supported, so exceptions/unwinding will not
work.

llvm-svn: 374476
2019-10-10 23:37:51 +00:00
Lang Hames 96cd736c2d [JITLink] Move MachO/x86 got test further down in the data section.
'named_data' should be the first symbol in the data section.

llvm-svn: 374475
2019-10-10 23:37:49 +00:00
Tom Stellard 97578b14fc docs/DeveloperPolicy: Add instructions for requesting GitHub commit access
Subscribers: mehdi_amini, jtony, xbolva00, llvm-commits

Tags: #llvm

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

llvm-svn: 374474
2019-10-10 23:36:06 +00:00
Amy Huang c9428a04fc Change test case so that it accepts backslashes in file path, in the case that the test runs on Windows
llvm-svn: 374473
2019-10-10 23:35:53 +00:00
Reid Kleckner 9280d6c178 Fix check-interception link error in compiler-rt debug mode
llvm-svn: 374472
2019-10-10 23:30:54 +00:00
Alina Sbirlea 6442b56974 [MemorySSA] Update Phi simplification.
When simplifying a Phi to the unique value found incoming, check that
there wasn't a Phi already created to break a cycle. If so, remove it.
Resolves PR43541.

Some additional nits included.

llvm-svn: 374471
2019-10-10 23:27:21 +00:00
Michael Liao 1ccb39bbd8 [tooling] Teach Tooling to understand compilation with offloading.
Summary:
- So far, we only recognize the host compilation with offloading and
  skip the offloading part.

Reviewers: tra, yaxunl

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 374470
2019-10-10 23:05:55 +00:00
Alex Langford 887707e29d [lldb-test] Remove unused header
llvm-svn: 374468
2019-10-10 22:43:03 +00:00
Yaxun Liu c10a64718e Fix help message for -ffp-contract
Differential Revision: https://reviews.llvm.org/D68823

llvm-svn: 374467
2019-10-10 22:43:00 +00:00
Richard Smith e381f33651 PR43629: Fix crash evaluating constexpr placement new on a subobject of
an out-of-lifetime object.

llvm-svn: 374465
2019-10-10 22:31:17 +00:00
Marcello Maggioni a064edf55e [GISel] Simplifying return from else in function. NFC
Forgot to integrate this little change in previous commit

llvm-svn: 374463
2019-10-10 21:51:30 +00:00
Jonas Devlieghere 6cff8648cc [Make] Remove spurious line break
This test is disabled upstream and therefore this went unnoticed.

llvm-svn: 374462
2019-10-10 21:49:25 +00:00
Jonas Devlieghere b9e518d3c6 [test] Reduce inconsistency between lit configuration files.
Add the Python extension to the configuration files in the API directory
to match the other test suites.

llvm-svn: 374461
2019-10-10 21:49:22 +00:00
Craig Topper 4ee7f8365f [X86] Guard against leaving a dangling node in combineTruncateWithSat.
When handling the packus pattern for i32->i8 we do a two step
process using a packss to i16 followed by a packus to i8. If the
final i8 step is a type with less than 64-bits the packus step
will return SDValue(), but the i32->i16 step might have succeeded.
This leaves the nodes from the middle step dangling.

Guard against this by pre-checking that the number of elements is
at least 8 before doing the middle step.

With that check in place this should mean the only other
case the middle step itself can fail is when SSE2 is disabled. So
add an early SSE2 check then just assert that neither the middle
or final step ever fail.

llvm-svn: 374460
2019-10-10 21:46:52 +00:00
Craig Topper a0df8b72f2 [X86] Add test cases for packus/ssat/usat 32i32->v32i8 test cases. NFC
llvm-svn: 374459
2019-10-10 21:46:44 +00:00
Marcello Maggioni 0112123eea [GISel] Allow getConstantVRegVal() to return G_FCONSTANT values.
In GISel we have both G_CONSTANT and G_FCONSTANT, but because
in GISel we don't really have a concept of Float vs Int value
the only difference between the two is where the data originates
from.

What both G_CONSTANT and G_FCONSTANT return is just a bag of bits
with the constant representation in it.

By making getConstantVRegVal() return G_FCONSTANTs bit representation
as well we allow ConstantFold and other things to operate with
G_FCONSTANT.

Adding tests that show ConstantFolding to work on mixed G_CONSTANT
and G_FCONSTANT sources.

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

llvm-svn: 374458
2019-10-10 21:46:26 +00:00
Richard Smith 3f2d42baa0 Fix some errors in <arm_neon.h> tests that cause them to fail with lax
vector conversions disabled.

llvm-svn: 374457
2019-10-10 21:40:56 +00:00
Nico Weber b556085d81 Revert 374450 "Fix __builtin_assume_aligned with too large values."
The test fails on Windows, with

  error: 'warning' diagnostics expected but not seen:
    File builtin-assume-aligned.c Line 62: requested alignment
        must be 268435456 bytes or smaller; assumption ignored
  error: 'warning' diagnostics seen but not expected:
    File builtin-assume-aligned.c Line 62: requested alignment
        must be 8192 bytes or smaller; assumption ignored

llvm-svn: 374456
2019-10-10 21:34:32 +00:00
Stanislav Mekhanoshin 19a1a739b1 [AMDGPU] Handle undef old operand in DPP combine
It was missing an undef flag.

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

llvm-svn: 374455
2019-10-10 21:32:41 +00:00
Rong Xu 686fa4bbfb [ValueTracking] Improve pointer offset computation for cases of same base
This patch improves the handling of pointer offset in GEP expressions where
one argument is the base pointer. isPointerOffset() is being used by memcpyopt
where current code synthesizes consecutive 32 bytes stores to one store and
two memset intrinsic calls. With this patch, we convert the stores to one
memset intrinsic.

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

llvm-svn: 374454
2019-10-10 21:30:43 +00:00
Evandro Menezes 8bd4276981 [InstCombine] Add test case for PR43617 (NFC)
Also, refactor check in `LibCallSimplifier::optimizeLog()`.

llvm-svn: 374453
2019-10-10 21:29:10 +00:00
Julian Lettner 8d0744a8b5 [lit] Break main into smaller functions
This change is purely mechanical.  I will do further cleanups of
parameter usages.

Reviewed By: rnk

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

llvm-svn: 374452
2019-10-10 21:24:41 +00:00
Frederic Riss 58417b3390 TestMTCSimple: Make Makefile portable.
r374262 left out the Makefile changes needed to cross compile this test.

llvm-svn: 374451
2019-10-10 21:21:16 +00:00