platform/upstream/llvm.git
4 years agoFix buildbots #2 after aa1eb5152d9a5bd588c8479a376fa65cbeabbc9f.
Alexey Lapshin [Tue, 12 May 2020 22:20:33 +0000 (01:20 +0300)]
Fix buildbots #2 after aa1eb5152d9a5bd588c8479a376fa65cbeabbc9f.

4 years agoPowerPC: Treat llvm.fma.f* intrinsic as using CTR with SPE
Justin Hibbits [Sun, 19 Apr 2020 04:09:30 +0000 (23:09 -0500)]
PowerPC: Treat llvm.fma.f* intrinsic as using CTR with SPE

Summary:
The SPE doesn't have a 'fma' instruction, so the intrinsic becomes a
libcall.  It really should become an expansion to two instructions, but
for some reason the compiler doesn't think that's as optimal as a
branch.  Since this lowering is done after CTR is allocated for loops,
tell the optimizer that CTR may be used in this case.  This prevents a
"Invalid PPC CTR loop!" assertion in the case that a fma() function call
is used in a C/C++ file, and clang converts it into an intrinsic.

Reviewed By: shchenz
Differential Revision: https://reviews.llvm.org/D78668

4 years agoFix buildbots after aa1eb5152d9a5bd588c8479a376fa65cbeabbc9f.
Alexey Lapshin [Tue, 12 May 2020 22:10:32 +0000 (01:10 +0300)]
Fix buildbots after aa1eb5152d9a5bd588c8479a376fa65cbeabbc9f.

4 years ago[SampleFDO] Rename llvm-profdata flag -partial-profile to -gen-partial-profile.
Wei Mi [Tue, 12 May 2020 21:48:22 +0000 (14:48 -0700)]
[SampleFDO] Rename llvm-profdata flag -partial-profile to -gen-partial-profile.

The internal flag -partial-profile in llvm conflicts with the flag with
the same name in llvm-profdata. The conflict happens in builds with
LLVM_LINK_LLVM_DYLIB enabled. In this case the tools are linked with libLLVM
and we end up with two definitions for the same cl::opt.

The patch renames llvm-profdata flag -partial-profile to -gen-partial-profile.

4 years ago[VirtualFileSystem] Add unit test that showcases another YAMLVFSWriter bug
Jonas Devlieghere [Tue, 12 May 2020 21:55:17 +0000 (14:55 -0700)]
[VirtualFileSystem] Add unit test that showcases another YAMLVFSWriter bug

This scenario generates another broken YAML mapping as illustrated below.

  {
    'type': 'directory',
    'name': "c",
    'contents': [
      ,
      {
        'type': 'directory',
        'name': "d",
        'contents': [
          ,
          {
            'type': 'directory',
            'name': "e",
            'contents': [
              {
                'type': 'file',
                'name': "f",
                'external-contents': "//root/a/c/d/e/f"
              }                    {
                'type': 'file',
                'name': "g",
                'external-contents': "//root/a/c/d/e/g"
              }
            ]
          }
        ]
      }
    ]
  },

4 years ago[VirtualFileSystem] Add unit test that showcases YAMLVFSWriter bug
Jonas Devlieghere [Tue, 12 May 2020 21:46:23 +0000 (14:46 -0700)]
[VirtualFileSystem] Add unit test that showcases YAMLVFSWriter bug

This scenario generates a broken YAML mapping as illustrated below.

 {
   'type': 'directory',
   'name': "c",
   'contents': [
     {
       'type': 'file',
       'name': "d",
       'external-contents': "//root/a/c/d"
     }            {
       'type': 'file',
       'name': "e",
       'external-contents': "//root/a/c/e"
     }            {
       'type': 'file',
       'name': "f",
       'external-contents': "//root/a/c/f"
     }
   ]
 },

4 years ago[X86][ISelLowering] refactor Varargs handling in X86ISelLowering.cpp
Alexey Lapshin [Wed, 12 Feb 2020 17:47:39 +0000 (20:47 +0300)]
[X86][ISelLowering] refactor Varargs handling in X86ISelLowering.cpp

Summary:
This patch refactors handling of VarArgs in
X86TargetLowering::LowerFormalArguments.
That refactoring was requested while reviewing
D69372. Code related to varargs handling is removed
from X86TargetLowering::LowerFormalArguments and
is divided into smaller routines.

Reviewed By: aeubanks

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

4 years ago[TargetLoweringObjectFileImpl] Produce .text.hot. instead of .text.hot for -fno-uniqu...
Fangrui Song [Thu, 7 May 2020 21:00:24 +0000 (14:00 -0700)]
[TargetLoweringObjectFileImpl] Produce .text.hot. instead of .text.hot for -fno-unique-section-names

GNU ld's internal linker script uses (https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=add44f8d5c5c05e08b11e033127a744d61c26aee)

  .text           :
  {
    *(.text.unlikely .text.*_unlikely .text.unlikely.*)
    *(.text.exit .text.exit.*)
    *(.text.startup .text.startup.*)
    *(.text.hot .text.hot.*)
    *(SORT(.text.sorted.*))
    *(.text .stub .text.* .gnu.linkonce.t.*)
    /* .gnu.warning sections are handled specially by elf.em.  */
    *(.gnu.warning)
  }

Because `*(.text.exit .text.exit.*)` is ordered before `*(.text .text.*)`, in a -ffunction-sections build, the C library function `exit` will be placed before other functions.
gold's `-z keep-text-section-prefix` has the same problem.

In lld, `-z keep-text-section-prefix` recognizes `.text.{exit,hot,startup,unlikely,unknown}.*`, but not `.text.{exit,hot,startup,unlikely,unknown}`, to avoid the strange placement problem.

In -fno-function-sections or -fno-unique-section-names mode, a function whose `function_section_prefix` is set to `.exit"`
will go to the output section `.text` instead of `.text.exit` when linked by lld.
To address the problem, append a dot to become `.text.exit.`

Reviewed By: grimar

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

4 years ago[libc++abi] Adjust XFAIL on macOS for bug that was fixed in recent OSes
Louis Dionne [Tue, 12 May 2020 20:57:53 +0000 (16:57 -0400)]
[libc++abi] Adjust XFAIL on macOS for bug that was fixed in recent OSes

