platform/upstream/llvm.git
4 years agoAMDGPU/GlobalISel: Select llvm.amdcn.struct.tbuffer.load
Matt Arsenault [Tue, 14 Jan 2020 01:06:26 +0000 (20:06 -0500)]
AMDGPU/GlobalISel: Select llvm.amdcn.struct.tbuffer.load

4 years ago[clang] Fix covered default in switch
Jinsong Ji [Mon, 27 Jan 2020 18:40:59 +0000 (18:40 +0000)]
[clang] Fix covered default in switch

clang/lib/Format/TokenAnnotator.cpp:3162:7:
error: default label in switch which covers all enumeration values
[-Werror,-Wcovered-switch-default]
      default:
      ^
1 error generated.

4 years ago[clang-tidy] readability-identifier-naming disregards parameters restrictions on...
Nathan [Sun, 26 Jan 2020 00:13:18 +0000 (00:13 +0000)]
[clang-tidy] readability-identifier-naming disregards parameters restrictions on main like functions

Summary:
Typically most main functions have the signature:
```
int main(int argc, char *argv[])
```
To stick with convention when renaming parameters we should ignore the `argc` and `argv` names even if the parameter style says they should be renamed. This patch addresses this by checking all ParmVarDecls if they form part of a function with a signature that matches main `int name(int argc, char * argv[], (optional char *env[]))`

Reviewers: aaron.ballman, JonasToth, alexfh, hokein

Reviewed By: aaron.ballman

Subscribers: Mordante, merge_guards_bot, xazax.hun, kristof.beyls, cfe-commits

Tags: #clang, #clang-tools-extra

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

4 years ago[Symbolize] Handle error after the notes loop
Petr Hosek [Mon, 27 Jan 2020 00:10:56 +0000 (16:10 -0800)]
[Symbolize] Handle error after the notes loop

We always have to check the error, even if we're going to ignore it.

4 years agoReland (again): [DWARF] Allow cross-CU references of subprogram definitions
Vedant Kumar [Sat, 25 Jan 2020 20:52:47 +0000 (12:52 -0800)]
Reland (again): [DWARF] Allow cross-CU references of subprogram definitions

This is a revert-of-revert (i.e. this reverts commit 802bec89, which
itself reverted fa4701e1 and 79daafc9) with a fix folded in. The problem
was that call site tags weren't emitted properly when LTO was enabled
along with split-dwarf. This required a minor fix. I've added a reduced
test case in test/DebugInfo/X86/fission-call-site.ll.

Original commit message:

This allows a call site tag in CU A to reference a callee DIE in CU B
without resorting to creating an incomplete duplicate DIE for the callee
inside of CU A.

We already allow cross-CU references of subprogram declarations, so it
doesn't seem like definitions ought to be special.

This improves entry value evaluation and tail call frame synthesis in
the LTO setting. During LTO, it's common for cross-module inlining to
produce a call in some CU A where the callee resides in a different CU,
and there is no declaration subprogram for the callee anywhere. In this
case llvm would (unnecessarily, I think) emit an empty DW_TAG_subprogram
in order to fill in the call site tag. That empty 'definition' defeats
entry value evaluation etc., because the debugger can't figure out what
it means.

As a follow-up, maybe we could add a DWARF verifier check that a
DW_TAG_subprogram at least has a DW_AT_name attribute.

Update #1:

Reland with a fix to create a declaration DIE when the declaration is
missing from the CU's retainedTypes list. The declaration is left out
of the retainedTypes list in two cases:

1) Re-compiling pre-r266445 bitcode (in which declarations weren't added
   to the retainedTypes list), and
2) Doing LTO function importing (which doesn't update the retainedTypes
   list).

It's possible to handle (1) and (2) by modifying the retainedTypes list
(in AutoUpgrade, or in the LTO importing logic resp.), but I don't see
an advantage to doing it this way, as it would cause more DWARF to be
emitted compared to creating the declaration DIEs lazily.

Update #2:

Fold in a fix for call site tag emission in the split-dwarf + LTO case.

Tested with a stage2 ThinLTO+RelWithDebInfo build of clang, and with a
ReleaseLTO-g build of the test suite.

rdar://46577651, rdar://57855316, rdar://57840415, rdar://58888440

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

4 years ago[analyzer] Simplify BoolAssignmentChecker
Mikhail Gadelha [Mon, 27 Jan 2020 18:51:35 +0000 (14:51 -0400)]
[analyzer] Simplify BoolAssignmentChecker

Summary:
Instead of checking the range manually, changed the checker to use assumeInclusiveRangeDual instead.

This patch was part of D28955.

Reviewers: NoQ

Reviewed By: NoQ

Subscribers: ddcc, xazax.hun, baloghadamsoftware, szepet, a.sidorin, Szelethus, donat.nagy, dkrupp, Charusso, cfe-commits

Tags: #clang

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

4 years agoAMDGPU/GlobalISel: Select llvm.amdgcn.raw.tbuffer.load
Matt Arsenault [Mon, 13 Jan 2020 23:18:56 +0000 (18:18 -0500)]
AMDGPU/GlobalISel: Select llvm.amdgcn.raw.tbuffer.load

4 years ago[mlir] [VectorOps] Lowering of vector.extract/insert_slices to LLVM IR
aartbik [Sat, 25 Jan 2020 00:27:56 +0000 (16:27 -0800)]
[mlir] [VectorOps] Lowering of vector.extract/insert_slices to LLVM IR

Summary: Uses progressive lowering to convert vector.extract_slices and vector_insert_slices to equivalent vector operations that can be subsequently lowered into LLVM.

Reviewers: nicolasvasilache, andydavis1, rriddle

Reviewed By: nicolasvasilache, rriddle

Subscribers: merge_guards_bot, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, llvm-commits

Tags: #llvm

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

4 years ago[AMDGPU] Attempt to reschedule withou clustering
Stanislav Mekhanoshin [Fri, 24 Jan 2020 00:18:16 +0000 (16:18 -0800)]
[AMDGPU] Attempt to reschedule withou clustering

We want to have more load/store clustering but we also want
to maintain low register pressure which are oposit targets.
Allow scheduler to reschedule regions without mutations
applied if we hit a register limit.

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

4 years agoAMDGPU/GlobalISel: Select llvm.amdgcn.struct.buffer.load.format
Matt Arsenault [Mon, 13 Jan 2020 22:07:41 +0000 (17:07 -0500)]
AMDGPU/GlobalISel: Select llvm.amdgcn.struct.buffer.load.format

