OSDN Git Service
Petar Jovanovic [Fri, 5 Apr 2019 12:58:15 +0000 (12:58 +0000)]
[TextAPI] Fix off-by-one error in the bit index extraction loop
The loop in findNextSetBit() runs one pass more than it should.
On 64-bit architectures this does not cause a problem, but 32-bit
architectures mask the shift count to 5 bits which limits the number of
shifts inside a range of 0 to 31. Shifting by 32 has the same effect as
shifting by 0, so if the first bit in the set is 1, the function will return
with Index different from EndIndexVal. Because of that, range-based for
loops iterating thorough architectures will continue until hitting a 0 in
the set, resulting in n additional iterations, where n is equal to the
number of consecutive 1 bits at the start the set.
Ultimately TBDv1.WriteFile and TBDv2.WriteFile will output additional
architectures causing a failure in the unit tests.
Patch by Milos Stojanovic.
Differential Revision: https://reviews.llvm.org/D60198
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357759
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Fri, 5 Apr 2019 12:52:04 +0000 (12:52 +0000)]
[Symbolize] Replace map<SymbolDesc, StringRef> with sorted vector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357758
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 5 Apr 2019 11:34:30 +0000 (11:34 +0000)]
[X86][AVX] Add PR34584 masked store test cases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357757
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 5 Apr 2019 11:22:28 +0000 (11:22 +0000)]
[X86] Add SSE/AVX1/AVX2 masked trunc+store tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357756
91177308-0d34-0410-b5e6-
96231b3b80d8
Pavel Labath [Fri, 5 Apr 2019 08:43:54 +0000 (08:43 +0000)]
Fix r357749 for big-endian architectures
We need to read the strings from the minidump files as little-endian,
regardless of the host byte order.
I definitely remember thinking about this case while writing the patch
(and in fact, I have implemented that for the "write" case), but somehow
I have ended up not implementing the byte swapping when reading the
data. This adds the necessary byte-swapping and should hopefully fix
test failures on big-endian bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357754
91177308-0d34-0410-b5e6-
96231b3b80d8
Roger Ferrer Ibanez [Fri, 5 Apr 2019 08:40:57 +0000 (08:40 +0000)]
[RISCV] Implement adding a displacement to a BlockAddress
Recent change rL357393 uses MachineInstrBuilder::addDisp to add a based on a
BlockAddress but this case was not implemented.
This patch adds the missing case and a test for RISC-V that exercises the new
case.
Differential Revision: https://reviews.llvm.org/D60136
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357752
91177308-0d34-0410-b5e6-
96231b3b80d8
Pavel Labath [Fri, 5 Apr 2019 08:26:58 +0000 (08:26 +0000)]
Fix MSVC build for r357749
MSVC found the bare "make_unique" invocation ambiguous (between std::
and llvm:: versions). Explicitly qualifying the call with llvm:: should
hopefully fix it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357750
91177308-0d34-0410-b5e6-
96231b3b80d8
Pavel Labath [Fri, 5 Apr 2019 08:06:26 +0000 (08:06 +0000)]
Minidump: Add support for reading/writing strings
Summary:
Strings in minidump files are stored as a 32-bit length field, giving
the length of the string in *bytes*, which is followed by the
appropriate number of UTF16 code units. The string is also supposed to
be null-terminated, and the null-terminator is not a part of the length
field. This patch:
- adds support for reading these strings out of the minidump file (this
implementation does not depend on proper null-termination)
- adds support for writing them to a minidump file
- using the previous two pieces implements proper (de)serialization of
the CSDVersion field of the SystemInfo stream. Previously, this was
only read/written as hex, and no attempt was made to access the
referenced string -- now this string is read and written correctly.
The changes are tested via yaml2obj|obj2yaml round-trip as well as a
unit test which checks the corner cases of the string deserialization
logic.
Reviewers: jhenderson, zturner, clayborg
Subscribers: llvm-commits, aprantl, markmentovai, amccarth, lldb-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59775
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357749
91177308-0d34-0410-b5e6-
96231b3b80d8
Piotr Sobczak [Fri, 5 Apr 2019 07:44:09 +0000 (07:44 +0000)]
[SelectionDAG] Compute known bits of CopyFromReg
Summary:
Teach SelectionDAG how to compute known bits of ISD::CopyFromReg if
the virtual reg used has one def only.
This can be particularly useful when calling isBaseWithConstantOffset()
with the ISD::CopyFromReg argument, as more optimizations may get enabled
in the result.
Also add a missing truncation on X86, found by testing of this patch.
Change-Id: Id1c9fceec862d118c54a5b53adf72ada5d6daefa
Reviewers: bogner, craig.topper, RKSimon
Reviewed By: RKSimon
Subscribers: lebedev.ri, nemanjai, jvesely, nhaehnle, javed.absar, jsji, jdoerfert, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59535
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357745
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 5 Apr 2019 06:32:50 +0000 (06:32 +0000)]
[X86] Promote i16 SRA instructions to i32
We already promote SRL and SHL to i32.
This will introduce sign extends sometimes which might be harder to deal with than the zero we use for promoting SRL. I ran this through some of our internal benchmark lists and didn't see any major regressions.
I think there might be some DAG combine improvement opportunities in the test changes here.
Differential Revision: https://reviews.llvm.org/D60278
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357743
91177308-0d34-0410-b5e6-
96231b3b80d8
Serguei Katkov [Fri, 5 Apr 2019 05:41:08 +0000 (05:41 +0000)]
[FastISel] Fix crash for gc.relocate lowring
Lowering safepoint checks that all gc.relocaes observed in safepoint
must be lowered. However Fast-Isel is able to skip dead gc.relocate.
To resolve this issue we just ignore dead gc.relocate in the check.
Reviewers: reames
Reviewed By: reames
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D60184
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357742
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 4 Apr 2019 23:34:38 +0000 (23:34 +0000)]
NFC: Move API uses of MD5::MD5Result to Optional rather than a pointer.
Differential Revision: https://reviews.llvm.org/D60290
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357736
91177308-0d34-0410-b5e6-
96231b3b80d8
David Callahan [Thu, 4 Apr 2019 23:30:47 +0000 (23:30 +0000)]
Include invoke'd functions for recursive extract
Summary: When recursively extracting a function from a bit code file, include functions mentioned in InvokeInst as well as CallInst
Reviewers: loladiro, espindola, volkan
Reviewed By: loladiro
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60231
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357735
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 4 Apr 2019 23:09:40 +0000 (23:09 +0000)]
An unreachable block may have a route to a reachable block, don't fast-path return that it can't.
A block reachable from the entry block can't have any route to a block that's not reachable from the entry block (if it did, that route would make it reachable from the entry block). That is the intended performance optimization for isPotentiallyReachable. For the case where we ask whether an unreachable from entry block has a route to a reachable from entry block, we can't conclude one way or the other. Fix a bug where we claimed there could be no such route.
The fix in rL357425 ironically reintroduced the very bug it was fixing but only when a DominatorTree is provided. This fixes the remaining bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357734
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Thu, 4 Apr 2019 22:56:50 +0000 (22:56 +0000)]
[TextAPI] Prefix all architecture enums to fix the build on i386.
Summary: This changes the Architecture enum to use a prefix (AK_) to prevent the
preprocessor from replacing i386 with 1 when building llvm/clang for i386.
Reviewers: steven_wu, lhames, mstorsjo
Reviewed By: mstorsjo
Subscribers: hiraditya, jkorous, dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60241
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357733
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Thu, 4 Apr 2019 22:40:06 +0000 (22:40 +0000)]
[IR] Refactor attribute methods in Function class (NFC)
Rename the functions that query the optimization kind attributes.
Differential revision: https://reviews.llvm.org/D60287
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357731
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Thu, 4 Apr 2019 21:06:41 +0000 (21:06 +0000)]
Make SourceManager::createFileID(UnownedTag, ...) take a const llvm::MemoryBuffer*
Requires making the llvm::MemoryBuffer* stored by SourceManager const,
which in turn requires making the accessors for that return const
llvm::MemoryBuffer*s and updating all call sites.
The original motivation for this was to use it and fix the TODO in
CodeGenAction.cpp's ConvertBackendLocation() by using the UnownedTag
version of createFileID, and since llvm::SourceMgr* hands out a const
llvm::MemoryBuffer* this is required. I'm not sure if fixing the TODO
this way actually works, but this seems like a good change on its own
anyways.
No intended behavior change.
Differential Revision: https://reviews.llvm.org/D60247
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357724
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Linder [Thu, 4 Apr 2019 20:35:57 +0000 (20:35 +0000)]
Fix some MCTargetOptions Doxygen comments (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357723
91177308-0d34-0410-b5e6-
96231b3b80d8
James Y Knight [Thu, 4 Apr 2019 19:05:48 +0000 (19:05 +0000)]
Revert [X86] When using Win64 ABI, exit with error if SSE is disabled for varargs
It unnecessarily breaks previously-working code which used varargs,
but didn't pass any float/double arguments (such as EDK2).
Also revert the fixup on top of that:
Revert [X86] Fix a test from r357317
This reverts r357317 (git commit
d413f41de6baf500e5d20c638375447e18777db2)
This reverts r357380 (git commit
7af32444b9b17719ebabb6bee6eb52465acc8507)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357718
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 4 Apr 2019 18:45:05 +0000 (18:45 +0000)]
Appease STLs where std::atomic<void*> lacks a constexpr default ctor
MSVC 2019 casts the pointer to a pointer-sized integer, which is a
reinterpret_cast, which is invalid in a constexpr context, so I have to
remove the LLVM_REQUIRES_CONSTANT_INITIALIZATION annotation for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357716
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Thu, 4 Apr 2019 18:40:51 +0000 (18:40 +0000)]
[WebAssembly] Apply data relocations at runtime in shared objects
See: https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md
Data section relocations in wasm shared libraries are applied by the
library itself at static constructor time. This change adds a new
synthetic function that applies relocations to relevant memory locations
on startup.
Differential Revision: https://reviews.llvm.org/D59278
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357715
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 4 Apr 2019 18:30:07 +0000 (18:30 +0000)]
Ensure that ManagedStatic is constant initialized in MSVC 2017 & 2019
Fixes PR41367.
This effectively relands r357655 with a workaround for MSVC 2017.
I tried various approaches with unions, but I ended up going with this
ifdef approach because it lets us write the proper C++11 code that we
want to write, with a separate workaround that we can delete when we
drop MSVC 2017 support.
This also adds LLVM_REQUIRE_CONSTANT_INITIALIZATION, which wraps
[[clang::require_constant_initialization]]. This actually detected a
minor issue when using clang-cl where clang wasn't able to use the
constexpr constructor in MSVC's STL, so I switched back to using the
default ctor of std::atomic<void*>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357714
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Thu, 4 Apr 2019 17:43:50 +0000 (17:43 +0000)]
[WebAssembly] Add new explicit relocation types for PIC relocations
See https://github.com/WebAssembly/tool-conventions/pull/106
Differential Revision: https://reviews.llvm.org/D59907
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357710
91177308-0d34-0410-b5e6-
96231b3b80d8
Don Hinton [Thu, 4 Apr 2019 17:35:41 +0000 (17:35 +0000)]
[llvm-objcopy] [llvm-symbolizer] Fix failing tests
Summary: Fix failing tests that matched substrings in path.
Reviewers: evgeny777, mattd, espindola, alexshap, rupprecht, jhenderson
Reviewed By: jhenderson
Subscribers: Bulletmagnet, emaste, arichardson, jakehehrlich, MaskRay, rupprecht, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60170
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357709
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Thu, 4 Apr 2019 15:48:40 +0000 (15:48 +0000)]
llvm-dwarfdump: Support alternative architecture names in the -arch filter
<rdar://problem/
47918606>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357706
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 4 Apr 2019 14:46:13 +0000 (14:46 +0000)]
[x86] eliminate unnecessary broadcast of horizontal op
This is another pattern that comes up if we more aggressively
scalarize FP ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357703
91177308-0d34-0410-b5e6-
96231b3b80d8
Michal Gorny [Thu, 4 Apr 2019 14:21:38 +0000 (14:21 +0000)]
[llvm] [cmake] Add additional headers only if they exist
Modify the add_header_files_for_glob() function to only add files
that do exist, rather than all matches of the glob. This fixes CMake
error when one of the include directories (which happen to include
/usr/include) contain broken symlinks.
Differential Revision: https://reviews.llvm.org/D59632
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357701
91177308-0d34-0410-b5e6-
96231b3b80d8
Lewis Revill [Thu, 4 Apr 2019 14:13:37 +0000 (14:13 +0000)]
[RISCV] Support assembling TLS add and associated modifiers
This patch adds support in the MC layer for parsing and assembling the
4-operand add instruction needed for TLS addressing. This also involves
parsing the %tprel_hi, %tprel_lo and %tprel_add operand modifiers.
Differential Revision: https://reviews.llvm.org/D55341
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357698
91177308-0d34-0410-b5e6-
96231b3b80d8
Joseph Tremoulet [Thu, 4 Apr 2019 14:13:28 +0000 (14:13 +0000)]
[COFF] Fix delay import directory iterator
Summary:
Take the Index into account in `getDelayImportTable`, otherwise we
always return the entry for the first delay DLL reference.
Reviewers: ruiu
Reviewed By: ruiu
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60081
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357697
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Paulsson [Thu, 4 Apr 2019 12:12:35 +0000 (12:12 +0000)]
[SystemZ] Bugfix in isFusableLoadOpStorePattern()
This function is responsible for checking the legality of fusing an instance
of load -> op -> store into a single operation. In the SystemZ backend the
check was incomplete and a test case emerged with a cycle in the instruction
selection DAG as a result.
Instead of using the NodeIds to determine node relationships,
hasPredecessorHelper() now is used just like in the X86 backend. This handled
the failing tests and as well gave a few additional transformations on
benchmarks.
The SystemZ isFusableLoadOpStorePattern() is now a very near copy of the X86
function, and it seems this could be made a utility function in common code
instead.
Review: Ulrich Weigand
https://reviews.llvm.org/D60255
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357688
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Thu, 4 Apr 2019 11:49:54 +0000 (11:49 +0000)]
[yaml2obj] - Check we correctly set the sh_info field of .symtab section.
initSymtabSectionHeader has the following line:
SHeader.sh_info = findLocalsNum(Symbols) + 1;
As was mentioned in a review comments for D60122,
it is never tested. The patch adds a test.
Differential revision: https://reviews.llvm.org/D60192
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357687
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 4 Apr 2019 11:12:30 +0000 (11:12 +0000)]
Revert rL357655 and rL357656 from llvm/trunk:
Fix minor innaccuracy in previous comment on ManagedStaticBase
........
Make ManagedStatic constexpr constructible
Apparently it needs member initializers so that it can be constructed in
a constexpr context. I explained my investigation of this in PR41367.
........
Causes vs2017 debug llvm-tblgen to fail with "Unknown command line argument" errors - similar to the vs2019 error discussed on PR41367 without the patch....
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357685
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Thu, 4 Apr 2019 11:08:45 +0000 (11:08 +0000)]
[Symbolize] Keep SymbolDescs with the same address and improve getNameFromSymbolTable heuristic
I'll follow up with better heuristics or tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357683
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Thu, 4 Apr 2019 10:24:51 +0000 (10:24 +0000)]
[ARM GlobalISel] Support DBG_VALUE
Make sure we can map and select DBG_VALUE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357681
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 4 Apr 2019 09:31:12 +0000 (09:31 +0000)]
[SLP][X86] Regenerate operandorder tests with arguments on same line. NFCI.
Stops update_test_checks.py from splitting the later arguments after the CHECKs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357679
91177308-0d34-0410-b5e6-
96231b3b80d8
Sander de Smalen [Thu, 4 Apr 2019 09:11:17 +0000 (09:11 +0000)]
[AArch64][AsmParser] Fix .arch_extension directive parsing
This patch fixes .arch_extension directive parsing to handle a wider
range of architecture extension options. The existing parser was parsing
extensions as an identifier which breaks for extensions containing a
"-", such as the "tlb-rmi" extension.
The extension is now parsed as a string. This is consistent with the
extension parsing in the .arch and .cpu directive parsing.
Patch by Cullen Rhodes (c-rhodes)
Reviewed By: SjoerdMeijer
Differential Revision: https://reviews.llvm.org/D60118
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357677
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Kudrin [Thu, 4 Apr 2019 08:45:06 +0000 (08:45 +0000)]
[llvm-symbolizer] Allow more flexible usage of -e.
addr2line allows -e to be grouped with other options; it also allows it
to prefix the value. Thus, all the following usages are possible:
* addr2line -f -e <bin> <addr>
* addr2line -fe <bin> <addr>
* addr2line -f e<bin> <addr>
* addr2line -fe<bin> <addr>
This patch adds the same for llvm-symbolizer.
Differential Revision: https://reviews.llvm.org/D60196
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357676
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Kudrin [Thu, 4 Apr 2019 08:39:40 +0000 (08:39 +0000)]
[llvm-symbolizer] Add `--output-style` switch.
In general, llvm-symbolizer follows the output style of GNU's addr2line.
However, there are still some differences; in particular, for a requested
address, llvm-symbolizer prints line and column, while addr2line prints
only the line number.
This patch adds a new switch to select the preferred style.
Differential Revision: https://reviews.llvm.org/D60190
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357675
91177308-0d34-0410-b5e6-
96231b3b80d8
Luqman Aden [Thu, 4 Apr 2019 07:08:30 +0000 (07:08 +0000)]
[InstCombine] Combine no-wrap sub and icmp w/ constant.
Teach InstCombine the transformation `(icmp P (sub nuw|nsw C2, Y), C) -> (icmp swap(P) Y, C2-C)`
Reviewers: majnemer, apilipenko, sanjoy, spatel, lebedev.ri
Reviewed By: lebedev.ri
Subscribers: dmgreen, lebedev.ri, nikic, hiraditya, JDevlieghere, jfb, jdoerfert, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59916
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357674
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 4 Apr 2019 05:00:18 +0000 (05:00 +0000)]
[X86] Use INSERT_SUBREG rather than SUBREG_TO_REG when creating LEA64_32 during isel.
SUBREG_TO_REG is supposed to be used to assert that we know the upper bits are
zero. But that isn't the case here. We've done no analysis of the inputs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357673
91177308-0d34-0410-b5e6-
96231b3b80d8
Serguei Katkov [Thu, 4 Apr 2019 04:19:56 +0000 (04:19 +0000)]
[FastISel] Fix the crash in gc.result lowering
The Fast ISel has a fallback to SelectionDAGISel in case it cannot handle the instruction.
This works as follows:
Using reverse order, try to select instruction using Fast ISel, if it cannot handle instruction it fallbacks to SelectionDAGISel
for these instructions if it is a call and continue fast instruction selections.
However if unhandled instruction is not a call or statepoint related instruction it fallbacks to SelectionDAGISel for all remaining
instructions in basic block.
However gc.result instruction is missed and as a result it is possible that gc.result is processed earlier than statepoint
causing breakage invariant the gc.results should be handled after statepoint.
Test is updated because in the current form fast-isel cannot handle ret instruction (due to i1 ret type without explicit ext)
and as a result test does not check fast-isel at all.
Reviewers: reames
Reviewed By: reames
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D60182
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357672
91177308-0d34-0410-b5e6-
96231b3b80d8
David L. Jones [Thu, 4 Apr 2019 02:27:57 +0000 (02:27 +0000)]
Revert r357452 - 'SimplifyCFG SinkCommonCodeFromPredecessors: Also sink function calls without used results (PR41259)'
This revision causes tests to fail under ASAN. Since the cause of the failures
is not clear (could be ASAN, could be a Clang bug, could be a bug in this
revision), the safest course of action seems to be to revert while investigating.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357667
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Thu, 4 Apr 2019 02:08:10 +0000 (02:08 +0000)]
gn build: Merge r357663
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357666
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Thu, 4 Apr 2019 01:43:21 +0000 (01:43 +0000)]
[WebAssembly] EmscriptenEHSjLj: Don't abort if __THREW__ is defined
This allows __THREW__ to be defined in the current module, although
it is still required to be a GlobalVariable.
In emscripten we want to be able to compile the source code that
defines this symbols.
Previously we were avoid this by not running this pass when building
that compiler-rt library, but I have change out to build it using the
normal compiler path:
https://github.com/emscripten-core/emscripten/pull/8391
Differential Revision: https://reviews.llvm.org/D60232
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357665
91177308-0d34-0410-b5e6-
96231b3b80d8
Hubert Tong [Thu, 4 Apr 2019 00:53:21 +0000 (00:53 +0000)]
[XCOFF] Add functionality for parsing AIX XCOFF object file headers
Summary:
1. Add functionality for parsing AIX XCOFF object files headers.
2. Only support 32-bit AIX XCOFF object files in this patch.
3. Print out the AIX XCOFF object file header in YAML format.
Reviewers: sfertile, hubert.reinterpretcast, jasonliu, mstorsjo, zturner, rnk
Reviewed By: sfertile, hubert.reinterpretcast
Subscribers: jsji, mgorny, hiraditya, jdoerfert, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59419
Patch by Digger Lin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357663
91177308-0d34-0410-b5e6-
96231b3b80d8
Hubert Tong [Thu, 4 Apr 2019 00:40:34 +0000 (00:40 +0000)]
[Support] On AIX, Check ENOTSUP on posix_fallocate instead of EOPNOTSUPP
Summary:
`posix_fallocate` can fail if the underlying filesystem does not support
it; and, on AIX, such a failure is reported by a return value of
`ENOTSUP`. The existing code checks only for `EOPNOTSUPP`, which may
share the same value as `ENOTSUP`, but is not required to.
Reviewers: xingxue, sfertile, jasonliu
Reviewed By: xingxue
Subscribers: kristina, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60175
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357662
91177308-0d34-0410-b5e6-
96231b3b80d8
Hubert Tong [Thu, 4 Apr 2019 00:33:57 +0000 (00:33 +0000)]
[AIX] SelectionDAGNodes.h: Pack bit-fields that are meant to be packed
Summary:
Certain classes in the subject file are expected to provide different
views of a two-byte field as a collection of various bit-fields. On AIX,
the canonical layout of bit-fields would cause these classes to span
four bytes. Applying the `pack` pragma for compilers that employ the AIX
canonical layout allows these classes to fit within the expected two
bytes. In the future, the pragma would also likely need to be applied
when building with Clang on AIX.
Reviewers: xingxue, sfertile, jasonliu
Reviewed By: xingxue
Subscribers: jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60164
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357661
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 4 Apr 2019 00:31:19 +0000 (00:31 +0000)]
[gn] Use "$link /lib" for archives instead of lib.exe
Summary:
This avoids the need to talk about lib.exe or llvm-lib.exe and it does
the right thing with LLD.
Reviewers: thakis
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60155
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357660
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 4 Apr 2019 00:28:49 +0000 (00:28 +0000)]
[X86] Remove CustomInserters for RDPKRU/WRPKRU. Use some custom lowering and new ISD opcodes instead.
These inserters inserted some instructions to zero some registers and copied from virtual registers to physical registers.
This change instead inserts the zeros directly into the DAG at lowering time using new ISD opcodes
that take the extra zeroes as inputs. The zeros will then go through isel on their own to select
the MOV32r0 pseudo. Then we just need to mention the physical registers directly
in the isel patterns and the isel table and InstrEmitter will take care of inserting the necessary
copies to/from physical registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357659
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 4 Apr 2019 00:28:48 +0000 (00:28 +0000)]
[codeview] Remove Type member from CVRecord
Summary:
Now CVType and CVSymbol are effectively type-safe wrappers around
ArrayRef<uint8_t>. Make the kind() accessor load it from the
RecordPrefix, which is the same for types and symbols.
Reviewers: zturner, aganea
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60018
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357658
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 4 Apr 2019 00:13:16 +0000 (00:13 +0000)]
Fix minor innaccuracy in previous comment on ManagedStaticBase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357656
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 4 Apr 2019 00:11:21 +0000 (00:11 +0000)]
Make ManagedStatic constexpr constructible
Apparently it needs member initializers so that it can be constructed in
a constexpr context. I explained my investigation of this in PR41367.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357655
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 3 Apr 2019 23:29:05 +0000 (23:29 +0000)]
llvm-undname: Name a pair. No behavior change.
Differential Revision: https://reviews.llvm.org/D60210
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357653
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 3 Apr 2019 23:28:30 +0000 (23:28 +0000)]
[X86] Remove CustomInserter pseudos for MONITOR/MONITORX/CLZERO. Use custom instruction selection instead.
This custom inserter existed so we could do a weird thing where we pretended that the instructions support
a full address mode instead of taking a pointer in EAX/RAX. I think was largely so we could be pointer
size agnostic in the isel pattern.
To make this work we would then put the address into an LEA into EAX/RAX in front of the instruction after
isel. But the LEA is overkill when we just have a base pointer. So we end up using the LEA as a slower MOV
instruction.
With this change we now just do custom selection during isel instead and just assign the incoming address
of the intrinsic into EAX/RAX based on its size. After the intrinsic is selected, we can let isel take
care of selecting an LEA or other operation to do any address computation needed in this basic block.
I've also split the instruction into a 32-bit mode version and a 64-bit mode version so the implicit
use is properly sized based on the pointer. Without this we get comments in the assembly output about
killing eax and defing rax or vice versa depending on whether we define the instruction to use EAX/RAX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357652
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 3 Apr 2019 23:28:18 +0000 (23:28 +0000)]
[X86] Remove dead CHECK lines for a test. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357651
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 3 Apr 2019 23:28:11 +0000 (23:28 +0000)]
[X86] Autogenerate checks. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357650
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 3 Apr 2019 23:27:18 +0000 (23:27 +0000)]
llvm-undname: Fix a crash-on-invalid
Found by oss-fuzz, fixes issue 13260 on oss-fuzz.
Differential Revision: https://reviews.llvm.org/D60207
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357649
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 3 Apr 2019 23:23:32 +0000 (23:23 +0000)]
llvm-undame: Fix an assert-on-invalid
Found by oss-fuzz, fixes issue 12432 on os-fuzz.
Differential Revision: https://reviews.llvm.org/D60206
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357648
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 3 Apr 2019 23:19:39 +0000 (23:19 +0000)]
llvm-undname: Fix an assert-on-invalid
Found by oss-fuzz, fixes issues 12428 and 12429 on oss-fuzz.
Differential Revision: https://reviews.llvm.org/D60204
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357647
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 3 Apr 2019 23:15:56 +0000 (23:15 +0000)]
llvm-undname: Fix a crash-on-invalid
Found by oss-fuzz, fixes issues 12435 and 12438 on oss-fuzz.
Differential Revision: https://reviews.llvm.org/D60202
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357646
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 3 Apr 2019 23:14:33 +0000 (23:14 +0000)]
llvm-cxxfilt: Demangle gcc "old-style unified" ctors and dtors
These are variant 4, cf
https://github.com/gcc-mirror/gcc/blob/master/gcc/cp/mangle.c#L1851
https://github.com/gcc-mirror/gcc/blob/master/gcc/cp/mangle.c#L1880
and gcc seems to sometimes emit them still.
Differential Revision: https://reviews.llvm.org/D60229
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357645
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 3 Apr 2019 22:40:35 +0000 (22:40 +0000)]
[x86] fold shuffles of h-ops that have an undef operand
If an operand is undef, we can assume it's the same as the
other operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357644
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 3 Apr 2019 22:15:29 +0000 (22:15 +0000)]
[x86] eliminate movddup of horizontal op
This pattern would show up as a regression if we more
aggressively convert vector FP ops to scalar ops.
There's still a missed optimization for the v4f64 legal
case (AVX) because we create that h-op with an undef operand.
We should probably just duplicate the operands for that
pattern to avoid trouble.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357642
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Wed, 3 Apr 2019 21:27:03 +0000 (21:27 +0000)]
[IR] Create new method in `Function` class (NFC)
Create method `optForNone()` testing for the function level equivalent of
`-O0` and refactor appropriately.
Differential revision: https://reviews.llvm.org/D59852
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357638
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 3 Apr 2019 21:10:55 +0000 (21:10 +0000)]
[x86] add another test for disguised h-op; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357636
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 3 Apr 2019 20:53:20 +0000 (20:53 +0000)]
AMDGPU: Split block for si_end_cf
Relying on no spill or other code being inserted before this was
precarious. It relied on code diligently checking isBasicBlockPrologue
which is likely to be forgotten.
Ideally this could be done earlier, but this doesn't work because of
phis. Any other instruction can't be placed before them, so we have to
accept the position being incorrect during SSA.
This avoids regressions in the fast register allocator rewrite from
inverting the direction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357634
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 3 Apr 2019 20:34:22 +0000 (20:34 +0000)]
[x86] add test for disguised horizontal op; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357630
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Devlieghere [Wed, 3 Apr 2019 19:57:13 +0000 (19:57 +0000)]
[dwarfdump] Remove bogus verifier error
The standard doesn't require a DW_TAG_variable, DW_TAG_formal_parameter
or DW_TAG_constant to A DW_AT_type attribute describing the type of the
variable. It only specifies that it *can* have one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357628
91177308-0d34-0410-b5e6-
96231b3b80d8
Taewook Oh [Wed, 3 Apr 2019 19:54:43 +0000 (19:54 +0000)]
[ProfileSummary] Count callsite samples when computing total samples.
Summary: Currently ProfileSummaryBuilder doesn't count into callsite samples when computing total samples. Considering that ProfileSummaryInfo is used to checked the hotness of not only body samples but also callsite samples (from SampleProfileLoader), I think the callsite sample counts should be considered when computing total samples.
Reviewers: eraman, danielcdh, wmi
Subscribers: hiraditya, jdoerfert, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59835
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357627
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 3 Apr 2019 19:09:15 +0000 (19:09 +0000)]
gn build: Add build file for dexp
None of check-clang-tools's tests run this, but the CMake
check-clang-tools depends on the binary, so add it for consistency.
Differential Revision: https://reviews.llvm.org/D60222
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357624
91177308-0d34-0410-b5e6-
96231b3b80d8
Konstantin Zhuravlyov [Wed, 3 Apr 2019 19:07:29 +0000 (19:07 +0000)]
AMDGPU/NFC: Add offset field to arg metadata (required for code object v3)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357623
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 3 Apr 2019 17:43:14 +0000 (17:43 +0000)]
[X86] Extend boolean arguments to inline-asm according to getBooleanType
Differential Revision: https://reviews.llvm.org/D60208
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357615
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 3 Apr 2019 17:28:34 +0000 (17:28 +0000)]
[X86][AVX] combineHorizontalPredicateResult - split any/allof v16i16/v32i8 reduction on AVX1
Perform the 2 x 128-bit lo/hi OR/AND on the vectors before calling PMOVMSKB on the 128-bit result.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357611
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 3 Apr 2019 17:17:13 +0000 (17:17 +0000)]
[X86][AVX] combineHorizontalPredicateResult - support v16i16/v32i8 reduction on AVX1
Use getPMOVMSKB helper which splits v32i8 MOVMSK calls on pre-AVX2 targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357608
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Semel [Wed, 3 Apr 2019 17:13:45 +0000 (17:13 +0000)]
[DWARF] check whether the DIE is valid before querying for information
Differential Revision: https://reviews.llvm.org/D60147
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357607
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Wed, 3 Apr 2019 16:58:32 +0000 (16:58 +0000)]
[AArch64][GlobalISel] Legalize G_FEXP2
Same as G_EXP. Add a test, and update legalizer-info-validation.mir and
f16-instructions.ll.
Differential Revision: https://reviews.llvm.org/D60165
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357605
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 3 Apr 2019 16:33:24 +0000 (16:33 +0000)]
[x86] make stack folding tests immune to unrelated transforms; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357604
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 3 Apr 2019 16:00:59 +0000 (16:00 +0000)]
[DAGCombiner] Rename variables Demanded -> DemandedBits/DemandedElts. NFCI.
Use consistent variable names down the SimplifyDemanded* call stack so debugging isn't such a annoyance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357602
91177308-0d34-0410-b5e6-
96231b3b80d8
Lewis Revill [Wed, 3 Apr 2019 15:54:30 +0000 (15:54 +0000)]
Test commit: Remove double variable assignment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357601
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Wed, 3 Apr 2019 15:11:19 +0000 (15:11 +0000)]
[llvm-readobj] - Fix 2 test cases.
https://reviews.llvm.org/D60122 (r357595) changed the
symbols description format.
This change fix two more new test cases to fix BB:
http://lab.llvm.org:8011/builders/clang-with-thin-lto-ubuntu/builds/16205/steps/test-stage1-compiler/logs/stdio
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357598
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Wed, 3 Apr 2019 15:09:19 +0000 (15:09 +0000)]
[SystemZ] Improve codegen for certain SADDO-immediate cases
When performing an add-with-overflow with an immediate in the
range -2G ... -4G, code currently loads the immediate into a
register, which generally takes two instructions.
In this particular case, it is preferable to load the negated
immediate into a register instead, which always only requires
one instruction, and then perform a subtract.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357597
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Wed, 3 Apr 2019 14:53:42 +0000 (14:53 +0000)]
[yaml2obj][obj2yaml] - Change how symbol's binding is descibed when parsing/dumping.
Currently, YAML has the following syntax for describing the symbols:
Symbols:
Local:
LocalSymbol1:
...
LocalSymbol2:
...
...
Global:
GlobalSymbol1:
...
Weak:
...
GNUUnique:
I.e. symbols are grouped by their bindings. That is not very convenient,
because:
It does not allow to set a custom binding, what can be useful for producing
broken/special outputs for test cases. Adding a new binding would require to
change a syntax (what we observed when added GNUUnique recently).
It does not allow to change the order of the symbols in .symtab/.dynsym,
i.e. currently all Local symbols are placed first, then Global, Weak and GNUUnique
are following, but we are not able to change the order.
It is not consistent. Binding is just one of the properties of the symbol,
we do not group them by other properties.
It makes the code more complex that it can be. This patch shows it can be simplified
with the change performed.
The patch changes the syntax to just:
Symbols:
Symbol1:
...
Symbol2:
...
...
With that, we are able to work with the binding field just like with any other symbol property.
Differential revision: https://reviews.llvm.org/D60122
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357595
91177308-0d34-0410-b5e6-
96231b3b80d8
James Henderson [Wed, 3 Apr 2019 14:50:50 +0000 (14:50 +0000)]
[NFC] Address missed review comment for test
Reviewed by: grimar
Differential Revision: https://reviews.llvm.org/D60200
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357594
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 3 Apr 2019 14:45:45 +0000 (14:45 +0000)]
[x86] remove duplicate tests
Accidentally double-committed these.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357593
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 3 Apr 2019 14:41:28 +0000 (14:41 +0000)]
[x86] add negative tests for FP scalarization; NFC
These go with the proposal in D60150.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357592
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 3 Apr 2019 14:41:24 +0000 (14:41 +0000)]
[x86] add tests with constants for FP scalarization; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357591
91177308-0d34-0410-b5e6-
96231b3b80d8
James Henderson [Wed, 3 Apr 2019 14:40:27 +0000 (14:40 +0000)]
[llvm-objcopy] Make section rename/set flags case-insensitive
This fixes https://bugs.llvm.org/show_bug.cgi?id=41305. GNU objcopy
--set-section-flags/--rename-section flags are case-insensitive, so this
patch updates llvm-objcopy to match.
Reviewed by: grimar
Differential Revision: https://reviews.llvm.org/D60200
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357590
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 3 Apr 2019 14:36:47 +0000 (14:36 +0000)]
[x86] add tests with constants for FP scalarization; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357587
91177308-0d34-0410-b5e6-
96231b3b80d8
Petar Avramovic [Wed, 3 Apr 2019 14:12:59 +0000 (14:12 +0000)]
[MIPS GlobalISel] Select floating point arithmetic operations
Select 32 and 64 bit floating point add, sub, mul and div for MIPS32.
Differential Revision: https://reviews.llvm.org/D60191
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357584
91177308-0d34-0410-b5e6-
96231b3b80d8
Javed Absar [Wed, 3 Apr 2019 14:12:13 +0000 (14:12 +0000)]
[AArch64] Update v8.5a MTE LDG/STG instructions
The latest MTE specification adds register Xt to the STG instruction family:
STG [Xn, #offset] -> STG Xt, [Xn, #offset]
The tag written to memory is taken from Xt rather than Xn.
Also, the LDG instruction also was changed to read return address from Xt:
LDG Xt, [Xn, #offset].
This patch includes those changes and tests.
Specification is at: https://developer.arm.com/docs/ddi0596/c
Differential Revision: https://reviews.llvm.org/D60188
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357583
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 3 Apr 2019 13:56:36 +0000 (13:56 +0000)]
AMDGPU: Fix copy/paste error in intrnsic comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357581
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 3 Apr 2019 13:42:06 +0000 (13:42 +0000)]
[DAGCombiner] loosen restrictions for moving shuffles after vector binop
There are 3 changes to make this correspond to the same transform in instcombine:
1. Remove the legality check - we can't create anything less legal than we started with.
2. Ease the use restriction, so we only bail out if both operands have >1 use.
3. Ease the use restriction for binops with a repeated operand (eg, mul x, x).
As discussed in D60150, there's a scalarization opportunity that will be made
easier by allowing this transform more generally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357580
91177308-0d34-0410-b5e6-
96231b3b80d8
Xing GUO [Wed, 3 Apr 2019 13:32:49 +0000 (13:32 +0000)]
[llvm-readobj] Add GNU style dumper for .gnu.version section
Summary: Currently, `llvm-readobj` do not support GNU style dumper for symbol versioning sections. In this patch, I would like to implement dumper for `.gnu.version` section
Reviewers: jhenderson, rupprecht, grimar
Reviewed By: jhenderson, rupprecht
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59877
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357578
91177308-0d34-0410-b5e6-
96231b3b80d8
James Henderson [Wed, 3 Apr 2019 12:57:46 +0000 (12:57 +0000)]
[llvm-nm]Add support for --no-demangle
GNU nm has --no-demangle, so llvm-nm should too. It disables the
--demangle switch. The patch also allows --demangle to be specified
multiple times (the last of all --no-demangle/--demangle switches
takes precedence).
Reviewed by: grimar, rupprecht, mattd
Differential Revision: https://reviews.llvm.org/D60134
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357575
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 3 Apr 2019 12:33:19 +0000 (12:33 +0000)]
gn build: Add build files for clangd xpc framework code
This is a bit of a larger change since this is the first (and as far as
I can tell only) place where the LLVM build produces macOS framework
bundles.
GN has some built-in support for this, so use that.
`gn help create_bundle` has a terse description (but it's a bit
outdated: `deps` must be `public_deps` and the conditionals in the
example in the help aren't quite right on non-iOS).
We need a new 'copy_bundle_data' tool, and since we copy the clangd.xpc
bundle as bundle_data into ClangdXPC.framework it needs to be able to
handle directories in addition to files.
GN also insists we have a compile_xcassets tool even though it's not
used. I just made that run `false`.
Despite GN's support for bundles, we still need to manually create the
expected symlink structure in the .framework bundle. Since this code
never runs on Windows, it's safe to create the symlinks before the
symlink targets exist, so we can just make the bundle depend on the
steps that create the symlinks. For this to work, change the symlink
script to create the symlink's containing directory if it doesn't yet
exist.
I locally verified that CMake and GN build create the same bundle
structure. (I noticed that both builds set LC_ID_DYLIB to the pre-copy
libClangdXPCLib.dylib name, but that seems to not cause any issues and
it happens in the CMake build too.)
(Also add an error message to clangd-xpc-test-client for when loading
the dylib fails – this was useful while locally debugging this.)
Differential Revision: https://reviews.llvm.org/D60130
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357574
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 3 Apr 2019 12:33:16 +0000 (12:33 +0000)]
[X86] Regenerate LEA codegen tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357573
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 3 Apr 2019 11:00:55 +0000 (11:00 +0000)]
[DAGCombine] Don't use getZExtValue() until we know the constant is in range.
Noticed during prep for a patch for PR40758.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357571
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Wed, 3 Apr 2019 10:08:27 +0000 (10:08 +0000)]
[mips] Remove unused FGRH32 register class. NFC
If we need this class in the future we will easily restore it.
Differential Revision: http://reviews.llvm.org/D60132
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357570
91177308-0d34-0410-b5e6-
96231b3b80d8
Clement Courbet [Wed, 3 Apr 2019 09:37:30 +0000 (09:37 +0000)]
[X86] Make the post machine scheduler macrofusion-aware.
Summary:
Given that X86 does not use this currently, this is an NFC. I'll
experiment with enabling and will report numbers.
Reviewers: andreadb, lebedev.ri
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60185
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357568
91177308-0d34-0410-b5e6-
96231b3b80d8
Clement Courbet [Wed, 3 Apr 2019 08:21:54 +0000 (08:21 +0000)]
[X86][NFC] Add tests for misched macro-fusion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357565
91177308-0d34-0410-b5e6-
96231b3b80d8