4 years ago[Attributor] Fixup block addresses after rewriting function signature
Sergey Dmitriev [Tue, 12 May 2020 20:31:03 +0000 (13:31 -0700)]
[Attributor] Fixup block addresses after rewriting function signature

Reviewers: jdoerfert, sstefan1, uenoku

Reviewed By: jdoerfert

Subscribers: hiraditya, uenoku, llvm-commits

Tags: #llvm

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

4 years agoPR45589: Properly decompose overloaded `&&` and `||` operators in
Richard Smith [Tue, 12 May 2020 20:14:32 +0000 (13:14 -0700)]
PR45589: Properly decompose overloaded `&&` and `||` operators in
constraint expressions.

We create overloaded `&&` and `||` operators to hold the possible
unqualified lookup results (if any) when the operands are dependent. We
could avoid building these in some cases (we will never use the stored
lookup results, and it would be better to not store them or perform the
lookups), but in the general case we will probably still need to handle
overloaded operators even with that optimization.

4 years ago[MLIR] Fix dependencies for Analysis libraries
Stephen Neuendorffer [Tue, 12 May 2020 20:37:31 +0000 (13:37 -0700)]
[MLIR] Fix dependencies for Analysis libraries

cmake does not truly support dependencies on automatically generated files
which are not in the same directory as the targets which depend on them.
It works with ninja, but doesn't work with make

This patch adds an explicit dependence so that all dialects are built
before the analysis libraries.

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

4 years ago[analyzer] SATestBuild.py: Fix support for #NOPREFIX.
Artem Dergachev [Tue, 12 May 2020 19:43:32 +0000 (22:43 +0300)]
[analyzer] SATestBuild.py: Fix support for #NOPREFIX.

Regressed in ec2d93c.

4 years ago[MLIR] Rename SideEffects.td -> SideEffectInterfaces.td
Stephen Neuendorffer [Wed, 6 May 2020 19:52:00 +0000 (12:52 -0700)]
[MLIR] Rename SideEffects.td -> SideEffectInterfaces.td

This normalize the name of the tablegen file with the name of the generated
files (SideEffectInterfaces.h.inc) and the other Interface tablegen files,
which all end in Interface(s).td

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

4 years ago[lldb/Driver] Support terminal resizing
Fred Riss [Fri, 8 May 2020 22:14:14 +0000 (15:14 -0700)]
[lldb/Driver] Support terminal resizing

Summary:
The comment in the Editine.h header made it sound like editline was
just unable to handle terminal resizing. We were not ever telling
editline that the terminal had changed size, which might explain why
it wasn't working.

This patch threads a `TerminalSizeChanged()` callback through the
IOHandler and invokes it from the SIGWINCH handler in the driver. Our
`Editline` class already had a `TerminalSizeChanged()` method which
was invoked only when editline was configured.

This patch also changes `Editline` to not apply the changes right away
in `TerminalSizeChanged()`, but instead defer that to the next
character read. During my testing, it happened once that the signal
was received while our `ConnectionFileDescriptor::Read` was allocating
memory. As `el_resize` seems to allocate memory too, this crashed.

Reviewers: labath, teemperor

Subscribers: lldb-commits

Tags: #lldb

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