4 years ago[tablegen] Emit string literals instead of char arrays
Luke Drummond [Wed, 15 Jan 2020 14:14:01 +0000 (14:14 +0000)]
[tablegen] Emit string literals instead of char arrays

This changes the generated (Instr|Asm|Reg|Regclass)Name tables from this
form:
    extern const char HexagonInstrNameData[] = {
      /* 0 */ 'G', '_', 'F', 'L', 'O', 'G', '1', '0', 0,
      /* 9 */ 'E', 'N', 'D', 'L', 'O', 'O', 'P', '0', 0,
      /* 18 */ 'V', '6', '_', 'v', 'd', 'd', '0', 0,
      /* 26 */ 'P', 'S', '_', 'v', 'd', 'd', '0', 0,
      [...]
    };

...to this:

    extern const char HexagonInstrNameData[] = {
      /* 0 */ "G_FLOG10\0"
      /* 9 */ "ENDLOOP0\0"
      /* 18 */ "V6_vdd0\0"
      /* 26 */ "PS_vdd0\0"
      [...]
    };

This should make debugging and exploration a lot easier for mortals,
while providing a significant compile-time reduction for common compilers.

To avoid issues with low implementation limits, this is disabled by
default for visual studio.

To force output one way or the other, pass
`--long-string-literals=<bool>` to `tablegen`

Reviewers: mstorsjo, rnk

Subscribers: llvm-commits

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

A variation of this patch was originally committed in ce23515f5ab011 and
then reverted in e464b31c due to build failures.

4 years ago[llvm][TextAPI/MachO] Support writing single macCatalyst platform
Jonas Devlieghere [Mon, 27 Jan 2020 18:17:46 +0000 (10:17 -0800)]
[llvm][TextAPI/MachO] Support writing single macCatalyst platform

TAPI currently lacks a way to emit the macCatalyst platform. For TBD_V3
is does support zippered frameworks given that both macOS and
macCatalyst are part of the PlatformSet.

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

4 years agoAMDGPU/GlobalISel: Select llvm.amdgcn.struct.buffer.load
Matt Arsenault [Mon, 13 Jan 2020 21:02:14 +0000 (16:02 -0500)]
AMDGPU/GlobalISel: Select llvm.amdgcn.struct.buffer.load

4 years agoAMDGPU/GlobalISel: Select llvm.amdgcn.raw.buffer.load.format
Matt Arsenault [Thu, 9 Jan 2020 03:35:23 +0000 (22:35 -0500)]
AMDGPU/GlobalISel: Select llvm.amdgcn.raw.buffer.load.format

4 years ago[analyzer] Fix handle leak false positive when the handle dies too early
Gabor Horvath [Wed, 22 Jan 2020 01:26:11 +0000 (17:26 -0800)]
[analyzer] Fix handle leak false positive when the handle dies too early

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

4 years agoAMDGPU/GlobalISel: Select llvm.amdgcn.raw.buffer.load
Matt Arsenault [Thu, 19 Sep 2019 04:29:20 +0000 (00:29 -0400)]
AMDGPU/GlobalISel: Select llvm.amdgcn.raw.buffer.load

Use intermediate instructions, unlike with buffer stores. This is
necessary because of the need to have an internal way to distinguish
between signed and unsigned extloads. This introduces some duplication
and near duplication with the buffer store selection path. The store
handling should maybe be moved into legalization to match and
eliminate the duplication.

4 years agoAMDGPU/GlobalISel: Handle VOP3NoMods
Matt Arsenault [Sun, 26 Jan 2020 05:25:35 +0000 (00:25 -0500)]
AMDGPU/GlobalISel: Handle VOP3NoMods

4 years agoAMDGPU/GlobalISel: Add baseline tests for fma/fmad selection
Matt Arsenault [Sun, 26 Jan 2020 05:33:43 +0000 (00:33 -0500)]
AMDGPU/GlobalISel: Add baseline tests for fma/fmad selection

4 years agoAMDGPU/GlobalISel: Minor refactor of MUBUF complex patterns
Matt Arsenault [Fri, 24 Jan 2020 16:45:33 +0000 (11:45 -0500)]
AMDGPU/GlobalISel: Minor refactor of MUBUF complex patterns

This will make it easier to support the small variants in the complex
patterns for atomics.

4 years agoAMDGPU: Fix not using f16 fsin/fcos
Matt Arsenault [Sat, 25 Jan 2020 02:51:37 +0000 (21:51 -0500)]
AMDGPU: Fix not using f16 fsin/fcos

I noticed this because this accidentally started working for
GlobalISel.

4 years ago[AMDGPU] Simplify test and extend to gfx9 and gfx10
Jay Foad [Tue, 26 Nov 2019 09:46:19 +0000 (09:46 +0000)]
[AMDGPU] Simplify test and extend to gfx9 and gfx10

Summary:
This is in preparation for adding more test cases for D69661 and other
bug fixes in the same area.

Reviewers: tpr, dstuttard, critson, nhaehnle, arsenm

Subscribers: kzhuravl, jvesely, wdng, yaxunl, t-tye, llvm-commits

Tags: #llvm

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

4 years ago[X86][AVX] Add a more aggressive SimplifyMultipleUseDemandedBits to simplify masked...
Simon Pilgrim [Mon, 27 Jan 2020 16:43:59 +0000 (16:43 +0000)]
[X86][AVX] Add a more aggressive SimplifyMultipleUseDemandedBits to simplify masked store masks.

Fixes a poor codegen issue noticed in PR11210.

4 years agoAMDGPU/GlobalISel: Custom legalize v2s16 G_SHUFFLE_VECTOR
Matt Arsenault [Wed, 1 Jan 2020 20:51:46 +0000 (15:51 -0500)]
AMDGPU/GlobalISel: Custom legalize v2s16 G_SHUFFLE_VECTOR

Try to keep simple v2s16 cases as-is. This will more naturally map to
how the VOP3P op_sel modifiers work compared to the expansion
involving bitcasts and bitshifts.

This could maybe try harder with wider source vector types, although
that could be handled with a pre-legalize combine.

