platform/upstream/llvm.git
4 years ago[Alignment] fix build
Guillaume Chatelet [Mon, 23 Sep 2019 09:04:12 +0000 (09:04 +0000)]
[Alignment] fix build

llvm-svn: 372562

4 years ago[lldb][NFC] Remove argument prefix checking boilerplate when adding completions
Raphael Isemann [Mon, 23 Sep 2019 08:59:21 +0000 (08:59 +0000)]
[lldb][NFC] Remove argument prefix checking boilerplate when adding completions

llvm-svn: 372561

4 years ago[ARM][LowOverheadLoops] Use subs during revert.
Sam Parker [Mon, 23 Sep 2019 08:57:50 +0000 (08:57 +0000)]
[ARM][LowOverheadLoops] Use subs during revert.

Check whether there are any uses or defs between the LoopDec and
LoopEnd. If there's not, then we can use a subs to set the cpsr and
skip generating a cmp.

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

llvm-svn: 372560

4 years ago[Alignment][NFC] Switch DataLayout private members to llvm::Align
Guillaume Chatelet [Mon, 23 Sep 2019 08:38:36 +0000 (08:38 +0000)]
[Alignment][NFC] Switch DataLayout private members to llvm::Align

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

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 372558

4 years ago[ARM][LowOverheadLoops] Use tBcc when reverting
Sam Parker [Mon, 23 Sep 2019 08:35:31 +0000 (08:35 +0000)]
[ARM][LowOverheadLoops] Use tBcc when reverting

Check the branch target ranges and use a tBcc instead of t2Bcc when
we can.

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

llvm-svn: 372557

4 years ago[lldb] Reduce some dangerous boilerplate with CompletionRequest::ShiftArguments
Raphael Isemann [Mon, 23 Sep 2019 08:16:19 +0000 (08:16 +0000)]
[lldb] Reduce some dangerous boilerplate with CompletionRequest::ShiftArguments

We should in general not allow external code to fiddle with the internals of
CompletionRequest, but until this is gone let's at least provide a utility
function that makes this less dangerous.

This also now correct updates the partially parsed argument list,
but it doesn't seem to be used by anything that is behind one of
the current shift/SetCursorIndex calls, so this doesn't seeem to
fix any currently used completion.

llvm-svn: 372556

4 years ago[MIPS GlobalISel] VarArg argument lowering, select G_VASTART and vacopy
Petar Avramovic [Mon, 23 Sep 2019 08:11:41 +0000 (08:11 +0000)]
[MIPS GlobalISel] VarArg argument lowering, select G_VASTART and vacopy

CC_Mips doesn't accept vararg functions for O32, so we have to explicitly
use CC_Mips_FixedArg.
For lowerCall we now properly figure out whether callee function is vararg
or not, this has no effect for O32 since we always use CC_Mips_FixedArg.
For lower formal arguments we need to copy arguments in register to stack
and save pointer to start for argument list into MipsMachineFunction
object so that G_VASTART could use it during instruction select.
For vacopy we need to copy content from one vreg to another,
load and store are used for that purpose.

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

llvm-svn: 372555

4 years agoReland "[utils] Implement the llvm-locstats tool"
Djordje Todorovic [Mon, 23 Sep 2019 07:57:53 +0000 (07:57 +0000)]
Reland "[utils] Implement the llvm-locstats tool"

The tool reports verbose output for the DWARF debug location coverage.
The llvm-locstats for each variable or formal parameter DIE computes what
percentage from the code section bytes, where it is in scope, it has
location description. The line 0 shows the number (and the percentage) of
DIEs with no location information, but the line 100 shows the number (and
the percentage) of DIEs where there is location information in all code
section bytes (where the variable or parameter is in the scope). The line
50..59 shows the number (and the percentage) of DIEs where the location
information is in between 50 and 59 percentage of its scope covered.

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

llvm-svn: 372554

4 years ago[lldb] Fix that importing decls in a TagDecl end up in wrong declaration context...
Raphael Isemann [Mon, 23 Sep 2019 07:27:14 +0000 (07:27 +0000)]
[lldb] Fix that importing decls in a TagDecl end up in wrong declaration context (partly reverts D61333)

Summary:
In D61333 we dropped some code from ClangASTSource that checks if imported declarations
ended up in the right DeclContext. While this code wasn't tested by the test suite (or better, it was hit
by the test suite but we didn't have any checks that were affected) and the code seems pointless
(as usually Decls should end up in the right DeclContext), it actually broke the data formatters in LLDB
and causes a bunch of obscure bugs where structs suddenly miss all their members. The first report we got about
this was that printing a std::map doesn't work anymore when simply doing "expr m" (m is the std::map).