4 years agoAvoid binding pointers to "auto&" (by dereferencing the pointer that's non-null anyway)
David Blaikie [Tue, 12 May 2020 18:39:01 +0000 (11:39 -0700)]
Avoid binding pointers to "auto&" (by dereferencing the pointer that's non-null anyway)

Based on @djtodoro's 2552dc5317e0

4 years ago[libcxx] Re-commit: shared_ptr changes from library fundamentals (P0414R2).
zoecarver [Tue, 12 May 2020 01:42:50 +0000 (18:42 -0700)]
[libcxx] Re-commit: shared_ptr changes from library fundamentals (P0414R2).

Implements P0414R2:
  * Adds support for array types in std::shared_ptr.
  * Adds reinterpret_pointer_cast for shared_ptr.

Re-committing now that the leaking tests are fixed.

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

4 years ago[PowerPC] Fold redundant load immediates of zero and delete if possible
Kamau Bridgeman [Tue, 12 May 2020 18:15:06 +0000 (13:15 -0500)]
[PowerPC] Fold redundant load immediates of zero and delete if possible

This patch folds redundant load immediates into a zero for instructions
which recognise this as the value zero and not the register. If the load
immediate is no longer in use it is then deleted.

This is already done in earlier passes but the ppc-mi-peephole allows for
a more general implementation.

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

4 years ago[Reproducers] Serialize process arguments in ProcessInfo
Jonas Devlieghere [Tue, 12 May 2020 17:28:27 +0000 (10:28 -0700)]
[Reproducers] Serialize process arguments in ProcessInfo

While debugging why TestProcessList.py failed during passive replay, I
remembered that we don't serialize the arguments for ProcessInfo. This
is necessary to make the test pass and to make platform process list -v
behave the same during capture and replay.

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

4 years ago[FileCollector][NFC] Add comments
Jan Korous [Fri, 8 May 2020 23:29:17 +0000 (16:29 -0700)]
[FileCollector][NFC] Add comments

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

4 years ago[ValueTracking] Let propagatesPoison support binops/unaryops/cast/etc.
Juneyoung Lee [Mon, 20 Apr 2020 15:35:45 +0000 (00:35 +0900)]
[ValueTracking] Let propagatesPoison support binops/unaryops/cast/etc.

Summary:
This patch makes propagatesPoison be more accurate by returning true on
more bin ops/unary ops/casts/etc.

The changed test in ScalarEvolution/nsw.ll was introduced by
https://github.com/llvm/llvm-project/commit/a19edc4d15b0dae0210b90615775edd76f021008 .
IIUC, the goal of the tests is to show that iv.inc's SCEV expression still has
no-overflow flags even if the loop isn't in the wanted form.
It becomes more accurate with this patch, so think this is okay.

Reviewers: spatel, lebedev.ri, jdoerfert, reames, nikic, sanjoy

Reviewed By: spatel, nikic

Subscribers: regehr, nlopes, efriedma, fhahn, javed.absar, llvm-commits, hiraditya

Tags: #llvm

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

4 years ago[X86] Remove the v16i8->v16i16 path for MULHS with AVX2.
Craig Topper [Tue, 12 May 2020 17:10:42 +0000 (10:10 -0700)]
[X86] Remove the v16i8->v16i16 path for MULHS with AVX2.

We have a couple main strategies for legalizing MULH.

-If the vXi16 type is legal, extend to do the full i16 multiply
and then shift and truncate the results.
-Use unpcks to split each 128 bit lane into high and low halves.a

For signed we have an extra case to split a v32i8 to v16i8 and then
use the extending to v16i16 strategy.

This patch proposes to use the unpck strategy instead. Which is
what we already do for unsigned.

This seems to be 1 instruction shorter when the RHS is constant
like the idiv case. It's 1 instruction longer for the smulo case.
But we're trading cross lane shuffles for inlane shuffles and a
shift.

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

4 years ago[arm] Add big-endian version of pcrel fixups for adr instructions
Dimitry Andric [Tue, 12 May 2020 10:33:15 +0000 (12:33 +0200)]
[arm] Add big-endian version of pcrel fixups for adr instructions

Summary:
In 2e24219d3cbf, a number of ARM pcrel fixups were resolved at assembly
time, to solve PR44929. This only covered little-endian ARM however, so
add similar fixups for big-endian ARM. Also extend the test case to
cover big-endian ARM.

Reviewers: hans, psmith, MaskRay

Reviewed By: psmith, MaskRay

Subscribers: kristof.beyls, hiraditya, danielkiss, emaste, llvm-commits

Tags: #llvm

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

4 years ago[AMDGPU] Add AGPRs to getRegClassForSizeOnBank
Austin Kerbow [Tue, 12 May 2020 03:30:10 +0000 (20:30 -0700)]
[AMDGPU] Add AGPRs to getRegClassForSizeOnBank

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

4 years ago[CodeGen] Use Align in MachineConstantPool.
Craig Topper [Tue, 12 May 2020 16:43:24 +0000 (09:43 -0700)]
[CodeGen] Use Align in MachineConstantPool.

4 years ago[VectorCombine] add test to check for iterative improvements; NFC
Sanjay Patel [Tue, 12 May 2020 16:48:51 +0000 (12:48 -0400)]
[VectorCombine] add test to check for iterative improvements; NFC

4 years ago[WebAssembly] Implement pseudo-min/max SIMD instructions
Thomas Lively [Tue, 12 May 2020 16:39:01 +0000 (09:39 -0700)]
[WebAssembly] Implement pseudo-min/max SIMD instructions

Summary:
As proposed in https://github.com/WebAssembly/simd/pull/122. Since
these instructions are not yet merged to the SIMD spec proposal, this
patch makes them entirely opt-in by surfacing them only through LLVM
intrinsics and clang builtins. If these instructions are made
official, these intrinsics and builtins should be replaced with simple
instruction patterns.

Reviewers: aheejin

Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

4 years ago[gcov][test] Fix clang test
Fangrui Song [Tue, 12 May 2020 16:21:19 +0000 (09:21 -0700)]
[gcov][test] Fix clang test

4 years ago[gcov] Default coverage version to '408*' and delete CC1 option -coverage-exit-block...
Fangrui Song [Tue, 12 May 2020 06:20:33 +0000 (23:20 -0700)]
[gcov] Default coverage version to '408*' and delete CC1 option -coverage-exit-block-before-body

gcov 4.8 (r189778) moved the exit block from the last to the second.
The .gcda format is compatible with 4.7 but

* decoding libgcov 4.7 produced .gcda with gcov [4.7,8) can mistake the
  exit block, emit bogus `%s:'%s' has arcs from exit block\n` warnings,
  and print wrong `" returned %s` for branch statistics (-b).
* decoding libgcov 4.8 produced .gcda with gcov 4.7 has similar issues.

Also, rename "return block" to "exit block" because the latter is the
appropriate term.

4 years ago[PassBuilder] Moved ProfileSummaryAnalysis in buildInlinerPipeline.
Whitney Tsang [Tue, 12 May 2020 15:56:14 +0000 (15:56 +0000)]
[PassBuilder] Moved ProfileSummaryAnalysis in buildInlinerPipeline.

Summary:
As commented in the code, ProfileSummaryAnalysis is required for inliner
pass to query, so this patch moved
RequireAnalysisPass<ProfileSummaryAnalysis> in the recently created
buildInlinerPipeline.
Reviewer: mtrofin, davidxl, tejohnson, dblaikie, jdoerfert, sstefan1
Reviewed By: mtrofin, davidxl, jdoerfert
Subscribers: hiraditya, steven_wu, dexonsmith, wuzish, llvm-commits,
jsji
Tag: LLVM
Differential Revision: https://reviews.llvm.org/D79696

4 years ago[GlobalISel][IRTranslator] Fix <1 x Ty> handling in ConstantExprs
Jay Foad [Fri, 17 Apr 2020 15:17:26 +0000 (16:17 +0100)]
[GlobalISel][IRTranslator] Fix <1 x Ty> handling in ConstantExprs

Summary:
ConstantExprs involving operations on <1 x Ty> could translate into MIR
that failed to verify with:
*** Bad machine code: Reading virtual register without a def ***

The problem was that translate(const Constant &C, Register Reg) had
recursive calls that passed the same Reg in for the translation of a
subexpression, but without updating VMap for the subexpression first as
translate(const Constant &C, Register Reg) expects.

Fix this by using the same translateCopy helper function that we use for
translating Instructions. In some cases this causes extra G_COPY
MIR instructions to be generated.

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

Reviewers: arsenm, volkan, t.p.northover, aditya_nandakumar

Subscribers: jvesely, wdng, nhaehnle, rovka, hiraditya, kerbowa, llvm-commits

Tags: #llvm

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

4 years ago[GlobalISel][IRTranslator] New helper function translateCopy. NFC.
Jay Foad [Fri, 17 Apr 2020 13:36:01 +0000 (14:36 +0100)]
[GlobalISel][IRTranslator] New helper function translateCopy. NFC.

Reviewers: arsenm, volkan, t.p.northover, aditya_nandakumar

Subscribers: wdng, rovka, hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[Matrix] Check non-dependent elt type before creating DepSizedMatrix.
Florian Hahn [Tue, 12 May 2020 15:37:01 +0000 (16:37 +0100)]
[Matrix] Check non-dependent elt type before creating DepSizedMatrix.

We should check non-dependent element types before creating a
DependentSizedMatrixType. Otherwise we do not generate an error message
for dependent-sized matrix types with invalid non-dependent element
types, if the template is never instantiated. See the make5 struct in
the tests.

It also moves the SEMA template tests to
clang/test/SemaTemplate/matrix-type.cpp and introduces a few more test
cases.

4 years ago[docs] Corrected inaccuracies in Common Problems section.
Michael Kruse [Tue, 12 May 2020 14:44:34 +0000 (09:44 -0500)]
[docs] Corrected inaccuracies in Common Problems section.

Changed the language in LLVM_USE_LINKER to more strongly recommend LLD
and to specify that the GNU gold linker is only useful if LLD is
unavailable in binary form and it is the first build of LLVM. Added that
LLD will help when used on ELF-based platforms.

Corrected information in CMAKE_BUILD_TYPE regarding the Release build
type and enabling assertions.

Added option LLVM_ENABLE_ASSERTIONS and mentioned enabling this option
with a Release build as an alternative to using a Debug build.

Specified that the LLVM_OPTIMIZED_TABLEGEN
option is only for Debug builds, that the LLVM_USE_SPLIT_DWARF option
is only available on ELF host platforms, and that setting
CLANG_ENABLE_STATIC_ANALYZER to OFF only slightly improves build time.

These changes address comments made in D75425.

Reviewed By: Meinersbur

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

4 years ago[lld-macho] Add support for creating and reading reexported dylibs
Jez Ng [Fri, 24 Apr 2020 03:16:49 +0000 (20:16 -0700)]
[lld-macho] Add support for creating and reading reexported dylibs

This unblocks the linking of real programs, since many core system
functions are only available as sub-libraries of libSystem.

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

4 years ago[lld-macho] Re-add dylink-lazy test
Jez Ng [Tue, 12 May 2020 14:29:15 +0000 (07:29 -0700)]
[lld-macho] Re-add dylink-lazy test

This reverts commit eb81de2de4003e3045fdf743e093f77e37aee9bf; the
test commands just needed to be run under llvm-lit.

4 years agoAdd comment for SelectionDAGBuilder::SL field.
James Y Knight [Tue, 12 May 2020 04:22:54 +0000 (00:22 -0400)]
Add comment for SelectionDAGBuilder::SL field.

4 years ago[clangd] Add metrics for selection tree and recovery expressions.
Haojian Wu [Mon, 11 May 2020 09:02:34 +0000 (11:02 +0200)]
[clangd] Add metrics for selection tree and recovery expressions.

Reviewers: sammccall

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

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

4 years ago[AMDGPU] Order pos exports before param exports
Carl Ritson [Tue, 12 May 2020 14:02:05 +0000 (23:02 +0900)]
[AMDGPU] Order pos exports before param exports

Summary:
Modify export clustering DAG mutation to move position exports
before other exports types.

Reviewers: foad, arsenm, rampitec, nhaehnle

Reviewed By: foad

Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, hiraditya, kerbowa, llvm-commits

Tags: #llvm

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

4 years agoHIP: Merge builtin library handling
Matt Arsenault [Fri, 27 Mar 2020 16:28:24 +0000 (12:28 -0400)]
HIP: Merge builtin library handling

Merge with the new --rocm-path handling used for OpenCL. This looks
for a usable set of device libraries upfront, rather than giving a
generic "no such file or directory error". If any of the required
bitcode libraries are missing, this will now produce a "cannot find
ROCm installation." error. This differs from the existing hip specific
flags by pointing to a rocm root install instead of a single directory
with bitcode files.

This tries to maintain compatibility with the existing the
--hip-device-lib and --hip-device-lib-path flags, as well as the
HIP_DEVICE_LIB_PATH environment variable, or at least the range of
uses with testcases. The existing range of uses and behavior doesn't
entirely make sense to me, so some of the untested edge cases change
behavior. Currently the two path forms seem to have the double purpose
of a search path for an arbitrary --hip-device-lib, and for finding
the stock set of libraries. Since the stock set of libraries This also
changes the behavior when multiple paths are specified, and only takes
the last one (and the environment variable only handles a single
path).

If --hip-device-lib is used, it now only treats --hip-device-lib-path
as the search path for it, and does not attempt to find the rocm
installation. If not, --hip-device-lib-path and the environment
variable are used as the directory to search instead of the rocm root
based path.

This should also automatically fix handling of the options to use
wave64.

4 years agoAMDGPU: Search for new ROCm bitcode library structure
Matt Arsenault [Fri, 10 Apr 2020 16:56:20 +0000 (12:56 -0400)]
AMDGPU: Search for new ROCm bitcode library structure

The current install situation is a mess, but I'm working on fixing
it. Search for the target layout instead of one of the N options that
exist today.

4 years ago[LLD] Rename iDTable -> idTable, NFC
Reid Kleckner [Mon, 11 May 2020 20:16:25 +0000 (13:16 -0700)]
[LLD] Rename iDTable -> idTable, NFC

The variable renaming change did not handle this variable well.

4 years agoFold single-use variables into assert
Benjamin Kramer [Tue, 12 May 2020 13:26:59 +0000 (15:26 +0200)]
Fold single-use variables into assert

This avoids unused variable warnings in Release builds.

4 years agoAdd Linux SVE Ptrace macros.
Kristof Beyls [Thu, 7 May 2020 15:32:44 +0000 (17:32 +0200)]
Add Linux SVE Ptrace macros.

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

4 years agoRevert "[mlir] Revisit std.subview handling of static information."
Sam McCall [Tue, 12 May 2020 13:18:50 +0000 (15:18 +0200)]
Revert "[mlir] Revisit std.subview handling of static information."

This reverts commit 80d133b24f77d1b9d351251315606441c971ef9b.

Per Stephan Herhut: The canonicalizer pattern that was added creates
forms of the subview op that cannot be lowered.

This is shown by failing Tensorflow XLA tests such as:
  tensorflow/compiler/xla/service/mlir_gpu/tests:abs.hlo.test
Will provide more details offline, they rely on logs from private CI.

4 years ago[PATCH] #pragma float_control should be permitted in namespace scope.
Melanie Blower [Fri, 8 May 2020 15:05:34 +0000 (08:05 -0700)]
[PATCH] #pragma float_control should be permitted in namespace scope.

Summary: Erroneous error diagnostic observed in VS2017 <numeric> header
Also correction to propagate usesFPIntrin from template func to instantiation.

Reviewers: rjmccall, erichkeane (no feedback received)

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

4 years ago[X86] combineX86ShuffleChain - use narrowShuffleMaskElts scale == 1 builtin handling...
Simon Pilgrim [Tue, 12 May 2020 12:43:38 +0000 (13:43 +0100)]
[X86] combineX86ShuffleChain - use narrowShuffleMaskElts scale == 1 builtin handling. NFC.

narrowShuffleMaskElts already has the fast-path for scale == 1, no need to reimplement it here.

4 years ago[CUDA][HIP] Workaround for resolving host device function against wrong-sided function
Yaxun (Sam) Liu [Fri, 24 Apr 2020 20:41:24 +0000 (16:41 -0400)]
[CUDA][HIP] Workaround for resolving host device function against wrong-sided function

recommit c77a4078e01033aa2206c31a579d217c8a07569b with fix

https://reviews.llvm.org/D77954 caused regressions due to diagnostics in implicit
host device functions.

For now, it seems the most feasible workaround is to treat implicit host device function and explicit host
device function differently. Basically in device compilation for implicit host device functions, keep the
old behavior, i.e. give host device candidates and wrong-sided candidates equal preference. For explicit
host device functions, favor host device candidates against wrong-sided candidates.

The rationale is that explicit host device functions are blessed by the user to be valid host device functions,
that is, they should not cause diagnostics in both host and device compilation. If diagnostics occur, user is
able to fix them. However, there is no guarantee that implicit host device function can be compiled in
device compilation, therefore we need to preserve its overloading resolution in device compilation.

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

4 years ago[NFC][AArch64] More casts tests...
Sam Parker [Tue, 12 May 2020 12:05:09 +0000 (13:05 +0100)]
[NFC][AArch64] More casts tests...

Don't use truncs are users because sometimes they're free too.

4 years ago[X86][AVX] Use X86ISD::VPERM2X128 for blend-with-zero if optimizing for size
Simon Pilgrim [Tue, 12 May 2020 11:31:07 +0000 (12:31 +0100)]
[X86][AVX] Use X86ISD::VPERM2X128 for blend-with-zero if optimizing for size

Last part of PR22984 - avoid the zero-register dependency if optimizing for size

4 years agoFuzzerCLI.h - reduce StringRef.h include to forward declaration. NFC.
Simon Pilgrim [Sun, 10 May 2020 20:50:13 +0000 (21:50 +0100)]
FuzzerCLI.h - reduce StringRef.h include to forward declaration. NFC.

4 years agoDebugCounter.h - remove unused includes. NFC.
Simon Pilgrim [Sun, 10 May 2020 19:33:51 +0000 (20:33 +0100)]
DebugCounter.h - remove unused includes. NFC.

Added explicit StringRef.h include as we need the full definition for several inline functions in DebugCounter.h.

4 years ago[Target][ARM] Replace outdated getARMVPTBlockMask function
Pierre-vh [Wed, 8 Apr 2020 10:55:09 +0000 (11:55 +0100)]
[Target][ARM] Replace outdated getARMVPTBlockMask function

getARMVPTBlockMask was an outdated function that only handled basic
block masks: T, TT, TTT and TTTT. This worked fine before the MVE
VPT Block Insertion Pass improvements as it was the only kind of
masks that it could generate, but now it can generate more complex
masks that uses E predicates, so it's dangerous to use that function
to calculate VPT/VPST block masks.

I replaced it with 2 different functions:
  - expandPredBlockMask, in ARMBaseInfo. This adds an "E" or "T" at
    the end of an existing PredBlockMask.
  - recomputeVPTBlockMask, in Thumb2InstrInfo. This takes an iterator
    to a VPT/VPST instruction and recomputes its block mask by looking
    at the predicated instructions that follows it. This should be
    used to recompute a block mask after removing/adding a predicated
    instruction to the block.

The expandPredBlockMask function is pretty much imported from the MVE
VPT Blocks pass.

I had to change the ARMLowOverheadLoops and MVEVPTBlocks passes as well
so they could use these new functions.

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

4 years ago[Target][ARM] Replace re-uses of old VPR values with VPNOTs
Pierre-vh [Thu, 2 Apr 2020 14:24:14 +0000 (15:24 +0100)]
[Target][ARM] Replace re-uses of old VPR values with VPNOTs

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

4 years ago[libcxx testing] Remove ALLOW_RETRIES from sleep_for.pass.cpp
David Zarzycki [Tue, 12 May 2020 10:44:37 +0000 (06:44 -0400)]
[libcxx testing] Remove ALLOW_RETRIES from sleep_for.pass.cpp

Operating systems are best effort by default, so we cannot assume that
sleep-like APIs return as soon as we'd like.

Even if a sleep-like API returns when we want it to, the potential for
preemption means that attempts to measure time are subject to delays.

4 years ago[CodeGen][SVE] Add patterns for whole vector predicate select
Sander de Smalen [Tue, 12 May 2020 10:23:38 +0000 (11:23 +0100)]
[CodeGen][SVE] Add patterns for whole vector predicate select

Added patterns to implement `select i1 %p, <vty> %a, <vty> %b`

Reviewed By: efriedma

Tags: #llvm

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

4 years agoRevert "[RISCV] Make CanLowerReturn protected for downstream maintenance"
Jim Lin [Tue, 12 May 2020 10:49:17 +0000 (18:49 +0800)]
Revert "[RISCV] Make CanLowerReturn protected for downstream maintenance"

This reverts commit d775841d7d6ee3e8bbf3a420590be9bb19433eaa.

4 years ago[NFC][AArch64] More cast cost tests
Sam Parker [Tue, 12 May 2020 10:30:54 +0000 (11:30 +0100)]
[NFC][AArch64] More cast cost tests

Add truncating stores and casts with users.

4 years ago[SveEmitter] Add builtins for svdup and svindex
Sander de Smalen [Tue, 12 May 2020 10:01:18 +0000 (11:01 +0100)]
[SveEmitter] Add builtins for svdup and svindex

Reviewed By: efriedma

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

4 years ago[ARM] Refactor lower to S[LR]I optimization
Petre-Ionut Tudor [Tue, 21 Apr 2020 13:11:13 +0000 (14:11 +0100)]
[ARM] Refactor lower to S[LR]I optimization

Summary:
The optimization has been refactored to fix certain bugs and
limitations. The condition for lowering to S[LR]I has been changed
to reflect the manual pseudocode description of SLI and SRI operation.
The optimization can now handle more cases of operand type and order.

Subscribers: kristof.beyls, hiraditya, danielkiss, llvm-commits

Tags: #llvm

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

4 years ago[ARM][CostModel] Improve getCastInstrCost
Sam Parker [Thu, 7 May 2020 12:21:31 +0000 (13:21 +0100)]
[ARM][CostModel] Improve getCastInstrCost

- Specifically check for sext/zext users which have 'long' form NEON
  instructions.
- Add more entries to the table for sext/zexts so that we can report
  more accurately the number of vmovls required for NEON.
- Pass the instruction to the pass implementation.

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

4 years ago[AArch64][CostModel] getCastInstrCost
Sam Parker [Tue, 12 May 2020 07:54:18 +0000 (08:54 +0100)]
[AArch64][CostModel] getCastInstrCost

Pass the instruction to the base implementation.

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

4 years ago[Openmp][VE] Libomptarget plugin for NEC SX-Aurora
Manoel Roemmer [Tue, 12 May 2020 08:05:00 +0000 (10:05 +0200)]
[Openmp][VE] Libomptarget plugin for NEC SX-Aurora

This patch adds a libomptarget plugin for the NEC SX-Aurora TSUBASA Vector
Engine (VE target).  The code is largely based on the existing generic-elf
plugin and uses the NEC VEO and VEOSINFO libraries for offloading.

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

4 years agoget rid of the NDEBUG usage in RecoveryExpr, NFC.
Haojian Wu [Tue, 12 May 2020 08:16:30 +0000 (10:16 +0200)]
get rid of the NDEBUG usage in RecoveryExpr, NFC.

use the llvm::all_of, per dblaikie's suggestion.

4 years ago[NFC][AArch64] Update tests
Sam Parker [Tue, 12 May 2020 07:47:28 +0000 (08:47 +0100)]
[NFC][AArch64] Update tests

Add cost model tests for extending loads.

4 years agoFix typos encountered while working on pass pipeline for O1.
Eric Christopher [Tue, 12 May 2020 07:44:05 +0000 (00:44 -0700)]
Fix typos encountered while working on pass pipeline for O1.

4 years agoRevert "[NFC][DwarfDebug] Prefer explicit to auto type deduction"
Djordje Todorovic [Tue, 12 May 2020 07:40:47 +0000 (09:40 +0200)]
Revert "[NFC][DwarfDebug] Prefer explicit to auto type deduction"

This wasn't proposed by the LLVM Style Guide.
Please see https://reviews.llvm.org/D79624.

This reverts commit rG2552dc5317e0.

4 years agoRevert "[NFC][DwarfDebug] Avoid default capturing when using lambdas"
Djordje Todorovic [Tue, 12 May 2020 07:04:57 +0000 (09:04 +0200)]
Revert "[NFC][DwarfDebug] Avoid default capturing when using lambdas"

Reverting this because we found it isn't that useful.
Please see https://reviews.llvm.org/D79616.

This reverts commit rG45e5a32a8bd3.

4 years ago[SystemZ] Improve foldMemoryOperandImpl: vec->FP conversions
Jonas Paulsson [Wed, 18 Mar 2020 17:11:56 +0000 (18:11 +0100)]
[SystemZ] Improve foldMemoryOperandImpl: vec->FP conversions

Use FP-mem instructions when folding reloads into single lane (W..) vector
instructions.

Only do this when all other operands of the instruction have already been
allocated to an FP (F0-F15) register.

Review: Ulrich Weigand

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

4 years ago[CodeGen] Fix incorrect uses of getVectorNumElements()
David Sherwood [Tue, 5 May 2020 08:58:24 +0000 (09:58 +0100)]
[CodeGen] Fix incorrect uses of getVectorNumElements()

I have fixed up some places in SelectionDAG::getNode() where we
used to assert that the number of vector elements for two types
are the same. I have changed such cases to assert that the
element counts are the same instead. I've added new tests that
exercise the code paths for all the truncations. All the extend
operations are covered by this existing test:

  CodeGen/AArch64/sve-sext-zext.ll

For the ISD::SETCC case I fixed this code path is exercised by
these existing tests:

  CodeGen/AArch64/sve-fcmp.ll
  CodeGen/AArch64/sve-intrinsics-int-compares-with-imm.ll

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

4 years ago[LLDB] Disable TestBasicEntryValues.py for arm
Muhammad Omair Javaid [Tue, 12 May 2020 06:32:54 +0000 (11:32 +0500)]
[LLDB] Disable TestBasicEntryValues.py for arm

TestBasicEntryValues.py fails on arm 32 bit. Currently running on silent master here:
http://lab.llvm.org:8014/builders/lldb-arm-ubuntu/

4 years ago[clangd] Have suppression comments take precedence over warning-as-error
Nathan Ridge [Sun, 10 May 2020 19:08:18 +0000 (15:08 -0400)]
[clangd] Have suppression comments take precedence over warning-as-error

Summary: This matches the clang-tidy behaviour.

Fixes https://github.com/clangd/clangd/issues/375

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

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

4 years agoTemporarily Revert "[mlir][shape] Tidy up shape.shape_of" as it's breaking a few...
Eric Christopher [Tue, 12 May 2020 06:03:41 +0000 (23:03 -0700)]
Temporarily Revert "[mlir][shape] Tidy up shape.shape_of" as it's breaking a few tests.

This reverts commit b6045448869a63dc7da3a4c87c124e85101220d7.

Followed up offline with a testcase.

4 years ago[RISCV] Make CanLowerReturn protected for downstream maintenance
Jim Lin [Tue, 12 May 2020 05:48:30 +0000 (13:48 +0800)]
[RISCV] Make CanLowerReturn protected for downstream maintenance

Summary: For the downstream RISCV maintenance, it would be easier to override and reuse CanLowerReturn for customizing.

Reviewers: asb, lenary, luismarques

Reviewed By: lenary

Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, s.egerton, pzheng, sameer.abuasal, apazos, evandro, llvm-commits

Tags: #llvm

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

4 years ago[PowerPC] Add fma/fsqrt/fmax strict-fp intrinsics
Qiu Chaofan [Tue, 12 May 2020 05:40:54 +0000 (13:40 +0800)]
[PowerPC] Add fma/fsqrt/fmax strict-fp intrinsics

This patch adds strict-fp intrinsics support for fma, fsqrt, fmaxnum and
fminnum on PowerPC.

Reviewed By: hfinkel

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

4 years agoRevert "[libcxx] shared_ptr changes from library fundamentals (P0414R2)."
zoecarver [Tue, 12 May 2020 05:42:49 +0000 (22:42 -0700)]
Revert "[libcxx] shared_ptr changes from library fundamentals (P0414R2)."

This reverts commit e8c13c182a562f45287d6b8da612264d09027087.

4 years ago[gcov] Fix big-endian problems
Fangrui Song [Tue, 12 May 2020 05:30:49 +0000 (22:30 -0700)]
[gcov] Fix big-endian problems

In a big-endian .gcda file, the first four bytes are "gcda" instead of "adcg".
All 32-bit values are in big-endian.

With this change, libclang_rt.profile can hopefully produce gcov
compatible output.

4 years agoRevert part of D49132 "[gcov] Fix gcov profiling on big-endian machines"
Fangrui Song [Tue, 12 May 2020 05:08:07 +0000 (22:08 -0700)]
Revert part of D49132 "[gcov] Fix gcov profiling on big-endian machines"

D49132 is partially correct. For 64-bit values, the lower 32-bit part comes
before the higher 32-bit part (in a little-endian manner).

For 32-bit values, libgcov reads/writes 32-bit values in native endianness.

4 years agoPartially revert "[CMake] Fix building with -DBUILD_SHARED_LIBS=ON on mingw"
Martin Storsjö [Tue, 12 May 2020 05:20:34 +0000 (08:20 +0300)]
Partially revert "[CMake] Fix building with -DBUILD_SHARED_LIBS=ON on mingw"

This reverts parts of commit 609ef948387ba40e3693c2bd693d82ca34dcdc02,
as it caused build failures on windows if LLVM_BUILD_EXAMPLES was
enabled, due to Bye being added as a dependency of the lit tests.

4 years ago[DWARF5]: Added support for dumping strx forms in llvm-dwarfdump
Sourabh Singh Tomar [Mon, 27 Apr 2020 16:16:11 +0000 (21:46 +0530)]
[DWARF5]: Added support for dumping strx forms in llvm-dwarfdump

This patch adds support for dumping DW_MACRO_define_strx,
DW_MACRO_undef_strx in llvm-dwarfdump. These forms are currently
supported only in debug_macro section.

Reviewed By: ikudrin, dblaikie

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

4 years ago[gcov] Emit GCOV_TAG_OBJECT_SUMMARY/GCOV_TAG_PROGRAM_SUMMARY correctly and fix llvm...
Fangrui Song [Tue, 12 May 2020 01:43:15 +0000 (18:43 -0700)]
[gcov] Emit GCOV_TAG_OBJECT_SUMMARY/GCOV_TAG_PROGRAM_SUMMARY correctly and fix llvm-cov's decoding of runcount

gcov 9 (r264462) started to use GCOV_TAG_OBJECT_SUMMARY. Before,
GCOV_TAG_PROGRAM_SUMMARY was used.
libclang_rt.profile should emit just one tag according to the version.

Another bug introduced by rL194499 is that the wrong runcount field was
selected.

Fix the two bugs so that gcov can correctly decode "Runs:" from
libclang_rt.profile produced .gcda files, and llvm-cov gcov can
correctly decode "Runs:" from libgcov produced .gcda files.

4 years ago[x86/SLH][NFC] Add a test to produce a failed generation.
Wang, Pengfei [Tue, 12 May 2020 03:43:20 +0000 (11:43 +0800)]
[x86/SLH][NFC] Add a test to produce a failed generation.

4 years ago[mlir] [VectorOps] Replace zero-scalar + splat into direct zero vector constant
aartbik [Tue, 12 May 2020 01:22:59 +0000 (18:22 -0700)]
[mlir] [VectorOps] Replace zero-scalar + splat into direct zero vector constant

Summary:
The scalar zero + splat yields more intermediate code than the direct
dense zero constant, and ultimately is lowered to exactly the same
LLVM IR operations, so no point wasting the intermediate code.

Reviewers: nicolasvasilache, andydavis1, reidtatge

Reviewed By: nicolasvasilache

Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, stephenneuendorffer, Joonsoo, grosul1, frgossen, Kayjukh, llvm-commits

Tags: #llvm

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

4 years agoQuote error string from qLaunchSuccess
Jason Molenda [Tue, 12 May 2020 03:01:54 +0000 (20:01 -0700)]
Quote error string from qLaunchSuccess

If the error message from qLaunchSucess included a gdb RSP
metacharacter, it could crash lldb.  Apply the binary
escaping to the string before sending it to lldb; lldb
promiscuously applies the binary escaping protocol on
packets it receives.

Also fix a small bug in cstring_to_asciihex_string where
a high bit character (eg utf-8 chars) would not be
quoted correctly due to signed char fun.

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

rdar://problem/62873581

4 years agoFix a release+noasserts werror for unused variable.
Eric Christopher [Tue, 12 May 2020 03:02:54 +0000 (20:02 -0700)]
Fix a release+noasserts werror for unused variable.

4 years agoTemporarily Revert "[lld-macho] Re-add dylink-lazy test" as it
Eric Christopher [Tue, 12 May 2020 02:46:06 +0000 (19:46 -0700)]
Temporarily Revert "[lld-macho] Re-add dylink-lazy test" as it
appears to be still failing.

This reverts commit 723c46e645dbe23942c926d2cb800ce020df6b8b.

4 years ago[libcxx] shared_ptr changes from library fundamentals (P0414R2).
zoecarver [Tue, 12 May 2020 01:42:50 +0000 (18:42 -0700)]
[libcxx] shared_ptr changes from library fundamentals (P0414R2).

Implements P0414R2:
  * Adds support for array types in std::shared_ptr.
  * Adds reinterpret_pointer_cast for shared_ptr.

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

4 years ago[FileCheck] Make invalid prefix diagnostics more precise
Joel E. Denny [Mon, 11 May 2020 13:57:37 +0000 (09:57 -0400)]
[FileCheck] Make invalid prefix diagnostics more precise

This will prove especially helpful after D79276, which introduces
comment prefixes.  Specifically, identifying whether there's a
uniqueness violation will be helpful as prefixes will be required to
be unique across both check prefixes and comment prefixes.

Also, remove a related comment about `cl::list` that no longer seems
relevant now that FileCheck is also a library.

Reviewed By: jhenderson, thopre

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

4 years ago[AMDGPU][GlobalISel] Revise handling of wide loads in RegBankSelect
Austin Kerbow [Tue, 12 May 2020 00:24:03 +0000 (17:24 -0700)]
[AMDGPU][GlobalISel] Revise handling of wide loads in RegBankSelect

When splitting loads in RegBankSelect G_EXTRACT_VECTOR_ELT were being added
which could not be selected. Since invoking the legalizer will generate
instructions that split and combine wide loads, we can remove the redundant
repair instructions which are added by RegBankSelect.

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

4 years ago[gn build] Use relative paths in generated lit.site.cfg.py files for llvm and clang.
Nico Weber [Tue, 12 May 2020 00:57:46 +0000 (20:57 -0400)]
[gn build] Use relative paths in generated lit.site.cfg.py files for llvm and clang.

This ports a16ba6fea2e554f to the GN build.

No intended behavior change.

4 years ago[Inlining] Make shouldBeDeferred static (NFC)
Kazu Hirata [Mon, 11 May 2020 21:04:10 +0000 (14:04 -0700)]
[Inlining] Make shouldBeDeferred static (NFC)

Summary:
This patch makes shouldBeDeferred static because it is called only
from shouldInline in the same .cpp file.

Reviewers: davidxl, mtrofin

Reviewed By: mtrofin

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[SelectionDAG] Don't promote the alignment of allocas beyond the stack alignment.
Eli Friedman [Wed, 6 May 2020 19:06:29 +0000 (12:06 -0700)]
[SelectionDAG] Don't promote the alignment of allocas beyond the stack alignment.

allocas in LLVM IR have a specified alignment. When that alignment is
specified, the alloca has at least that alignment at runtime.

If the specified type of the alloca has a higher preferred alignment,
SelectionDAG currently ignores that specified alignment, and increases
the alignment. It does this even if it would trigger stack realignment.
I don't think this makes sense, so this patch changes that.

I was looking into this for SVE in particular: for SVE, overaligning
vscale'ed types is extra expensive because it requires realigning the
stack multiple times, or using dynamic allocation. (This currently isn't
implemented.)

I updated the expected assembly for a couple tests; in particular, for
arg-copy-elide.ll, the optimization in question does not increase the
alignment the way SelectionDAG normally would. For the rest, I just
increased the specified alignment on the allocas to match what
SelectionDAG was inferring.

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

4 years ago[AMDGPU] Reserving VGPR for future SGPR Spill
Saiyedul Islam [Fri, 10 Apr 2020 07:55:11 +0000 (07:55 +0000)]
[AMDGPU] Reserving VGPR for future SGPR Spill

Summary: One VGPR register is allocated to handle a future spill of SGPR if "--amdgpu-reserve-vgpr-for-sgpr-spill" option is used

Reviewers: arsenm, rampitec, msearles, cdevadas

Reviewed By: arsenm

Subscribers: madhur13490, qcolombet, kerbowa, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #amdgpu, #llvm

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

4 years ago[AArch64][SVE] Add patterns for VSELECT of immediates.
Eli Friedman [Sat, 2 May 2020 03:58:49 +0000 (20:58 -0700)]
[AArch64][SVE] Add patterns for VSELECT of immediates.

This covers forms involving "CPY (immediate, zeroing)".

This doesn't handle the case where the operands are reversed, and the
condition is freely invertible.  Not sure how to handle that.  Maybe a
DAGCombine.

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

4 years ago[MLIR] Fix several misc issues in in Toy tutorial
Rahul Joshi [Mon, 11 May 2020 23:53:16 +0000 (16:53 -0700)]
[MLIR] Fix several misc issues in in Toy tutorial

Summary:
- Fix comments in several places
- Eliminate extra ' in AST dump and adjust tests accordingly

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

4 years ago[AMDGPU] Allow spilling FP to memory
Austin Kerbow [Thu, 7 May 2020 21:56:37 +0000 (14:56 -0700)]
[AMDGPU] Allow spilling FP to memory

If there are no available lanes in a reserved VGPR, no free SGPR, and no unused CSR
VGPR when trying to save the FP it needs to be spilled to memory as a last
resort. This can be done in the prolog/epilog if we manually add the spill
and manage exec.

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

4 years agoRevert "[FileCheck] Make invalid prefix diagnostics more precise"
Joel E. Denny [Mon, 11 May 2020 23:40:15 +0000 (19:40 -0400)]
Revert "[FileCheck] Make invalid prefix diagnostics more precise"

This reverts commit a78e13745d4ee4a42e41ebbe698159f651515fc5 to try to
fix a bot:

http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/23489

4 years agoRevert "[FileCheck] Support comment directives"
Joel E. Denny [Mon, 11 May 2020 23:39:49 +0000 (19:39 -0400)]
Revert "[FileCheck] Support comment directives"

This reverts commit 9a9a5f9893c8db05cebc8818eb8485bff61f7c74 to try to
fix a bot:

http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/23489

4 years ago[gn build] Make paths in generated llvm-lit relative.
Nico Weber [Mon, 11 May 2020 23:31:26 +0000 (19:31 -0400)]
[gn build] Make paths in generated llvm-lit relative.

This ports d4638cba and e613f0ee to the GN build.
Since paths in the generated lit.site.cfg.py files still contain
absolute paths in the GN build, this isn't very useful yet.

No intended behavior change.

4 years ago[GlobalISel] Remove debug locations when emitting G_FCONSTANT.
Davide Italiano [Mon, 11 May 2020 23:21:26 +0000 (16:21 -0700)]
[GlobalISel] Remove debug locations when emitting G_FCONSTANT.

<rdar://problem/62991543>