4 years agoAdd pretty printers for llvm::PointerIntPair and llvm::PointerUnion.
Christian Sigg [Mon, 27 Jan 2020 16:23:39 +0000 (17:23 +0100)]
Add pretty printers for llvm::PointerIntPair and llvm::PointerUnion.

Reviewers: aprantl, dblaikie, jdoerfert, nicolasvasilache

Reviewed By: dblaikie

Subscribers: jpienaar, dexonsmith, merge_guards_bot, llvm-commits

Tags: #llvm, #clang, #lldb, #openmp

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

4 years agoRevert "[StackColoring] Remap PseudoSourceValue frame indices via MachineFunction...
Nico Weber [Mon, 27 Jan 2020 15:39:49 +0000 (10:39 -0500)]
Revert "[StackColoring] Remap PseudoSourceValue frame indices via MachineFunction::getPSVManager()"

This reverts commit 7a8b0b1595e7dc878b48cf9bbaa652087a6895db.
It seems to break exception handling on 32-bit Windows, see
https://crbug.com/1045650

4 years agoRevert "AMDGPU: Temporary drop s_mul_hi_i/u32 patterns"
Matt Arsenault [Fri, 24 Jan 2020 18:41:50 +0000 (13:41 -0500)]
Revert "AMDGPU: Temporary drop s_mul_hi_i/u32 patterns"

This reverts commit fe23ed2c681413e7baf517c79aee9be130579873.

It was never really clear this was responsible for the performance
regressions that caused this to be reverted. It's been a long time,
and we need to have scalar patterns for this to get GlobalISel
working.

4 years ago[clangd] Only re-open files if their flags changed
David Goldman [Mon, 13 Jan 2020 22:01:10 +0000 (17:01 -0500)]
[clangd] Only re-open files if their flags changed

Reviewers: sammccall

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

Tags: #clang

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

4 years agoRestore "[LTO/WPD] Enable aggressive WPD under LTO option"
Teresa Johnson [Fri, 24 Jan 2020 20:24:18 +0000 (12:24 -0800)]
Restore "[LTO/WPD] Enable aggressive WPD under LTO option"

This restores 59733525d37cf9ad88b5021b33ecdbaf2e18911c (D71913), along
with bot fix 19c76989bb505c3117730c47df85fd3800ea2767.

The bot failure should be fixed by D73418, committed as
af954e441a5170a75687699d91d85e0692929d43.

I also added a fix for non-x86 bot failures by requiring x86 in new test
lld/test/ELF/lto/devirt_vcall_vis_public.ll.

4 years agoAMDGPU/GlobalISel: Fix not using global atomics on gfx9+
Matt Arsenault [Fri, 24 Jan 2020 16:26:34 +0000 (11:26 -0500)]
AMDGPU/GlobalISel: Fix not using global atomics on gfx9+

For some reason the flat/global atomics end up in the generated
matcher table in a different order from SelectionDAG. Use
AddedComplexity to prefer checking for global atomics first.

4 years ago[LoopUnroll] Remove remapInstruction().
Whitney Tsang [Thu, 23 Jan 2020 20:11:28 +0000 (20:11 +0000)]
[LoopUnroll] Remove remapInstruction().

Summary:
LoopUnroll can reuse the RemapInstruction() in ValueMapper, or
remapInstructionsInBlocks() in CloneFunction, depending on the needs.
There is no need to have its own version in LoopUnroll.

By calling RemapInstruction() without TypeMapper or Materializer and
with Flags (RF_NoModuleLevelChanges | RF_IgnoreMissingLocals), it does
the same as remapInstruction(). remapInstructionsInBlocks() calls
RemapInstruction() exactly as described.

Looking at the history, I cannot find any obvious reason to have its own
version.
Reviewer: dmgreen, jdoerfert, Meinersbur, kbarton, bmahjour, etiotto,
foad, aprantl
Reviewed By: jdoerfert
Subscribers: hiraditya, zzheng, llvm-commits, prithayan, anhtuyen
Tag: LLVM
Differential Revision: https://reviews.llvm.org/D73277

4 years ago[test][llvm-dwarfdump] Add extra test case for invalid MD5 form
James Henderson [Fri, 3 Jan 2020 14:35:54 +0000 (14:35 +0000)]
[test][llvm-dwarfdump] Add extra test case for invalid MD5 form

A subsequent patch will change how an invalid file name table is handled
to allow parsing to continue. This patch adds a test case that will
demonstrate a difference in behaviour with that change between invalid
file tables where the error is before the end of the stated prologue
length and where the error occurs after the stated length.

Reviewed by: dblaikie

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

4 years ago[DebugInfo] Make incorrect debug line extended opcode length non-fatal
James Henderson [Fri, 3 Jan 2020 13:59:46 +0000 (13:59 +0000)]
[DebugInfo] Make incorrect debug line extended opcode length non-fatal

It is possible to try to keep parsing a debug line program even when the
length of an extended opcode does not match what is expected for that
opcode. This patch changes what was previously a fatal error to be
non-fatal. The parser now continues by assuming the the claimed length
is correct, even if it means moving the offset backwards.

Reviewed by: dblaikie

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

4 years agoAMDPGPU/GlobalISel: Select more MUBUF global addressing modes
Matt Arsenault [Sat, 18 Jan 2020 02:28:58 +0000 (21:28 -0500)]
AMDPGPU/GlobalISel: Select more MUBUF global addressing modes

The handling of the high bits of the resource descriptor seem weird to
me, where the 3rd dword changes based on the instruction.

4 years agoclang-format: [JS] options for arrow functions.
Martin Probst [Fri, 24 Jan 2020 10:30:31 +0000 (11:30 +0100)]
clang-format: [JS] options for arrow functions.

Summary:
clang-format currently always wraps the body of non-empty arrow
functions:

    const x = () => {
      z();
    };

This change implements support for the `AllowShortLambdasOnASingleLine`
style options, controlling the indent style for arrow function bodies
that have one or fewer statements. SLS_All puts all on a single line,
SLS_Inline only arrow functions used in an inline position.

    const x = () => { z(); };

Multi-statement arrow functions continue to be wrapped. Function
expressions (`a = function() {}`) and function/method declarations are
unaffected as well.

Reviewers: krasimir

Subscribers: cfe-commits

Tags: #clang

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

4 years ago[mlir] Harden error propagation in LLVM import
Alex Zinenko [Thu, 16 Jan 2020 13:32:33 +0000 (14:32 +0100)]
[mlir] Harden error propagation in LLVM import

