AbortedChanges

Summary

  1. [cmake] Make gtest macro definitions a part the library interface (details)
  2. [lld] s/dyn_cast/isa (details)
  3. [ARM][MVE] Added extra tail-predication runs for auto-correlation test case. NFC (details)
  4. [llvm-readobj] - Refine program headers testing (`-l`, `--program-headers` and `--segment`). (details)
  5. [flang][directives] Use TableGen information for clause classes in parse-tree (details)
  6. [llvm-readobj][test] - Rename gnu-phdrs.test to program-headers.test, NFCI. (details)
  7. [compiler-rt][builtins] Un-xfail two tests on sparcv9 (details)
  8. [llvm-readobj/elf] - Remove `unwrapOrError` calls from DumpStyle<ELFT>::printRelocationsHelper. (details)
  9. Revert "[flang][directives] Use TableGen information for clause classes in parse-tree" (details)
  10. [clangd] Unify macro matching in code completion for AST and Index based macros (details)
  11. [clangd] Disable ExtractFunction for C (details)
  12. [clang][HeaderInsert] Do not treat defines with values as header guards (details)
  13. [NFC][ARM][SimplifyCFG] Add some tests. (details)
  14. [flang] Disable -Wmaybe-uninitialized for GCC (details)
  15. TableGen/GlobalISel: Hack the operand order for atomic_store (details)
  16. [clang] Don't make synthesized accessor stub functions visible twice (details)
  17. [clang] Don't make ObjCIvarDecl visible twice when adding them to an implicit ObjCInterfaceDecl (details)
  18. [NFC] Guard the cost report block of debug outputs with NDEBUG and (details)
  19. GlobalISel: Implement bitcast action for G_INSERT_VECTOR_ELT (details)
  20. [flang][directives] Use TableGen information for clause classes in parse-tree (details)
  21. [DWARFYAML] Let the address size of line tables inferred from the object file. (details)
  22. [GlobalISel] Remove unused variable. NFC. (details)
  23. [DebugInfo] Simplify DwarfDebug::emitMacro (details)
  24. [DebugInfo] Allow GNU macro extension to be emitted (details)
  25. [clang] Add a matcher for template template parameters. (details)
  26. [split-file] Fix sys::fs::remove() on Solaris after D83834 (details)
  27. [ELF][test] Enhance x86-64-split-stack-prologue-adjust-success.s & non-abs-reloc.s (details)
  28. [ELF] Move the outSecOff addend from relocAlloc/relocNonAlloc/... to InputSectionBase::relocate (details)
  29. AMDGPU/GlobalISel: Fix test bugs and add a few more cases (details)
  30. AMDGPU/GlobalISel: Prepare for more custom load lowerings (details)
  31. [X86][SSE] Add HADD/SUB support to combineHorizOpWithShuffle (details)
  32. [mlir] Add verification to LLVM dialect types (details)
  33. [InstCombine] add tests for pointer casts with insertelement; NFC (details)
  34. [InstSimplify] add tests for min/max intrinsics with common operands; NFC (details)
  35. [InstSimplify] fold min/max with matching min/max operands (details)
  36. [Sema] Iteratively strip sugar when removing address spaces. (details)
  37. [clang] Do not crash for unsupported fixed point to floating point conversion (details)
  38. [GlobalISel] Add G_ABS (details)
  39. [NFC][LoopUnrollAndJam] Use BasicBlock::replacePhiUsesWith instead of (details)
  40. [flang] Allow compiler directives in more places (details)
Commit bb91c9fe7b62939fdb11ae42a31a5d5a61575ae7 by pavel
[cmake] Make gtest macro definitions a part the library interface

