platform/upstream/llvm.git
5 years agoFix alignment check to check the alignment of the intended type.
Richard Smith [Fri, 17 May 2019 07:28:41 +0000 (07:28 +0000)]
Fix alignment check to check the alignment of the intended type.

llvm-svn: 360997

5 years ago[ClangFormat] Editor integrations inherit default style from clang-format binary
Sam McCall [Fri, 17 May 2019 07:22:55 +0000 (07:22 +0000)]
[ClangFormat] Editor integrations inherit default style from clang-format binary

Summary:
This allows downstream customizations to the default style to work without
needing to also modify the editor integrations.

Reviewers: ilya-biryukov

Reviewed By: ilya-biryukov

Subscribers: cfe-commits

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

llvm-svn: 360996

5 years agoRefactor constant evaluation of typeid(T) to track a symbolic type_info
Richard Smith [Fri, 17 May 2019 07:06:46 +0000 (07:06 +0000)]
Refactor constant evaluation of typeid(T) to track a symbolic type_info
object rather than tracking the originating expression.

This is groundwork for supporting polymorphic typeid expressions. (Note
that this somewhat regresses our support for DR1968, but it turns out
that that never actually worked anyway, at least in non-trivial cases.)

This reinstates r360974, reverted in r360988, with a fix for a
static_assert failure on 32-bit builds: force Type base class to have
8-byte alignment like the rest of Clang's AST nodes.

llvm-svn: 360995

5 years ago[Clang][Docs] Document __FILE_NAME__. NFC
Kristina Brooks [Fri, 17 May 2019 06:46:12 +0000 (06:46 +0000)]
[Clang][Docs] Document __FILE_NAME__. NFC

Document the `__FILE_NAME__` preprocessor extension.

llvm-svn: 360994

5 years ago[Bugpoint] Only run plugins tests if plugins are enabled
Petr Hosek [Fri, 17 May 2019 06:41:04 +0000 (06:41 +0000)]
[Bugpoint] Only run plugins tests if plugins are enabled

This is a followup to r360991 which applies the same logic to LLVM.

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

llvm-svn: 360993

5 years ago[X86] Add FeatureFastScalarShiftMasks and FeatureFastVectorShiftMasks to the ignore...
Craig Topper [Fri, 17 May 2019 06:40:21 +0000 (06:40 +0000)]
[X86] Add FeatureFastScalarShiftMasks and FeatureFastVectorShiftMasks to the ignore list for inlining compatibility.

These are tuning flags and won't cause any codegen issue if we inline a function
with a different value.

llvm-svn: 360992

5 years ago[Analysis] Only run plugins tests if plugins are actually enabled
Petr Hosek [Fri, 17 May 2019 06:07:37 +0000 (06:07 +0000)]
[Analysis] Only run plugins tests if plugins are actually enabled

When plugins aren't enabled, don't try to run plugins tests. Don't
enable plugins unconditionally based on the platform, instead check
if LLVM shared library is actually being built which may not be the
case for every host configuration, even if the host itself supports
plugins.

This addresses test failures introduced by r360891/D59464.

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

llvm-svn: 360991

5 years ago[PowerPC] Support .reloc *, R_PPC{,64}_NONE, *
Fangrui Song [Fri, 17 May 2019 06:04:11 +0000 (06:04 +0000)]
[PowerPC] Support .reloc *, R_PPC{,64}_NONE, *

This can be used to create references among sections. When --gc-sections
is used, the referenced section will be retained if the origin section
is retained.

llvm-svn: 360990

5 years ago[GlobalISel] Fix -Wsign-compare on 32-bit -DLLVM_ENABLE_ASSERTIONS=on builds
Fangrui Song [Fri, 17 May 2019 05:53:39 +0000 (05:53 +0000)]
[GlobalISel] Fix -Wsign-compare on 32-bit -DLLVM_ENABLE_ASSERTIONS=on builds

llvm-svn: 360989

5 years agoRevert Refactor constant evaluation of typeid(T) to track a symbolic type_info object...
Chris Bieneman [Fri, 17 May 2019 05:46:03 +0000 (05:46 +0000)]
Revert Refactor constant evaluation of typeid(T) to track a symbolic type_info object rather than tracking the originating expression.

This reverts r360974 (git commit 7ee4307bd4450022c3c8777f43a40cc4f0ccc009)

llvm-svn: 360988

5 years agoRevert [c++20] P1327R1: Support for typeid applied to objects of polymorphic class...
Chris Bieneman [Fri, 17 May 2019 05:45:57 +0000 (05:45 +0000)]
Revert [c++20] P1327R1: Support for typeid applied to objects of polymorphic class type in constant evaluation.

This reverts r360977 (git commit f51dc8d2f98f4029247552bc45ef53628ab3b6b9)

llvm-svn: 360987

5 years ago[MC][PowerPC] Clean up PPCAsmBackend
Fangrui Song [Fri, 17 May 2019 05:44:26 +0000 (05:44 +0000)]
[MC][PowerPC] Clean up PPCAsmBackend

Replace the member variable Target with Triple
Use Triple instead of TheTarget.getName() to dispatch on 32-bit/64-bit.
Delete redundant parameters

llvm-svn: 360986

5 years agoRe-land: Add Clang shared library with C++ exports
Chris Bieneman [Fri, 17 May 2019 04:20:01 +0000 (04:20 +0000)]
Re-land: Add Clang shared library with C++ exports

Summary:
This patch adds a libClang_shared library on *nix systems which exports the entire C++ API. In order to support this on Windows we should really refactor llvm-shlib and share code between the two.

This also uses a slightly different method for generating the shared library, which I should back-port to llvm-shlib. Instead of linking the static archives and passing linker flags to force loading the whole libraries, this patch creates object libraries for every library (which has no cost in the build system), and link the object libraries.

llvm-svn: 360985

5 years ago[ELF] Implement Dependent Libraries Feature
Ben Dunbobbin [Fri, 17 May 2019 03:44:15 +0000 (03:44 +0000)]
[ELF] Implement Dependent Libraries Feature