Summary:
LLVM importer to MLIR was implemented mostly as a prototype. As such, it did
not deal handle errors in a consistent way, reporting them out stderr in some
cases and continuing the execution in the error state until eventually
crashing. This is not desirable for a user-facing tool. Make sure errors are
returned from functions, consistently checked at call sites and propagated
further. Functions returning nullable IR values return nullptr to denote the
error state. Other functions return LogicalResult. LLVM importer in
mlir-translate should no longer crash on unsupported inputs.

The errors are reported without association with the source file (and therefore
cannot be checked using -verify-diagnostics). Attaching them to the actual
input file is left for future work.

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

4 years ago[mlir] LLVM import: handle constant data and array/vector aggregates
Alex Zinenko [Thu, 16 Jan 2020 12:24:42 +0000 (13:24 +0100)]
[mlir] LLVM import: handle constant data and array/vector aggregates

Summary:
Implement the handling of llvm::ConstantDataSequential and
llvm::ConstantAggregate for (nested) array and vector types when imporitng LLVM
IR to MLIR. In all cases, the result is a DenseElementsAttr that can be used in
either a `llvm.mlir.global` or a `llvm.mlir.constant`. Nested aggregates are
unpacked recursively until an element or a constant data is found. Nested
arrays with innermost scalar type are represented as DenseElementsAttr of
tensor type. Nested arrays with innermost vector type are represented as
DenseElementsAttr with (multidimensional) vector type.

Constant aggregates of struct type are not yet supported as the LLVM dialect
does not have a well-defined way of modeling struct-type constants.

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

4 years agoAMDGPU/GlobalISel: Initial selection of MUBUF addr64 load/store
Matt Arsenault [Wed, 22 Jan 2020 21:56:48 +0000 (16:56 -0500)]
AMDGPU/GlobalISel: Initial selection of MUBUF addr64 load/store

Fixes the main reason for compile failures on SI, but doesn't really
try to use the addressing modes yet.

4 years ago[X86][AVX] Add test case from PR11210
Simon Pilgrim [Mon, 27 Jan 2020 15:05:08 +0000 (15:05 +0000)]
[X86][AVX] Add test case from PR11210

Shows failure to remove sign bit comparison when the result has multiple uses

4 years agoAdd a warning, flags and pragmas to limit the number of pre-processor tokens in a...
Hans Wennborg [Wed, 9 Oct 2019 13:22:38 +0000 (15:22 +0200)]
Add a warning, flags and pragmas to limit the number of pre-processor tokens in a translation unit

See
https://docs.google.com/document/d/1xMkTZMKx9llnMPgso0jrx3ankI4cv60xeZ0y4ksf4wc/preview
for background discussion.

This adds a warning, flags and pragmas to limit the number of
pre-processor tokens either at a certain point in a translation unit, or
overall.

The idea is that this would allow projects to limit the size of certain
widely included headers, or for translation units overall, as a way to
insert backstops for header bloat and prevent compile-time regressions.

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

4 years agoUse pointer type size for offset constant when lowering load/stores
Dominik Montada [Mon, 27 Jan 2020 14:35:59 +0000 (09:35 -0500)]
Use pointer type size for offset constant when lowering load/stores

4 years agoAMDGPU: Allow i16 shader arguments
Matt Arsenault [Sun, 26 Jan 2020 23:24:24 +0000 (18:24 -0500)]
AMDGPU: Allow i16 shader arguments

Not allowing this just creates unnecessary complications when writing
simple tests.

4 years ago[AMDGPU] Handle multiple base operands in areMemAccessesTriviallyDisjoint
Jay Foad [Thu, 19 Dec 2019 10:54:34 +0000 (10:54 +0000)]
[AMDGPU] Handle multiple base operands in areMemAccessesTriviallyDisjoint

Summary:
This is in preparation for getMemOperandsWithOffset returning more base
operands.

Depends on D73455.

Reviewers: arsenm, rampitec

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

Tags: #llvm

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

4 years ago[AMDGPU] Handle multiple base operands in shouldClusterMemOps
Jay Foad [Wed, 18 Dec 2019 16:59:25 +0000 (16:59 +0000)]
[AMDGPU] Handle multiple base operands in shouldClusterMemOps

Summary:
This is in preparation for getMemOperandsWithOffset returning more base
operands.

Depends on D73454.

Reviewers: arsenm, rampitec

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

Tags: #llvm

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

4 years ago[AMDGPU] Handle frame index base operands in memOpsHaveSameBasePtr
Jay Foad [Mon, 6 Jan 2020 13:37:29 +0000 (13:37 +0000)]
[AMDGPU] Handle frame index base operands in memOpsHaveSameBasePtr

Summary:
This is in preparation for getMemOperandsWithOffset returning more base
operands.

Reviewers: arsenm, rampitec

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

Tags: #llvm

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

4 years ago[AMDGPU] Fix GCN regpressure trackers for INLINEASM instructions.
vpykhtin [Mon, 27 Jan 2020 14:25:25 +0000 (17:25 +0300)]
[AMDGPU] Fix GCN regpressure trackers for INLINEASM instructions.

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

4 years ago[WPD] Emit vcall_visibility metadata for MicrosoftCXXABI
Teresa Johnson [Sat, 25 Jan 2020 15:26:09 +0000 (07:26 -0800)]
[WPD] Emit vcall_visibility metadata for MicrosoftCXXABI

Summary:
The MicrosoftCXXABI uses a separate mechanism for emitting vtable
type metadata, and thus didn't pick up the change from D71907
to emit the vcall_visibility metadata under -fwhole-program-vtables.

I believe this is the cause of a Windows bot failure when I committed
follow on change D71913 that required a revert. The failure occurred
in a CFI test that was expecting to not abort because it expected a
devirtualization to occur, and without the necessary vcall_visibility
metadata we would not get devirtualization.

Note in the equivalent code in CodeGenModule::EmitVTableTypeMetadata
(used by the ItaniumCXXABI), we also emit the vcall_visibility metadata
when Virtual Function Elimination is enabled. Since I am not as familiar
with the details of that optimization, I have marked that as a TODO and
am only inserting under -fwhole-program-vtables.

Reviewers: evgeny777

Subscribers: Prazek, ostannard, cfe-commits

Tags: #clang

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