These definitions are needed by any file which uses gtest. Previously we
were adding them in the add_unittest function, but over time we've
accumulated libraries (which don't go through add_unittest) building on
gtest and this has resulted in proliferation of the definitions.

Making this a part of the library interface enables them to be managed
centrally. This follows a patch for -Wno-suggest-override (D84554) which
took a similar approach.

Differential Revision: https://reviews.llvm.org/D84748
The file was modifiedlldb/unittests/TestingSupport/Symbol/CMakeLists.txt
The file was modifiedllvm/cmake/modules/AddLLVM.cmake
The file was modifiedllvm/lib/Testing/Support/CMakeLists.txt
The file was modifiedllvm/utils/unittest/CMakeLists.txt
Commit c3817728e7b6b367a8aa91f8cbbcbc229b10a998 by pavel
[lld] s/dyn_cast/isa

Fixes some unused variable warnings with gcc.
The file was modifiedlld/MachO/Arch/X86_64.cpp
Commit a680c797b9fb7f652d8f63fc4d9ab4ba8ac7769c by sjoerd.meijer
[ARM][MVE] Added extra tail-predication runs for auto-correlation test case. NFC
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/varying-outer-2d-reduction.ll
Commit d212b63a792188ba483be861554deb4b173e8233 by grimar
[llvm-readobj] - Refine program headers testing (`-l`, `--program-headers` and `--segment`).

We have `gnu-phdrs.test` that tests
`-l`, `--program-headers` and `--segment` options for `llvm-readelf`.

We also have:
1) `program-headers.test` that tests `--program-headers` and `-l`
   for `llvm-readobj`. It doesn't test `--segment` and also uses
   lots of precompiled objects. It is very incomplete in compare
   with the `gnu-phdrs.test`.

2) `pt-gnu-property.test` that contains a simple test for the
   `PT_GNU_PROPERTY` segment. There is no reason to have it in
   a separate file.

This patch:
1) Merges `program-headers.test` and `pt-gnu-property.test` to `gnu-phdrs.test`.
2) Removes 2 precompiled binaries used by `program-headers.test`
   (other ones are still used by another tests).

Differential revision: https://reviews.llvm.org/D85526
The file was removedllvm/test/tools/llvm-readobj/ELF/pt-gnu-property.test
The file was modifiedllvm/test/tools/llvm-readobj/ELF/gnu-phdrs.test
The file was removedllvm/test/Object/Inputs/program-headers.mips64
The file was removedllvm/test/tools/llvm-readobj/ELF/program-headers.test
The file was removedllvm/test/Object/Inputs/program-headers.mips
Commit bf93edc4758b512e84b70ec6335d15b0cf386a18 by clementval
[flang][directives] Use TableGen information for clause classes in parse-tree

This patch takes advantage of the directive information and tablegen generation
to replace the clauses class parse tree and in the dump parse tree sections.

Reviewed By: sscalpone

Differential Revision: https://reviews.llvm.org/D85549
The file was modifiedllvm/test/TableGen/directive2.td
The file was modifiedllvm/test/TableGen/directive1.td
The file was modifiedflang/include/flang/Parser/parse-tree.h
The file was modifiedflang/lib/Semantics/CMakeLists.txt
The file was modifiedflang/lib/Parser/openacc-parsers.cpp
The file was modifiedflang/lib/Evaluate/CMakeLists.txt
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMP.td
The file was modifiedllvm/include/llvm/Frontend/Directive/DirectiveBase.td
The file was modifiedflang/lib/Parser/unparse.cpp
The file was modifiedllvm/utils/TableGen/DirectiveEmitter.cpp
The file was modifiedflang/lib/Semantics/check-acc-structure.h
The file was modifiedflang/lib/Semantics/check-acc-structure.cpp
The file was modifiedflang/include/flang/Parser/dump-parse-tree.h
The file was modifiedllvm/include/llvm/Frontend/OpenACC/ACC.td
The file was modifiedflang/lib/Semantics/resolve-directives.cpp
Commit d2e2ad292142f150ab1292c25d605d03525fe15c by grimar
[llvm-readobj][test] - Rename gnu-phdrs.test to program-headers.test, NFCI.

program-headers.test was merged to gnu-phdrs.test and removed in D85526.
Now, gnu-phdrs.test contains tests for both GNU and LLVM style.

It was decided that this renaming should be done separately for a better
commit history and diffing purposes.
The file was removedllvm/test/tools/llvm-readobj/ELF/gnu-phdrs.test
The file was addedllvm/test/tools/llvm-readobj/ELF/program-headers.test
Commit dc7630dd4446ac9e1c654b8bb32f5787fafede67 by ro
[compiler-rt][builtins] Un-xfail two tests on sparcv9

Two tests currently `XPASS` on sparcv9:

  Unexpectedly Passed Tests (2):
    Builtins-sparcv9-sunos :: compiler_rt_logbl_test.c
    Builtins-sparcv9-sunos :: divtc3_test.c

The following patch fixes this.

Tested on `sparcv9-sun-solaris2.11`.