This patch reverts D61333 partly and reintroduces the check in a more stricter way (we actually check now that
we *move* the Decl and it is in a single DeclContext). This should fix all the problems we currently have until
we figure out how to properly fix the underlying issues. I changed the order of some std::map formatter tests
which is currently the most reliable way to test this problem (it's a tricky setup, see description below).

Fixes rdar://55502701 and rdar://55129537

--------------------------------------

Some more explanation what is actually going on and what is going wrong:

The situation we have is that if we have a `std::map m` and do a `expr m`, we end up seeing an empty map
(even if `m` has elements). The reason for this is that our data formatter sees that std::pair<int, int> has no
members. However, `frame var m` works just fine (and fixes all following `expr m` calls).

The reason for why `expr` breaks std::map is that we actually copy the std::map nodes in two steps in the
three ASTContexts that are involved: The debug information ASTContext (D-AST), the expression ASTContext
we created for the current expression (E-AST) and the persistent ASTContext we use for our $variables (P-AST).

When doing `expr m` we do a minimal import of `std::map` from D-AST to E-AST just do the type checking/codegen.
This copies std::map itself and does a minimal.import of `std::pair<int, int>` (that is, we don't actually import
the `first` and `second` members as we don't need them for anything). After the expression is done, we take
the expression result and copy it from E-AST to P-AST. This imports the E-AST's `std::pair` into P-AST which still
has no `first` and `second` as they are still undeserialized. Once we are in P-AST, the data formatter tries to
inspect `std::map` (and also `std::pair` as that's what the elements are) and it asks for the `std::pair` members.
We see that `std::pair` has undeserialized members and go to the ExternalASTSource to ask for them. However,
P-ASTs ExternalASTSource points to D-AST (and not E-AST, which `std::pair` came from). It can't point to E-AST
as that is only temporary and already gone (and also doesn't actually contain all decls we have in P-AST).

So we go to D-AST to get the `std::pair` members. The ASTImporter is asked to copy over `std::pair` members
and first checks if `std::pair` is already in P-AST. However, it only finds the std::pair we got from E-AST, so it
can't use it's map of already imported declarations and does a comparison between the `std::pair` decls we have
Because the ASTImporter thinks they are different declarations, it creates a second `std::pair` and fills in the
members `first` and `second` into the second `std::pair`. However, the data formatter is looking at the first
`std::pair` which still has no members as they are in the other decl. Now we pretend we have no declarations
and just print an empty map as a fallback.

The hack we had before fixed this issue by moving `first` and `second` to the first declaration which makes
the formatters happy as they can now see the members in the DeclContext they are querying.

Obviously this is a temporary patch until we get a real fix but I'm not sure what's the best way to fix this.
Implementing that the ClassTemplateSpecializationDecl actually understands that the two std::pair's are the same
decl fixes the issue, but this doesn't fix the bug for all declarations. My preferred solution would be to
complete all declarations in E-AST before they get moved to P-AST (as we anyway have to do this from what I can
tell), but that might have unintended side-effects and not sure what's the best way to implement this.

Reviewers: friss, martong

Reviewed By: martong

Subscribers: aprantl, rnkovacs, christof, abidh, JDevlieghere, lldb-commits, shafik

Tags: #lldb

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

llvm-svn: 372549

4 years ago[lldb] Fix LLDB build after r372538
Raphael Isemann [Mon, 23 Sep 2019 06:59:35 +0000 (06:59 +0000)]
[lldb] Fix LLDB build after r372538

llvm-svn: 372548

4 years agoRevert "Extension: Mark the default constructor of chrono::duration as conditionally...
Marshall Clow [Mon, 23 Sep 2019 06:16:41 +0000 (06:16 +0000)]
Revert "Extension: Mark the default constructor of chrono::duration as conditionally noexcept"; this breaks the gcc5 bot for C++11

This reverts commit c8ca15c95c4c0d6d1356500d5fe49a319ea4ca01.

llvm-svn: 372546

4 years ago[X86] Canonicalize all zeroes vector to RHS in X86DAGToDAGISel::tryVPTESTM.
Craig Topper [Mon, 23 Sep 2019 05:35:23 +0000 (05:35 +0000)]
[X86] Canonicalize all zeroes vector to RHS in X86DAGToDAGISel::tryVPTESTM.

llvm-svn: 372544

4 years ago[X86] Remove SETEQ/SETNE canonicalization code from LowerIntVSETCC_AVX512 to prevent...
Craig Topper [Mon, 23 Sep 2019 05:35:20 +0000 (05:35 +0000)]
[X86] Remove SETEQ/SETNE canonicalization code from LowerIntVSETCC_AVX512 to prevent an infinite loop.

The attached test case would previous infinite loop after
r365711.

I'm going to move this to X86ISelDAGToDAG.cpp to get the setcc
to match VPTEST in 32-bit mode in a follow up commit.

llvm-svn: 372543

4 years ago[X86] Add 32-bit command line to avx512f-vec-test-testn.ll
Craig Topper [Mon, 23 Sep 2019 05:35:15 +0000 (05:35 +0000)]
[X86] Add 32-bit command line to avx512f-vec-test-testn.ll

llvm-svn: 372542

4 years agoFor P0784R7: add further testing of requirements on constexpr
Richard Smith [Mon, 23 Sep 2019 05:08:55 +0000 (05:08 +0000)]
For P0784R7: add further testing of requirements on constexpr
destructors.

llvm-svn: 372541

4 years agoPrefer AVX512 memcpy when applicable
David Zarzycki [Mon, 23 Sep 2019 05:00:59 +0000 (05:00 +0000)]
Prefer AVX512 memcpy when applicable

When AVX512 is available and the preferred vector width is 512-bits or
more, we should prefer AVX512 for memcpy().

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

https://reviews.llvm.org/D67874

llvm-svn: 372540

4 years agoExtension: Mark the default constructor of chrono::duration as conditionally noexcept
Marshall Clow [Mon, 23 Sep 2019 04:16:48 +0000 (04:16 +0000)]
Extension: Mark the default constructor of chrono::duration as conditionally noexcept

llvm-svn: 372539

4 years agoFor P0784R7: add support for constexpr destructors, and call them as
Richard Smith [Mon, 23 Sep 2019 03:48:44 +0000 (03:48 +0000)]
For P0784R7: add support for constexpr destructors, and call them as
appropriate during constant evaluation.

Note that the evaluator is sometimes invoked on incomplete expressions.
In such cases, if an object is constructed but we never reach the point
where it would be destroyed (and it has non-trivial destruction), we
treat the expression as having an unmodeled side-effect.

llvm-svn: 372538

4 years ago[X86] Convert to Constant arguments to MMX shift by i32 intrinsics to TargetConstant...
Craig Topper [Mon, 23 Sep 2019 01:21:51 +0000 (01:21 +0000)]
[X86] Convert to Constant arguments to MMX shift by i32 intrinsics to TargetConstant during lowering.

This allows us to use timm in the isel table which is more
consistent with other intrinsics that take an immediate now.

We can't declare the intrinsic as taking an ImmArg because we
need to match non-constants to the shift by MMX register
instruction which we do by mutating the intrinsic id during
lowering.

llvm-svn: 372537

4 years ago[X86] Remove stale FIXME.
Craig Topper [Mon, 23 Sep 2019 01:21:47 +0000 (01:21 +0000)]
[X86] Remove stale FIXME.

This goes back to when MMX was migrated to intrinsic only. The
hack referenced here has been gone for quite a while.

llvm-svn: 372536

4 years ago[X86][SelectionDAGBuilder] Move the hack for handling MMX shift by i32 intrinsics...
Craig Topper [Mon, 23 Sep 2019 01:05:33 +0000 (01:05 +0000)]
[X86][SelectionDAGBuilder] Move the hack for handling MMX shift by i32 intrinsics into the X86 backend.

This intrinsics should be shift by immediate, but gcc allows any
i32 scalar and clang needs to match that. So we try to detect the
non-constant case and move the data from an integer register to an
MMX register.

Previously this was done by creating a v2i32 build_vector and
bitcast in SelectionDAGBuilder. This had to be done early since
v2i32 isn't a legal type. The bitcast+build_vector would be DAG
combined to X86ISD::MMX_MOVW2D which isel will turn into a
GPR->MMX MOVD.

This commit just moves the whole thing to lowering and emits
the X86ISD::MMX_MOVW2D directly to avoid the illegal type. The
test changes just seem to be due to nodes being linearized in a
different order.

llvm-svn: 372535

4 years ago[X86] Require last argument to LWPINS/LWPVAL builtins to be an ICE. Add ImmArg to...
Craig Topper [Sun, 22 Sep 2019 23:48:50 +0000 (23:48 +0000)]
[X86] Require last argument to LWPINS/LWPVAL builtins to be an ICE. Add ImmArg to the llvm intrinsics.

Update the isel patterns to use timm instead of imm.

llvm-svn: 372534

4 years ago[NFC] Fixed failed test
David Bolvansky [Sun, 22 Sep 2019 22:15:11 +0000 (22:15 +0000)]
[NFC] Fixed failed test

llvm-svn: 372533

4 years ago[X86] X86DAGToDAGISel::matchBEXTRFromAndImm(): if can't use BEXTR, fallback to BZHI...
Roman Lebedev [Sun, 22 Sep 2019 22:04:29 +0000 (22:04 +0000)]
[X86] X86DAGToDAGISel::matchBEXTRFromAndImm(): if can't use BEXTR, fallback to BZHI is profitable (PR43381)

Summary:
PR43381 notes that while we are good at matching `(X >> C1) & C2` as BEXTR/BEXTRI,
we only do that if we either have BEXTRI (TBM),
or if BEXTR is marked as being fast (`-mattr=+fast-bextr`).
In all other cases we don't match.

But that is mainly only true for AMD CPU's.
However, for all the CPU's for which we have sched models,
the BZHI is always fast (or the sched models are all bad.)

So if we decide that it's unprofitable to emit BEXTR/BEXTRI,
we should consider falling-back to BZHI if it is available,
and follow-up with the shift.

While it's really tempting to do something because it's cool
it is wise to first think whether it actually makes sense to do.
We shouldn't just use BZHI because we can, but only it it is beneficial.
In particular, it isn't really worth it if the input is a register,
mask is small, or we can fold a load.
But it is worth it if the mask does not fit into 32-bits.

(careful, i don't know much about intel cpu's, my choice of `-mcpu` may be bad here)
Thus we manage to fold a load:
https://godbolt.org/z/Er0OQz
Or if we'd end up using BZHI anyways because the mask is large:
https://godbolt.org/z/dBJ_5h
But this isn'r actually profitable in general case,
e.g. here we'd increase microop count
(the register renaming is free, mca does not model that there it seems)
https://godbolt.org/z/k6wFoz
Likewise, not worth it if we just get load folding:
https://godbolt.org/z/1M1deG

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

Reviewers: RKSimon, craig.topper, davezarzycki, spatel

Reviewed By: craig.topper, davezarzycki

Subscribers: andreadb, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 372532

4 years ago[Diagnostics] Warn if ?: with integer constants always evaluates to true
David Bolvansky [Sun, 22 Sep 2019 22:00:48 +0000 (22:00 +0000)]
[Diagnostics] Warn if ?: with integer constants always evaluates to true

Extracted from D63082. GCC has this warning under -Wint-in-bool-context, but as noted in the D63082's review, we should put it under TautologicalConstantCompare.

llvm-svn: 372531

4 years ago[clang] fixing conditional explicit for out-of-line definition PR42980
Gauthier Harnisch [Sun, 22 Sep 2019 21:59:10 +0000 (21:59 +0000)]
[clang] fixing conditional explicit for out-of-line definition PR42980

Summary: not every read in CXXConstructorDecl::getExplicitSpecifierInternal() was made on the canonical declaration.

Reviewers: rsmith, aaron.ballman

Reviewed By: rsmith

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 372530

4 years agoVerifier - silence static analyzer dyn_cast<VectorType> null dereference warnings...
Simon Pilgrim [Sun, 22 Sep 2019 21:01:23 +0000 (21:01 +0000)]
Verifier - silence static analyzer dyn_cast<VectorType> null dereference warnings. NFCI.

The static analyzer is warning about potential null dereferences, but we should be able to use cast<VectorType> directly and if not assert will fire for us.

llvm-svn: 372529

4 years ago[AMDGPU] isSDNodeAlwaysUniform - silence static analyzer dyn_cast<LoadSDNode> null...
Simon Pilgrim [Sun, 22 Sep 2019 21:01:13 +0000 (21:01 +0000)]
[AMDGPU] isSDNodeAlwaysUniform - silence static analyzer dyn_cast<LoadSDNode> null dereference warning. NFCI.

The static analyzer is warning about a potential null dereference, but we should be able to use cast<LoadSDNode> directly and if not assert will fire for us.

llvm-svn: 372528

4 years ago[clang] [Basic] Enable __has_feature(leak_sanitizer)
Michal Gorny [Sun, 22 Sep 2019 20:55:01 +0000 (20:55 +0000)]
[clang] [Basic] Enable __has_feature(leak_sanitizer)

Add a 'leak_sanitizer' feature akin to existing '*_sanitizer' features
to let programmers switch code paths accounting for leak sanitizers
being enabled.

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

llvm-svn: 372527

4 years ago[X86] Fix some VCVTPS2PH isel patterns where 'i32' was used instead of 'timm'
Craig Topper [Sun, 22 Sep 2019 20:08:57 +0000 (20:08 +0000)]
[X86] Fix some VCVTPS2PH isel patterns where 'i32' was used instead of 'timm'

This seems to have completed omitted any check for the opcode
of the operand in the isel table.

llvm-svn: 372526

4 years ago[X86][TableGen] Allow timm to appear in output patterns. Use it to remove ConvertToTa...
Craig Topper [Sun, 22 Sep 2019 19:49:39 +0000 (19:49 +0000)]
[X86][TableGen] Allow timm to appear in output patterns. Use it to remove ConvertToTarget opcodes from the X86 isel table.

We're now using a lot more TargetConstant nodes in SelectionDAG.
But we were still telling isel to convert some of them
to TargetConstants even though they already are. This is because
isel emits a conversion anytime the output pattern has a an 'imm'.
I guess for patterns in instructions we take the 'timm' from the
'set' pattern, but for Pat patterns with explcicit output we
previously had to say 'imm' since 'timm' wasn't allowed in outputs.

llvm-svn: 372525

4 years ago[NFC][X86] Add BEXTR test with load and 33-bit mask (PR43381 / D67875)
Roman Lebedev [Sun, 22 Sep 2019 19:36:38 +0000 (19:36 +0000)]
[NFC][X86] Add BEXTR test with load and 33-bit mask (PR43381 / D67875)

llvm-svn: 372524

4 years ago[X86] Update commutable EVEX vcmp patterns to use timm instead of imm.
Craig Topper [Sun, 22 Sep 2019 19:06:13 +0000 (19:06 +0000)]
[X86] Update commutable EVEX vcmp patterns to use timm instead of imm.

We need to match TargetConstant, not Constant. This was broken
in r372338, but we lacked test coverage.

llvm-svn: 372523

4 years ago[X86] Add more tests for commuting evex vcmp instructions during isel to fold a load.
Craig Topper [Sun, 22 Sep 2019 19:06:08 +0000 (19:06 +0000)]
[X86] Add more tests for commuting evex vcmp instructions during isel to fold a load.

Some of the isel patterns were not updated to check for
TargetConstant instead of Constant in r372338.

llvm-svn: 372522

4 years ago[SelectionDAG] computeKnownBits/ComputeNumSignBits - cleanup demanded/unknown paths...
Simon Pilgrim [Sun, 22 Sep 2019 18:47:12 +0000 (18:47 +0000)]
[SelectionDAG] computeKnownBits/ComputeNumSignBits - cleanup demanded/unknown paths. NFCI.

Merge the calls, just adjust the demandedelts if we have a valid extract_subvector constant index, else demand all elts.

llvm-svn: 372521

4 years ago[XRay] Silence static analyzer dyn_cast<BufferExtents> null dereference warning....
Simon Pilgrim [Sun, 22 Sep 2019 18:47:00 +0000 (18:47 +0000)]
[XRay] Silence static analyzer dyn_cast<BufferExtents> null dereference warning. NFCI.

llvm-svn: 372520

4 years ago[LSR] Silence static analyzer null dereference warnings with assertions. NFCI.
Simon Pilgrim [Sun, 22 Sep 2019 17:59:24 +0000 (17:59 +0000)]
[LSR] Silence static analyzer null dereference warnings with assertions. NFCI.

Add assertions to make it clear that GenerateIVChain / NarrowSearchSpaceByPickingWinnerRegs should succeed in finding non-null values

llvm-svn: 372518

4 years agoConstantHoisting - Silence static analyzer dyn_cast<PointerType> null dereference...
Simon Pilgrim [Sun, 22 Sep 2019 17:45:05 +0000 (17:45 +0000)]
ConstantHoisting - Silence static analyzer dyn_cast<PointerType> null dereference warning. NFCI.

llvm-svn: 372517

4 years ago[CLANG][BPF] permit any argument type for __builtin_preserve_access_index()
Yonghong Song [Sun, 22 Sep 2019 17:33:48 +0000 (17:33 +0000)]
[CLANG][BPF] permit any argument type for __builtin_preserve_access_index()

Commit c15aa241f821 ("[CLANG][BPF] change __builtin_preserve_access_index()
signature") changed the builtin function signature to
  PointerT __builtin_preserve_access_index(PointerT ptr)
with a pointer type as the argument/return type, where argument and
return types must be the same.

There is really no reason for this constraint. The builtin just
presented a code region so that IR builtins
  __builtin_{array, struct, union}_preserve_access_index
can be applied.

This patch removed the pointer type restriction to permit any
argument type as long as it is permitted by the compiler.

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

llvm-svn: 372516

4 years agogn build: Friendlier error on invalid entries in llvm_targets_to_build
Nico Weber [Sun, 22 Sep 2019 16:48:20 +0000 (16:48 +0000)]
gn build: Friendlier error on invalid entries in llvm_targets_to_build

llvm-svn: 372515

4 years ago[Cost][X86] Add more missing vector truncation costs
Simon Pilgrim [Sun, 22 Sep 2019 16:46:15 +0000 (16:46 +0000)]
[Cost][X86] Add more missing vector truncation costs

The AVX512 cases still need some work to correct recognise the PMOV truncation cases.

llvm-svn: 372514

4 years ago[mips] Deduce MIPS specific ELF header flags from `emulation`
Simon Atanasyan [Sun, 22 Sep 2019 16:26:39 +0000 (16:26 +0000)]
[mips] Deduce MIPS specific ELF header flags from `emulation`

In case of linking binary blobs which do not have any ELF headers, we can
deduce MIPS ABI  ELF header flags from an `emulation` option.

Patch by Kyle Evans.

llvm-svn: 372513

4 years agogn build: consolidate "Nothing to do" branches in targets.gni
Nico Weber [Sun, 22 Sep 2019 15:42:40 +0000 (15:42 +0000)]
gn build: consolidate "Nothing to do" branches in targets.gni

No behavior change.

llvm-svn: 372512

4 years ago[compiler-rt] Fix lint check failure on comments
Jinsong Ji [Sun, 22 Sep 2019 15:31:03 +0000 (15:31 +0000)]
[compiler-rt] Fix lint check failure on comments

This fixes buildbot failures for https://reviews.llvm.org/rL372459.
(at least on PowerPC/Z )

The fix is generated by running clang-format on the error lines only.

llvm-svn: 372511

4 years ago[InstCombine] allow icmp+binop folds before min/max bailout (PR43310)
Sanjay Patel [Sun, 22 Sep 2019 14:31:53 +0000 (14:31 +0000)]
[InstCombine] allow icmp+binop folds before min/max bailout (PR43310)

This has the potential to uncover missed analysis/folds as shown in the
min/max code comment/test, but fewer restrictions on icmp folds should
be better in general to solve cases like:
https://bugs.llvm.org/show_bug.cgi?id=43310

llvm-svn: 372510

4 years ago[InstCombine] add tests for icmp fold hindered by min/max; NFC
Sanjay Patel [Sun, 22 Sep 2019 14:23:22 +0000 (14:23 +0000)]
[InstCombine] add tests for icmp fold hindered by min/max; NFC

llvm-svn: 372509

4 years agoFix uninitialized variable warning. NFCI.
Simon Pilgrim [Sun, 22 Sep 2019 13:43:21 +0000 (13:43 +0000)]
Fix uninitialized variable warning. NFCI.

llvm-svn: 372508

4 years ago[AArch64] AArch64StackTagging - Silence static analyzer dyn_cast<> null dereference...
Simon Pilgrim [Sun, 22 Sep 2019 13:43:12 +0000 (13:43 +0000)]
[AArch64] AArch64StackTagging - Silence static analyzer dyn_cast<> null dereference warning. NFCI.

The static analyzer is warning about potential null dereferences, but we should be able to use cast<> directly and if not assert will fire for us.

llvm-svn: 372507

4 years agogn build: Add missing RISCV to llvm_targets_to_build="all"
Nico Weber [Sun, 22 Sep 2019 13:41:38 +0000 (13:41 +0000)]
gn build: Add missing RISCV to llvm_targets_to_build="all"

llvm-svn: 372506

4 years agogn build: Add build files for llvm/lib/Target/AVR
Nico Weber [Sun, 22 Sep 2019 13:17:38 +0000 (13:17 +0000)]
gn build: Add build files for llvm/lib/Target/AVR

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

llvm-svn: 372505

4 years ago[NVPTX] NVPTXLowerAggrCopies - Silence static analyzer dyn_cast<StoreInst> null deref...
Simon Pilgrim [Sun, 22 Sep 2019 13:14:30 +0000 (13:14 +0000)]
[NVPTX] NVPTXLowerAggrCopies - Silence static analyzer dyn_cast<StoreInst> null dereference warning. NFCI.

llvm-svn: 372504

4 years ago[Lanai] LanaiAsmParser - Silence static analyzer dyn_cast null dereference warnings...
Simon Pilgrim [Sun, 22 Sep 2019 13:14:21 +0000 (13:14 +0000)]
[Lanai] LanaiAsmParser - Silence static analyzer dyn_cast null dereference warnings. NFCI.

We were already doing this dyn_cast && isa<> && cast<> pattern for some add*Operands methods, just do this more consistently to stop clang static analyzer warning so much.

llvm-svn: 372503

4 years ago[VPlan] Silence static analyzer dyn_cast null dereference warning. NFCI.
Simon Pilgrim [Sun, 22 Sep 2019 13:02:00 +0000 (13:02 +0000)]
[VPlan] Silence static analyzer dyn_cast null dereference warning. NFCI.

llvm-svn: 372502

4 years agoAMDGPUPrintfRuntimeBinding - silence static analyzer null dereference warnings. NFCI.
Simon Pilgrim [Sun, 22 Sep 2019 13:01:49 +0000 (13:01 +0000)]
AMDGPUPrintfRuntimeBinding - silence static analyzer null dereference warnings. NFCI.

llvm-svn: 372501

4 years ago[MIPS] Don't dereference dyn_cast<> Constant results. NFCI.
Simon Pilgrim [Sun, 22 Sep 2019 12:38:32 +0000 (12:38 +0000)]
[MIPS] Don't dereference dyn_cast<> Constant results. NFCI.

The static analyzer is warning about potential null dereferences, but we should be able to use cast<> directly and if not assert will fire for us.

llvm-svn: 372500

4 years ago[Hexagon] Don't dereference dyn_cast<ConstantFPSDNode> result. NFCI.
Simon Pilgrim [Sun, 22 Sep 2019 12:38:21 +0000 (12:38 +0000)]
[Hexagon] Don't dereference dyn_cast<ConstantFPSDNode> result. NFCI.

The static analyzer is warning about potential null dereference, but we should be able to use cast<ConstantFPSDNode> directly and if not assert will fire for us.

llvm-svn: 372499

4 years ago[Cost][X86] Add v2i64 truncation costs
Simon Pilgrim [Sun, 22 Sep 2019 12:04:38 +0000 (12:04 +0000)]
[Cost][X86] Add v2i64 truncation costs

We are missing costs for a lot of truncation cases, I'm hoping to address all the 'zero cost' cases in trunc.ll

I thought this was a vector widening side effect, but even before this we had some interesting LV decisions (notably over indvars) being made due to these zero costs.

llvm-svn: 372498

4 years agoClang-format: Add Whitesmiths indentation style
Paul Hoad [Sun, 22 Sep 2019 12:00:34 +0000 (12:00 +0000)]
Clang-format: Add Whitesmiths indentation style

Summary:
This patch adds support for the Whitesmiths indentation style to clang-format. It’s an update to a patch submitted in 2015 (D6833), but reworks it to use the newer API.

There are still some issues with this patch, primarily around `switch` and `case` support. The added unit test won’t currently pass because of the remaining issues.

Reviewers: mboehme, MyDeveloperDay, djasper

Reviewed By: MyDeveloperDay

Subscribers: krasimir, MyDeveloperDay, echristo, cfe-commits

Patch By: @timwoj (Tim Wojtulewicz)

Tags: #clang

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

llvm-svn: 372497

4 years agoMove classes into anonymous namespaces. NFC.
Benjamin Kramer [Sun, 22 Sep 2019 09:28:47 +0000 (09:28 +0000)]
Move classes into anonymous namespaces. NFC.

llvm-svn: 372495

4 years ago[X86] Add test memset and memcpy testcases for D67874. NFC
Craig Topper [Sun, 22 Sep 2019 06:52:25 +0000 (06:52 +0000)]
[X86] Add test memset and memcpy testcases for D67874. NFC

llvm-svn: 372494

4 years agoUse _WIN32 instead of _MSC_VER
Haibo Huang [Sun, 22 Sep 2019 01:21:34 +0000 (01:21 +0000)]
Use _WIN32 instead of _MSC_VER

Summary: This way it works better with MinGW.

Subscribers: mstorsjo, lldb-commits

Tags: #lldb

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

llvm-svn: 372493

4 years agoNFC: Change ObjCQualified*TypesAreCompatible to take
James Y Knight [Sat, 21 Sep 2019 22:31:28 +0000 (22:31 +0000)]
NFC: Change ObjCQualified*TypesAreCompatible to take
ObjCObjectPointerType arguments.

All callers already had one, just creating a QualType to pass, after
which the function cast it right back.

llvm-svn: 372492

4 years ago[InstSimplify] simplifyUnsignedRangeCheck(): X >= Y && Y == 0 --> Y == 0
Roman Lebedev [Sat, 21 Sep 2019 22:27:39 +0000 (22:27 +0000)]
[InstSimplify] simplifyUnsignedRangeCheck(): X >= Y && Y == 0  -->  Y == 0

https://rise4fun.com/Alive/v9Y4

llvm-svn: 372491

4 years ago[InstSimplify][NFC] Reorganize simplifyUnsignedRangeCheck() to emphasize and/or symmetry
Roman Lebedev [Sat, 21 Sep 2019 22:27:28 +0000 (22:27 +0000)]
[InstSimplify][NFC] Reorganize simplifyUnsignedRangeCheck() to emphasize and/or symmetry

Only a single `X >= Y && Y == 0  -->  Y == 0` fold appears to be missing.

llvm-svn: 372490

4 years ago[NFC][InstSimplify] Add exhaustive test coverage for simplifyUnsignedRangeCheck().
Roman Lebedev [Sat, 21 Sep 2019 22:27:18 +0000 (22:27 +0000)]
[NFC][InstSimplify] Add exhaustive test coverage for simplifyUnsignedRangeCheck().

One case is not handled.

llvm-svn: 372489

4 years ago[Docs] Updates sidebar links
DeForest Richards [Sat, 21 Sep 2019 21:05:20 +0000 (21:05 +0000)]
[Docs] Updates sidebar links

Adds sidebar links to mailing lists, IRC, and meetups and social events.

llvm-svn: 372488

4 years ago[Docs] Adds new page for Getting Involved articles
DeForest Richards [Sat, 21 Sep 2019 20:56:40 +0000 (20:56 +0000)]
[Docs] Adds new page for Getting Involved articles

Adds a new page for existing Getting Involved, Development Process, and Community Proposals articles. Also moves Mailing Lists, Meetups and social events, and IRC sections.

llvm-svn: 372487

4 years ago[LLDB] Cast -1 (as invalid socket) to the socket type before comparing
Martin Storsjo [Sat, 21 Sep 2019 19:10:15 +0000 (19:10 +0000)]
[LLDB] Cast -1 (as invalid socket) to the socket type before comparing

This silences warnings about comparison of integers between unsigned
long long (which is what the Windows SOCKET type is) and signed int
when building in MinGW mode.

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

llvm-svn: 372486

4 years ago[LLDB] Use SetErrorStringWithFormatv for cases that use LLVM style format strings
Martin Storsjo [Sat, 21 Sep 2019 19:10:00 +0000 (19:10 +0000)]
[LLDB] Use SetErrorStringWithFormatv for cases that use LLVM style format strings

SetErrorStringWithFormat only supports normal printf style format
strings.

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

llvm-svn: 372485

4 years ago[LLDB] Use LLVM_FALLTHROUGH instead of a custom comment
Martin Storsjo [Sat, 21 Sep 2019 19:09:54 +0000 (19:09 +0000)]
[LLDB] Use LLVM_FALLTHROUGH instead of a custom comment

This fixes a warning when built with Clang in MinGW mode.

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

llvm-svn: 372484

4 years ago[LLDB] Check for the GCC/MinGW compatible arch defines for windows, in addition to...
Martin Storsjo [Sat, 21 Sep 2019 19:09:49 +0000 (19:09 +0000)]
[LLDB] Check for the GCC/MinGW compatible arch defines for windows, in addition to MSVC defines

This matches how it is done in all other similar ifdefs throughout
lldb.

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

llvm-svn: 372483

4 years ago[LLDB] Fix compilation for MinGW, remove redundant class name on inline member
Martin Storsjo [Sat, 21 Sep 2019 19:09:43 +0000 (19:09 +0000)]
[LLDB] Fix compilation for MinGW, remove redundant class name on inline member

This fixes build errors like these:

NativeRegisterContextWindows.h:22:33: error: extra qualification on member 'NativeRegisterContextWindows'
  NativeRegisterContextWindows::NativeRegisterContextWindows(
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

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

llvm-svn: 372482

4 years ago[CodeView] Add pragma push/pop_macro for ARM64_FPSR to enum header
Martin Storsjo [Sat, 21 Sep 2019 19:09:24 +0000 (19:09 +0000)]
[CodeView] Add pragma push/pop_macro for ARM64_FPSR to enum header

This fixes (one aspect of) compilation of LLDB with MSVC for ARM64.

LLDB source files include intrin.h, and the MSVC intrin.h transitively
includes arm64intr.h, which has an ARM64_FPSR define, which clashes
with the enum declaration.

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

llvm-svn: 372481

4 years agoSROA: Check Total Bits of vector type
Suyog Sarda [Sat, 21 Sep 2019 18:16:37 +0000 (18:16 +0000)]
SROA: Check Total Bits of vector type

While Promoting alloca instruction of Vector Type,
Check total size in bits of its slices too.
If they don't match, don't promote the alloca instruction.

Bug : https://bugs.llvm.org/show_bug.cgi?id=42585

llvm-svn: 372480

4 years agoTest mail. NFC.
Suyog Sarda [Sat, 21 Sep 2019 18:03:30 +0000 (18:03 +0000)]
Test mail. NFC.

Testing commit acces. NFC.

llvm-svn: 372479

4 years agoRecommit [SampleFDO] Expose an interface to return the size of a section
Wei Mi [Sat, 21 Sep 2019 17:23:55 +0000 (17:23 +0000)]
Recommit [SampleFDO] Expose an interface to return the size of a section
or the size of the profile for profile in ExtBinary format.

Fix a test failure on Mac.

[SampleFDO] Expose an interface to return the size of a section or the
size of the profile for profile in ExtBinary format.

Sometimes we want to limit the size of the profile by stripping some functions
with low sample count or by stripping some function names with small text size
from profile symbol list. That requires the profile reader to have the
interfaces returning the size of a section or the size of total profile. The
patch add those interfaces.

At the same time, add some dump facility to show the size of each section.

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

llvm-svn: 372478

4 years ago[Attributor] Implement "norecurse" function attribute deduction
Hideto Ueno [Sat, 21 Sep 2019 15:13:19 +0000 (15:13 +0000)]
[Attributor] Implement "norecurse" function attribute deduction

Summary:
This patch introduces `norecurse` function attribute deduction.

`norecurse` will be deduced if the following conditions hold:
* The size of SCC in which the function belongs equals to 1.
* The function doesn't have self-recursion.
* We have `norecurse` for all call site.

To avoid a large change, SCC is calculated using scc_iterator in InfoCache initialization for now.

Reviewers: jdoerfert, sstefan1

Reviewed By: jdoerfert

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 372475

4 years ago[Support] Add a DataExtractor constructor that takes ArrayRef<uint8_t>
Fangrui Song [Sat, 21 Sep 2019 15:05:03 +0000 (15:05 +0000)]
[Support] Add a DataExtractor constructor that takes ArrayRef<uint8_t>

The new constructor can simplify some llvm-readobj call sites.

Reviewed By: grimar, dblaikie

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

llvm-svn: 372473

4 years ago[Docs] Bug fix for document not included in toctree
DeForest Richards [Sat, 21 Sep 2019 14:29:19 +0000 (14:29 +0000)]
[Docs] Bug fix for document not included in toctree

Fixes 'document not included in toctree' bug for FAQ and Lexicon topics.

llvm-svn: 372470

4 years ago[Docs] Updates sidebar links
DeForest Richards [Sat, 21 Sep 2019 14:17:09 +0000 (14:17 +0000)]
[Docs] Updates sidebar links

Adds additional links to sidebar. Also removes Glossary and FAQ from LLVM Design & Overview section. (These links now reside on the sidebar.)

llvm-svn: 372469

4 years ago[NFC][X86] Adjust check prefixes in bmi.ll (PR43381)
Roman Lebedev [Sat, 21 Sep 2019 11:12:55 +0000 (11:12 +0000)]
[NFC][X86] Adjust check prefixes in bmi.ll (PR43381)

llvm-svn: 372468

4 years ago[AArch64][GlobalISel] Implement selection for G_SHL of <2 x i64>
Amara Emerson [Sat, 21 Sep 2019 09:21:16 +0000 (09:21 +0000)]
[AArch64][GlobalISel] Implement selection for G_SHL of <2 x i64>

Simple continuation of existing selection support.

llvm-svn: 372467

4 years ago[AArch64][GlobalISel] Selection support for G_ASHR of <2 x s64>
Amara Emerson [Sat, 21 Sep 2019 09:21:13 +0000 (09:21 +0000)]
[AArch64][GlobalISel] Selection support for G_ASHR of <2 x s64>

Just add an extra case to the existing selection logic.

llvm-svn: 372466

4 years ago[AArch64][GlobalISel] Make <4 x s32> G_ASHR and G_LSHR legal.
Amara Emerson [Sat, 21 Sep 2019 09:21:10 +0000 (09:21 +0000)]
[AArch64][GlobalISel] Make <4 x s32> G_ASHR and G_LSHR legal.

llvm-svn: 372465

4 years agoRevert "[SampleFDO] Expose an interface to return the size of a section or the size"
Amara Emerson [Sat, 21 Sep 2019 09:11:51 +0000 (09:11 +0000)]
Revert "[SampleFDO] Expose an interface to return the size of a section or the size"

This reverts commit f118852046a1d255ed8c65c6b5db320e8cea53a0.

Broke the macOS build/greendragon bots.

llvm-svn: 372464

4 years ago[MachinePipeliner] Improve the TargetInstrInfo API analyzeLoop/reduceLoopCount
James Molloy [Sat, 21 Sep 2019 08:19:41 +0000 (08:19 +0000)]
[MachinePipeliner] Improve the TargetInstrInfo API analyzeLoop/reduceLoopCount

Recommit: fix asan errors.

The way MachinePipeliner uses these target hooks is stateful - we reduce trip
count by one per call to reduceLoopCount. It's a little overfit for hardware
loops, where we don't have to worry about stitching a loop induction variable
across prologs and epilogs (the induction variable is implicit).

This patch introduces a new API:

  /// Analyze loop L, which must be a single-basic-block loop, and if the
  /// conditions can be understood enough produce a PipelinerLoopInfo object.
  virtual std::unique_ptr<PipelinerLoopInfo>
  analyzeLoopForPipelining(MachineBasicBlock *LoopBB) const;

The return value is expected to be an implementation of the abstract class:

  /// Object returned by analyzeLoopForPipelining. Allows software pipelining
  /// implementations to query attributes of the loop being pipelined.
  class PipelinerLoopInfo {
  public:
    virtual ~PipelinerLoopInfo();
    /// Return true if the given instruction should not be pipelined and should
    /// be ignored. An example could be a loop comparison, or induction variable
    /// update with no users being pipelined.
    virtual bool shouldIgnoreForPipelining(const MachineInstr *MI) const = 0;

    /// Create a condition to determine if the trip count of the loop is greater
    /// than TC.
    ///
    /// If the trip count is statically known to be greater than TC, return
    /// true. If the trip count is statically known to be not greater than TC,
    /// return false. Otherwise return nullopt and fill out Cond with the test
    /// condition.
    virtual Optional<bool>
    createTripCountGreaterCondition(int TC, MachineBasicBlock &MBB,
                                 SmallVectorImpl<MachineOperand> &Cond) = 0;

    /// Modify the loop such that the trip count is
    /// OriginalTC + TripCountAdjust.
    virtual void adjustTripCount(int TripCountAdjust) = 0;

    /// Called when the loop's preheader has been modified to NewPreheader.
    virtual void setPreheader(MachineBasicBlock *NewPreheader) = 0;

    /// Called when the loop is being removed.
    virtual void disposed() = 0;
  };

The Pipeliner (ModuloSchedule.cpp) can use this object to modify the loop while
allowing the target to hold its own state across all calls. This API, in
particular the disjunction of creating a trip count check condition and
adjusting the loop, improves the code quality in ModuloSchedule.cpp.

llvm-svn: 372463

4 years agoAttempt to fix a windows buildbot failure
Kristof Umann [Sat, 21 Sep 2019 07:56:40 +0000 (07:56 +0000)]
Attempt to fix a windows buildbot failure

llvm-svn: 372462

4 years agoAdd __lsan::ScopedInterceptorDisabler for strerror(3)
Kamil Rytarowski [Sat, 21 Sep 2019 07:45:02 +0000 (07:45 +0000)]
Add __lsan::ScopedInterceptorDisabler for strerror(3)

Summary:
strerror(3) on NetBSD uses internally TSD with a destructor that is never
fired for exit(3). It's correctly called for pthread_exit(3) scenarios.

This is a case when a leak on exit(3) is expected, unavoidable and harmless.

Reviewers: joerg, vitalybuka, dvyukov, mgorny

Reviewed By: vitalybuka

Subscribers: dmgreen, kristof.beyls, jfb, llvm-commits, #sanitizers

Tags: #sanitizers, #llvm

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

llvm-svn: 372461

4 years agoAvoid memory leak in ASan test
Kamil Rytarowski [Sat, 21 Sep 2019 07:43:55 +0000 (07:43 +0000)]
Avoid memory leak in ASan test

Summary:
Add missing free(3) for the malloc(3) call.

Detected on NetBSD with LSan.

Reviewers: joerg, mgorny, vitalybuka, dvyukov

Reviewed By: vitalybuka

Subscribers: llvm-commits, #sanitizers

Tags: #sanitizers, #llvm

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

llvm-svn: 372460

4 years agoStop tracking atexit/__cxa_atexit/pthread_atfork allocations in LSan/NetBSD
Kamil Rytarowski [Sat, 21 Sep 2019 07:30:42 +0000 (07:30 +0000)]
Stop tracking atexit/__cxa_atexit/pthread_atfork allocations in LSan/NetBSD

Summary:
The atexit(3) and __cxa_atexit() calls allocate internally memory and free on exit,
after executing all callback. This causes false positives as DoLeakCheck() is called
from the atexit handler. In the LSan/ASan tests there are strict checks triggering
false positives here.

Intercept all atexit(3) and __cxa_atexit() calls and disable LSan when calling the
real functions.

Stop tracing allocations in pthread_atfork(3) funtions, as there are performed
internal allocations that are not freed for the time of running StopTheWorld()
code. This avoids false-positives.

The same changes have to be replicated in the ASan and LSan runtime.

Non-NetBSD OSs are not tested and this code is restricted to NetBSD only.

Reviewers: dvyukov, joerg, mgorny, vitalybuka, eugenis

Reviewed By: vitalybuka

Subscribers: jfb, llvm-commits, #sanitizers

Tags: #sanitizers, #llvm

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

llvm-svn: 372459

4 years ago[X86] Use sse_load_f32/f64 and timm in patterns for memory form of vgetmantss/sd.
Craig Topper [Sat, 21 Sep 2019 06:44:29 +0000 (06:44 +0000)]
[X86] Use sse_load_f32/f64 and timm in patterns for memory form of vgetmantss/sd.

Previously we only matched scalar_to_vector and scalar load, but
we should be able to narrow a vector load or match vzload.

Also need to match TargetConstant instead of Constant. The register
patterns were previously updated, but not the memory patterns.

llvm-svn: 372458

4 years ago[X86] Add test case to show failure to fold load with getmantss due to isel pattern...
Craig Topper [Sat, 21 Sep 2019 06:44:24 +0000 (06:44 +0000)]
[X86] Add test case to show failure to fold load with getmantss due to isel pattern looking for Constant instead of TargetConstant

The intrinsic has an immarg so its gets created with a TargetConstant
instead of a Constant after r372338. The isel pattern was only
updated for the register form, but not the memory form.

llvm-svn: 372457

4 years ago[Clang Interpreter] Fixed Bug 43362, build failure on GCC
Nandor Licker [Sat, 21 Sep 2019 05:29:18 +0000 (05:29 +0000)]
[Clang Interpreter] Fixed Bug 43362, build failure on GCC

free() was not directly included in InterpStack.cpp, added include now.

llvm-svn: 372455

4 years agoFix bad APInt compare.
Richard Trieu [Sat, 21 Sep 2019 04:18:54 +0000 (04:18 +0000)]
Fix bad APInt compare.

APInt comparison require both to have the same bitwidth.  Since only the value
is needed, use the compare function APInt::isSameValue instead.

llvm-svn: 372454

4 years agoMerge and improve code that detects same value in comparisons.
Richard Trieu [Sat, 21 Sep 2019 03:02:26 +0000 (03:02 +0000)]
Merge and improve code that detects same value in comparisons.

-Wtautological-overlap-compare and self-comparison from -Wtautological-compare
relay on detecting the same operand in different locations.  Previously, each
warning had it's own operand checker.  Now, both are merged together into
one function that each can call.  The function also now looks through member
access and array accesses.

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

llvm-svn: 372453

4 years agoRevert assertion added by r372394
Yaxun Liu [Sat, 21 Sep 2019 02:51:44 +0000 (02:51 +0000)]
Revert assertion added by r372394

The assertion added by r372394 causes CUDA test in test-suite to assert.

The assertion was not there originally, so revert it.

llvm-svn: 372452

4 years agoavr targetinfo: remove unneeded dep on MC
Nico Weber [Sat, 21 Sep 2019 02:43:32 +0000 (02:43 +0000)]
avr targetinfo: remove unneeded dep on MC

llvm-svn: 372451

4 years agoAMDGPU/GlobalISel: Allow selection of scalar min/max
Matt Arsenault [Sat, 21 Sep 2019 02:37:33 +0000 (02:37 +0000)]
AMDGPU/GlobalISel: Allow selection of scalar min/max

I believe all of the uniform/divergent pattern predicates are
redundant and can be removed. The uniformity bit already influences
the register class, and nothhing has broken when I've removed this and
others.

llvm-svn: 372450

4 years agoLiveIntervals: Add missing operator!= for segments
Matt Arsenault [Sat, 21 Sep 2019 02:37:28 +0000 (02:37 +0000)]
LiveIntervals: Add missing operator!= for segments

llvm-svn: 372449

4 years agoImprove -Wtautological-overlap-compare
Richard Trieu [Sat, 21 Sep 2019 02:37:10 +0000 (02:37 +0000)]
Improve -Wtautological-overlap-compare

Allow this warning to detect a larger number of constant values, including
negative numbers, and handle non-int types better.

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

llvm-svn: 372448