4 years agoGlobalISel: Reimplement widenScalar for G_UNMERGE_VALUES results
Matt Arsenault [Tue, 21 Jan 2020 14:02:42 +0000 (09:02 -0500)]
GlobalISel: Reimplement widenScalar for G_UNMERGE_VALUES results

Only use shifts if the requested type exactly matches the source type,
and create sub-unmerges otherwise.

4 years ago[MVE] Fixup order of gather writeback intrinsic outputs
David Green [Mon, 27 Jan 2020 13:59:29 +0000 (13:59 +0000)]
[MVE] Fixup order of gather writeback intrinsic outputs

The MVE_VLDRWU32_qi_pre gather loads, like the other _pre/_post mve
loads returns the writeback as result 0, the value as result 1. The llvm
ir intrinsic seems to have this the other way around though, and so when
lowering from one to the other we need to switch the first two outputs.

I've also fixed up the types of _pre/_post on normal MVE loads. There we
were already getting the values the right way around, just not for the
types. I don't believe this was causing anything to go wrong, but it was
very confusing to read in the debug output.

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

4 years agoGlobalISel: Translate vector GEPs
Matt Arsenault [Sat, 25 Jan 2020 03:57:49 +0000 (22:57 -0500)]
GlobalISel: Translate vector GEPs

4 years agoRe-land [Support] Extend TimeProfiler to support multiple threads
Russell Gallop [Fri, 3 Jan 2020 16:04:19 +0000 (16:04 +0000)]
Re-land [Support] Extend TimeProfiler to support multiple threads

This makes TimeTraceProfilerInstance thread local. Added
timeTraceProfilerFinishThread() which moves the thread local instance to
a global vector of instances. timeTraceProfilerWrite() then writes
recorded data from all instances.

Threads are identified based on their thread ids. Totals are reported
with artificial thread ids higher than the real ones.

This fixes the previous version to work with __thread as well as
thread_local.

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

4 years ago[LLDB] Fix build failures after removing Version from DWARFExpression.
Igor Kudrin [Mon, 27 Jan 2020 12:33:34 +0000 (19:33 +0700)]
[LLDB] Fix build failures after removing Version from DWARFExpression.

4 years ago[DWARF] Do not pass Version to DWARFExpression. NFCI.
Igor Kudrin [Thu, 23 Jan 2020 02:24:00 +0000 (09:24 +0700)]
[DWARF] Do not pass Version to DWARFExpression. NFCI.

The Version was used only to determine the size of an operand of
DW_OP_call_ref. The size was 4 for all versions apart from 2, but
the DW_OP_call_ref operation was introduced only in DWARF3. Thus,
the code may be simplified and using of Version may be eliminated.

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

4 years ago[DWARF] Simplify DWARFExpression. NFC.
Igor Kudrin [Thu, 23 Jan 2020 11:13:30 +0000 (18:13 +0700)]
[DWARF] Simplify DWARFExpression. NFC.

As DataExtractor already has a method to extract an unsigned value of
a specified size, there is no need to duplicate that.

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

4 years ago[clang-format] Handle escaped " in C# string-literals
Krasimir Georgiev [Mon, 27 Jan 2020 11:37:15 +0000 (12:37 +0100)]
[clang-format] Handle escaped " in C# string-literals

Reviewers: krasimir

Reviewed By: krasimir

Subscribers: klimek, MyDeveloperDay

Tags: #clang-format

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

4 years agoImprovements to call site register worklist
David Stenberg [Mon, 27 Jan 2020 10:36:03 +0000 (11:36 +0100)]
Improvements to call site register worklist

Summary:
This fixes PR44118. For cases where we have a chain like this:

  R8 = R1 (entry value)
  R0 = R8
  call @foo R0

the code that emits call site entries using entry values would not
follow that chain, instead emitting a call site entry with R8 as
location rather than R0. Such a case was discovered when originally
adding dbgcall-site-orr-moves.mir. This patch fixes that issue. This is
done by changing the ForwardedRegWorklist set to a map in which the
worklist registers always map to the parameter registers that they
describe.

Another thing this patch fixes is that worklist registers now can
describe more than one parameter register at a time. Such a case
occurred in dbgcall-site-interpretation.mir, resulting in a call site
entry not being emitted for one of the parameters.

Reviewers: djtodoro, NikolaPrica, aprantl, vsk

Reviewed By: vsk

Subscribers: hiraditya, llvm-commits

Tags: #debug-info, #llvm

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

4 years ago[ASTMatchers] Fix parent traversal with InitListExpr
Stephen Kelly [Mon, 27 Jan 2020 11:16:50 +0000 (11:16 +0000)]
[ASTMatchers] Fix parent traversal with InitListExpr

Children of InitListExpr are traversed twice by RAV, so this code
populates a vector to represent the possibly-multiple parents (in
reality in this situation the parent is the same and is therefore
de-duplicated).

4 years ago[ARM][MVE] Tail-predication: support constant trip count
Sjoerd Meijer [Mon, 27 Jan 2020 11:05:26 +0000 (11:05 +0000)]
[ARM][MVE] Tail-predication: support constant trip count

We had support for runtime trip count values, but not constants, and this adds
supports for that.

And added a minor optimisation while I was add it: don't invoke Cleanup when
there's nothing to clean up.

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

4 years ago[ARM][LowOverheadLoops] Dont ignore VCTP
Sam Parker [Mon, 27 Jan 2020 10:58:46 +0000 (10:58 +0000)]
[ARM][LowOverheadLoops] Dont ignore VCTP

When expanding the LoopStart, we try to remove the iteration count
calculation. However, if part of the calculation was also used to
calculate the number of elements we could end up deleting
instructions that were required to feed DLSTP/WLSTP.

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

4 years agoDon't separate imp/expl def handling for call site params
David Stenberg [Mon, 27 Jan 2020 10:15:55 +0000 (11:15 +0100)]
Don't separate imp/expl def handling for call site params

Summary:
Since D70431 the describeLoadedValue() hook takes a parameter register,
meaning that it can now be asked to describe any register. This means
that we can drop the difference between explicit and implicit defines
that we previously had in collectCallSiteParameters().

I have not found any case for any upstream targets where a parameter
register is only implicitly defined, and does not overlap with any
explicit defines. I don't know if such a case would even make sense. So
as far as I have tested, this patch should be a non-functional change.
However, this reduces the complexity of the code a bit, and it will
simplify the implementation of an upcoming patch which solves PR44118.