Differential Revision: https://reviews.llvm.org/D85119
The file was modifiedcompiler-rt/test/builtins/Unit/divtc3_test.c
The file was modifiedcompiler-rt/test/builtins/Unit/compiler_rt_logbl_test.c
Commit 034b95e2839ee0dbd375cdff7ffe20d6fbfa4750 by grimar
[llvm-readobj/elf] - Remove `unwrapOrError` calls from DumpStyle<ELFT>::printRelocationsHelper.

It removes all `unwrapOrError` calls except the first one, which
is is bit different and can be removed separately.

Differential revision: https://reviews.llvm.org/D85303
The file was modifiedllvm/test/tools/llvm-readobj/ELF/packed-relocs-error5.s
The file was modifiedllvm/test/tools/llvm-readobj/ELF/packed-relocs-error1.s
The file was modifiedllvm/test/Object/invalid.test
The file was modifiedllvm/test/tools/llvm-readobj/ELF/relocations.test
The file was modifiedllvm/test/tools/llvm-readobj/ELF/packed-relocs.test
The file was modifiedllvm/test/tools/llvm-readobj/ELF/packed-relocs-error3.s
The file was modifiedllvm/test/tools/llvm-readobj/ELF/packed-relocs-error2.s
The file was modifiedllvm/test/tools/llvm-readobj/ELF/packed-relocs-error4.s
The file was modifiedllvm/test/tools/llvm-readobj/ELF/relr-relocs.test
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
Commit 3b3dc1dbfffc6a710565bc83a46cee9a1334f32a by clementval
Revert "[flang][directives] Use TableGen information for clause classes in parse-tree"

This reverts commit bf93edc4758b512e84b70ec6335d15b0cf386a18.

Buildbot failure
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMP.td
The file was modifiedllvm/include/llvm/Frontend/Directive/DirectiveBase.td
The file was modifiedflang/lib/Semantics/CMakeLists.txt
The file was modifiedllvm/test/TableGen/directive2.td
The file was modifiedflang/include/flang/Parser/dump-parse-tree.h
The file was modifiedflang/include/flang/Parser/parse-tree.h
The file was modifiedflang/lib/Evaluate/CMakeLists.txt
The file was modifiedflang/lib/Parser/unparse.cpp
The file was modifiedflang/lib/Parser/openacc-parsers.cpp
The file was modifiedflang/lib/Semantics/check-acc-structure.cpp
The file was modifiedllvm/test/TableGen/directive1.td
The file was modifiedflang/lib/Semantics/resolve-directives.cpp
The file was modifiedflang/lib/Semantics/check-acc-structure.h
The file was modifiedllvm/include/llvm/Frontend/OpenACC/ACC.td
The file was modifiedllvm/utils/TableGen/DirectiveEmitter.cpp
Commit b626f45329e8575f72e6cd444b444942d4913e9c by kadircet
[clangd] Unify macro matching in code completion for AST and Index based macros

fixes https://github.com/clangd/clangd/issues/489

Differential Revision: https://reviews.llvm.org/D85721
The file was modifiedclang-tools-extra/clangd/CodeComplete.cpp
The file was modifiedclang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
Commit 24a816c7d3925eb21970ea733d7d6bda11088ac7 by kadircet
[clangd] Disable ExtractFunction for C

This tweak uses constructs like auto and refs, which are not available
in C.

Differential Revision: https://reviews.llvm.org/D85727
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp
The file was modifiedclang-tools-extra/clangd/unittests/TweakTests.cpp
Commit ea8e71c3da56f76ae2ab2f9ee7afc6444408ffab by kadircet
[clang][HeaderInsert] Do not treat defines with values as header guards

This was resulting in inserting headers at bogus locations, see
https://github.com/ycm-core/YouCompleteMe/issues/3736 for an example.

Differential Revision: https://reviews.llvm.org/D85590
The file was modifiedclang/lib/Tooling/Inclusions/HeaderIncludes.cpp
The file was modifiedclang/unittests/Tooling/HeaderIncludesTest.cpp
Commit ac50efd67cccc82f542c323e8903eac1e8b94bf7 by sam.parker
[NFC][ARM][SimplifyCFG] Add some tests.

Add some tests around thresholds and minsize.
The file was modifiedllvm/test/Transforms/SimplifyCFG/ARM/select-costs.ll
The file was addedllvm/test/Transforms/SimplifyCFG/ARM/branch-fold-threshold.ll
Commit a9795b6f639f976e2d6f690066c61f890eed534f by tkeith
[flang] Disable -Wmaybe-uninitialized for GCC

