OSDN Git Service
Fangrui Song [Wed, 1 May 2019 10:40:48 +0000 (10:40 +0000)]
[llvm-objdump] Print newlines before and after "Disassembly of section ...:"
This improves readability and the behavior is consistent with GNU objdump.
The new test test/tools/llvm-objdump/X86/disassemble-section-name.s
checks we print newlines before and after "Disassembly of section ...:"
Differential Revision: https://reviews.llvm.org/D61127
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359668
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 1 May 2019 10:38:10 +0000 (10:38 +0000)]
[X86] SimplifyDemandedVectorEltsForTargetNode - pull out vector halving code. NFCI.
Pull out the HADD/HSUB code to halve vector widths if the upper half isn't used - prep work to adding support for other opcodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359667
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 1 May 2019 10:02:22 +0000 (10:02 +0000)]
[X86][SSE] Extract i1 elements from vXi1 bool vectors
This is an alternative to D59669 which more aggressively extracts i1 elements from vXi1 bool vectors using a MOVMSK.
Differential Revision: https://reviews.llvm.org/D61189
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359666
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Wed, 1 May 2019 09:45:55 +0000 (09:45 +0000)]
[yaml2obj] - Report when unknown section is referenced from program header declaration block.
Previously we did not report this.
Also this removes multiple lookups in the map
what cleanups the code.
Differential revision: https://reviews.llvm.org/D61322
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359663
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Wed, 1 May 2019 09:28:24 +0000 (09:28 +0000)]
[llvm-readobj] Change -t to --symbols in tests. NFC
-t is --symbols in llvm-readobj but --section-details (unimplemented) in readelf.
The confusing option should not be used since we aim for improving
compatibility.
Keep just one llvm-readobj -t use case in test/tools/llvm-readobj/symbols.test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359661
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Wed, 1 May 2019 09:01:10 +0000 (09:01 +0000)]
[gold] Fix two readelf tests after rL359649
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359660
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 1 May 2019 06:53:03 +0000 (06:53 +0000)]
[X86FixupLEAs] Hoist the calls to isLEA out of the 3 separate functions and put it in the basic block instruction loop. NFC
Now need to check it 3 different times. Just do it once at the top of the loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359658
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Wed, 1 May 2019 06:46:34 +0000 (06:46 +0000)]
Fix test/tools/llvm-readobj/mips-plt.test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359657
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Wed, 1 May 2019 05:55:22 +0000 (05:55 +0000)]
[llvm-readobj] llvm-readobj --elf-output-style=GNU => llvm-readelf. NFC
The latter is much more common.
A dedicated --elf-output-style=GNU test demonstrating it is the same as
llvm-readelf is sufficient.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359652
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Wed, 1 May 2019 05:27:20 +0000 (05:27 +0000)]
[llvm-readobj] Change -long-option to --long-option in tests. NFC
We use both -long-option and --long-option in tests. Switch to --long-option for consistency.
In the "llvm-readelf" mode, -long-option is discouraged as it conflicts with grouped short options and it is not accepted by GNU readelf.
While updating the tests, change llvm-readobj -s to llvm-readobj -S to reduce confusion ("s" is --section-headers in llvm-readobj but --symbols in llvm-readelf).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359649
91177308-0d34-0410-b5e6-
96231b3b80d8
David L. Jones [Wed, 1 May 2019 05:01:03 +0000 (05:01 +0000)]
Revert "[llvm] r359313 - [PowerPC] Update P9 vector costs for insert/extract element"
This causes segfaults during optimized builds. More details, including a reproducer, are on the llvm-commits thread for r359313.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359648
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Wed, 1 May 2019 03:38:41 +0000 (03:38 +0000)]
Delete outdated comment about DISubprogram. NFC
rL301501 deleted DisplayName and rearranged the operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359647
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 1 May 2019 02:43:52 +0000 (02:43 +0000)]
[JITLink] Make sure we explicitly deallocate memory on failure.
JITLinkGeneric phases 2 and 3 (focused on applying fixups and finalizing memory,
respectively) may fail for various reasons. If this happens, we need to
explicitly de-allocate the memory allocated in phase 1 (explicitly, because
deallocation may also fail and so is implemented as a method returning error).
No testcase yet: I am still trying to decide on the right way to test totally
platform agnostic code like this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359643
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 1 May 2019 01:28:12 +0000 (01:28 +0000)]
Make some comments that were meant to be for public documentation
actually public documentation (i.e. // -> ///).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359640
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Wed, 1 May 2019 00:39:31 +0000 (00:39 +0000)]
[llvm-objcopy] Simplify SHT_NOBITS -> SHT_PROGBITS promotion
GNU objcopy uses bfd_elf_get_default_section_type to decide the candidate section type,
which roughly translates to our [a] (I assume SEC_COMMON implies SHF_ALLOC):
(!(Sec.Flags & ELF::SHF_ALLOC) || Flags & (SectionFlag::SecContents | SectionFlag::SecLoad)))
Then, it updates the section type in bfd/elf.c:elf_fake_sections if:
if (this_hdr->sh_type == SHT_NULL)
this_hdr->sh_type = sh_type; // common case
else if (this_hdr->sh_type == SHT_NOBITS
&& sh_type == SHT_PROGBITS
&& (asect->flags & SEC_ALLOC) != 0) // uncommon case
...
this_hdr->sh_type = sh_type;
If the following condition is met the uncommon branch is executed:
if (elf_section_type (osec) == SHT_NULL
&& (osec->flags == isec->flags
|| (final_link
&& ((osec->flags ^ isec->flags)
& ~(SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_RELOC)) == 0)))
I suggest we just ignore this clause and follow the common case
behavior, which is done in this patch. Rationales to do so:
If --set-section-flags is a no-op (osec->flags == isec->flags)
(corresponds to the "readonly" test in set-section-flags.test), GNU
objcopy will require (Sec.Flags & ELF::SHF_ALLOC). [a] is essentially:
Flags & (SectionFlag::SecContents | SectionFlag::SecLoad)
This special case is not really useful. Non-SHF_ALLOC SHT_NOBITS
sections do not make much sense and it doesn't matter if they are
SHT_NOBITS or SHT_PROGBITS.
For all other RUN lines in set-section-flags.test, the new behavior
matches GNU objcopy, i.e. this patch improves compatibility.
Differential Revision: https://reviews.llvm.org/D60189
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359639
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 30 Apr 2019 23:40:58 +0000 (23:40 +0000)]
gn build: Fix build on macOS after r359570 / r359527
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359637
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 30 Apr 2019 23:22:40 +0000 (23:22 +0000)]
gn build: Merge r359626
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359635
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Tue, 30 Apr 2019 23:10:28 +0000 (23:10 +0000)]
[WebAssembly] Update expectations for gcc torture tests
This is needed to make the wasm waterfall green again
after we land the update to WASI:
https://github.com/WebAssembly/waterfall/pull/492
Differential Revision: https://reviews.llvm.org/D61351
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359634
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 30 Apr 2019 23:09:26 +0000 (23:09 +0000)]
[InstCombine] Limit a vector demanded elts rule which was producing invalid IR.
The demanded elts rules introduced for GEPs in https://reviews.llvm.org/rL356293 replaced vector constants with undefs (by design). It turns out that the LangRef disallows such cases when indexing structs. The right fix is probably to relax the langref requirement, and update other passes to expect the result, but for the moment, limit the transform to avoid compiler crashes.
This should fix https://bugs.llvm.org/show_bug.cgi?id=41624.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359633
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 30 Apr 2019 23:04:49 +0000 (23:04 +0000)]
[WebAssembly] Test the "wasm32-wasi" triple
Add triple tests for "wasm32-wasi" and "wasm64-wasi", and also remove the
"-musl" component from the existing wasm triple tests as we're not using that
in practice (WASI libc is derived in part from musl, but it is not fully
musl-compatible).
Differential Revision: https://reviews.llvm.org/D61334
Reviewer: sbc100
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359629
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Tue, 30 Apr 2019 22:43:55 +0000 (22:43 +0000)]
[MemorySSA] Invalidate MemorySSA if AA or DT are invalidated.
Summary:
MemorySSA keeps internal pointers of AA and DT.
If these get invalidated, so should MemorySSA.
Reviewers: george.burgess.iv, chandlerc
Subscribers: jlebar, Prazek, llvm-commits
Tags: LLVM
Differential Revision: https://reviews.llvm.org/D61043
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359627
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 30 Apr 2019 22:42:01 +0000 (22:42 +0000)]
[ORC] Move SimpleCompiler/ConcurrentIRCompiler definitions into a .cpp file.
SimpleCompiler is no longer templated, so there's no reason for this code to be
in a header any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359626
91177308-0d34-0410-b5e6-
96231b3b80d8
Rong Xu [Tue, 30 Apr 2019 22:35:35 +0000 (22:35 +0000)]
[llvm-profdata] Fix indentation error in docs. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359625
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Tue, 30 Apr 2019 22:15:47 +0000 (22:15 +0000)]
[AliasAnalysis/NewPassManager] Invalidate AAManager less often.
Summary:
This is a redo of D60914.
The objective is to not invalidate AAManager, which is stateless, unless
there is an explicit invalidate in one of the AAResults.
To achieve this, this patch adds an API to PAC, to check precisely this:
is this analysis not invalidated explicitly == is this analysis not abandoned == is this analysis stateless, so preserved without explicitly being marked as preserved by everyone
Reviewers: chandlerc
Subscribers: mehdi_amini, jlebar, george.burgess.iv, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61284
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359622
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Tue, 30 Apr 2019 22:08:23 +0000 (22:08 +0000)]
[AMDGPU] gfx1010 VMEM and SMEM implementation
Differential Revision: https://reviews.llvm.org/D61330
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359621
91177308-0d34-0410-b5e6-
96231b3b80d8
Rong Xu [Tue, 30 Apr 2019 22:05:11 +0000 (22:05 +0000)]
[llvm-profdata] Fix indentation error. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359619
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 30 Apr 2019 21:55:15 +0000 (21:55 +0000)]
Add an include of Module since we actually access it now and remove
the forward declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359618
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 30 Apr 2019 21:44:21 +0000 (21:44 +0000)]
Fix a few -Werror warnings:
- Remove a variable only used in an assert
- Fix pessimizing move warning around copy elision
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359617
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Tue, 30 Apr 2019 21:29:20 +0000 (21:29 +0000)]
[PassManagerBuilder] Add option for interleaved loops, for loop vectorize.
Summary:
Match NewPassManager behavior: add option for interleaved loops in the
old pass manager, and use that instead of the flag used to disable loop unroll.
No changes in the defaults.
Reviewers: chandlerc
Subscribers: mehdi_amini, jlebar, dmgreen, hsaito, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61030
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359615
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 30 Apr 2019 21:28:07 +0000 (21:28 +0000)]
[JITLink] Add debugging output to print resolved external atoms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359614
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 30 Apr 2019 21:27:56 +0000 (21:27 +0000)]
[ORC][JITLink] Name in-memory compiled objects after their source modules.
In-memory compiled object buffer identifiers will now be derived from the
identifiers of their source IR modules. This makes it easier to connect
in-memory objects with their source modules in debugging output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359613
91177308-0d34-0410-b5e6-
96231b3b80d8
Rong Xu [Tue, 30 Apr 2019 21:19:12 +0000 (21:19 +0000)]
[llvm-profdata] Add overlap command to compute similarity b/w two profile files
Add overlap functionality to llvm-profdata tool to compute the similarity
between two profile files.
Differential Revision: https://reviews.llvm.org/D60977
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359612
91177308-0d34-0410-b5e6-
96231b3b80d8
Fedor Sergeev [Tue, 30 Apr 2019 20:44:53 +0000 (20:44 +0000)]
[NFC][InlineCost] cleanup - comments, overflow handling.
Reviewed By: apilipenko
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60751
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359609
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 30 Apr 2019 20:31:07 +0000 (20:31 +0000)]
[X86][SSE] Fold extract_subvector(extend(x)) -> extend_vector_inreg(x)
This adds any extend support - folding to zero_extend_vector_inreg (PMOVZX) for legality
Minor improvement for PR39709
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359608
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 30 Apr 2019 19:58:56 +0000 (19:58 +0000)]
[WebAssembly] Fix test after r359602
Update the expected output for this test now that the EXPLICIT_NAME
flag is being printed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359605
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 30 Apr 2019 19:43:35 +0000 (19:43 +0000)]
Fix stack-use-after free after r359580
`Candidate` was a StringRef refering to a temporary string.
Instead, create a local variable for the string and use
a StringRef referring to that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359604
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 30 Apr 2019 19:30:24 +0000 (19:30 +0000)]
[WebAssembly] Support EXPLICIT_NAME symbols in llvm-readobj
Teach llvm-readobj about WASM_SYMBOL_EXPLICIT_NAME.
Differential Revision: https://reviews.llvm.org/D61323
Reviewer: sbc100
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359602
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 30 Apr 2019 19:17:59 +0000 (19:17 +0000)]
[WebAssembly] Support f16 libcalls
Add support for f16 libcalls in WebAssembly. This entails adding signatures
for the remaining F16 libcalls, and renaming gnu_f2h_ieee/gnu_h2f_ieee to
truncsfhf2/extendhfsf2 for consistency between f32 and f64/f128 (compiler-rt
already supports this).
Differential Revision: https://reviews.llvm.org/D61287
Reviewer: dschuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359600
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 30 Apr 2019 19:02:15 +0000 (19:02 +0000)]
[X86] Remove if that's always true
It's been like this since it was added in a refactor of this code.
Fixes PR41659
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359597
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Tue, 30 Apr 2019 18:35:38 +0000 (18:35 +0000)]
[SimplifyLibCalls] Clean up code (NFC)
Fix pointer check after dereferencing (PR41665).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359595
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 30 Apr 2019 18:15:18 +0000 (18:15 +0000)]
[AArch64] add more tests for constant folding failures; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359592
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 30 Apr 2019 17:56:47 +0000 (17:56 +0000)]
[X86] If PreprocessISelDAG reorders a load before a call, make sure we remove dead nodes from the graph
The reordering can leave at least a dead TokenFactor in the graph. This cause the linearize scheduler to fail with something like the assert seen in PR22614. This is only one of many ways we can break the linearize scheduler today so I can't say for sure that any of the other failures in that bug were caused by this issue.
This takes the heavy hammer approach of just running RemoveDeadNodes unconditionally at the end of the PreprocessISelDAG. If this turns out to be a compile time hit, we can try to refine it.
Differential Revision: https://reviews.llvm.org/D61164
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359582
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 30 Apr 2019 17:56:28 +0000 (17:56 +0000)]
[X86] Initial cleanups on the FixupLEAs pass. Separate Atom LEA creation from other LEA optimizations.
This removes some of the class variables. Merge basic block processing into
runOnMachineFunction to keep the flags local.
Pass MachineBasicBlock around instead of an iterator. We can get the iterator in
the few places that need it. Allows a range-based outer for loop.
Separate the Atom optimization from the rest of the optimizations. This allows
fixupIncDec to create INC/DEC and still allow Atom to turn it back into LEA
when profitable by its heuristics.
I'd like to improve fixupIncDec to turn LEAs into ADD any time the base or index
register is equal to the destination register. This is profitable regardless of
the various slow flags. But again we would want Atom to be able to undo that.
Differential Revision: https://reviews.llvm.org/D60993
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359581
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 30 Apr 2019 17:46:00 +0000 (17:46 +0000)]
Re-reland "[Option] Fix PR37006 prefix choice in findNearest"
This was first reviewed in https://reviews.llvm.org/D46776 and
landed in r332299, but got reverted because it broke the PS4
bots.
https://reviews.llvm.org/D50410 fixed this, and then this
change was re-reviewed at https://reviews.llvm.org/D50515 and
relanded in r341329. It got reverted due to causing MSan issues.
However, nobody wrote down the error message and the bot link
is dead, so I'm relanding this to capture the MSan error.
I'll then either fix it, or copy it somewhere and revert if
fixing looks difficult.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359580
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 30 Apr 2019 15:36:02 +0000 (15:36 +0000)]
gn build: Add check-clangd target after r3359424
r359527 already merged some of that to the GN build,
but it was missing some bits as well.
The check-clangd target works (at least for now) differently than all
the other check-foo targets, see https://reviews.llvm.org/D61187
For that reason, there's no gni file and the generated lit configs are
not (yet?) added to llvm-lit/BUILD.gn.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359570
91177308-0d34-0410-b5e6-
96231b3b80d8
Russell Gallop [Tue, 30 Apr 2019 15:35:16 +0000 (15:35 +0000)]
Add llvm-profdata to LLVM_TOOLCHAIN_TOOLS
This is required for using PGO on Windows but isn't in the Windows
release packages. Windows packages are built with
LLVM_INSTALL_TOOLCHAIN_ONLY so only includes llvm "tools" listed here.
Differential Revision: https://reviews.llvm.org/D61317
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359569
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rupprecht [Tue, 30 Apr 2019 15:21:36 +0000 (15:21 +0000)]
[llvm-objcopy] Add RISC-V support for -B/-O
Reviewers: jorgbrown, espindola, alexshap, jhenderson
Subscribers: emaste, arichardson, fedor.sergeev, jakehehrlich, kito-cheng, shiva0217, MaskRay, rogfer01, rkruppe, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61272
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359568
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 30 Apr 2019 14:37:15 +0000 (14:37 +0000)]
[SelectionDAG] remove div-by-zero constant folding restriction
We don't have this restriction in IR, so it should not be here
either simply out of consistency. Code that wants to handle FP
exceptions is expected to use the 'strict' variants of these
nodes.
We don't get the frem case because frem by 0.0 produces NaN (invalid),
and that's the remaining check here (so the removed check for frem
was dead code AFAIK).
This is the only place in SDAG that uses "HasFPExceptions", so I
think we should remove that entirely as a follow-up patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359566
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Leviant [Tue, 30 Apr 2019 13:51:48 +0000 (13:51 +0000)]
[llvm-nm] Add --special-syms no-op flag
Differential revision: https://reviews.llvm.org/D60502
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359563
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 30 Apr 2019 13:45:16 +0000 (13:45 +0000)]
gn build: Merge r359455
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359562
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 30 Apr 2019 13:43:17 +0000 (13:43 +0000)]
[AArch64] add tests for fdiv/frem constant folding (PR41668); NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359561
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 30 Apr 2019 13:09:55 +0000 (13:09 +0000)]
[TableGen] Fix null pointer dereferencing in token parser.
Reported in https://www.viva64.com/en/b/0629/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359559
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 30 Apr 2019 12:41:33 +0000 (12:41 +0000)]
vs integration: vs2019 support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359557
91177308-0d34-0410-b5e6-
96231b3b80d8
Russell Gallop [Tue, 30 Apr 2019 12:37:10 +0000 (12:37 +0000)]
[cmake] Fix error message on simulated VS version check
For clang-cl self hosts in VS2015 environment this was reporting: "Host
Clang must have at least -fms-compatibility-version=19.00.24213.1, your
version is 9.0.0".
This check fires as CMake detects the simulated environment as _MSC_VER
1900, which is truncated. This makes it less than the required
19.00.24213.1.
Differential revision: https://reviews.llvm.org/D61188
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359556
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 30 Apr 2019 12:34:21 +0000 (12:34 +0000)]
Revert rL359519 : [MemorySSA] Invalidate MemorySSA if AA or DT are invalidated.
Summary:
MemorySSA keeps internal pointers of AA and DT.
If these get invalidated, so should MemorySSA.
Reviewers: george.burgess.iv, chandlerc
Subscribers: jlebar, Prazek, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61043
........
This was causing windows build bot failures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359555
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 30 Apr 2019 11:03:09 +0000 (11:03 +0000)]
[SLP] Lit test that cannot get vectorized due to lack of look-ahead operand reordering heuristic.
The code in this test is not vectorized by SLP because its operand reordering cannot look beyond the immediate predecessors.
This will get fixed in a follow-up patch that introduces the look-ahead operand reordering heuristic.
Committed on behalf of @vporpo (Vasileios Porpodas)
Differential Revision: https://reviews.llvm.org/D61283
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359553
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Tue, 30 Apr 2019 11:02:09 +0000 (11:02 +0000)]
[llvm-objcopy] - Check dynamic relocation sections for broken references.
This is a fix for https://bugs.llvm.org/show_bug.cgi?id=41371.
Currently, it is possible to break the sh_link field of the dynamic relocation section
by removing the section it refers to. The patch fixes an issue and adds 2 test cases.
One of them shows that it does not seem possible to break the sh_info field.
I added an assert to verify this.
Differential revision: https://reviews.llvm.org/D60825
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359552
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeremy Morse [Tue, 30 Apr 2019 10:56:33 +0000 (10:56 +0000)]
Update checks in an instcombine test, NFC
This reduces the delta in some incoming work that changes this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359549
91177308-0d34-0410-b5e6-
96231b3b80d8
Sjoerd Meijer [Tue, 30 Apr 2019 10:28:50 +0000 (10:28 +0000)]
[ARM] Implement TTI::getMemcpyCost
This implements TargetTransformInfo method getMemcpyCost, which estimates the
number of instructions to which a memcpy instruction expands to.
Differential Revision: https://reviews.llvm.org/D59787
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359547
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 30 Apr 2019 10:18:25 +0000 (10:18 +0000)]
Fix for bug 41512: lower INSERT_VECTOR_ELT(ZeroVec, 0, Elt) to SCALAR_TO_VECTOR(Elt) for all SSE flavors
Current LLVM uses pxor+pinsrb on SSE4+ for INSERT_VECTOR_ELT(ZeroVec, 0, Elt) insead of much simpler movd.
INSERT_VECTOR_ELT(ZeroVec, 0, Elt) is idiomatic construct which is used e.g. for _mm_cvtsi32_si128(Elt) and for lowest element initialization in _mm_set_epi32.
So such inefficient lowering leads to significant performance digradations in ceratin cases switching from SSSE3 to SSE4.
https://bugs.llvm.org/show_bug.cgi?id=41512
Here INSERT_VECTOR_ELT(ZeroVec, 0, Elt) is simply converted to SCALAR_TO_VECTOR(Elt) when applicable since latter is closer match to desired behavior and always efficiently lowered to movd and alike.
Committed on behalf of @Serge_Preis (Serge Preis)
Differential Revision: https://reviews.llvm.org/D60852
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359545
91177308-0d34-0410-b5e6-
96231b3b80d8
David Bolvansky [Tue, 30 Apr 2019 10:09:28 +0000 (10:09 +0000)]
Revert r359520
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359544
91177308-0d34-0410-b5e6-
96231b3b80d8
Sjoerd Meijer [Tue, 30 Apr 2019 10:09:15 +0000 (10:09 +0000)]
[TargetLowering] findOptimalMemOpLowering. NFCI.
This was a local static funtion in SelectionDAG, which I've promoted to
TargetLowering so that I can reuse it to estimate the cost of a memory
operation in D59787.
Differential Revision: https://reviews.llvm.org/D59766
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359543
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Tue, 30 Apr 2019 09:24:43 +0000 (09:24 +0000)]
[ARM GlobalISel] Widen small shift operands
The legalizer was already widening the shift amount. Add tests for that
behaviour, and also support widening the shifted value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359542
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Tue, 30 Apr 2019 09:14:02 +0000 (09:14 +0000)]
[AsmPrinter] Make AsmPrinter::HandlerInfo::Handler a unique_ptr
Handlers.clear() in AsmPrinter::doFinalization() will destroy these handlers.
A unique_ptr makes the ownership clearer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359541
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Tue, 30 Apr 2019 09:05:25 +0000 (09:05 +0000)]
[ARM GlobalISel] Be more careful about bailing out
Bail out on function arguments/returns with types aggregating an
unsupported type. This fixes cases where we would happily and
incorrectly lower functions taking e.g. [1 x i64] parameters, when we
don't even support plain i64 yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359540
91177308-0d34-0410-b5e6-
96231b3b80d8
Sjoerd Meijer [Tue, 30 Apr 2019 08:38:12 +0000 (08:38 +0000)]
[TargetLowering] Change getOptimalMemOpType to take a function attribute list
The MachineFunction wasn't used in getOptimalMemOpType, but more importantly,
this allows reuse of findOptimalMemOpLowering that is calling getOptimalMemOpType.
This is the groundwork for the changes in D59766 and D59787, that allows
implementation of TTI::getMemcpyCost.
Differential Revision: https://reviews.llvm.org/D59785
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359537
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Potapenko [Tue, 30 Apr 2019 08:35:14 +0000 (08:35 +0000)]
MSan: handle llvm.lifetime.start intrinsic
Summary:
When a variable goes into scope several times within a single function
or when two variables from different scopes share a stack slot it may
be incorrect to poison such scoped locals at the beginning of the
function.
In the former case it may lead to false negatives (see
https://github.com/google/sanitizers/issues/590), in the latter - to
incorrect reports (because only one origin remains on the stack).
If Clang emits lifetime intrinsics for such scoped variables we insert
code poisoning them after each call to llvm.lifetime.start().
If for a certain intrinsic we fail to find a corresponding alloca, we
fall back to poisoning allocas for the whole function, as it's now
impossible to tell which alloca was missed.
The new instrumentation may slow down hot loops containing local
variables with lifetime intrinsics, so we allow disabling it with
-mllvm -msan-handle-lifetime-intrinsics=false.
Reviewers: eugenis, pcc
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60617
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359536
91177308-0d34-0410-b5e6-
96231b3b80d8
Markus Lavin [Tue, 30 Apr 2019 07:58:57 +0000 (07:58 +0000)]
[DebugInfo] DW_OP_deref_size in PrologEpilogInserter.
The PrologEpilogInserter need to insert a DW_OP_deref_size before
prepending a memory location expression to an already implicit
expression to avoid having the existing expression act on the memory
address instead of the value behind it.
The reason for using DW_OP_deref_size and not plain DW_OP_deref is that
big-endian targets need to read the right size as simply truncating a
larger read would yield the wrong result (LSB bytes are not at the lower
address).
This re-commit fixes issues reported in the first one. Namely deref was
inserted under wrong conditions and additionally the deref_size argument
was incorrectly encoded.
Differential Revision: https://reviews.llvm.org/D59687
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359535
91177308-0d34-0410-b5e6-
96231b3b80d8
Kang Zhang [Tue, 30 Apr 2019 03:39:05 +0000 (03:39 +0000)]
[NFC][PowerPC] Use -check-prefixes to simplify the check in code-align.ll
Summary:
When checking the same output, we can use the `-check-prefixes` to simplify the check.
For example, if we want to check below output.
```
; GENERIC-LABEL: .globl foo
; BASIC-LABEL: .globl foo
; PWR-LABEL: .globl foo
; GENERIC: .p2align 2
; BASIC: .p2align 4
; PWR: .p2align 4
; GENERIC: @foo
; BASIC: @foo
; PWR: @foo
```
If we use `-check-prefixes`
```
... -check-prefixes=CHECK,GENERAL
... -check-prefixes=CHECK,BASIC
... -check-prefixes=CHECK,PWR
```
Above check can be simplify to:
```
; CHECK-LABEL: .globl foo
; GENERIC: .p2align 2
; BASIC: .p2align 4
; PWR: .p2align 4
; CHECK: @foo
```
Reviewed By: hfinkel
Differential Revision: https://reviews.llvm.org/D61227
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359533
91177308-0d34-0410-b5e6-
96231b3b80d8
Zi Xuan Wu [Tue, 30 Apr 2019 03:01:14 +0000 (03:01 +0000)]
[DAGCombiner] Do not generate ISD::ADDE node if adde is not legal for the target when combine ISD::TRUNC node
Do not combine (trunc adde(X, Y, Carry)) into (adde trunc(X), trunc(Y), Carry),
if adde is not legal for the target. Even it's at type-legalize phase.
Because adde is special and will not be legalized at operation-legalize phase later.
This fixes: PR40922
https://bugs.llvm.org/show_bug.cgi?id=40922
Differential Revision: https://reviews.llvm.org//D60854
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359532
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 30 Apr 2019 02:43:01 +0000 (02:43 +0000)]
[ORC] Fix an ambiguous call in a unit test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359529
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Tue, 30 Apr 2019 01:35:42 +0000 (01:35 +0000)]
[clangd] Fix GN build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359527
91177308-0d34-0410-b5e6-
96231b3b80d8
Don Hinton [Tue, 30 Apr 2019 00:09:49 +0000 (00:09 +0000)]
[CommandLine} Wire-up cl::list::setDefault() so it will work correctly with cl::ResetAllOptionOccurrences() in unittests. Part 2 of 5
Summary:
With this change, cl::ResetAllOptionOccurrences() clears
cl::list just like cl::opt, allowing users to call
cl::ParseCommandLineOptions() multiple times without interference from
previous calls.
Reviewers: rnk
Reviewed By: rnk
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61234
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359522
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 30 Apr 2019 00:03:26 +0000 (00:03 +0000)]
[ORC] Allow JITDylib definition generators to return Errors.
Background: A definition generator can be attached to a JITDylib to generate
new definitions in response to queries. For example: a generator that forwards
calls to dlsym can map symbols from a dynamic library into the JIT process on
demand.
If definition generation fails then the generator should be able to return an
error. This allows the JIT API to distinguish between the case where a
generator does not provide a definition, and the case where it was not able to
determine whether it provided a definition due to an error.
The immediate motivation for this is cross-process symbol lookups: If the
remote-lookup generator is attached to a JITDylib early in the search list, and
if a generator failure is misinterpreted as "no definition in this JITDylib" then
lookup may continue and bind to a different definition in a later JITDylib, which
is a bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359521
91177308-0d34-0410-b5e6-
96231b3b80d8
David Bolvansky [Mon, 29 Apr 2019 23:57:20 +0000 (23:57 +0000)]
[PDB] Fixed null pointer dereference
Reviewers: zturner, rnk
Reviewed By: rnk
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61279
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359520
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Mon, 29 Apr 2019 23:53:04 +0000 (23:53 +0000)]
[MemorySSA] Invalidate MemorySSA if AA or DT are invalidated.
Summary:
MemorySSA keeps internal pointers of AA and DT.
If these get invalidated, so should MemorySSA.
Reviewers: george.burgess.iv, chandlerc
Subscribers: jlebar, Prazek, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61043
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359519
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahsan Saghir [Mon, 29 Apr 2019 23:25:33 +0000 (23:25 +0000)]
Add __builtin_dcbf support for PPC
Summary:
This patch adds support for __builtin_dcbf for PPC.
__builtin_dcbf copies the contents of a modified block from the data cache
to main memory and flushes the copy from the data cache.
Differential revision: https://reviews.llvm.org/D59843
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359517
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Mon, 29 Apr 2019 23:09:35 +0000 (23:09 +0000)]
[PDB] Fix hash function used to write /src/headerblock
lld-link used to write PDB files that DIA couldn't recover natvis
files from if:
- The global strings table was > 64kiB
- There were at least 3 natvis files
The cause was that the hash function for the /src/headerblock stream
was incorrect: It needs to be truncated to 16 bit.
If the global strings table was <= 64kiB, truncating to 16 bit is a
no-op, so this wasn't needed for small programs.
If there are only 1 or 2 natvis files, then the growth strategy in
HashTable::grow() would mean the hash table would have 2 buckets (for 1
natvis file) or 4 buckets (for 4 natvis files), and since the hash
function is used modulo number of buckets, and since 2 and 4 divide
0x10000, the missing `% 0x10000` is a no-op there too. For 3 natvis
files, the hash table grows to 6 buckets, which has a factor that's not
common with 0x10000 and the difference starts to matter.
Fixes PR41626.
Differential Revision: https://reviews.llvm.org/D61277
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359515
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Mon, 29 Apr 2019 23:06:03 +0000 (23:06 +0000)]
gn build: Merge r359252
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359514
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 29 Apr 2019 22:37:27 +0000 (22:37 +0000)]
[ORC] Replace the LLJIT/LLLazyJIT Create methods with Builder utilities.
LLJITBuilder and LLLazyJITBuilder construct LLJIT and LLLazyJIT instances
respectively. Over time these will allow more configurable options to be
added while remaining easy to use in the default case, which for default
in-process JITing is now:
auto J = ExitOnErr(LLJITBuilder.create());
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359511
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 29 Apr 2019 22:37:16 +0000 (22:37 +0000)]
[JITLink] Move a typedef.
The FinalizeContinuation typedef belongs on the Allocation class, not the
allocator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359510
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 29 Apr 2019 22:37:08 +0000 (22:37 +0000)]
[WebAssembly] Make an assertion message prettier. NFC.
This is a follow-up to https://reviews.llvm.org/D59521.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359509
91177308-0d34-0410-b5e6-
96231b3b80d8
Steven Wu [Mon, 29 Apr 2019 21:39:54 +0000 (21:39 +0000)]
[ThinLTO] Adding architecture name into saved object filename
Summary:
For ThinLTOCodegenerator, it has an option to save the object file
outputs into a directory which is essential for debug info. Tools like lldb
and dsymutil will look for these object files for debug info.
On Darwin platform, you can link fat binaries with one single clang
driver invocation like:
$ clang -arch x86_64 -arch i386 -Wl,-object_path_lto,$TMPDIR ...
Unfornately, the output object files for one architecture is going to
overwrite the previous ones and one architecture slice will end up with
no debug info. One example for this is to turn on ThinLTO for sanitizer
dylibs in compiler-rt project.
To fix the issue, add the name for the architecture into the name of the
output object file.
rdar://problem/
35482935
Reviewers: tejohnson, bd1976llvm, dexonsmith, JDevlieghere
Reviewed By: dexonsmith
Subscribers: mehdi_amini, aprantl, inglorion, eraman, hiraditya, jkorous, dang, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60924
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359508
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 29 Apr 2019 21:09:44 +0000 (21:09 +0000)]
[WebAssembly] Define the signature for __stack_chk_fail
The WebAssembly backend needs to know the signatures of all runtime
libcall functions. This adds the signature for __stack_chk_fail which was
previously missing.
Also, make the error message for a missing libcall include the name of
the function.
Differential Revision: https://reviews.llvm.org/D59521
Reviewed By: sbc100
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359505
91177308-0d34-0410-b5e6-
96231b3b80d8
Roland Froese [Mon, 29 Apr 2019 21:08:35 +0000 (21:08 +0000)]
[PowerPC] Try harder to avoid load/move-to VSR for partial vector loads
Change the PPCISelLowering.cpp function that decides to avoid update form in
favor of partial vector loads to know about newer load types and to not be
confused by the chain operand.
Differential Revision: https://reviews.llvm.org/D60102
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359504
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Mon, 29 Apr 2019 20:58:17 +0000 (20:58 +0000)]
[GlobalISel][AArch64] Select llvm.aarch64.crypto.sha1h
This was falling back and gives us a reason to create a selectIntrinsic function
which we would need eventually anyway. Update arm64-crypto.ll to show that we
correctly select it.
Also factor out the code for finding an intrinsic ID.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359501
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Mon, 29 Apr 2019 20:25:56 +0000 (20:25 +0000)]
[UpdateTestChecks] Allow Lbegin_func without a leading period
On mingw/i686, local labels don't start with a leading period.
Also escape the leading period, as it previously could match
any char.
Differential Revision: https://reviews.llvm.org/D61254
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359497
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Mon, 29 Apr 2019 20:25:51 +0000 (20:25 +0000)]
[X86] Run CFIInstrInserter on Windows if Dwarf is used
This is necessary since SVN r330706, as tail merging can include
CFI instructions since then.
This fixes PR40322 and PR40012.
Differential Revision: https://reviews.llvm.org/D61252
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359496
91177308-0d34-0410-b5e6-
96231b3b80d8
Don Hinton [Mon, 29 Apr 2019 20:13:35 +0000 (20:13 +0000)]
Fix one more case of passing options with too many dashes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359495
91177308-0d34-0410-b5e6-
96231b3b80d8
Petr Hosek [Mon, 29 Apr 2019 20:04:20 +0000 (20:04 +0000)]
[gn] Use label_name rather than target_output_name for objects
Multiple targets in the same output directory can use the same
target_output_name. The typical example of that is having a shared
and a static library of the same, e.g. libc++.so and libc++.a.
When that's the case, the object files produced for each target
are going to conflict. Using the label_name avoids this conflict
since labels are guaranteed to be unique within a single BUILD.gn
file which corresponds to a single output directory.
Differential Revision: https://reviews.llvm.org/D60329
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359494
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 29 Apr 2019 19:56:46 +0000 (19:56 +0000)]
Fix string UAF in new FileCheck test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359493
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 29 Apr 2019 19:52:59 +0000 (19:52 +0000)]
[X86][SSE] isHorizontalBinOp - add support for target shuffles
Add target shuffle decoding to isHorizontalBinOp as well as ISD::VECTOR_SHUFFLE support.
This does mean we can go through bitcasts so we need to bitcast the extracted args to ensure they are the correct type
Fixes PR39936 and should help with PR39920/PR39921
Differential Revision: https://reviews.llvm.org/D61245
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359491
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 29 Apr 2019 19:40:12 +0000 (19:40 +0000)]
[llvm-pdbutil] FunctionDumper::dump(PDBSymbolTypeFunctionArg) - fix null dereference warning
Reported in https://www.viva64.com/en/b/0629/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359488
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 29 Apr 2019 19:25:16 +0000 (19:25 +0000)]
computePolynomialFromPointer - add missing early-out return for non-pointer types.
Reported in https://www.viva64.com/en/b/0629/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359486
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 29 Apr 2019 19:23:44 +0000 (19:23 +0000)]
[InstCombine] reduce code duplication; NFC
Follow-up to:
rL359482
Avoid this potential problem throughout by giving the type a name
and verifying the assumption that both operands are the same type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359485
91177308-0d34-0410-b5e6-
96231b3b80d8
Don Hinton [Mon, 29 Apr 2019 18:58:52 +0000 (18:58 +0000)]
Fix additional cases of more that two dashes for options in tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359484
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 29 Apr 2019 18:58:32 +0000 (18:58 +0000)]
Remove duplicate line. NFCI.
Reported in https://www.viva64.com/en/b/0629/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359483
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 29 Apr 2019 18:52:19 +0000 (18:52 +0000)]
[InstCombine] visitFCmpInst - appease copy+paste pattern warning. NFCI.
PVS Studio's copy+paste recognizer was seeing this as a typo, technically Op0/Op1 in a fcmp should always be the same type, but we might as well avoid the issue.
Reported in https://www.viva64.com/en/b/0629/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359482
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Mon, 29 Apr 2019 18:45:59 +0000 (18:45 +0000)]
[globalisel] Improve Legalizer debug output
* LegalizeAction should be printed by name rather than number
* Newly created instructions are incomplete at the point the observer first sees
them. They are therefore recorded in a small vector and printed just before
the legalizer moves on to another instruction. By this point, the instruction
must be complete.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359481
91177308-0d34-0410-b5e6-
96231b3b80d8
Don Hinton [Mon, 29 Apr 2019 18:34:18 +0000 (18:34 +0000)]
[CommandLine] Don't allow unlimitted dashes for options. Part 1 or 5
Summary:
Prior to this patch, the CommandLine parser would strip an
unlimitted number of dashes from options. This patch limits it to
two.
Reviewers: rnk
Reviewed By: rnk
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61229
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359480
91177308-0d34-0410-b5e6-
96231b3b80d8