Reviewers: djtodoro, NikolaPrica, aprantl, vsk

Reviewed By: djtodoro, vsk

Subscribers: hiraditya, llvm-commits

Tags: #debug-info, #llvm

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

4 years ago[llvm-readobj] - Refine --needed-libs implementation and add a test.
Georgii Rymar [Wed, 22 Jan 2020 12:20:36 +0000 (15:20 +0300)]
[llvm-readobj] - Refine --needed-libs implementation and add a test.

We have no good test for --needed-libs option.
The one we have as a part of Object/readobj-shared-object.test
is not complete.

In this patch I've did a minor NFC changes to the implementation and
added a test. This allowed to remove this piece from
Object/readobj-shared-object.test

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

4 years ago[Alignment][NFC] Use Align with CreateAlignedLoad
Guillaume Chatelet [Mon, 27 Jan 2020 09:37:01 +0000 (10:37 +0100)]
[Alignment][NFC] Use Align with CreateAlignedLoad

Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet, bollu

Subscribers: hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

4 years ago[lldb][NFC] Give import-std-module tests a more unique file names
Raphael Isemann [Mon, 27 Jan 2020 09:55:54 +0000 (10:55 +0100)]
[lldb][NFC] Give import-std-module tests a more unique file names

We want that the *.py names for the tests have unique names but
the current ones are sometimes very simple (e.g., "TestUniquePtr.py")
and could collide with unrelated tests. This just gives all these
tests a "FromStdModule" suffix to make these collisions less likely.

4 years ago[lldb][NFC] Improve documentation for CompletionRequest
Raphael Isemann [Mon, 27 Jan 2020 09:48:22 +0000 (10:48 +0100)]
[lldb][NFC] Improve documentation for CompletionRequest

4 years ago[llvm-readobj] - Add a test for --dyn-symbols when there are no dynamic symbols.
Georgii Rymar [Wed, 22 Jan 2020 11:08:42 +0000 (14:08 +0300)]
[llvm-readobj] - Add a test for --dyn-symbols when there are no dynamic symbols.

It removes the Object/readobj-absent.test test and creates a one more case in
dyn-symbols.test we have.

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

4 years ago[llvm-readobj] - Add a test for --hash-table option.
Georgii Rymar [Tue, 21 Jan 2020 14:49:42 +0000 (17:49 +0300)]
[llvm-readobj] - Add a test for --hash-table option.

We had no test for --hash-table in tools/llvm-readobj.

The one we had was in test/Object and checked that
it is possible to dump the hash table even when an object
doesn't have a section header table.

In this patch I created a test, moved and merged the existent one.
During moving I converted it to be YAML based to stop using the
precompiled binary.

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

4 years ago[Alignment][NFC] Use Align with CreateMaskedScatter/Gather
Guillaume Chatelet [Fri, 24 Jan 2020 16:40:17 +0000 (17:40 +0100)]
[Alignment][NFC] Use Align with CreateMaskedScatter/Gather

Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

This patch shows that CreateMaskedScatter/CreateMaskedGather can only take positive non zero alignment values.

Reviewers: courbet

Subscribers: hiraditya, llvm-commits, delena

Tags: #llvm

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

4 years agoFix missing dependency in LibcUnitTest
Guillaume Chatelet [Fri, 24 Jan 2020 10:37:18 +0000 (11:37 +0100)]
Fix missing dependency in LibcUnitTest

Summary: LibcUnitTest is missing a dependency on LLVMSupport. This prevents building with shared libraries.

Reviewers: sivachandra

Subscribers: mgorny, MaskRay, libc-commits

Tags: #libc-project

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

4 years ago[clan-tidy] Fix false positive in bugprone-infinite-loop
Adam Balogh [Thu, 23 Jan 2020 14:13:30 +0000 (15:13 +0100)]
[clan-tidy] Fix false positive in bugprone-infinite-loop

The checker bugprone-infinite-loop does not track changes of
variables in the initialization expression of a variable
declared inside the condition of the while statement. This
leads to false positives, similarly to the one in the bug
report https://bugs.llvm.org/show_bug.cgi?id=44618. This
patch fixes this issue by enabling tracking of the variables
of this expression as well.

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

4 years ago[MIPS GlobalISel] Select population count (popcount)
Petar Avramovic [Mon, 27 Jan 2020 08:59:50 +0000 (09:59 +0100)]
[MIPS GlobalISel] Select population count (popcount)

G_CTPOP is generated from llvm.ctpop.<type> intrinsics, clang generates
these intrinsics from __builtin_popcount and __builtin_popcountll.
Add lower and narrow scalar for G_CTPOP.
Lower G_CTPOP for MIPS32.

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

4 years ago[MIPS GlobalISel] Select count trailing zeros
Petar Avramovic [Mon, 27 Jan 2020 08:51:06 +0000 (09:51 +0100)]
[MIPS GlobalISel] Select count trailing zeros

llvm.cttz.<type> intrinsic has additional i1 argument is_zero_undef,
it tells whether zero as the first argument produces a defined result.
G_CTTZ is generated from llvm.cttz.<type> (<type> <src>, i1 false)
intrinsics, clang generates these intrinsics from __builtin_ctz and
__builtin_ctzll.
G_CTTZ_ZERO_UNDEF comes from llvm.cttz.<type> (<type> <src>, i1 true).
Clang generates such intrinsics as parts of expansion of builtin_ffs
and builtin_ffsll. It is also traditionally part of and many
algorithms that are now predicated on avoiding zero-value inputs.

Add narrow scalar (algorithm uses G_CTTZ_ZERO_UNDEF) for G_CTTZ.
Lower G_CTTZ and G_CTTZ_ZERO_UNDEF for MIPS32.

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

4 years ago[MIPS GlobalISel] Select count leading zeros
Petar Avramovic [Mon, 27 Jan 2020 08:43:38 +0000 (09:43 +0100)]
[MIPS GlobalISel] Select count leading zeros

llvm.ctlz.<type> intrinsic has additional i1 argument is_zero_undef,
it tells whether zero as the first argument produces a defined result.
MIPS clz instruction returns 32 for zero input.
G_CTLZ is generated from llvm.ctlz.<type> (<type> <src>, i1 false)
intrinsics, clang generates these intrinsics from __builtin_clz and
__builtin_clzll.
G_CTLZ_ZERO_UNDEF can also be generated from llvm.ctlz with true as
second argument. It is also traditionally part of and many algorithms
that are now predicated on avoiding zero-value inputs.