According to llvm/cmake/config-ix.cmake, gcc's potentially uninitialized
use analysis has lots of false positives. We are encountering one in
flang/lib/Lower/CharacterExpr.cpp.

That warning is disabled for gcc in in-tree builds; this does the same
thing for out-of-tree builds.

Differential Revision: https://reviews.llvm.org/D85694
The file was modifiedflang/CMakeLists.txt
Commit 53f21e0fb754799fc9a7ad7243a9161e2411b51d by Matthew.Arsenault
TableGen/GlobalISel: Hack the operand order for atomic_store

ISD::ATOMIC_STORE arbitrarily has the operands in the opposite order
from regular ISD::STORE, which always introduced an annoying
duplication of patterns to handle both cases. Since in GlobalISel
there's just the one G_STORE, we need to swap the operands to
correctly emit the type check for the pointer operand.

Some work started in 20aafa31569b5157e792daa8860d71dd0df8a53a to
migrate SelectionDAG to use ISD::STORE for atomics, but that work
seems to have stalled. Since this is the pretty much the last
operation which matters which isn't supported for AMDGPU, use this
compatibility hack to unblock declaring it functionally complete.

Not sure what's going on with the pending_phis AArch64 test. It seems
it didn't always use atomics, and I'm not sure what it was originally
testing matters anymore.
The file was modifiedllvm/include/llvm/Target/GlobalISel/SelectionDAGCompat.td
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-store-global.mir
The file was modifiedllvm/test/TableGen/Common/GlobalISelEmitterCommon.td
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-store-flat.mir
The file was modifiedllvm/lib/Target/AMDGPU/DSInstructions.td
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUGISel.td
The file was modifiedllvm/utils/TableGen/GlobalISelEmitter.cpp
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-store-atomic-local.mir
The file was addedllvm/test/TableGen/GlobalISelEmitter-atomic_store.td
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-store-atomic-flat.mir
Commit 442a80292d50d895396eb14418bd471e7da68fd0 by Raphael Isemann
[clang] Don't make synthesized accessor stub functions visible twice

`addDecl` is making the Decl visible, so there is no need to make it explicitly
visible again. Making it visible twice will also make the lookup storage less
efficient and potentially lead to crashes, see D84827 for that.

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D84828
The file was modifiedclang/lib/Sema/SemaDeclObjC.cpp
Commit 02899d7f1b9ae7f6da30bd020a714c7b3eb2c59f by Raphael Isemann
[clang] Don't make ObjCIvarDecl visible twice when adding them to an implicit ObjCInterfaceDecl

`addDecl` is making the ivar visible in its primary context. The primary context
of the ivar here is in a 'fragile' ABI the ObjCInterfaceDecl and in a
'non-fragile' ABI the current ObjCImplementationDecl. The additional call to
`makeDeclVisibleInContext` to make the ivar visible in the ObjCInterfaceDecl is
only necessary in the 'non-fragile' case (as in the 'fragile' case the Decl
becomes automatically visible in the ObjCInterfaceDecl with the `addDecl` call
as thats its primary context). See `Sema::ActOnIvar` for where the ivar is put
into a different context depending on the ABI.

To put this into an example:

```
lang=c++
@implementation SomeClass
{
  id ivar1;
}
@end

fragile case:
implicit ObjCInterfaceDecl 'SomeClass'
`- ivar1 (in primary context and will be automatically made visible)
ObjCImplementationDecl 'SomeClass'

