Roman Lebedev [Tue, 10 Sep 2019 18:40:00 +0000 (18:40 +0000)]
[NFC][InstSimplify] rewrite test added in r371537 to use non-null pointer instead
I only want to ensure that %offset is non-zero there,
it doesn't matter how that info is conveyed.
As filed in PR43267, the assumption way does not work.
llvm-svn: 371546
Vedant Kumar [Tue, 10 Sep 2019 18:36:53 +0000 (18:36 +0000)]
[lldbtest] Add an "expected_cmd_failure" option to the filecheck helper
llvm-svn: 371544
Vedant Kumar [Tue, 10 Sep 2019 18:36:50 +0000 (18:36 +0000)]
[Function] Factor out GetCallEdgeForReturnAddress, NFC
Finding the call edge in a function which corresponds to a particular
return address is a generic/useful operation.
llvm-svn: 371543
Matt Arsenault [Tue, 10 Sep 2019 17:57:33 +0000 (17:57 +0000)]
GlobalISel/TableGen: Handle REG_SEQUENCE patterns
The scalar f64 patterns don't work yet because they fail on multiple
results from the unused implicit def of scc in the result bit
operation.
llvm-svn: 371542
Guozhi Wei [Tue, 10 Sep 2019 17:25:11 +0000 (17:25 +0000)]
[BPI] Adjust the probability for floating point unordered comparison
Since NaN is very rare in normal programs, so the probability for floating point unordered comparison should be extremely small. Current probability is 3/8, it is too large, this patch changes it to a tiny number.
Differential Revision: https://reviews.llvm.org/D65303
llvm-svn: 371541
Matt Arsenault [Tue, 10 Sep 2019 17:19:46 +0000 (17:19 +0000)]
AMDGPU/GlobalISel: Select G_FABS/G_FNEG
f64 doesn't work yet because tablegen currently doesn't handlde
REG_SEQUENCE.
This does regress some multi use VALU fneg cases since now the
immediate remains in an SGPR, and more moves are used for legalizing
the xor. This is a SIFixSGPRCopies deficiency.
llvm-svn: 371540
Matt Arsenault [Tue, 10 Sep 2019 17:17:05 +0000 (17:17 +0000)]
AMDGPU/GlobalISel: Select cvt pk intrinsics
llvm-svn: 371539
Matt Arsenault [Tue, 10 Sep 2019 17:16:59 +0000 (17:16 +0000)]
AMDGPU/GlobalISel: Select llvm.amdgcn.sffbh
llvm-svn: 371538
Roman Lebedev [Tue, 10 Sep 2019 17:13:59 +0000 (17:13 +0000)]
[NFC][InstCombine][InstSimplify] PR43251 - and some patterns with offset != 0
https://rise4fun.com/Alive/21b
llvm-svn: 371537
Matt Arsenault [Tue, 10 Sep 2019 16:42:37 +0000 (16:42 +0000)]
AMDGPU/GlobalISel: RegBankSelect for G_ZEXTLOAD/G_SEXTLOAD
llvm-svn: 371536
Matt Arsenault [Tue, 10 Sep 2019 16:42:31 +0000 (16:42 +0000)]
AMDGPU/GlobalISel: Legalize constant 32-bit loads
Legalize by casting to a 64-bit constant address. This isn't how the
DAG implements it, but it should.
llvm-svn: 371535
Sam Elliott [Tue, 10 Sep 2019 16:24:03 +0000 (16:24 +0000)]
[RISCV] Support llvm-objdump -M no-aliases and -M numeric
Summary:
Now that llvm-objdump allows target-specific options, we match the
`no-aliases` and `numeric` options for RISC-V, as supported by GNU objdump.
This is done by overriding the variables used for the command-line options, so
that the command-line options are still supported.
This patch updates all tests using `llvm-objdump -riscv-no-aliases` to use
`llvm-objdump -M no-aliases`.
Reviewers: luismarques, asb
Reviewed By: luismarques, asb
Subscribers: pzheng, hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66139
llvm-svn: 371534
Matt Arsenault [Tue, 10 Sep 2019 16:20:14 +0000 (16:20 +0000)]
AMDGPU/GlobalISel: First pass at attempting to legalize load/stores
There's still a lot more to do, but this handles decomposing due to
alignment. I've gotten it to the point where nothing crashes or
infinite loops the legalizer.
llvm-svn: 371533
Adrian Prantl [Tue, 10 Sep 2019 16:17:38 +0000 (16:17 +0000)]
Implement DW_OP_convert
This patch adds basic support for DW_OP_convert[1] for integer
types. Recent versions of LLVM's optimizer may insert this opcode into
DWARF expressions. DW_OP_convert is effectively a type cast operation
that takes a reference to a base type DIE (or zero) and then casts the
value at the top of the DWARF stack to that type. Internally this
works by changing the bit size of the APInt that is used as backing
storage for LLDB's DWARF stack.
I managed to write a unit test for this by implementing a mock YAML
object file / module that takes debug info sections in yaml2obj
format.
[1] Typed DWARF stack. http://www.dwarfstd.org/ShowIssue.php?issue=140425.1
<rdar://problem/
48167864>
Differential Revision: https://reviews.llvm.org/D67369
llvm-svn: 371532
Sam Elliott [Tue, 10 Sep 2019 15:55:55 +0000 (15:55 +0000)]
[RISCV] Add Option for Printing Architectural Register Names
Summary:
This is an option primarily to use during testing. Instead of always
printing registers using their ABI names, this allows a user to request they
are printed with their architectural name.
This is then used in the register constraint tests to ensure the mapping
between architectural and abi names is correct.
Reviewers: asb, luismarques
Reviewed By: asb
Subscribers: pzheng, hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65950
llvm-svn: 371531
Adrian Prantl [Tue, 10 Sep 2019 15:53:18 +0000 (15:53 +0000)]
Don't emit .gnu_pubnames when tuning for LLDB.
LLDB reads the various .apple* accelerator tables (and in the near
future: the DWARF 5 accelerator tables) which should make
.gnu_pubnames redundant. This changes the Clang driver to no longer
pass -ggnu-pubnames when tuning for LLDB.
Thanks to David Blaikie for pointing this out!
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-
20190422/thread.html#646062
rdar://problem/
50142073
Differential Revision: https://reviews.llvm.org/D67373
llvm-svn: 371530
Sanjay Patel [Tue, 10 Sep 2019 15:42:22 +0000 (15:42 +0000)]
[x86] add a test for BreakFalseDeps; NFC
As discussed in D67363
llvm-svn: 371528
Djordje Todorovic [Tue, 10 Sep 2019 14:48:52 +0000 (14:48 +0000)]
Revert "[utils] Implement the llvm-locstats tool"
This reverts commit rL371520.
llvm-svn: 371527
Sanjay Patel [Tue, 10 Sep 2019 14:29:02 +0000 (14:29 +0000)]
[ARM] add test for BreakFalseDeps with minsize attribute; NFC
llvm-svn: 371526
Simon Pilgrim [Tue, 10 Sep 2019 14:28:29 +0000 (14:28 +0000)]
[X86] Add AVX partial dependency tests as noted on D67363
llvm-svn: 371525
Sanjay Patel [Tue, 10 Sep 2019 14:26:25 +0000 (14:26 +0000)]
[ARM] auto-generate complete test checks; NFC
llvm-svn: 371524
Florian Hahn [Tue, 10 Sep 2019 14:20:20 +0000 (14:20 +0000)]
[VectorUtils] Remove unused include. [NFC]
Patch by Francesco Petrogalli <francesco.petrogalli@arm.com>
Reviewers: fhahn
Reviewed By: fhahn
Differential Revision: https://reviews.llvm.org/D67365
llvm-svn: 371523
Clement Courbet [Tue, 10 Sep 2019 14:20:08 +0000 (14:20 +0000)]
[clang][codegen][NFC] Make test patterns more permissive.
See the discussion in:
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-
20190909/692736.html
llvm-svn: 371522
David Zarzycki [Tue, 10 Sep 2019 14:19:52 +0000 (14:19 +0000)]
[CMake] Don't pass all LLVM_COMPILE_FLAGS to the C compiler
GCC (unlike clang!) warns about C++ flags when compiling C.
https://reviews.llvm.org/D67171
llvm-svn: 371521
Djordje Todorovic [Tue, 10 Sep 2019 13:47:03 +0000 (13:47 +0000)]
[utils] Implement the llvm-locstats tool
The tool reports verbose output for the DWARF debug location coverage.
The llvm-locstats for each variable or formal parameter DIE computes what
percentage from the code section bytes, where it is in scope, it has
location description. The line 0 shows the number (and the percentage) of
DIEs with no location information, but the line 100 shows the number (and
the percentage) of DIEs where there is location information in all code
section bytes (where the variable or parameter is in the scope). The line
50..59 shows the number (and the percentage) of DIEs where the location
information is in between 50 and 59 percentage of its scope covered.
The tool will be very useful for tracking improvements regarding the
"debugging optimized code" support with LLVM ecosystem.
Differential Revision: https://reviews.llvm.org/D66526
llvm-svn: 371520
Roman Lebedev [Tue, 10 Sep 2019 13:29:40 +0000 (13:29 +0000)]
[NFC][InstCombine] PR43251 - valid for other predicates too
llvm-svn: 371519
Florian Hahn [Tue, 10 Sep 2019 13:10:28 +0000 (13:10 +0000)]
[InstCombine] Use SimplifyFMulInst to simplify multiply in fma.
This allows us to fold fma's that multiply with 0.0. Also, the
multiply by 1.0 case is handled there as well. The fneg/fabs cases
are not handled by SimplifyFMulInst, so we need to keep them.
Reviewers: spatel, anemet, lebedev.ri
Reviewed By: spatel
Differential Revision: https://reviews.llvm.org/D67351
llvm-svn: 371518
Florian Hahn [Tue, 10 Sep 2019 13:05:34 +0000 (13:05 +0000)]
[InstCombine] Precommit tests for D67351.
llvm-svn: 371517
Sanjay Patel [Tue, 10 Sep 2019 13:00:31 +0000 (13:00 +0000)]
[BreakFalseDeps] fix typos/grammar in documentation comment; NFC
llvm-svn: 371516
Martin Storsjo [Tue, 10 Sep 2019 12:31:40 +0000 (12:31 +0000)]
[Object] Implement relocation resolver for COFF ARM/ARM64
Adding testscases for this via llvm-dwarfdump.
Also add testcases for the existing resolver support for X86.
Differential Revision: https://reviews.llvm.org/D67340
llvm-svn: 371515
Fangrui Song [Tue, 10 Sep 2019 12:28:07 +0000 (12:28 +0000)]
[ELF][test] Make tests more tolerant to exact symbol addresses
Delete relocation-local.s and relocation-shared.s - covered by various tests
llvm-svn: 371514
Haojian Wu [Tue, 10 Sep 2019 12:17:49 +0000 (12:17 +0000)]
Fix the "git modified" issue on the preserve-comments-crlf.s.
Summary:
rL371473 corrected the line ending (to crlf) in preserve-comments-crlf.s, but it causes a wired issue on git
repository (I ran git pull today, it showed a local change of that file even I did not change anything).
Reviewers: gribozavr
Reviewed By: gribozavr
Subscribers: llvm-commits, cfe-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67391
llvm-svn: 371513
Raphael Isemann [Tue, 10 Sep 2019 12:04:04 +0000 (12:04 +0000)]
[lldb] Readd missing functionalities/breakpoint tests
It seems when I restructured the test folders the functionalities/breakpoint
was deleted. This just reverts this change and re-adds the tests.
llvm-svn: 371512
Guillaume Chatelet [Tue, 10 Sep 2019 12:00:43 +0000 (12:00 +0000)]
[Alignment][NFC] Use llvm::Align for TargetLowering::getPrefLoopAlignment
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Reviewed By: courbet
Subscribers: wuzish, arsenm, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, MaskRay, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67386
llvm-svn: 371511
Igor Kudrin [Tue, 10 Sep 2019 11:54:32 +0000 (11:54 +0000)]
Reland [DWARF] Add a unit test for DWARFUnit::getLength().
This is a follow-up of rL369529, where the return value of
DWARFUnit::getLength() was changed from uint32_t to uint64_t.
The test checks that a unit header with Length > 4G can be successfully
parsed and the value of the Length field is not truncated.
Differential Revision: https://reviews.llvm.org/D67276
llvm-svn: 371510
Rui Ueyama [Tue, 10 Sep 2019 11:50:26 +0000 (11:50 +0000)]
[LLD][COFF] Add index to disambiguate archive members when using -wholearchive
Patch by Markus Böck.
PR42951: When linking an archive with members that have the same name linking
fails when using the -wholearchive option. This patch passes the index
of the member in the archive to the offset parameter to disambiguate the
member.
Differential Revision: https://reviews.llvm.org/D66239
llvm-svn: 371509
Alexander Timofeev [Tue, 10 Sep 2019 10:58:57 +0000 (10:58 +0000)]
[AMDGPU]: PHI Elimination hooks added for custom COPY insertion.
Reviewers: rampitec, vpykhtin
Differential Revision: https://reviews.llvm.org/D67101
llvm-svn: 371508
Dmitri Gribenko [Tue, 10 Sep 2019 10:39:09 +0000 (10:39 +0000)]
Revert "Reland "r364412 [ExpandMemCmp][MergeICmps] Move passes out of CodeGen into opt pipeline.""
This reverts commit r371502, it broke tests
(clang/test/CodeGenCXX/auto-var-init.cpp).
llvm-svn: 371507
Djordje Todorovic [Tue, 10 Sep 2019 10:37:28 +0000 (10:37 +0000)]
[llvm-dwarfdump] Add additional stats fields
The additional fields will be parsed by the llvm-locstats tool in order to
produce more human readable output of the DWARF debug location quality
generated.
Differential Revision: https://reviews.llvm.org/D66525
llvm-svn: 371506
Igor Kudrin [Tue, 10 Sep 2019 10:17:48 +0000 (10:17 +0000)]
Revert "[DWARF] Add a unit test for DWARFUnit::getLength()" because it broke ASAN bot.
llvm-svn: 371505
Haojian Wu [Tue, 10 Sep 2019 10:10:36 +0000 (10:10 +0000)]
[clangd] Collect location of macro definition in the ParsedAST
allows semantic hightlighting macro definition
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D67264
llvm-svn: 371504
Clement Courbet [Tue, 10 Sep 2019 10:00:15 +0000 (10:00 +0000)]
[ExpandMemCmp] Add lit.local.cfg
To prevent AArch64 tests from running when the target is not compiled.
Fixes r371502:
/home/buildslave/ps4-buildslave4/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/llvm.src/test/Transforms/ExpandMemCmp/AArch64/memcmp.ll:11:15: error: CHECK-NEXT: expected string not found in input
; CHECK-NEXT: [[TMP0:%.*]] = bitcast i8* [[S1:%.*]] to i64*
llvm-svn: 371503
Clement Courbet [Tue, 10 Sep 2019 09:18:00 +0000 (09:18 +0000)]
Reland "r364412 [ExpandMemCmp][MergeICmps] Move passes out of CodeGen into opt pipeline."
With a fix for sanitizer breakage (see explanation in D60318).
llvm-svn: 371502
Fangrui Song [Tue, 10 Sep 2019 09:16:34 +0000 (09:16 +0000)]
[yaml2obj] Set p_align to the maximum sh_addralign of contained sections
The address difference between two sections in a PT_LOAD is a constant.
Consider a hypothetical case (pagesize can be very small, say, 4).
```
.text sh_addralign=4
.text.hot sh_addralign=16
```
If we set p_align to 4, the PT_LOAD will be loaded at an address which
is a multiple of 4. The address of .text.hot is guaranteed to be a
multiple of 4, but not necessarily a multiple of 16.
This patch deletes the constraint
if (SHeader->sh_offset == PHeader.p_offset)
Reviewed By: grimar, jhenderson
Differential Revision: https://reviews.llvm.org/D67260
llvm-svn: 371501
Igor Kudrin [Tue, 10 Sep 2019 09:03:24 +0000 (09:03 +0000)]
[DWARF] Add a unit test for DWARFUnit::getLength().
This is a follow-up of rL369529, where the return value of
DWARFUnit::getLength() was changed from uint32_t to uint64_t.
The test checks that a unit header with Length > 4G can be successfully
parsed and the value of the Length field is not truncated.
Differential Revision: https://reviews.llvm.org/D67276
llvm-svn: 371499
Guillaume Chatelet [Tue, 10 Sep 2019 09:01:18 +0000 (09:01 +0000)]
[Alignment] Use Align for TargetLowering::MinStackArgumentAlignment
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: sdardis, nemanjai, hiraditya, kbarton, jrtc27, MaskRay, atanasyan, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67288
llvm-svn: 371498
James Henderson [Tue, 10 Sep 2019 08:48:33 +0000 (08:48 +0000)]
Revert Remove REQUIRES:shell from tests that pass for me on Windows
This reverts r371478 (git commit
a9980f60ce083fa6d5fd03c12c58ca0b293e3d60)
llvm-svn: 371497
Roger Ferrer Ibanez [Tue, 10 Sep 2019 08:16:24 +0000 (08:16 +0000)]
[RISCV] Make -march=rv{32,64}gc the default in RISC-V Linux
This is the logical follow-up of D65634.
Differential Revision: https://reviews.llvm.org/D66003
llvm-svn: 371496
Haojian Wu [Tue, 10 Sep 2019 08:07:12 +0000 (08:07 +0000)]
[clangd] some tweaks on the vscode readme, NFC
llvm-svn: 371495
Roger Ferrer Ibanez [Tue, 10 Sep 2019 07:57:36 +0000 (07:57 +0000)]
[RISCV] Default to ilp32d/lp64d in RISC-V Linux
When running clang as a native compiler in RISC-V Linux the flag
-mabi=ilp32d / -mabi=lp64d is always mandatory. This change makes it the
default there.
Differential Revision: https://reviews.llvm.org/D65634
llvm-svn: 371494
Craig Topper [Tue, 10 Sep 2019 07:56:02 +0000 (07:56 +0000)]
[LegalizeTypes] Teach SoftenFloatOp_SELECT_CC to handle operand 2 or 3 being softened.
This can only happen on X86 when fp128 is a legal type, but we
go through softening to generate libcalls. This causes fp128 to
be softened to fp128 instead of an integer type. This can be
removed if D67128 lands.
llvm-svn: 371493
Roger Ferrer Ibanez [Tue, 10 Sep 2019 07:47:34 +0000 (07:47 +0000)]
[RISCV] Move architecture parsing code into its own function
I plan to reuse it in a later patch.
This is almost NFC except a small change in control flow when diagnosing
+d without +f.
Differential Revision: https://reviews.llvm.org/D66002
llvm-svn: 371492
David Carlier [Tue, 10 Sep 2019 07:33:39 +0000 (07:33 +0000)]
[LLDB] FreeBSD fix new SetFile call.
llvm-svn: 371491
Nico Weber [Tue, 10 Sep 2019 06:31:59 +0000 (06:31 +0000)]
gn build: Merge r371488
llvm-svn: 371489
Petr Hosek [Tue, 10 Sep 2019 06:25:13 +0000 (06:25 +0000)]
Revert "clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM"
This reverts commit r371484: this broke sanitizer-x86_64-linux-fast bot.
llvm-svn: 371488
Craig Topper [Tue, 10 Sep 2019 05:49:53 +0000 (05:49 +0000)]
[X86] Add broadcast load unfolding support for VCMPPS/PD.
llvm-svn: 371487
Craig Topper [Tue, 10 Sep 2019 05:49:48 +0000 (05:49 +0000)]
[X86] Add broadcast load unfold tests for VCMPPS/PD.
llvm-svn: 371486
Nico Weber [Tue, 10 Sep 2019 03:18:25 +0000 (03:18 +0000)]
gn build: Merge r371484
llvm-svn: 371485
Petr Hosek [Tue, 10 Sep 2019 03:11:39 +0000 (03:11 +0000)]
clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM
This patch contains the basic functionality for reporting potentially
incorrect usage of __builtin_expect() by comparing the developer's
annotation against a collected PGO profile. A more detailed proposal and
discussion appears on the CFE-dev mailing list
(http://lists.llvm.org/pipermail/cfe-dev/2019-July/062971.html) and a
prototype of the initial frontend changes appear here in D65300
We revised the work in D65300 by moving the misexpect check into the
LLVM backend, and adding support for IR and sampling based profiles, in
addition to frontend instrumentation.
We add new misexpect metadata tags to those instructions directly
influenced by the llvm.expect intrinsic (branch, switch, and select)
when lowering the intrinsics. The misexpect metadata contains
information about the expected target of the intrinsic so that we can
check against the correct PGO counter when emitting diagnostics, and the
compiler's values for the LikelyBranchWeight and UnlikelyBranchWeight.
We use these branch weight values to determine when to emit the
diagnostic to the user.
A future patch should address the comment at the top of
LowerExpectIntrisic.cpp to hoist the LikelyBranchWeight and
UnlikelyBranchWeight values into a shared space that can be accessed
outside of the LowerExpectIntrinsic pass. Once that is done, the
misexpect metadata can be updated to be smaller.
In the long term, it is possible to reconstruct portions of the
misexpect metadata from the existing profile data. However, we have
avoided this to keep the code simple, and because some kind of metadata
tag will be required to identify which branch/switch/select instructions
are influenced by the use of llvm.expect
Patch By: paulkirth
Differential Revision: https://reviews.llvm.org/D66324
llvm-svn: 371484
Kai Luo [Tue, 10 Sep 2019 02:28:24 +0000 (02:28 +0000)]
[PowerPC][NFC] Update test assertions using update_llc_test_checks.py
Summary:
This patch is made due to https://reviews.llvm.org/rL371289 where typo
fixes failed.
Differential Revision: https://reviews.llvm.org/D67317
llvm-svn: 371483
Mehdi Amini [Tue, 10 Sep 2019 01:26:36 +0000 (01:26 +0000)]
Revert [git-llvm] Do not reinvent `@{upstream}`
This reverts r371290 (git commit
7faffd544b16f851a632d6b8f93e3c8485ff34bb)
The change wasnt NFC and broke some users' workflow. Reverting while figuring
out the best alternative to move forward.
llvm-svn: 371480
Nico Weber [Tue, 10 Sep 2019 01:11:30 +0000 (01:11 +0000)]
gn build: Merge r371466
llvm-svn: 371479
Reid Kleckner [Tue, 10 Sep 2019 00:50:32 +0000 (00:50 +0000)]
Remove REQUIRES:shell from tests that pass for me on Windows
I see in the history for some of these tests REQUIRES:shell was used as
a way to disable tests on Windows because they are flaky there. I tried
not to re-enable such tests, but it's possible that I missed some and
this will re-enable flaky tests on Windows. If so, we should disable
them with UNSUPPORTED:system-windows and add a comment that they are
flaky there. So far as I can tell, the lit internal shell is capable of
running all of these tests, and we shouldn't use REQUIRES:shell as a
proxy for Windows.
llvm-svn: 371478
Nico Weber [Tue, 10 Sep 2019 00:48:20 +0000 (00:48 +0000)]
gn build: (manually) merge r371429
llvm-svn: 371477
Richard Smith [Tue, 10 Sep 2019 00:39:53 +0000 (00:39 +0000)]
Fix crash mangling an explicit lambda non-type template parameter pack
that is not a pack expansion.
llvm-svn: 371476
Jan Korous [Tue, 10 Sep 2019 00:29:35 +0000 (00:29 +0000)]
[llvm][ADT][NFC] Add test for makeArrayRef(std::array)
llvm-svn: 371475
Jonas Devlieghere [Tue, 10 Sep 2019 00:20:50 +0000 (00:20 +0000)]
[Utility] Replace `lldb_private::CleanUp` by `llvm::scope_exit`
This removes the CleanUp class and replaces its usages with llvm's
ScopeExit, which has similar semantics.
Differential revision: https://reviews.llvm.org/D67378
llvm-svn: 371474
Reid Kleckner [Tue, 10 Sep 2019 00:06:52 +0000 (00:06 +0000)]
Remove some unnecessary REQUIRES: shell lines
This means these tests will run on Windows. Replace one with
UNSUPPORTED: system-windows.
llvm-svn: 371473
Alex Langford [Mon, 9 Sep 2019 23:59:54 +0000 (23:59 +0000)]
[Expression] Remove unused header from LLVMUserExpression
llvm-svn: 371472
Matt Arsenault [Mon, 9 Sep 2019 23:30:11 +0000 (23:30 +0000)]
AMDGPU/GlobalISel: Fix insert point when lowering fminnum/fmaxnum
llvm-svn: 371471
Alex Langford [Mon, 9 Sep 2019 23:11:43 +0000 (23:11 +0000)]
[Symbol] Give ClangASTContext a PersistentExpressionState instead of a ClangPersistentVariables
ClangASTContext doesn't use m_persistent_variables in a way specific to
ClangPersistentVariables. Therefore, it should hold a unique pointer to
PersistentExpressionState instead of a ClangPersistentVariablesUP.
This also prevents you from pulling in a plugin header when including
ClangASTContext.h
Doing this exposed an implicit dependency in ObjCLanguage that was
corrected by including ClangModulesDeclVendor.h
llvm-svn: 371470
Richard Smith [Mon, 9 Sep 2019 23:07:25 +0000 (23:07 +0000)]
Fix incorrect demangling of call operator of lambda with explicit
template parameters due to registering template parameters twice.
llvm-svn: 371469
Richard Smith [Mon, 9 Sep 2019 23:07:22 +0000 (23:07 +0000)]
PR43242: Fix crash when typo-correcting to an operator() that should not
have been visible.
llvm-svn: 371468
Austin Kerbow [Mon, 9 Sep 2019 23:06:13 +0000 (23:06 +0000)]
AMDGPU/GlobalISel: Rename MIRBuilder to B. NFC
Reviewers: arsenm
Reviewed By: arsenm
Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, rovka, dstuttard, tpr, t-tye, hiraditya, Petar.Avramovic, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67374
llvm-svn: 371467
Reid Kleckner [Mon, 9 Sep 2019 23:04:25 +0000 (23:04 +0000)]
[Windows] Replace TrapUnreachable with an int3 insertion pass
This is an alternative to D66980, which was reverted. Instead of
inserting a pseudo instruction that optionally expands to nothing, add a
pass that inserts int3 when appropriate after basic block layout.
Reviewers: hans
Differential Revision: https://reviews.llvm.org/D67201
llvm-svn: 371466
Aditya Nandakumar [Mon, 9 Sep 2019 22:51:41 +0000 (22:51 +0000)]
[GlobalISel]: Fix a bug where we could dereference None
getConstantVRegVal returns None when dealing with constants > 64 bits.
Don't assume we always have a value in GISelKnownBits.
llvm-svn: 371465
Richard Smith [Mon, 9 Sep 2019 22:26:04 +0000 (22:26 +0000)]
Simplify demangler rule for lambda-expressions to match discussion on
cxx-abi list.
llvm-svn: 371462
Evgeniy Stepanov [Mon, 9 Sep 2019 22:24:57 +0000 (22:24 +0000)]
LangRef: mention MSan's problem with speculative conditional branches.
Summary:
This short blurb aims to disallow optimizations like we had to revert
(under MSan) in
https://reviews.llvm.org/D21165
https://bugs.llvm.org/show_bug.cgi?id=28054
https://reviews.llvm.org/D67205
Reviewers: vitalybuka, efriedma
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67244
llvm-svn: 371461
Jonas Devlieghere [Mon, 9 Sep 2019 22:07:45 +0000 (22:07 +0000)]
Revert "[Reproducer] Add a `cont` to ModuleCXX.test"
This should no longer be necessary after r371459.
llvm-svn: 371460
Jonas Devlieghere [Mon, 9 Sep 2019 22:05:48 +0000 (22:05 +0000)]
[Reproducer] Disconnect when the replay server is out of packets.
This is a fix for the issue described in r371144.
> On more than one occasion I've found this test got stuck during replay
> while waiting for a packet from debugserver when the debugger was in
> the process of being destroyed.
When the replay server is out of packets we should just disconnect so
the debugger doesn't have to do any cleanup that it wouldn't do during
capture.
llvm-svn: 371459
Simon Atanasyan [Mon, 9 Sep 2019 22:04:20 +0000 (22:04 +0000)]
[mips] Make another set of test cases more tolerant to exact symbol addresses. NFC
llvm-svn: 371458
Greg Clayton [Mon, 9 Sep 2019 21:45:49 +0000 (21:45 +0000)]
Fix ELF core file memory reading for PT_LOAD program headers with no p_filesz
Prior to this fix, ELF files might contain PT_LOAD program headers that had a valid p_vaddr, and a valid file p_offset, but the p_filesz would be zero. For example in llvm-project/lldb/test/testcases/functionalities/postmortem/elf-core/thread_crash/linux-i386.core we see:
Program Headers:
Index p_type p_flags p_offset p_vaddr p_paddr p_filesz p_memsz p_align
======= ---------------- ---------- ------------------ ------------------ ------------------ ------------------ ------------------ ------------------
[ 0] PT_NOTE 0x00000000 0x0000000000000474 0x0000000000000000 0x0000000000000000 0x0000000000001940 0x0000000000000000 0x0000000000000000
[ 1] PT_LOAD 0x00000005 0x0000000000002000 0x0000000008048000 0x0000000000000000 0x0000000000000000 0x0000000000003000 0x0000000000001000
[ 2] PT_LOAD 0x00000004 0x0000000000002000 0x000000000804b000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[ 3] PT_LOAD 0x00000006 0x0000000000002000 0x000000000804c000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[ 4] PT_LOAD 0x00000006 0x0000000000002000 0x0000000009036000 0x0000000000000000 0x0000000000000000 0x0000000000025000 0x0000000000001000
[ 5] PT_LOAD 0x00000000 0x0000000000002000 0x00000000f63a1000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[ 6] PT_LOAD 0x00000006 0x0000000000002000 0x00000000f63a2000 0x0000000000000000 0x0000000000000000 0x0000000000800000 0x0000000000001000
[ 7] PT_LOAD 0x00000000 0x0000000000002000 0x00000000f6ba2000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[ 8] PT_LOAD 0x00000006 0x0000000000002000 0x00000000f6ba3000 0x0000000000000000 0x0000000000000000 0x0000000000804000 0x0000000000001000
[ 9] PT_LOAD 0x00000005 0x0000000000002000 0x00000000f73a7000 0x0000000000000000 0x0000000000000000 0x00000000001b1000 0x0000000000001000
[ 10] PT_LOAD 0x00000004 0x0000000000002000 0x00000000f7558000 0x0000000000000000 0x0000000000000000 0x0000000000002000 0x0000000000001000
[ 11] PT_LOAD 0x00000006 0x0000000000002000 0x00000000f755a000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[ 12] PT_LOAD 0x00000006 0x0000000000002000 0x00000000f755b000 0x0000000000000000 0x0000000000000000 0x0000000000003000 0x0000000000001000
[ 13] PT_LOAD 0x00000005 0x0000000000002000 0x00000000f755e000 0x0000000000000000 0x0000000000000000 0x0000000000019000 0x0000000000001000
[ 14] PT_LOAD 0x00000004 0x0000000000002000 0x00000000f7577000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[ 15] PT_LOAD 0x00000006 0x0000000000002000 0x00000000f7578000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[ 16] PT_LOAD 0x00000006 0x0000000000002000 0x00000000f7579000 0x0000000000000000 0x0000000000000000 0x0000000000002000 0x0000000000001000
[ 17] PT_LOAD 0x00000005 0x0000000000002000 0x00000000f757b000 0x0000000000000000 0x0000000000000000 0x000000000001c000 0x0000000000001000
[ 18] PT_LOAD 0x00000004 0x0000000000002000 0x00000000f7597000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[ 19] PT_LOAD 0x00000006 0x0000000000002000 0x00000000f7598000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[ 20] PT_LOAD 0x00000005 0x0000000000002000 0x00000000f7599000 0x0000000000000000 0x0000000000000000 0x0000000000053000 0x0000000000001000
[ 21] PT_LOAD 0x00000004 0x0000000000002000 0x00000000f75ec000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[ 22] PT_LOAD 0x00000006 0x0000000000002000 0x00000000f75ed000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[ 23] PT_LOAD 0x00000005 0x0000000000002000 0x00000000f75ee000 0x0000000000000000 0x0000000000000000 0x0000000000176000 0x0000000000001000
[ 24] PT_LOAD 0x00000004 0x0000000000002000 0x00000000f7764000 0x0000000000000000 0x0000000000000000 0x0000000000006000 0x0000000000001000
[ 25] PT_LOAD 0x00000006 0x0000000000002000 0x00000000f776a000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[ 26] PT_LOAD 0x00000006 0x0000000000002000 0x00000000f776b000 0x0000000000000000 0x0000000000000000 0x0000000000003000 0x0000000000001000
[ 27] PT_LOAD 0x00000006 0x0000000000002000 0x00000000f778a000 0x0000000000000000 0x0000000000000000 0x0000000000002000 0x0000000000001000
[ 28] PT_LOAD 0x00000004 0x0000000000002000 0x00000000f778c000 0x0000000000000000 0x0000000000002000 0x0000000000002000 0x0000000000001000
[ 29] PT_LOAD 0x00000005 0x0000000000004000 0x00000000f778e000 0x0000000000000000 0x0000000000002000 0x0000000000002000 0x0000000000001000
[ 30] PT_LOAD 0x00000005 0x0000000000006000 0x00000000f7790000 0x0000000000000000 0x0000000000000000 0x0000000000022000 0x0000000000001000
[ 31] PT_LOAD 0x00000004 0x0000000000006000 0x00000000f77b3000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[ 32] PT_LOAD 0x00000006 0x0000000000006000 0x00000000f77b4000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000
[ 33] PT_LOAD 0x00000006 0x0000000000006000 0x00000000ffa25000 0x0000000000000000 0x0000000000000000 0x0000000000022000 0x0000000000001000
Prior to this fix if users tried to read memory from one of these addresses like 0x8048000, they would end up incorrectly reading from the next memory region that actually had a p_filesz which would be 0x00000000f778c000 in this case. This fix correctly doesn't include program headers with zero p_filesz in the ProcessELFCore::m_core_aranges that is used to read memory. I found two cores files that have this same issue and added tests.
Differential Revision: https://reviews.llvm.org/D67370
llvm-svn: 371457
Philip Reames [Mon, 9 Sep 2019 21:33:59 +0000 (21:33 +0000)]
[Tests] Fix a typo in a test
llvm-svn: 371456
Philip Reames [Mon, 9 Sep 2019 21:32:16 +0000 (21:32 +0000)]
[Tests] Precommit test case for D67372
llvm-svn: 371455
Simon Pilgrim [Mon, 9 Sep 2019 21:30:11 +0000 (21:30 +0000)]
Fix MSVC "not all control paths return a value" warning. NFCI.
llvm-svn: 371454
Max Moroz [Mon, 9 Sep 2019 21:00:25 +0000 (21:00 +0000)]
[UBSan] Follow up fix for r371442.
Reviewers: vitalybuka, hctim, Dor1s
Reviewed By: Dor1s
Subscribers: delcypher, #sanitizers, llvm-commits
Tags: #llvm, #sanitizers
Differential Revision: https://reviews.llvm.org/D67371
llvm-svn: 371453
Philip Reames [Mon, 9 Sep 2019 20:54:13 +0000 (20:54 +0000)]
[LoopVectorize] Leverage speculation safety to avoid masked.loads
If we're vectorizing a load in a predicated block, check to see if the load can be speculated rather than predicated. This allows us to generate a normal vector load instead of a masked.load.
To do so, we must prove that all bytes accessed on any iteration of the original loop are dereferenceable, and that all loads (across all iterations) are properly aligned. This is equivelent to proving that hoisting the load into the loop header in the original scalar loop is safe.
Note: There are a couple of code motion todos in the code. My intention is to wait about a day - to be sure this sticks - and then perform the NFC motion without furthe review.
Differential Revision: https://reviews.llvm.org/D66688
llvm-svn: 371452
Artem Dergachev [Mon, 9 Sep 2019 20:34:44 +0000 (20:34 +0000)]
[analyzer] NFC: Simplify bug report equivalence classes to not be ilists.
Use a vector of unique pointers instead.
Differential Revision: https://reviews.llvm.org/D67024
llvm-svn: 371451
Artem Dergachev [Mon, 9 Sep 2019 20:34:40 +0000 (20:34 +0000)]
[analyzer] NFC: Introduce sub-classes for path-sensitive and basic reports.
Checkers are now required to specify whether they're creating a
path-sensitive report or a path-insensitive report by constructing an
object of the respective type.
This makes BugReporter more independent from the rest of the Static Analyzer
because all Analyzer-specific code is now in sub-classes.
Differential Revision: https://reviews.llvm.org/D66572
llvm-svn: 371450
Philip Reames [Mon, 9 Sep 2019 20:26:52 +0000 (20:26 +0000)]
[Tests] Add anyextend tests for unordered atomics
Motivated by work on changing our representation of unordered atomics in SelectionDAG, but as an aside, all our lowerings for O3 are terrible. Even the ones which ignore the atomicity.
llvm-svn: 371449
Douglas Yung [Mon, 9 Sep 2019 20:12:29 +0000 (20:12 +0000)]
Relax opcode checks in test to check for only a number instead of a specific number.
llvm-svn: 371447
Julian Lettner [Mon, 9 Sep 2019 20:07:03 +0000 (20:07 +0000)]
[TSan] Add AnnotateIgnoreReadsBegin declaration to tsan/test.h
Declare the family of AnnotateIgnore[Read,Write][Begin,End] TSan
annotations in compiler-rt/test/tsan/test.h so that we don't have to
declare them separately in every test that needs them. Replace usages.
Leave usages that explicitly test the annotation mechanism:
thread_end_with_ignore.cpp
thread_end_with_ignore3.cpp
llvm-svn: 371446
Philip Reames [Mon, 9 Sep 2019 20:06:19 +0000 (20:06 +0000)]
[SDAG] Add a isSimple cover functon to MemSDNode, just as we have in IR/MI [NFC]
Uses are in reviews D66322 and D66318. Submitted separately to control rebuild times.
llvm-svn: 371445
Pirama Arumuga Nainar [Mon, 9 Sep 2019 19:52:39 +0000 (19:52 +0000)]
[Driver] Handle default case in refactored addOpenMPRuntime
Summary:
Appease failed builds (due to -Werror and -Wswitch) where OMPRT_Unknown
is not handled in the switch statement (even though it's handled by the
early exit).
This fixes -Wswitch triggered by r371442.
Reviewers: srhines, danalbert, jdoerfert
Subscribers: guansong, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D67364
llvm-svn: 371444
Francis Visoiu Mistrih [Mon, 9 Sep 2019 19:47:25 +0000 (19:47 +0000)]
[Remarks] Fix warning for uint8_t < 0 comparison
http://lab.llvm.org:8011/builders/clang-with-thin-lto-ubuntu/builds/19109/steps/build-stage1-compiler/logs/stdio
llvm-svn: 371443
Max Moroz [Mon, 9 Sep 2019 19:30:48 +0000 (19:30 +0000)]
[UBSan] Do not overwrite the default print_summary sanitizer option.
Summary:
This option is true by default in sanitizer common. The default
false value was added a while ago without any reasoning in
https://github.com/llvm-mirror/compiler-rt/commit/
524e934112a593ac081bf2b05aa0d60a67987f05
so, presumably it's safe to remove for consistency.
Reviewers: hctim, samsonov, morehouse, kcc, vitalybuka
Reviewed By: hctim, samsonov, vitalybuka
Subscribers: delcypher, #sanitizers, llvm-commits, kcc
Tags: #llvm, #sanitizers
Differential Revision: https://reviews.llvm.org/D67193
llvm-svn: 371442
Philip Reames [Mon, 9 Sep 2019 19:23:22 +0000 (19:23 +0000)]
Introduce infrastructure for an incremental port of SelectionDAG atomic load/store handling
This is the first patch in a large sequence. The eventual goal is to have unordered atomic loads and stores - and possibly ordered atomics as well - handled through the normal ISEL codepaths for loads and stores. Today, there handled w/instances of AtomicSDNodes. The result of which is that all transforms need to be duplicated to work for unordered atomics. The benefit of the current design is that it's harder to introduce a silent miscompile by adding an transform which forgets about atomicity. See the thread on llvm-dev titled "FYI: proposed changes to atomic load/store in SelectionDAG" for further context.
Note that this patch is NFC unless the experimental flag is set.
The basic strategy I plan on taking is:
introduce infrastructure and a flag for testing (this patch)
Audit uses of isVolatile, and apply isAtomic conservatively*
piecemeal conservative* update generic code and x86 backedge code in individual reviews w/tests for cases which didn't check volatile, but can be found with inspection
flip the flag at the end (with minimal diffs)
Work through todo list identified in (2) and (3) exposing performance ops
(*) The "conservative" bit here is aimed at minimizing the number of diffs involved in (4). Ideally, there'd be none. In practice, getting it down to something reviewable by a human is the actual goal. Note that there are (currently) no paths which produce LoadSDNode or StoreSDNode with atomic MMOs, so we don't need to worry about preserving any behaviour there.
We've taken a very similar strategy twice before with success - once at IR level, and once at the MI level (post ISEL).
Differential Revision: https://reviews.llvm.org/D66309
llvm-svn: 371441
Matt Arsenault [Mon, 9 Sep 2019 18:57:51 +0000 (18:57 +0000)]
AMDGPU/GlobalISel: Legalize G_BUILD_VECTOR v2s16
Handle it the same way as G_BUILD_VECTOR_TRUNC. Arguably only
G_BUILD_VECTOR_TRUNC should be legal for this, but G_BUILD_VECTOR will
probably be more convenient in most cases.
llvm-svn: 371440
Julian Lettner [Mon, 9 Sep 2019 18:57:32 +0000 (18:57 +0000)]
[TSan] Add interceptors for mach_vm_[de]allocate
I verified that the test is red without the interceptors.
rdar://
40334350
Reviewed By: kubamracek, vitalybuka
Differential Revision: https://reviews.llvm.org/D66616
llvm-svn: 371439
Matt Arsenault [Mon, 9 Sep 2019 18:43:29 +0000 (18:43 +0000)]
AMDGPU: Make VReg_1 size be 1
This was getting chosen as the preferred 32-bit register class based
on how TableGen selects subregister classes.
llvm-svn: 371438