Add narrow scalar for G_CTLZ (algorithm uses G_CTLZ_ZERO_UNDEF).
Lower G_CTLZ_ZERO_UNDEF and select G_CTLZ for MIPS32.

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

4 years ago[MachineVerifier] Simplify and delete LLVM_VERIFY_MACHINEINSTRS from a comment. NFC
Fangrui Song [Sun, 26 Jan 2020 23:47:32 +0000 (15:47 -0800)]
[MachineVerifier] Simplify and delete LLVM_VERIFY_MACHINEINSTRS from a comment. NFC

The environment variable has been unused since r228079.

4 years ago[libunwind] Treat assembly files as C on mingw
Martin Storsjö [Sun, 26 Jan 2020 20:14:41 +0000 (22:14 +0200)]
[libunwind] Treat assembly files as C on mingw

When targeting mingw, current CMake (3.16) fails to get the right
flags for assembly source files for windows gnu/clang targets
(see https://gitlab.kitware.com/cmake/cmake/merge_requests/4287
for a fix), causing builds to fail due to `-fPIC` being unsupported
in clang for mingw targets

In the meantime, restore the behaviour from before c48974ffd7d1676
selectively on mingw targets, treating the assembly files as C.

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

4 years ago[NFC] Fix typo in Clang docs
Qiu Chaofan [Mon, 27 Jan 2020 03:37:43 +0000 (11:37 +0800)]
[NFC] Fix typo in Clang docs

4 years ago[FPEnv] Divide macro INSTRUCTION into INSTRUCTION and DAG_INSTRUCTION,
Wang, Pengfei [Fri, 17 Jan 2020 02:32:30 +0000 (10:32 +0800)]
[FPEnv] Divide macro INSTRUCTION into INSTRUCTION and DAG_INSTRUCTION,
and macro FUNCTION likewise. NFCI.

Some functions like fmuladd don't really have a node, we should divide
the declaration form those have node to avoid introducing fake nodes.

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

4 years ago[Concepts] Fix incorrect TemplateArgs for introduction of local parameters
Saar Raz [Sun, 26 Jan 2020 22:57:31 +0000 (00:57 +0200)]
[Concepts] Fix incorrect TemplateArgs for introduction of local parameters

The wrong set of TemplateArgs was being provided to addInstantiatedParametersToScope.
Caused bug #44658.

4 years ago[mlir] Expose getNearestSymbolTable as SymbolTable class method
Lei Zhang [Sun, 26 Jan 2020 15:55:17 +0000 (10:55 -0500)]
[mlir] Expose getNearestSymbolTable as SymbolTable class method

This is a generally useful utility function for interacting with
symbol tables.

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

4 years ago[Concepts] Add missing null check to transformConstructor
Saar Raz [Sun, 26 Jan 2020 22:14:43 +0000 (00:14 +0200)]
[Concepts] Add missing null check to transformConstructor

Caused bug 44671 when transforming a constructor with a type-constraint with no explicit template args.

4 years ago[libunwind] Fix building standalone after c48974ffd7d1676
Martin Storsjö [Sun, 26 Jan 2020 20:11:28 +0000 (22:11 +0200)]
[libunwind] Fix building standalone after c48974ffd7d1676

After this change, we need to explicitly list the languages the
project uses, otherwise the assembly source files won't get built
at all.

Previously (before that commit), the assembly source files were
simply treated as C.

The toplevel llvm CMakeLists.txt adds these three languages, so
when building libunwind integrated as part of that, it works fine.

4 years ago[X86][BdVer2] Polish LEA instruction scheduling info
Roman Lebedev [Sun, 26 Jan 2020 17:33:29 +0000 (20:33 +0300)]
[X86][BdVer2] Polish LEA instruction scheduling info

Based on exhaustive llvm-exegesis measurements.
There may still be some imperfections for LEA16r/LEA32r.

Much like was observed in D68646, i'm also measuring some outliers
with some specific registers.

4 years ago[NFC][MCA] Re-autogenerate all check lines in all X86 MCA tests
Roman Lebedev [Sun, 26 Jan 2020 19:01:33 +0000 (22:01 +0300)]
[NFC][MCA] Re-autogenerate all check lines in all X86 MCA tests

Some whitespace issues have crept in,
and some znver2 check lines were missing..

4 years ago[InstCombine] Add extra shift(c1,add(c2,y)) tests for PR15141
Simon Pilgrim [Sun, 26 Jan 2020 17:27:53 +0000 (17:27 +0000)]
[InstCombine] Add extra shift(c1,add(c2,y)) tests for PR15141

4 years ago[X86][AVX] Extend combineCommutableSHUFP to handle v8f32 and v16f32 commutable shufps...
Simon Pilgrim [Sun, 26 Jan 2020 14:59:53 +0000 (14:59 +0000)]
[X86][AVX] Extend combineCommutableSHUFP to handle v8f32 and v16f32 commutable shufps patterns

4 years ago[Concepts] Fix parsing of scope specifier in compound-requirements, add more tests...
Saar Raz [Sun, 26 Jan 2020 18:39:44 +0000 (20:39 +0200)]
[Concepts] Fix parsing of scope specifier in compound-requirements, add more tests for scope specifiers in type-constraints

The code for parsing of type-constraints in compound-requirements was not adapted for the new TryAnnotateTypeConstraint which
caused compound-requirements with scope specifiers to ignore them.

Also add regression tests for scope specifiers in type-constraints in more contexts.

4 years agoNFC: Implement AST node skipping in ParentMapContext
Stephen Kelly [Fri, 24 Jan 2020 23:46:54 +0000 (23:46 +0000)]
NFC: Implement AST node skipping in ParentMapContext

Summary:
This allows ASTContext to store only one parent map, rather than storing
an entire parent map for each traversal mode used.

This is therefore a partial revert of commit 0a717d5b (Make it possible
control matcher traversal kind with ASTContext, 2019-12-06).

Reviewers: aaron.ballman, rsmith, rnk

Subscribers: cfe-commits

Tags: #clang

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

4 years ago[IR] masked gather/scatter alignment should be set
Guillaume Chatelet [Wed, 22 Jan 2020 13:27:05 +0000 (14:27 +0100)]
[IR] masked gather/scatter alignment should be set