non-fragile case:
implicit ObjCInterfaceDecl 'SomeClass'
`-<<<ivar1 not visible here and needs to be manually marked as visible.>>>
ObjCImplementationDecl 'SomeClass'
`- ivar1 (in its primary context and will be automatically made visible here)
```

Making a Decl visible multiple times in the same context is inefficient and
potentially can lead to crashes. See D84827 for more info and what this is
breaking.

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D84829
The file was modifiedclang/lib/Sema/SemaDeclObjC.cpp
Commit b1600d8b8971e7d5967ed29476ee3ae71ade6a81 by dtemirbulatov
[NFC] Guard the cost report block of debug outputs with NDEBUG and
switch to SmallString, this is part of D57779.
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Commit e2f1b48f867d9ed349b7520dea495717bca26f31 by Matthew.Arsenault
GlobalISel: Implement bitcast action for G_INSERT_VECTOR_ELT

This mirrors the support for the equivalent extracts. This also
creates a huge mess that would be greatly improved if we had any bit
operation combines.
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.i8.ll
The file was modifiedllvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.i16.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-insert-vector-elt.mir
Commit 16c1d251c4ce59f97802ff0c27ed6441f3153ab1 by clementval
[flang][directives] Use TableGen information for clause classes in parse-tree

This patch takes advantage of the directive information and tablegen generation
to replace the clauses class parse tree and in the dump parse tree sections.

Reviewed By: sscalpone

Differential Revision: https://reviews.llvm.org/D85549
The file was modifiedflang/lib/Semantics/CMakeLists.txt
The file was modifiedflang/lib/Semantics/check-acc-structure.cpp
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMP.td
The file was modifiedflang/lib/Semantics/check-acc-structure.h
The file was modifiedllvm/include/llvm/Frontend/OpenACC/ACC.td
The file was modifiedflang/lib/Parser/openacc-parsers.cpp
The file was modifiedflang/lib/Parser/unparse.cpp
The file was modifiedllvm/utils/TableGen/DirectiveEmitter.cpp
The file was modifiedllvm/test/TableGen/directive1.td
The file was modifiedflang/include/flang/Parser/parse-tree.h
The file was modifiedllvm/include/llvm/Frontend/Directive/DirectiveBase.td
The file was modifiedflang/lib/Evaluate/CMakeLists.txt
The file was modifiedflang/lib/Semantics/resolve-directives.cpp
The file was modifiedflang/include/flang/Parser/dump-parse-tree.h
The file was modifiedllvm/test/TableGen/directive2.td
Commit 1d4bc08ce43c8e2f07df3aa22a0787907750bf88 by Xing
[DWARFYAML] Let the address size of line tables inferred from the object file.

Currently, the line table uses the first compilation unit's address size
as its address size. It's not the right behavior. The address size should be
inferred from the target machine.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D85707
The file was modifiedllvm/test/tools/yaml2obj/ELF/DWARF/debug-line.yaml
The file was modifiedllvm/lib/ObjectYAML/DWARFEmitter.cpp
Commit d287a5a33f63dcd8f9882ceb3fb18e2e6080d8b4 by benny.kra
[GlobalISel] Remove unused variable. NFC.
The file was modifiedllvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
Commit bb640645f52410cac9c82eb8295cb4d442efd29e by david.stenberg
[DebugInfo] Simplify DwarfDebug::emitMacro

Broken out from a review comment on D82975. This is an NFC expect for
that the Macinfo macro string is now emitted using a single emitBytes()
invocation, so it can be done using a single string directive.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D83557
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Commit e2f32404727f891fea309f8457d87b1c306e3fcc by david.stenberg
[DebugInfo] Allow GNU macro extension to be emitted

Allow the GNU .debug_macro extension to be emitted for DWARF versions
earlier than 5. The extension is basically what became DWARF 5's format,
except that a DW_AT_GNU_macros attribute is emitted, and some entries
like the strx entries are missing. In this patch I emit GNU's indirect
entries, which are the same as DWARF 5's strp entries.

This patch adds the extension behind a hidden LLVM flag,
-use-gnu-debug-macro. I would later want to enable it by default when
tuning for GDB and targeting DWARF versions earlier than 5.

The size of a Clang 8.0 binary built with RelWithDebInfo and the flags
"-gdwarf-4 -fdebug-macro" reduces from 1533 MB to 1349 MB with
.debug_macro (compared to 1296 MB without -fdebug-macro).

Reviewed By: SouraVX, dblaikie

Differential Revision: https://reviews.llvm.org/D82975
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
The file was addedllvm/test/DebugInfo/X86/debug-macro-gnu.ll
The file was addedllvm/test/DebugInfo/X86/debug-macro-gnu-dwo.ll
Commit f4dccf115cc198e552b520fda0ee623457015db7 by riccibrun
[clang] Add a matcher for template template parameters.

There are already matchers for type template parameters and non-type template
parameters, but somehow no matcher exists for template template parameters
and I need it to write unit tests.

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

Reviewed By: aaron.ballman
The file was modifiedclang/lib/ASTMatchers/ASTMatchersInternal.cpp
The file was modifiedclang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp
The file was modifiedclang/include/clang/ASTMatchers/ASTMatchers.h
The file was modifiedclang/lib/ASTMatchers/Dynamic/Registry.cpp
Commit dbc468dc319953c86c2c564475f4939f66572810 by i
[split-file] Fix sys::fs::remove() on Solaris after D83834

where stdio.h ::remove() may set errno to EEXIST instead of ENOTEMPTY.

POSIX.1-2017 allows EEXIST for unlink() (which is called by remove()):

> [EEXIST] or [ENOTEMPTY]
> The flag parameter has the AT_REMOVEDIR bit set and the path argument names a directory that is not an empty directory, or there are hard links to the directory other than dot or a single entry in dot-dot.

Reviewed By: ro

Differential Revision: https://reviews.llvm.org/D85690
The file was modifiedllvm/tools/split-file/split-file.cpp
Commit 73ca96ebc156daeb56d63981b316b8bf060b0d7f by i
[ELF][test] Enhance x86-64-split-stack-prologue-adjust-success.s & non-abs-reloc.s

Catch problems when outSecOff is not zero and outSecOff is added twice or not added.
The file was modifiedlld/test/ELF/x86-64-split-stack-prologue-adjust-success.s
The file was modifiedlld/test/ELF/non-abs-reloc.s
Commit e973c1375ed04b1d71fa86f1519d5067d8a6fc1f by i
[ELF] Move the outSecOff addend from relocAlloc/relocNonAlloc/... to InputSectionBase::relocate

For an InputSection, the `buf` argument of `InputSectionBase::relocate` points
to the content of the containing OutputSection, instead of the content of the
InputSection itself, so `outSecOff` needs to be added in its callees.  This is
counter-intuitive and leads to many `- outSecOff` and `+ outSecOff`.

This patch makes `InputSection::writeTo` call `InputSectionBase::relocate` with
`outSecOff` added. relocAlloc/relocNonAlloc/relocateNonAllocForRelocatable can
thus be simplified now.

Updated test:

* non-abs-reloc.s: A minor offset bug is fixed for a diagnostic in `relocateNonAlloc`

Reviewed By: grimar

Differential Revision: https://reviews.llvm.org/D85618
The file was modifiedlld/ELF/SyntheticSections.cpp
The file was modifiedlld/ELF/ARMErrataFix.cpp
The file was modifiedlld/ELF/AArch64ErrataFix.cpp
The file was modifiedlld/ELF/InputSection.cpp
The file was modifiedlld/test/ELF/non-abs-reloc.s
Commit 6cac661637cd8d2cd8963a95ba2541ee5da42b79 by Matthew.Arsenault
AMDGPU/GlobalISel: Fix test bugs and add a few more cases

The wrong alignment or addrspace was used. Also add various cases to
stress a future patch.
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-private.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-global.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-constant.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-local.mir
Commit 076305568cd6c7c02ceb9cfc35e1543153406d19 by Matthew.Arsenault
AMDGPU/GlobalISel: Prepare for more custom load lowerings

Slight restructuring of the code to avoid formatting changes when more
cases are handled here.
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
Commit 91d59cbf1b386999fe6c135a5e5726a6d83d4e39 by llvm-dev
[X86][SSE] Add HADD/SUB support to combineHorizOpWithShuffle

Handles some HOP(SHUFFLE,SHUFFLE) patterns and sets us up to improve some of the cases mentioned in PR41813.
The file was modifiedllvm/test/CodeGen/X86/haddsub-shuf.ll
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit bae1517266bf4ce85a32390323fd463f28ae9d0c by zinenko
[mlir] Add verification to LLVM dialect types

Now that LLVM dialect types are implemented directly in the dialect, we can use
MLIR hooks for verifying type construction invariants. Implement the verifiers
and use them in the parser.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D85663
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMTypeSyntax.cpp
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMTypes.h
The file was modifiedmlir/test/Dialect/LLVMIR/types-invalid.mlir
Commit ea8c186c408d45dba9ded06463046d5151495a40 by spatel
[InstCombine] add tests for pointer casts with insertelement; NFC
The file was modifiedllvm/test/Transforms/InstCombine/cast_ptr.ll
Commit bad205fe0c742d956246b8b59305e783694d2ae2 by spatel
[InstSimplify] add tests for min/max intrinsics with common operands; NFC

There are 4*4*4 = 64 variations. We currently handle some, but not all,
of the alternative patterns with cmp+sel in instcombine.
The file was modifiedllvm/test/Transforms/InstSimplify/maxmin_intrinsics.ll
Commit 1470ce4a76fc56729fb15dab0ca9877e25d26d58 by spatel
[InstSimplify] fold min/max with matching min/max operands

I think this is the last remaining translation of an existing
instcombine transform for the corresponding cmp+sel idiom.

This interpretation is more general though - we can remove
mismatched signed/unsigned combinations in addition to the
more obvious cases.

min/max(X, Y) must produce X or Y as the result, so this is
just another clause in the existing transform that was already
matching a min/max of min/max.
The file was modifiedllvm/include/llvm/IR/PatternMatch.h
The file was modifiedllvm/test/Transforms/InstSimplify/maxmin_intrinsics.ll
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
Commit 956582aa165804dd8335879c3a7f833901e5424c by bevin.hansson
[Sema] Iteratively strip sugar when removing address spaces.

ASTContext::removeAddrSpaceQualType does not properly deal
with sugar. QualTypes derive their ASes from the AS on the
canonical type, not the type itself. However,
removeAddrSpaceQualType only strips the outermost qualifiers,
which means that it can fail to remove addrspace qualifiers
if there is sugar in the way.

Change the function to desugar types until the address space
really no longer exists on the corresponding QualType. This
should guarantee the removal of the address space.

This fixes the erroneous behavior in D62574.

Reviewed By: rjmccall, svenvh

Differential Revision: https://reviews.llvm.org/D83325
The file was modifiedclang/lib/AST/ASTContext.cpp
The file was modifiedclang/test/CodeGenCXX/address-space-cast.cpp
Commit d4408fe17f33bcd664ec8f468abfd1094e84a7c1 by bevin.hansson
[clang] Do not crash for unsupported fixed point to floating point conversion

- Fixed point to floating point conversion is unimplemented.
- If one of the operands has a floating type and the other operand has a fixed-point type, the function
   handleFloatConversion() is called because one of the operands has a floating type, but we do not handle fixed
   point type in this function (Implementation of fixed point to floating point conversion is missing), due to this
   compiler crashes. In order to avoid compiler crash, when one of the operands has a floating type and the other
   operand has a fixed-point type, return NULL.
- FIXME: Implementation of fixed point to floating point conversion.
- I am going to resolve FIXME in followup patches.
- Add the test case.

Reviewed By: ebevhan

Differential Revision: https://reviews.llvm.org/D81904
The file was modifiedclang/test/Frontend/fixed_point_errors.c
The file was modifiedclang/lib/Sema/SemaExpr.cpp
Commit fa2b836ea393dc4d24d2fced0ea78b7527f77de9 by jay.foad
[GlobalISel] Add G_ABS

This is equivalent to the new llvm.abs intrinsic added by D84125 with
is_int_min_poison=0.

Differential Revision: https://reviews.llvm.org/D85718
The file was modifiedllvm/docs/GlobalISel/GenericOpcode.rst
The file was modifiedllvm/include/llvm/Support/TargetOpcodes.def
The file was modifiedllvm/unittests/CodeGen/GlobalISel/MachineIRBuilderTest.cpp
The file was modifiedllvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
The file was modifiedllvm/include/llvm/Target/GlobalISel/SelectionDAGCompat.td
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalizer-info-validation.mir
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h
The file was modifiedllvm/include/llvm/Target/GenericOpcodes.td
The file was modifiedllvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
Commit aa994d9867e38ad12a5d43edcfb8d53a26b73020 by whitneyt
[NFC][LoopUnrollAndJam] Use BasicBlock::replacePhiUsesWith instead of
static function updatePHIBlocks.

Reviewed By: dmgreen
Differential Revision: https://reviews.llvm.org/D85673
The file was modifiedllvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp
Commit cf715717aa8cb17d98177af3ce63c7e20e8d25a3 by tkeith
[flang] Allow compiler directives in more places

Allow compiler directives in the implicit-part and before USE statements
in the specification-part.

Differential Revision: https://reviews.llvm.org/D85693
The file was addedflang/test/Parser/compiler-directives.f90
The file was modifiedflang/lib/Parser/program-parsers.cpp
The file was modifiedflang/include/flang/Parser/parse-tree.h
The file was modifiedflang/lib/Parser/Fortran-parsers.cpp
The file was modifiedflang/lib/Semantics/resolve-names.cpp