This patch implements a limited form of autolinking primarily designed to allow
either the --dependent-library compiler option, or "comment lib" pragmas (
https://docs.microsoft.com/en-us/cpp/preprocessor/comment-c-cpp?view=vs-2017) in
C/C++ e.g. #pragma comment(lib, "foo"), to cause an ELF linker to automatically
add the specified library to the link when processing the input file generated
by the compiler.

Currently this extension is unique to LLVM and LLD. However, care has been taken
to design this feature so that it could be supported by other ELF linkers.

The design goals were to provide:

- A simple linking model for developers to reason about.
- The ability to to override autolinking from the linker command line.
- Source code compatibility, where possible, with "comment lib" pragmas in other
  environments (MSVC in particular).

Dependent library support is implemented differently for ELF platforms than on
the other platforms. Primarily this difference is that on ELF we pass the
dependent library specifiers directly to the linker without manipulating them.
This is in contrast to other platforms where they are mapped to a specific
linker option by the compiler. This difference is a result of the greater
variety of ELF linkers and the fact that ELF linkers tend to handle libraries in
a more complicated fashion than on other platforms. This forces us to defer
handling the specifiers to the linker.

In order to achieve a level of source code compatibility with other platforms
we have restricted this feature to work with libraries that meet the following
"reasonable" requirements:

1. There are no competing defined symbols in a given set of libraries, or
   if they exist, the program owner doesn't care which is linked to their
   program.
2. There may be circular dependencies between libraries.

The binary representation is a mergeable string section (SHF_MERGE,
SHF_STRINGS), called .deplibs, with custom type SHT_LLVM_DEPENDENT_LIBRARIES
(0x6fff4c04). The compiler forms this section by concatenating the arguments of
the "comment lib" pragmas and --dependent-library options in the order they are
encountered. Partial (-r, -Ur) links are handled by concatenating .deplibs
sections with the normal mergeable string section rules. As an example, #pragma
comment(lib, "foo") would result in:

.section ".deplibs","MS",@llvm_dependent_libraries,1
         .asciz "foo"

For LTO, equivalent information to the contents of a the .deplibs section can be
retrieved by the LLD for bitcode input files.

LLD processes the dependent library specifiers in the following way:

1. Dependent libraries which are found from the specifiers in .deplibs sections
   of relocatable object files are added when the linker decides to include that
   file (which could itself be in a library) in the link. Dependent libraries
   behave as if they were appended to the command line after all other options. As
   a consequence the set of dependent libraries are searched last to resolve
   symbols.
2. It is an error if a file cannot be found for a given specifier.
3. Any command line options in effect at the end of the command line parsing apply
   to the dependent libraries, e.g. --whole-archive.
4. The linker tries to add a library or relocatable object file from each of the
   strings in a .deplibs section by; first, handling the string as if it was
   specified on the command line; second, by looking for the string in each of the
   library search paths in turn; third, by looking for a lib<string>.a or
   lib<string>.so (depending on the current mode of the linker) in each of the
   library search paths.
5. A new command line option --no-dependent-libraries tells LLD to ignore the
   dependent libraries.

Rationale for the above points:

1. Adding the dependent libraries last makes the process simple to understand
   from a developers perspective. All linkers are able to implement this scheme.
2. Error-ing for libraries that are not found seems like better behavior than
   failing the link during symbol resolution.
3. It seems useful for the user to be able to apply command line options which
   will affect all of the dependent libraries. There is a potential problem of
   surprise for developers, who might not realize that these options would apply
   to these "invisible" input files; however, despite the potential for surprise,
   this is easy for developers to reason about and gives developers the control
   that they may require.
4. This algorithm takes into account all of the different ways that ELF linkers
   find input files. The different search methods are tried by the linker in most
   obvious to least obvious order.
5. I considered adding finer grained control over which dependent libraries were
   ignored (e.g. MSVC has /nodefaultlib:<library>); however, I concluded that this
   is not necessary: if finer control is required developers can fall back to using
   the command line directly.

RFC thread: http://lists.llvm.org/pipermail/llvm-dev/2019-March/131004.html.

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

llvm-svn: 360984

5 years ago[X86] Support .reloc *, R_{386,X86_64}_NONE, *
Fangrui Song [Fri, 17 May 2019 03:25:39 +0000 (03:25 +0000)]
[X86] Support .reloc *, R_{386,X86_64}_NONE, *

This can be used to create references among sections. When --gc-sections
is used, the referenced section will be retained if the origin section
is retained.

See R_MIPS_NONE (D13659), R_ARM_NONE (D61992), R_AARCH64_NONE (D61973) for similar changes.

Reviewed By: rnk

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

llvm-svn: 360983

5 years ago[GWP-ASan] Fixed issue with c++ standard library dependency.
Mitch Phillips [Fri, 17 May 2019 03:20:53 +0000 (03:20 +0000)]
[GWP-ASan] Fixed issue with c++ standard library dependency.

Summary:
Removed dependency on c++ standard library. Some supporting allocators (namely Scudo on Fuchsia, and shortly, scudo standalone) has a hard requirement of no c++stdlib.

This patch updates the build system so that we don't have any c++ stdlib dependencies. It also will conveniently fix a racy build-order bug discrepency between GWP-ASan and libc++.

Reviewers: phosek, morehouse

Reviewed By: phosek, morehouse

Subscribers: kubamracek, mgorny, cryptoad, #sanitizers, llvm-commits, beanz, smeenai, vitalybuka

Tags: #sanitizers, #llvm

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

llvm-svn: 360982

5 years ago[AArch64] Support .reloc *, R_AARCH64_NONE, *
Fangrui Song [Fri, 17 May 2019 03:05:07 +0000 (03:05 +0000)]
[AArch64] Support .reloc *, R_AARCH64_NONE, *

Summary:
This can be used to create references among sections. When --gc-sections
is used, the referenced section will be retained if the origin section
is retained.

Reviewed By: peter.smith

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

llvm-svn: 360981

5 years ago[ARM] Support .reloc *, R_ARM_NONE, *
Fangrui Song [Fri, 17 May 2019 02:51:54 +0000 (02:51 +0000)]
[ARM] Support .reloc *, R_ARM_NONE, *

R_ARM_NONE can be used to create references among sections. When
--gc-sections is used, the referenced section will be retained if the
origin section is retained.

Add a generic MCFixupKind FK_NONE as this kind of no-op relocation is
ubiquitous on ELF and COFF, and probably available on many other binary
formats. See D62014.

Reviewed By: peter.smith

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

llvm-svn: 360980

5 years ago[LFTR] Strengthen assertions in genLoopLimit [NFCI]
Philip Reames [Fri, 17 May 2019 02:18:03 +0000 (02:18 +0000)]
[LFTR] Strengthen assertions in genLoopLimit [NFCI]

llvm-svn: 360978

5 years ago[c++20] P1327R1: Support for typeid applied to objects of polymorphic
Richard Smith [Fri, 17 May 2019 02:16:45 +0000 (02:16 +0000)]
[c++20] P1327R1: Support for typeid applied to objects of polymorphic
class type in constant evaluation.

llvm-svn: 360977

5 years ago[IndVars] Don't reimplement Loop::isLoopInvariant [NFC]
Philip Reames [Fri, 17 May 2019 02:09:03 +0000 (02:09 +0000)]
[IndVars] Don't reimplement Loop::isLoopInvariant [NFC]

Using dominance vs a set membership check is indistinguishable from a compile time perspective, and the two queries return equivelent results.  Simplify code by using the existing function.

llvm-svn: 360976

5 years agoMove symbol resolution code out of SymbolTable class.
Rui Ueyama [Fri, 17 May 2019 01:55:20 +0000 (01:55 +0000)]
Move symbol resolution code out of SymbolTable class.

This is the last patch of the series of patches to make it possible to
resolve symbols without asking SymbolTable to do so.

The main point of this patch is the introduction of
`elf::resolveSymbol(Symbol *Old, Symbol *New)`. That function resolves
or merges given symbols by examining symbol types and call
replaceSymbol (which memcpy's New to Old) if necessary.

With the new function, we have now separated symbol resolution from
symbol lookup. If you already have a Symbol pointer, you can directly
resolve the symbol without asking SymbolTable to do that.

Now that the nice abstraction become available, I can start working on
performance improvement of the linker. As a starter, I'm thinking of
making --{start,end}-lib faster.

--{start,end}-lib is currently unnecessarily slow because it looks up
the symbol table twice for each symbol.

 - The first hash table lookup/insertion occurs when we instantiate a
   LazyObject file to insert LazyObject symbols.

 - The second hash table lookup/insertion occurs when we create an
   ObjFile from LazyObject file. That overwrites LazyObject symbols
   with Defined symbols.

I think it is not too hard to see how we can now eliminate the second
hash table lookup. We can keep LazyObject symbols in Step 1, and then
call elf::resolveSymbol() to do Step 2.

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

llvm-svn: 360975

5 years agoRefactor constant evaluation of typeid(T) to track a symbolic type_info
Richard Smith [Fri, 17 May 2019 01:46:05 +0000 (01:46 +0000)]
Refactor constant evaluation of typeid(T) to track a symbolic type_info
object rather than tracking the originating expression.

This is groundwork for supporting polymorphic typeid expressions. (Note
that this somewhat regresses our support for DR1968, but it turns out
that that never actually worked anyway, at least in non-trivial cases.)

llvm-svn: 360974

5 years agoRevert r360946 "Add Clang shared library with C++ exports"
Nico Weber [Fri, 17 May 2019 01:42:37 +0000 (01:42 +0000)]
Revert r360946 "Add Clang shared library with C++ exports"

It breaks LLVM_ENABLE_PIC=OFF builds, and it's not clear
if the object library approach doesn't impact the normal
clang binary.

llvm-svn: 360973

5 years ago[LFTR] Factor out a helper function for readability purpose [NFC]
Philip Reames [Fri, 17 May 2019 01:39:58 +0000 (01:39 +0000)]
[LFTR] Factor out a helper function for readability purpose [NFC]

llvm-svn: 360972

5 years ago[Docs] Fix headings in remote debugging
Jonas Devlieghere [Fri, 17 May 2019 01:38:16 +0000 (01:38 +0000)]
[Docs] Fix headings in remote debugging

Add the proper headings instead of using just a bold font. Also add the
local ToC.

llvm-svn: 360971

5 years ago[CodeMetrics] Don't let extends of i1 be free.
Jonas Paulsson [Fri, 17 May 2019 01:26:35 +0000 (01:26 +0000)]
[CodeMetrics]  Don't let extends of i1 be free.

getUserCost() currently returns TCC_Free for any extend of a compare (i1)
result. It seems this is only true in a limited number of cases where for
example two compares are chained. Even in those types of cases it seems
unlikely that they are generally free, while they may be in some cases.

This patch therefore removes this special handling of cast of i1. No tests
are failing because of this.

If some target want the old behavior, it could override getUserCost().

Review: Hal Finkel, Chandler Carruth, Evgeny Astigeevich, Simon Pilgrim,
        Ulrich Weigand
https://reviews.llvm.org/D54742/new/

llvm-svn: 360970

5 years agoFix broken test case.
Richard Trieu [Fri, 17 May 2019 01:17:32 +0000 (01:17 +0000)]
Fix broken test case.

EXPECT_EQ takes two arguments, not a single expression that evaluates to bool.

llvm-svn: 360969

5 years agoClarify comments on helpers used by LFTR [NFC]
Philip Reames [Fri, 17 May 2019 01:12:02 +0000 (01:12 +0000)]
Clarify comments on helpers used by LFTR [NFC]

I'm slowly wrapping my head around this code, and am making comment improvements where I can.

llvm-svn: 360968

5 years ago[Docs] Remove architectures from feature matrix
Jonas Devlieghere [Fri, 17 May 2019 01:04:37 +0000 (01:04 +0000)]
[Docs] Remove architectures from feature matrix

This is outdated, there's a bunch of architectures missing. If we want
them to be part of this table they should be a separate row anyway.

llvm-svn: 360967

5 years ago[CommandInterpreter] Accept blanks after `all` or [0-9]+ for bt.
Davide Italiano [Fri, 17 May 2019 01:03:21 +0000 (01:03 +0000)]
[CommandInterpreter] Accept blanks after `all` or [0-9]+ for bt.

Previously "bt all    " would've failed as the regex didn't match
them.

Over the shoulder review by Jonas Devlieghere.

<rdar://problem/50824935>

llvm-svn: 360966

5 years ago[SystemZ] Bugfix in SystemZTargetLowering::combineIntDIVREM()
Jonas Paulsson [Fri, 17 May 2019 00:50:35 +0000 (00:50 +0000)]
[SystemZ]  Bugfix in SystemZTargetLowering::combineIntDIVREM()

Make sure to not unroll a vector division/remainder (with a constant splat
divisor) after type legalization, since the scalar type may then be illegal.

Review: Ulrich Weigand
https://reviews.llvm.org/D62036

llvm-svn: 360965

5 years ago[Docs] Unify sidebar padding
Jonas Devlieghere [Fri, 17 May 2019 00:45:05 +0000 (00:45 +0000)]
[Docs] Unify sidebar padding

Unify the padding across list items and the list header.

llvm-svn: 360964

5 years agoRevert r360859: "Reland r360771 "[MergeICmps] Simplify the code.""
Nico Weber [Fri, 17 May 2019 00:43:53 +0000 (00:43 +0000)]
Revert r360859: "Reland r360771 "[MergeICmps] Simplify the code.""

It caused PR41917.

llvm-svn: 360963

5 years agoConvert PointerUnion to a variadic template.
Richard Smith [Fri, 17 May 2019 00:39:38 +0000 (00:39 +0000)]
Convert PointerUnion to a variadic template.

Summary:
Rather than duplicating code between PointerUnion, PointerUnion3, and
PointerUnion4 (and missing things from the latter cases, such as some of the
DenseMap support and operator==), convert PointerUnion to a variadic template
that can be used as a union of any number of pointers.

(This doesn't support PointerUnion<> right now. Adding a special case for that
would be possible, and perhaps even useful in some situations, but it doesn't
seem worthwhile until we have a concrete use case.)

Reviewers: dblaikie

Subscribers: dexonsmith, kristina, llvm-commits

Tags: #llvm

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

llvm-svn: 360962

5 years ago[Tests] Consolidate more lftr tests
Philip Reames [Fri, 17 May 2019 00:19:28 +0000 (00:19 +0000)]
[Tests] Consolidate more lftr tests

These are all of the ones involving the same data layout string.  Remainder take a bit more consideration, but at least everything can be auto-updated now.

llvm-svn: 360961

5 years ago[X86][AsmParser] Add mnemonics missed in r360954.
David L. Jones [Fri, 17 May 2019 00:19:20 +0000 (00:19 +0000)]
[X86][AsmParser] Add mnemonics missed in r360954.

These are valid Jcc, but aren't based on the EFLAGS condition codes (Intel 64
and IA-32 Architetcures Software Developer's Manual Vol. 1, Appendix B). These
are covered in clang/test, but not llvm/test.

llvm-svn: 360960

5 years agoHWASan exception support.
Evgeniy Stepanov [Thu, 16 May 2019 23:54:41 +0000 (23:54 +0000)]
HWASan exception support.

Summary:
Adds a call to __hwasan_handle_vfork(SP) at each landingpad entry.

Reusing __hwasan_handle_vfork instead of introducing a new runtime call
in order to be ABI-compatible with old runtime library.

Reviewers: pcc

Subscribers: kubamracek, hiraditya, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

llvm-svn: 360959

5 years ago[sanitizer] Don't generate "failed to intercept" constants for each function
Vitaly Buka [Thu, 16 May 2019 23:46:15 +0000 (23:46 +0000)]
[sanitizer] Don't generate "failed to intercept" constants for each function

llvm-svn: 360958

5 years ago[Tests] Expand basic lftr coverage
Philip Reames [Thu, 16 May 2019 23:41:28 +0000 (23:41 +0000)]
[Tests] Expand basic lftr coverage

Newly written tests to cover the simple cases.  We don't appear to have broad coverage of this transform anywhere.

llvm-svn: 360957

5 years agoSlightly update the macOS part of status.rst to be less out-of-date.
Adrian Prantl [Thu, 16 May 2019 23:39:08 +0000 (23:39 +0000)]
Slightly update the macOS part of status.rst to be less out-of-date.

llvm-svn: 360956

5 years agoRevert r358069 "Discard debuginfo for object files empty after GC"
Bob Haarman [Thu, 16 May 2019 23:33:06 +0000 (23:33 +0000)]
Revert r358069 "Discard debuginfo for object files empty after GC"

The change broke some scenarios where debug information is still
needed, although MarkLive cannot see it, including the
Chromium/Android build. Reverting to unbreak that build.

llvm-svn: 360955

5 years ago[X86][AsmParser] Ignore "short" even harder in Intel syntax ASM.
David L. Jones [Thu, 16 May 2019 23:27:07 +0000 (23:27 +0000)]
[X86][AsmParser] Ignore "short" even harder in Intel syntax ASM.

In Intel syntax, it's not uncommon to see a "short" modifier on Jcc conditional
jumps, which indicates the offset should be a "short jump" (8-bit immediate
offset from EIP, -128 to +127). This patch expands to all recognized Jcc
condition codes, and removes the inline restriction.

Clang already ignores "jmp short" in inline assembly. However, only "jmp" and a
couple of Jcc are actually checked, and only inline (i.e., not when using the
integrated assembler for asm sources). A quick search through asm-containing
libraries at hand shows a pretty broad range of Jcc conditions spelled with
"short."

GAS ignores the "short" modifier, and instead uses an encoding based on the
given immediate. MS inline seems to do the same, and I suspect MASM does, too.
NASM will yield an error if presented with an out-of-range immediate value.

Example of GCC 9.1 and MSVC v19.20, "jmp short" with offsets that do and do not
fit within 8 bits: https://gcc.godbolt.org/z/aFZmjY

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

llvm-svn: 360954

5 years ago[X86][AsmParser] Rename "ConditionCode" variable to "ConditionPredicate".
David L. Jones [Thu, 16 May 2019 23:27:05 +0000 (23:27 +0000)]
[X86][AsmParser] Rename "ConditionCode" variable to "ConditionPredicate".

This better matches the verbiage in Intel documentation, and should help avoid
confusion between these two different kinds of values, both of which are parsed
from mnemonics.

llvm-svn: 360953

5 years ago[X86] Deduplicate symbol lowering logic, NFC
Reid Kleckner [Thu, 16 May 2019 23:15:26 +0000 (23:15 +0000)]
[X86] Deduplicate symbol lowering logic, NFC

Summary:
This refactors four pieces of code that create SDNodes for references to
symbols:
- normal global address lowering (LEA, MOV, etc)
- callee global address lowering (CALL)
- external symbol address lowering (LEA, MOV, etc)
- external symbol address lowering (CALL)

Each of these pieces of code need to:
- classify the reference
- lower the symbol
- emit a RIP wrapper if needed
- emit a load if needed
- add offsets if needed

I think handling them all in one place will make the code easier to
maintain in the future.

Reviewers: craig.topper, RKSimon

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 360952

5 years agoRemove unneeded alignment spec from builtin_FUNCTION.cpp test
Eric Fiselier [Thu, 16 May 2019 23:07:45 +0000 (23:07 +0000)]
Remove unneeded alignment spec from builtin_FUNCTION.cpp test

llvm-svn: 360951

5 years agoEmit global variables as S_CONSTANT records for codeview debug info.
Amy Huang [Thu, 16 May 2019 22:28:52 +0000 (22:28 +0000)]
Emit global variables as S_CONSTANT records for codeview debug info.

Summary:
This emits S_CONSTANT records for global variables.
Currently this emits records for the global variables already being tracked in the
LLVM IR metadata, which are just constant global variables; we'll also want S_CONSTANTs
for static data members and enums.

Related to https://bugs.llvm.org/show_bug.cgi?id=41615

Reviewers: rnk

Subscribers: aprantl, hiraditya, llvm-commits, thakis

Tags: #llvm

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

llvm-svn: 360948

5 years agoFix failing source location test on Windows
Eric Fiselier [Thu, 16 May 2019 22:21:42 +0000 (22:21 +0000)]
Fix failing source location test on Windows

llvm-svn: 360947

5 years agoAdd Clang shared library with C++ exports
Chris Bieneman [Thu, 16 May 2019 22:06:07 +0000 (22:06 +0000)]
Add Clang shared library with C++ exports

Summary:
This patch adds a libClang_shared library on *nix systems which exports the entire C++ API. In order to support this on Windows we should really refactor llvm-shlib and share code between the two.

This also uses a slightly different method for generating the shared library, which I should back-port to llvm-shlib. Instead of linking the static archives and passing linker flags to force loading the whole libraries, this patch creates object libraries for every library (which has no cost in the build system), and link the object libraries.

Reviewers: tstellar, winksaville

Subscribers: mgorny, cfe-commits

Tags: #clang

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

llvm-svn: 360946

5 years ago[Target] Stop linking against lldbPluginObjCLanguage
Alex Langford [Thu, 16 May 2019 22:01:25 +0000 (22:01 +0000)]
[Target] Stop linking against lldbPluginObjCLanguage

llvm-svn: 360945

5 years agoXFAIL test for new GCC version
Eric Fiselier [Thu, 16 May 2019 21:53:33 +0000 (21:53 +0000)]
XFAIL test for new GCC version

llvm-svn: 360944

5 years agoFix PCC test failures for source location builtins
Eric Fiselier [Thu, 16 May 2019 21:51:39 +0000 (21:51 +0000)]
Fix PCC test failures for source location builtins

llvm-svn: 360943

5 years ago[CodeGen] Fixed de-optimization of legalize subvector extract
Tim Renouf [Thu, 16 May 2019 21:49:06 +0000 (21:49 +0000)]
[CodeGen] Fixed de-optimization of legalize subvector extract

The recent introduction of v3i32 etc as an MVT, and its use in AMDGPU
3-dword memory instructions, caused a de-optimization problem for code
with such a load that then bitcasts via vector of i8, because v12i8 is
not an MVT so it legalizes the bitcast by widening it.

This commit adds the ability to widen a bitcast using extract_subvector
on the result, so the value does not need to go via memory.

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

Change-Id: Ie4abb7760547e54a2445961992eafc78e80d4b64
llvm-svn: 360942

5 years ago[WebAssembly] Move code and data section generation to finalizeContent. NFC.
Sam Clegg [Thu, 16 May 2019 21:36:06 +0000 (21:36 +0000)]
[WebAssembly] Move code and data section generation to finalizeContent. NFC.

Previously these sections were being generated during their
constructors.  This moves the work to finalizeContent, and also does
the same for the relocation sections because their contents depends
on the final layout too.

This change is part of a larger refactor to how we deal with synthetic
sections: https://reviews.llvm.org/D61811

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

llvm-svn: 360941

5 years ago[WebAssembly] Don't generate empty type sections.
Sam Clegg [Thu, 16 May 2019 21:22:43 +0000 (21:22 +0000)]
[WebAssembly] Don't generate empty type sections.

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

llvm-svn: 360940

5 years ago[clang/test] Add missing dependency on llvm-cxxfilt.
David L. Jones [Thu, 16 May 2019 21:13:59 +0000 (21:13 +0000)]
[clang/test] Add missing dependency on llvm-cxxfilt.

This tool is needed by clang/test/CodeGen/Output/ppc-mmintrin.c.

llvm-svn: 360939

5 years agoReland "[Clang][PP] Add the __FILE_NAME__ builtin macro"
Kristina Brooks [Thu, 16 May 2019 21:13:49 +0000 (21:13 +0000)]
Reland "[Clang][PP] Add the __FILE_NAME__ builtin macro"

This relands commit rL360833 which caused issues on Win32
bots due to path handling/normalization differences. Now
this uses `sys::path::filename` which should handle
additional edge cases on Win32.

Original commit:

"[Clang][PP] Add the __FILE_NAME__ builtin macro"

This patch adds the __FILE_NAME__ macro that expands to the
last component of the path, similar to __FILE__ except with
a guarantee that only the last path component (without the
separator) will be rendered.

I intend to follow through with discussion of this with WG14
as a potential inclusion in the C standard or failing that,
try to discuss this with GCC developers since this extension
is desired by GCC and Clang users/developers alike.

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

llvm-svn: 360938

5 years agoImplement __builtin_LINE() et. al. to support source location capture.
Eric Fiselier [Thu, 16 May 2019 21:04:15 +0000 (21:04 +0000)]
Implement __builtin_LINE() et. al. to support source location capture.

Summary:
This patch implements the source location builtins `__builtin_LINE(), `__builtin_FUNCTION()`, `__builtin_FILE()` and `__builtin_COLUMN()`. These builtins are needed to implement [`std::experimental::source_location`](https://rawgit.com/cplusplus/fundamentals-ts/v2/main.html#reflection.src_loc.creation).

With the exception of `__builtin_COLUMN`, GCC also implements these builtins, and Clangs behavior is intended to match as closely as possible.

Reviewers: rsmith, joerg, aaron.ballman, bogner, majnemer, shafik, martong

Reviewed By: rsmith

Subscribers: rnkovacs, loskutov, riccibruno, mgorny, kunitoki, alexr, majnemer, hfinkel, cfe-commits

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

llvm-svn: 360937

5 years ago[Tests] More consolidation of lftr tests
Philip Reames [Thu, 16 May 2019 20:42:00 +0000 (20:42 +0000)]
[Tests] More consolidation of lftr tests

llvm-svn: 360936

5 years ago[Test] Remove a bunch of cruft from a test
Philip Reames [Thu, 16 May 2019 20:37:20 +0000 (20:37 +0000)]
[Test] Remove a bunch of cruft from a test

This test hadn't been fully reduced, so do so.

llvm-svn: 360935

5 years ago[Tests] Start consolidating lftr tests into a single file
Philip Reames [Thu, 16 May 2019 20:33:41 +0000 (20:33 +0000)]
[Tests] Start consolidating lftr tests into a single file

llvm-svn: 360934

5 years ago[Tests] Autogen the last lftr test
Philip Reames [Thu, 16 May 2019 20:24:57 +0000 (20:24 +0000)]
[Tests] Autogen the last lftr test

llvm-svn: 360933

5 years ago[Tests] Autogen a few more lftr tests for readability
Philip Reames [Thu, 16 May 2019 20:19:02 +0000 (20:19 +0000)]
[Tests] Autogen a few more lftr tests for readability

llvm-svn: 360932

5 years ago[Tests] Autogen a few lftr test in preparation for merging
Philip Reames [Thu, 16 May 2019 20:15:25 +0000 (20:15 +0000)]
[Tests] Autogen a few lftr test in preparation for merging

llvm-svn: 360931

5 years agoFactor out switch statement into a helper function (NFC)
Adrian Prantl [Thu, 16 May 2019 20:03:05 +0000 (20:03 +0000)]
Factor out switch statement into a helper function (NFC)

This addresses post-commit review feedback for https://reviews.llvm.org/D62015.

llvm-svn: 360930

5 years agoMake sure GetObjectDescription falls back to the Objective-C runtime.
Adrian Prantl [Thu, 16 May 2019 19:21:31 +0000 (19:21 +0000)]
Make sure GetObjectDescription falls back to the Objective-C runtime.

This fixes an unintended regression introduced by
https://reviews.llvm.org/D61451 by making sure the Objective-C runtime
is also tried when the "correct" language runtime failed to return an
object description.

rdar://problem/50791055

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

llvm-svn: 360929

5 years ago[NFC][InstSimplify] Update fast-math.ll tests I botched in r360808.
Cameron McInally [Thu, 16 May 2019 19:00:57 +0000 (19:00 +0000)]
[NFC][InstSimplify] Update fast-math.ll tests I botched in r360808.

These were new tests I added in r360808. I made a mistake while converting the exisiting binary FNeg test into the new unary FNeg tests. Correct that.

llvm-svn: 360928

5 years ago[TSan][libdispatch] Use FileCheck's --implicit-check-not=...
Julian Lettner [Thu, 16 May 2019 18:57:36 +0000 (18:57 +0000)]
[TSan][libdispatch] Use FileCheck's --implicit-check-not=...

Use FileCheck's --implicit-check-not='ThreadSanitizer' which increases
the strictness of our tests a bit. NFC.

```
CHECK: start
CHECK-NOT: ThreadSanitizer
CHECK: done
```

With --implicit-check-not, the above is turned into:

```
CHECK-NOT: ThreadSanitizer
CHECK: start
CHECK-NOT: ThreadSanitizer
CHECK: done
CHECK-NOT: ThreadSanitizer
```

llvm-svn: 360927

5 years ago[ORC] Change handling for SymbolStringPtr tombstones and empty keys.
Lang Hames [Thu, 16 May 2019 18:29:34 +0000 (18:29 +0000)]
[ORC] Change handling for SymbolStringPtr tombstones and empty keys.

SymbolStringPtr used to use nullptr as its empty value and (since it performed
ref-count operations on any non-nullptr) a pointer to a special pool-entry
instance as its tombstone.

This commit changes the scheme to use two invalid pointer values as the empty
and tombstone values, and broadens the ref-count guard to prevent ref-counting
operations from being performed on these pointers. This should improve the
performance of SymbolStringPtrs used in DenseMaps/DenseSets, as ref counting
operations will no longer be performed on the tombstone.

llvm-svn: 360925

5 years ago[X86] Stop implicitly enabling avx512vl when avx512bf16 is enabled.
Craig Topper [Thu, 16 May 2019 18:28:17 +0000 (18:28 +0000)]
[X86] Stop implicitly enabling avx512vl when avx512bf16 is enabled.

Previously we were doing this so that the 256 bit selectw builtin could be used in the implementation of the 512->256 bit conversion intrinsic.

After this commit we now use a masked convert builtin that will emit the intrinsic call and the 256-bit select from custom code in CGBuiltin. Then the header only needs to call that one intrinsic.

llvm-svn: 360924

5 years ago[InstCombine] add tests for shuffle of insert subvectors; NFC
Sanjay Patel [Thu, 16 May 2019 18:09:47 +0000 (18:09 +0000)]
[InstCombine] add tests for shuffle of insert subvectors; NFC

llvm-svn: 360923

5 years agoUpdate comments on enums
Stephen Kelly [Thu, 16 May 2019 18:02:36 +0000 (18:02 +0000)]
Update comments on enums

llvm-svn: 360922

5 years agoFix typos in comment.
Joerg Sonnenberger [Thu, 16 May 2019 18:01:57 +0000 (18:01 +0000)]
Fix typos in comment.

llvm-svn: 360921

5 years agoMove TraversalKind enum to ast_type_traits
Stephen Kelly [Thu, 16 May 2019 17:57:38 +0000 (17:57 +0000)]
Move TraversalKind enum to ast_type_traits

Summary:
Make it usable outside of ASTMatchFinder.  This will make it possible to
use this enum to control whether certain implicit nodes are skipped
while AST dumping for example.

Reviewers: klimek, aaron.ballman

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 360920

5 years agoFixed second issue reported in https://bugs.llvm.org/show_bug.cgi?id=41584.
Andrey Churbanov [Thu, 16 May 2019 17:52:53 +0000 (17:52 +0000)]
Fixed second issue reported in https://bugs.llvm.org/show_bug.cgi?id=41584.

Added synchronization for possible concurrent initialization of mutexes
by multiple threads. The need of synchronization caused by commit r357927
which added the use of mutexes at threads movement to/from common pool
(earlier the mutexes were used only at suspend/resume).

Patch by Johnny Peyton.

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

llvm-svn: 360919

5 years ago[X86] Update doxygen comments for AVX512BF16 to not refer to masks as 'immediates...
Craig Topper [Thu, 16 May 2019 17:34:35 +0000 (17:34 +0000)]
[X86] Update doxygen comments for AVX512BF16 to not refer to masks as 'immediates'. Refer to parameter names instead of 'src', 'src1', 'src2'. NFC

llvm-svn: 360918

5 years ago[ORC] Use inline friend definitions for SymbolStringPtr operators.
Lang Hames [Thu, 16 May 2019 17:20:17 +0000 (17:20 +0000)]
[ORC] Use inline friend definitions for SymbolStringPtr operators.

llvm-svn: 360917

5 years ago[IRExecutionUnit] Remove static_assert
Jonas Devlieghere [Thu, 16 May 2019 16:54:41 +0000 (16:54 +0000)]
[IRExecutionUnit] Remove static_assert

This doesn't make sense on platforms other than 64 bit.

llvm-svn: 360916

5 years ago[X86] Use 0x9 instead of 0x1 as the immediate in some masked floor pattern. Similarly...
Craig Topper [Thu, 16 May 2019 16:53:50 +0000 (16:53 +0000)]
[X86] Use 0x9 instead of 0x1 as the immediate in some masked floor pattern. Similarly change 0x2 to 0xA for ceil.

This suppresses exceptions which is what we should be doing for ceil and floor. We already use the correct immediate
in patterns without masking.

llvm-svn: 360915

5 years ago[libFuzzer] Disable merge-sigusr.test on linux.
Matt Morehouse [Thu, 16 May 2019 16:42:45 +0000 (16:42 +0000)]
[libFuzzer] Disable merge-sigusr.test on linux.

Make buildbot green while I rethink the test.

llvm-svn: 360914

5 years ago[CommandLine] Don't allow duplicate categories.
Don Hinton [Thu, 16 May 2019 16:25:13 +0000 (16:25 +0000)]
[CommandLine] Don't allow duplicate categories.

Summary:
This is a fix to D61574, r360179, that allowed duplicate
OptionCategory's.  This change adds a check to make sure a category can
only be added once even if the user passes it twice.

Reviewed By: MaskRay

Tags: #llvm

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

llvm-svn: 360913

5 years ago[CodeComplete] Complete enumerators when preferred type is an enum
Ilya Biryukov [Thu, 16 May 2019 16:06:57 +0000 (16:06 +0000)]
[CodeComplete] Complete enumerators when preferred type is an enum

Reviewers: kadircet

Reviewed By: kadircet

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 360912

5 years agoImprove the test coverage for std::is_base_of
Marshall Clow [Thu, 16 May 2019 15:56:26 +0000 (15:56 +0000)]
Improve the test coverage for std::is_base_of

llvm-svn: 360911

5 years ago[analyzer] Add a test plugin for checker option handling
Kristof Umann [Thu, 16 May 2019 15:55:07 +0000 (15:55 +0000)]
[analyzer] Add a test plugin for checker option handling

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

llvm-svn: 360910

5 years ago[llvm-objdump]Move test code missed in r360904
James Henderson [Thu, 16 May 2019 15:20:08 +0000 (15:20 +0000)]
[llvm-objdump]Move test code missed in r360904

llvm-svn: 360909

5 years agoMinidump: Add support for the MemoryList stream
Pavel Labath [Thu, 16 May 2019 15:17:30 +0000 (15:17 +0000)]
Minidump: Add support for the MemoryList stream

Summary:
the stream format is exactly the same as for ThreadList and ModuleList
streams, only the entry types are slightly different, so the changes in
this patch are just straight-forward applications of established
patterns.

Reviewers: amccarth, jhenderson, clayborg

Subscribers: markmentovai, lldb-commits, llvm-commits

Tags: #llvm

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

llvm-svn: 360908

5 years agoftime-trace as a CoreOption
Alexandre Ganea [Thu, 16 May 2019 15:14:01 +0000 (15:14 +0000)]
ftime-trace as a CoreOption

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

llvm-svn: 360907

5 years agoAMDGPU: Introduce TokenFactor for ABI register copies in call sequence
Matt Arsenault [Thu, 16 May 2019 15:10:27 +0000 (15:10 +0000)]
AMDGPU: Introduce TokenFactor for ABI register copies in call sequence

The call was missing chain dependencies on the pre-call copies. I
don't think this was causing any real issues however.

llvm-svn: 360906

5 years ago[InstSimplify] add tests for fcmp of maxnum with constants; NFC
Sanjay Patel [Thu, 16 May 2019 15:00:11 +0000 (15:00 +0000)]
[InstSimplify] add tests for fcmp of maxnum with constants; NFC

Sibling tests for rL360899 (D61691).

llvm-svn: 360905

5 years ago[llvm-objdump]Split section-filter.test in two to remove X86 dependency
James Henderson [Thu, 16 May 2019 14:49:10 +0000 (14:49 +0000)]
[llvm-objdump]Split section-filter.test in two to remove X86 dependency

This allows the generic parts of section-filter.test to be tested on all
targets. The X86-specific parts have been moved to another test.

llvm-svn: 360904

5 years agoAMDGPU: Assume xnack is enabled by default
Matt Arsenault [Thu, 16 May 2019 14:48:34 +0000 (14:48 +0000)]
AMDGPU: Assume xnack is enabled by default

This is the conservatively correct default. It is always safe to
assume xnack is enabled, but not the converse.

Introduce a feature to blacklist targets where xnack can never be
meaningfully enabled. I'm not sure the targets this is applied to is
100% correct.

llvm-svn: 360903

5 years agoResubmit: [Salvage] Change salvage debug info implementation to use DW_OP_LLVM_conver...
Stephen Tozer [Thu, 16 May 2019 14:41:01 +0000 (14:41 +0000)]
Resubmit: [Salvage] Change salvage debug info implementation to use DW_OP_LLVM_convert where needed

Fixes issue: https://bugs.llvm.org/show_bug.cgi?id=40645

Previously, LLVM had no functional way of performing casts inside of a
DIExpression(), which made salvaging cast instructions other than Noop casts
impossible. With the recent addition of DW_OP_LLVM_convert this salvaging is
now possible, and so can be used to fix the attached bug as well as any cases
where SExt instruction results are lost in the debugging metadata. This patch
introduces this fix by expanding the salvage debug info method to cover these
cases using the new operator.

Differential revision: https://reviews.llvm.org/D61184

llvm-svn: 360902

5 years ago[llvm-objdump] Add "REQUIES: x86-registered-target" to section-filter.test after...
Fangrui Song [Thu, 16 May 2019 14:40:31 +0000 (14:40 +0000)]
[llvm-objdump] Add "REQUIES: x86-registered-target" to section-filter.test after rL360893

Appease the hexagon buildbot that doesn't build X86. Disassemblers
require Target/X86 support.

llvm-svn: 360901

5 years agoAdd AIX Version Macros
Xing Xue [Thu, 16 May 2019 14:22:37 +0000 (14:22 +0000)]
Add AIX Version Macros

Summary:
- This patch checks the AIX version and defines the appropriate macros.
- Follow up to a comment on D59048.

Author: andusy

Reviewers: hubert.reinterpretcast, jasonliu, sfertile, xingxue

Reviewed By: sfertile

Subscribers: jsji, cfe-commits

Tags: #clang

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

llvm-svn: 360900

5 years ago[InstSimplify] fold fcmp (minnum, X, C1), C2
Sanjay Patel [Thu, 16 May 2019 14:03:10 +0000 (14:03 +0000)]
[InstSimplify] fold fcmp (minnum, X, C1), C2
   minnum(X, LesserC) == C --> false
   minnum(X, LesserC) >= C --> false
   minnum(X, LesserC) >  C --> false
   minnum(X, LesserC) != C --> true
   minnum(X, LesserC) <= C --> true
   minnum(X, LesserC) <  C --> true

maxnum siblings will follow if there are no problems here.

We should be able to perform some other combines when the constants
are equal or greater-than too, but that would go in instcombine.

We might also generalize this by creating an FP ConstantRange
(similar to what we do for integers).

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

llvm-svn: 360899

5 years agoFixes for builds that require strict X/Open and POSIX compatiblity
Xing Xue [Thu, 16 May 2019 14:02:13 +0000 (14:02 +0000)]
Fixes for builds that require strict X/Open and POSIX compatiblity

Summary:
- Use alternative to MAP_ANONYMOUS for allocating mapped memory if it isn't available
- Use strtok_r instead of strsep as part of getting program path
- Don't try to find the width of a terminal using "struct winsize" and TIOCGWINSZ on POSIX builds. These aren't defined under POSIX (even though some platforms make them available when they shouldn't), so just check if we are doing a X/Open or POSIX compliant build first.

Author: daltenty

Reviewers: hubert.reinterpretcast, xingxue, andusy

Reviewed By: hubert.reinterpretcast

Subscribers: MaskRay, jsji, hiraditya, kristina, llvm-commits

Tags: #llvm

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

llvm-svn: 360898

5 years ago[RISCV][NFC] Add nounwind attribute to functions missing it in test/CodeGen/RISCV
Alex Bradbury [Thu, 16 May 2019 13:56:23 +0000 (13:56 +0000)]
[RISCV][NFC] Add nounwind attribute to functions missing it in test/CodeGen/RISCV

This is in preparation for emitting CFI directives.

llvm-svn: 360897

5 years ago[clang] Handle lround/llround builtins
Adhemerval Zanella [Thu, 16 May 2019 13:43:25 +0000 (13:43 +0000)]
[clang] Handle lround/llround builtins

As for other floating-point rounding builtins that can be optimized
when build with -fno-math-errno, this patch adds support for lround
and llround.  It currently only optimize for AArch64 backend.

Reviewed By: efriedma

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

llvm-svn: 360896

5 years ago[tests][go]Add -stdlib=libc++ to build GO test if LLVM is built with libc++
Xing Xue [Thu, 16 May 2019 13:32:55 +0000 (13:32 +0000)]
[tests][go]Add -stdlib=libc++ to build GO test if LLVM is built with libc++

When libc++ is used to build LLVM libraries, these libraries have dependencies on libc++ and C++ STL signatures in these libraries are corresponding to libc++ implementation. Therefore, -stdlib=libc++ is required on the C++ compiler command for building GO tests that link with these LLVM libraries.

Reviewers: hubert.reinterpretcast, sfertile, amyk, EricWF

Reviewed By: sfertile, hubert.reinterpretcast

Subscribers: jsji, llvm-commits

Tags: #llvm

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

llvm-svn: 360895

5 years ago[AArch64] Handle ISD::LROUND and ISD::LLROUND
Adhemerval Zanella [Thu, 16 May 2019 13:30:18 +0000 (13:30 +0000)]
[AArch64] Handle ISD::LROUND and ISD::LLROUND

This patch optimizes ISD::LROUND and ISD::LLROUND to fcvtas
instruction. It currently only handles the scalar version.

llvm-svn: 360894