Summary: masked_load and masked_store instructions require the alignment to be specified and a power of two. It seems to me that this requirement applies to masked_gather and masked_scatter as well.

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[mlir][spirv] Create builtin variable in nearest symbol table
Lei Zhang [Sat, 25 Jan 2020 15:09:46 +0000 (10:09 -0500)]
[mlir][spirv] Create builtin variable in nearest symbol table

This commit changes the logic of `getBuiltinVariableValue` to get
or create the builtin variable in the nearest symbol table. This
will allow us to use this function in other partial conversion
cases where we haven't created the spv.module yet.

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

4 years ago[mlir][spirv] NFC: simplify load/store builder call sites
Lei Zhang [Sat, 25 Jan 2020 15:58:18 +0000 (10:58 -0500)]
[mlir][spirv] NFC: simplify load/store builder call sites

This commit introduces default values for load/store builders to
simplify builder call sites.

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

4 years ago[mlir][spirv] NFC: expose builtin func op conversion pattern
Lei Zhang [Sat, 25 Jan 2020 22:01:26 +0000 (17:01 -0500)]
[mlir][spirv] NFC: expose builtin func op conversion pattern

This commit exposes the func op conversion pattern via a new
`populateBuiltinFuncToSPIRVPatterns` function from the standard
to SPIR-V conversion passs. This is structurally better given
that func op belongs to the builtin dialect. More importantly,
this makes the pattern reusable to other dialect to SPIR-V
dialect conversion as other dialect can well adopt builtin
func op instead of having its own. Besides, it's very common
to use func ops as test wrappers in lit tests, so test passes
will need to handle func ops too.

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

4 years ago[mlir][spirv] Relax verification to allow flexible placement
Lei Zhang [Sat, 25 Jan 2020 14:16:29 +0000 (09:16 -0500)]
[mlir][spirv] Relax verification to allow flexible placement

Thus far certain SPIR-V ops have been required to be in spv.module.
While this provides strong verification to catch unexpected errors,
it's quite rigid and makes progressive lowering difficult. Sometimes
we would like to partially lower ops from other dialects, which may
involve creating ops like global variables that should be placed in
other module-like ops. So this commit relaxes the requirement of
such SPIR-V ops' scope to module-like ops. Similarly for function-
like ops.

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

4 years ago[mlir][spirv] Add spv.GroupNonUniformElect and spv.GroupNonUniformIAdd
Lei Zhang [Sun, 26 Jan 2020 15:19:24 +0000 (10:19 -0500)]
[mlir][spirv] Add spv.GroupNonUniformElect and spv.GroupNonUniformIAdd

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

4 years ago[X86][AVX] Add tests showing combineCommutableSHUFP failure to handle v8f32 and v16f3...
Simon Pilgrim [Sun, 26 Jan 2020 14:35:56 +0000 (14:35 +0000)]
[X86][AVX] Add tests showing combineCommutableSHUFP failure to handle v8f32 and v16f32 commutable shufps patterns

4 years ago[X86][SSE] combineCommutableSHUFP - permilps(shufps(load(),x)) --> permilps(shufps...
Simon Pilgrim [Sun, 26 Jan 2020 14:31:26 +0000 (14:31 +0000)]
[X86][SSE] combineCommutableSHUFP - permilps(shufps(load(),x)) --> permilps(shufps(x,load()))

Pull out combineTargetShuffle code added in rG3fd5d1c6e7db into a helper function and extend it to handle shufps(shufps(load(),x),y) and shufps(y,shufps(load(),x)) cases as well.

4 years ago[FPEnv] Extended FPOptions with new attributes
Serge Pavlov [Wed, 7 Aug 2019 16:31:26 +0000 (23:31 +0700)]
[FPEnv] Extended FPOptions with new attributes

This change added two new attributes, rounding mode and exception
behavior to the structure FPOptions. These attributes allow more
flexible treatment of specific floating point environment than it is
provided by #pragma STDC FENV_ACCESS.

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

4 years ago[TargetLowering] Respect recursive depth in SimplifyDemandedBits call to ComputeNumSi...
Simon Pilgrim [Sun, 26 Jan 2020 10:01:21 +0000 (10:01 +0000)]
[TargetLowering] Respect recursive depth in SimplifyDemandedBits call to ComputeNumSignBits

4 years agoAMDGPU/GlobalISel: Clean-up code around ISel for Intrinsics.
Maheaha Shivamallappa [Sun, 26 Jan 2020 08:01:53 +0000 (13:31 +0530)]
AMDGPU/GlobalISel: Clean-up code around ISel for Intrinsics.

Summary:
A minor code clean-up around ISel for intrinsic llvm.amdgcn.end.cf()

Reviewers: arsenm, mshivama

Reviewed By: arsenm

Tags: #llvm

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

4 years ago[ELF][PPC32] Support range extension thunks with addends
Fangrui Song [Sun, 26 Jan 2020 02:58:54 +0000 (18:58 -0800)]
[ELF][PPC32] Support range extension thunks with addends

* Generalize the code added in D70637 and D70937. We should eventually remove the EM_MIPS special case.
* Handle R_PPC_LOCAL24PC the same way as R_PPC_REL24.

Reviewed By: Bdragon28

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

4 years ago[Support] `const`ify a method; NFC
George Burgess IV [Sun, 26 Jan 2020 05:44:59 +0000 (21:44 -0800)]
[Support] `const`ify a method; NFC

Pointed out by Stepan on llvm-dev:
http://lists.llvm.org/pipermail/llvm-dev/2020-January/138617.html

4 years agoMass update the MLIR license header to mention "Part of the LLVM project"
Mehdi Amini [Sun, 26 Jan 2020 03:58:30 +0000 (03:58 +0000)]
Mass update the MLIR license header to mention "Part of the LLVM project"

This is an artifact from merging MLIR into LLVM, the file headers are
now aligned with the rest of the project.

4 years ago[X86] Use a macro to convert X86ISD names to strings in getTargetNodeName.
Craig Topper [Sun, 26 Jan 2020 02:25:45 +0000 (18:25 -0800)]
[X86] Use a macro to convert X86ISD names to strings in getTargetNodeName.

Every case in the switch had a string version of themselves. Two
of them had a typo that used : instead of ::

By using a macro we can automate the string creation and avoid
the possibility of typos like this.

This is similar to what is done on the AMDGPU target.