Changes

Summary

  1. [ELF] GnuHashTableSection: replace stable_sort with 2-key sort. NFC (details)
  2. [docs] Clarify & update JSONCompilationDatabase docs (details)
  3. [GlobalOpt] Use generic type when converting malloc to global (details)
  4. [GlobalOpt] Drop an incorrect check (details)
  5. [RISCV] Add scheduler for bfp instruction in Zbf extension (details)
  6. [mlir] fix crash in PybindAdaptors.h (details)
  7. [ValueTracking] Remove ComputeMultiple() function (details)
  8. [LLDB] Fix Python GIL-not-held issues (details)
  9. [clangd] Avoid a code completion crash (details)
  10. [MachineInstr] Don't include debug uses in bundle header (PR52817) (details)
  11. Revert "[mlir] fix crash in PybindAdaptors.h" (details)
  12. Reland (2) "[AST] Add RParen loc for decltype AutoTypeloc."" (details)
  13. [MLIR][Linalg] Handle Attribute in InitTensorOp (details)
  14. [clangd] Add option to use dirty file contents when building preambles. (details)
  15. [RISCV] Add tests for scalable-vector vwsub patterns (details)
  16. [AArch64] Add tests for sinking mask And to smaller loads. NFC (details)
  17. [CodeGen][AArch64] Ensure isSExtCheaperThanZExt returns true for negative constants (details)
  18. [VPlan] Drop unnecessary uses of getVPSingleValue (NFC). (details)
  19. [LV] Make test more robust by adding users of inductions. (details)
  20. [InstCombine] auto-generate complete test check lines; NFC (details)
  21. [InstCombine] add tests for binop with flags and select op; NFC (details)
  22. [InstCombine] propagate IR flags from binop through select (details)
  23. [DSE] Remove commented-out InvisibleToCallerBeforeRet. (NFC) (details)
  24. [clangd] Don't rename on symbols from system headers. (details)
  25. Re-land [clangd] Elide even more checks in SelectionTree. (details)
  26. [Clang][AArch64][ARM] PMUv3 Option Added (details)
  27. [LV] Add test coverage for reductions with odd interleave counts. (details)
  28. [AArch64][SVE] Remove Redundant aarch64.sve.convert.to.svbool (details)
  29. AMDGPU/GlobalISel: Fix test not matching test name (details)
  30. AMDGPU: Fix LiveVariables error after optimizing VGPR ranges (details)
  31. AMDGPU/GlobalISel: Add failing ABI lowering testcases (details)
  32. [VE] select|vp.merge|vp.select v256 isel and tests (details)
  33. AMDGPU/GlobalISel: Fix legalization failure for s65 shifts (details)
  34. AMDGPU: Correct getMaxNumSGPR treatment of flat_scratch (details)
  35. AMDGPU/GlobalISel: Fix selection of constant 32-bit addrspace loads (details)
  36. AMDGPU: Fix crashing on calls to C functions from graphics contexts (details)
  37. [libc++] [test] Check for another kind of modulemap typo in lint_modulemap.sh.py. (details)
  38. [libc++] [ABI BREAK] Conform lognormal_distribution::param_type. (details)
  39. [DAG] Extend SearchForAndLoads with any_extend handling (details)
  40. [libc++] [test] Improve the test for `uniform_int_distribution<T>`. (details)
  41. [clang][dataflow] Remove TestingSupport's dependency on gtest (details)
  42. [AIX] Support of Big archive (read) (details)
  43. [InstCombine] add tests for fadd+fmul factorization fold; NFC (details)
  44. [InstCombine] FP with reassoc FMF: (X * C) + X --> X * (MulC + 1.0) (details)
  45. [ConstantFold] Don't fold load from non-byte-sized vector (details)
  46. [MCA][X86] Add missing zero-idioms test file coverage (details)
  47. [mlir][Vector] Generalize and improve folding of ExtractOp from Insert/Transpose chain. (details)
  48. [clang-format] Treat ForEachMacros as loops (details)
  49. [AIX][ZOS] Handle unsupported builtin function CFStringMakeConstantString (details)
  50. Revert "[AIX] Support of Big archive (read)" (details)
Commit f855074ed1193d5fd96b02280c31479294ce0901 by i
[ELF] GnuHashTableSection: replace stable_sort with 2-key sort. NFC

strTabOffset stabilizes llvm::sort. My x86-64 executable is 5+KiB smaller.
The file was modifiedlld/ELF/SyntheticSections.cpp
Commit 16949762dc6a670d2f3a1f5043262ec31e09c556 by sam.mccall
[docs] Clarify & update JSONCompilationDatabase docs

- prefer `arguments` over `command`, and add example
- clarify that there's no shell-unescaping of `arguments`

Fixes https://github.com/llvm/llvm-project/issues/53143

Differential Revision: https://reviews.llvm.org/D117428
The file was modifiedclang/docs/JSONCompilationDatabase.rst
Commit 499f1ca79f232faae09b1793a994d1a22ba403cd by npopov
[GlobalOpt] Use generic type when converting malloc to global

The malloc to global transform currently determines the type of the
global by looking at bitcasts of the malloc. This is limited (the
transform fails if there are multiple different types) and
incompatible with opaque pointers.

My initial approach was to construct an appropriate struct type
based on usage in loads/stores. What this patch does instead is
to always create an [i8 x AllocSize] global, without trying to
guess types at all.

This does mean that other transforms that require a certain global
type may break. I fixed two of these in D117034 and D117223, which
I believe should be sufficient to avoid regressions. In particular,
the global SRA change should end up splitting the global into
naturally-typed sub-globals, at which point all other optimizations
should work.

Differential Revision: https://reviews.llvm.org/D117092
The file was modifiedllvm/lib/Transforms/IPO/GlobalOpt.cpp
The file was modifiedllvm/test/Transforms/GlobalOpt/malloc-promote-5.ll
The file was modifiedllvm/test/Transforms/GlobalOpt/2021-08-03-StoreOnceLoadMultiCasts.ll
The file was addedllvm/test/Transforms/GlobalOpt/malloc-promote-opaque-ptr.ll
Commit 12bee2c0542460db8080a8630b139953207846cf by npopov
[GlobalOpt] Drop an incorrect check

This was a last-minute addition to D117249, and of course I ended
up inverting the condition in a way that caused an uninitialized
memory read.

I've dropped it entirely, as I don't think we actually care whether
the size is zero or not here. The previous code wasn't checking
this either.
The file was modifiedllvm/lib/Transforms/IPO/GlobalOpt.cpp
Commit 85def34f5e450ed1d7cb0f3af8c74f89fe4c8d1d by ben.shi
[RISCV] Add scheduler for bfp instruction in Zbf extension

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D117290
The file was modifiedllvm/lib/Target/RISCV/RISCVSchedRocket.td
The file was modifiedllvm/lib/Target/RISCV/RISCVSchedSiFive7.td
The file was modifiedllvm/lib/Target/RISCV/RISCVScheduleB.td
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoZb.td
Commit 970cb57ef72c9045250e0492cb00127b49ddfea8 by zinenko
[mlir] fix crash in PybindAdaptors.h

The constructor function was being defined without indicating its "__init__"
name, which made it interpret it as a regular fuction rather than a
constructor. When overload resolution failed, Pybind would attempt to print the
arguments actually passed to the function, including "self", which is not
initialized since the constructor couldn't be called. This would result in
"__repr__" being called with "self" referencing an uninitialized MLIR C API
object, which in turn would cause undefined behavior when attempting to print
in C++.

Fix this by specifying the correct name.

This in turn uncovers the fact the the mechanism used by PybindAdaptors.h to
bind constructors directly as "__init__" functions taking "self" is deprecated
by Pybind. The modern method requires using "py::init", which seems to rely on
the C++ equivalent of the bound class to be available, which is not the case in
PybindAdaptors.h. A deeper inspection shows that the deprecation concerns
old-style pybind11 constructors that had to allocate the object using
placement new with "self" as memory. The PybindAdaptors.h only provides
extension classes and never allocates (the object construction is delegated to
the base class), so it does not use the deprecated functionality. Use the
implementation detail tag class to convince pybind11 that we are using the
modern constructor binding method and suppress the warning.

On top of that, the definition of the function was incorrectly indicated as the
method on the "None" object instead of being the method of its parent class.
This would result in a second problem when Pybind would attempt to print
warnings pointing to the parent class since the "None" does not have a
"__name__" field or its C API equivalent.

Fix this by specifying the correct parent class by looking it up by name in the
parent module.

Reviewed By: stellaraccident

Differential Revision: https://reviews.llvm.org/D117325
The file was modifiedmlir/include/mlir/Bindings/Python/PybindAdaptors.h
Commit af12a3f4a95889bd1c1af054eda4e1d270f16ad8 by npopov
[ValueTracking] Remove ComputeMultiple() function

This function is no longer used since
499f1ca79f232faae09b1793a994d1a22ba403cd.
The file was modifiedllvm/include/llvm/Analysis/ValueTracking.h
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
Commit a6598575f4bc20f9a01c2bced2d0b1ff14d7576f by pavel
[LLDB] Fix Python GIL-not-held issues

The GIL must be held when calling any Python C API functions. In multithreaded applications that use callbacks this requirement can easily be violated by accident. A general tool to ensure GIL health is not available, but patching Python Py_INCREF to add an assert provides a basic health check:

```
+int PyGILState_Check(void); /* Include/internal/pystate.h */
+
#define Py_INCREF(op) (                         \
+    assert(PyGILState_Check()),                 \
     _Py_INC_REFTOTAL  _Py_REF_DEBUG_COMMA       \
     ((PyObject *)(op))->ob_refcnt++)

#define Py_DECREF(op)                                   \
     do {                                                \
+        assert(PyGILState_Check());                     \
         PyObject *_py_decref_tmp = (PyObject *)(op);    \
         if (_Py_DEC_REFTOTAL  _Py_REF_DEBUG_COMMA       \
         --(_py_decref_tmp)->ob_refcnt != 0)             \
```

Adding this assertion causes around 50 test failures in LLDB. Adjusting the scope of things guarded by `py_lock` fixes them.

More background: https://docs.python.org/3/glossary.html#term-global-interpreter-lock

Patch by Ralf Grosse-Kunstleve

Differential Revision: https://reviews.llvm.org/D114722
The file was modifiedlldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
The file was modifiedlldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
The file was modifiedlldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
Commit 884832407e47579a28e8c363492a620901f2eab4 by hokein.wu
[clangd] Avoid a code completion crash

This is a workaround (adding a newline to the eof) in clangd to avoid the code
completion crash, see https://github.com/clangd/clangd/issues/332.

In principle, this is a clang bug, we should fix it in clang, but it is not
trivial.

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D117456
The file was modifiedclang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
The file was modifiedclang-tools-extra/clangd/ClangdServer.cpp
Commit 873a7ee7e454e2bda754ff6f3f24078c1f853bac by npopov
[MachineInstr] Don't include debug uses in bundle header (PR52817)

Following the recommendation in
https://github.com/llvm/llvm-project/issues/52817#issuecomment-1007635426,
this excludes debug instructions when finalizing the bundle. As uses
in debug instructions don't have effects, they will no longer be
included in the BUNDLE header.

Fixes https://github.com/llvm/llvm-project/issues/52817.

Differential Revision: https://reviews.llvm.org/D116945
The file was addedllvm/test/CodeGen/Thumb2/pr52817.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/postra-bundle-memops.mir
The file was modifiedllvm/lib/CodeGen/MachineInstrBundle.cpp
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vpt-block-debug.mir
Commit 2325f363010d3176e96579628cbb96b8fca003a1 by zinenko
Revert "[mlir] fix crash in PybindAdaptors.h"

This reverts commit 970cb57ef72c9045250e0492cb00127b49ddfea8.

Broke the buildbot.
The file was modifiedmlir/include/mlir/Bindings/Python/PybindAdaptors.h
Commit ab3f100bec03d72ecee947a323c51698d4b95207 by hokein.wu
Reland (2) "[AST] Add RParen loc for decltype AutoTypeloc.""

The patch was reverted because it caused a crash during PCH build -- we
missed to update the RParenLoc in TreeTransform<Derived>::TransformAutoType.

This relands 55d96ac and 37ec65e with a test and fix.
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/ExpandAutoType.cpp
The file was modifiedclang/lib/Parse/ParseDecl.cpp
The file was modifiedclang/include/clang/AST/TypeLoc.h
The file was modifiedclang/lib/Sema/SemaType.cpp
The file was modifiedclang/test/AST/ast-dump-template-decls.cpp
The file was modifiedclang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp
The file was modifiedclang-tools-extra/clangd/unittests/tweaks/ExpandAutoTypeTests.cpp
The file was modifiedclang/lib/AST/TypeLoc.cpp
The file was modifiedclang/lib/Serialization/ASTWriter.cpp
The file was modifiedclang/unittests/AST/SourceLocationTest.cpp
The file was modifiedclang/lib/Serialization/ASTReader.cpp
The file was modifiedclang-tools-extra/clangd/unittests/SelectionTests.cpp
The file was modifiedclang/test/AST/ast-dump-template-decls-json.cpp
The file was modifiedclang/lib/Sema/TreeTransform.h
The file was addedclang/test/PCH/cxx14-decltype-auto.cpp
Commit ca2ac2bb14624257d9bc0a53919dbbc5f447c7fc by l.chelini
[MLIR][Linalg] Handle Attribute in InitTensorOp

In some cases, the result of an initTensorOp may have an attribute.
However, the Attribute was not passed to `inferResultType`, failing the
verifier. Therefore, propagate the Attribute to `inferResultType`.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D117192
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
The file was modifiedmlir/test/Dialect/Linalg/roundtrip.mlir
Commit 8b88ff08038c5525bdb5d22b050550ca3b34ad77 by n.james93
[clangd] Add option to use dirty file contents when building preambles.

Adds a option `use-dirty-preambles` to enable using unsaved in editor contents when building pre-ambles.
This enables a more seamless user experience when switching between header and implementation files and forgetting to save inbetween.
It's also in line with the LSP spec that states open files in the editor should be used instead of on the contents on disk - https://microsoft.github.io/language-server-protocol/overviews/lsp/overview/
For now the option is defaulted to off and hidden, Though I have a feeling it should be moved into the `.clangd` config and possibly defaulted to true.

Addresses https://github.com/clangd/clangd/issues/488

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D95046
The file was modifiedclang-tools-extra/clangd/tool/ClangdMain.cpp
The file was modifiedclang-tools-extra/clangd/ClangdServer.cpp
The file was modifiedclang-tools-extra/clangd/ClangdServer.h
Commit af219e567f96193975e65478495d826ab4d271b1 by fraser
[RISCV] Add tests for scalable-vector vwsub patterns

This patch adds tests for patterns introduced in D117188.

Reviewed By: jacquesguan

Differential Revision: https://reviews.llvm.org/D117392
The file was addedllvm/test/CodeGen/RISCV/rvv/vwsub-sdnode.ll
Commit 5f2edada68716190b3d62e60fd097c6101a1a1d4 by david.green
[AArch64] Add tests for sinking mask And to smaller loads. NFC
The file was addedllvm/test/CodeGen/AArch64/combine-andintoload.ll
Commit 197f3c0deb76951315118ef13937b67ea9cbd5aa by david.sherwood
[CodeGen][AArch64] Ensure isSExtCheaperThanZExt returns true for negative constants

When we know the value we're extending is a negative constant then it
makes sense to use SIGN_EXTEND because this may improve code quality in
some cases, particularly when doing a constant splat of an unpacked vector
type. For example, for SVE when splatting the value -1 into all elements
of a vector of type <vscale x 2 x i32> the element type will get promoted
from i32 -> i64. In this case we want the splat value to sign-extend from
(i32 -1) -> (i64 -1), whereas currently it zero-extends from
(i32 -1) -> (i64 0xFFFFFFFF). Sign-extending the constant means we can use
a single mov immediate instruction.

New tests added here:

  CodeGen/AArch64/sve-vector-splat.ll

I believe we see some code quality improvements in these existing
tests too:

  CodeGen/AArch64/reduce-and.ll
  CodeGen/AArch64/unfold-masked-merge-vector-variablemask.ll

The apparent regressions in CodeGen/AArch64/fast-isel-cmp-vec.ll only
occur because the test disables codegen prepare and branch folding.

Differential Revision: https://reviews.llvm.org/D114357
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
The file was modifiedllvm/test/CodeGen/AArch64/sve-vector-splat.ll
The file was modifiedllvm/test/CodeGen/AArch64/unfold-masked-merge-vector-variablemask.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
The file was modifiedllvm/test/CodeGen/AArch64/funnel-shift.ll
The file was modifiedllvm/include/llvm/CodeGen/TargetLowering.h
The file was modifiedllvm/test/CodeGen/AArch64/vecreduce-and-legalization.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
The file was modifiedllvm/test/CodeGen/AArch64/reduce-and.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.h
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h
The file was modifiedllvm/lib/CodeGen/CodeGenPrepare.cpp
Commit 500fe6095702459c7b000a344b5717c9700fda4a by flo
[VPlan] Drop unnecessary uses of getVPSingleValue (NFC).
The file was modifiedllvm/lib/Transforms/Vectorize/VPlan.cpp
Commit 4a6f47544610c26484ece3cf74fbbc80355e93a1 by flo
[LV] Make test more robust by adding users of inductions.

The modified tests didn't have actual users of all inductions, making it
trivial to eliminate them. Add users to make sure the inductions are
actually used in the vectorized version.
The file was modifiedllvm/test/Transforms/LoopVectorize/pr35773.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/pr36524.ll
Commit 9e8a0ea331bef7326b91804bd41a09d840344eba by spatel
[InstCombine] auto-generate complete test check lines; NFC
The file was modifiedllvm/test/Transforms/InstCombine/select-2.ll
Commit 69daa2fa617d146beb3eff190973f5e786f1b5e5 by spatel
[InstCombine] add tests for binop with flags and select op; NFC
The file was modifiedllvm/test/Transforms/InstCombine/select-2.ll
Commit 7037d110fab7e70c3951a4997779b3dd572ceb39 by spatel
[InstCombine] propagate IR flags from binop through select

The tests with constant folding that produces poison
could potentially remove the select entirely:
https://alive2.llvm.org/ce/z/e-WUqF
...but this patch just removes the FMF-only limitation on
propagation.
The file was modifiedllvm/lib/Transforms/InstCombine/InstructionCombining.cpp
The file was modifiedllvm/test/Transforms/InstCombine/select-2.ll
Commit aa7f0e6a553e9a84a46852cfabbaff8a5cb48325 by flo
[DSE] Remove commented-out InvisibleToCallerBeforeRet. (NFC)

This code was is a leftover from earlier changes and should be removed.
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
Commit 192f8d97002f13ab5a74ee11c4d5559b5ca693a8 by hokein.wu
[clangd] Don't rename on symbols from system headers.

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

Differential Revision: https://reviews.llvm.org/D116643
The file was modifiedclang-tools-extra/clangd/refactor/Rename.cpp
The file was modifiedclang-tools-extra/clangd/unittests/RenameTests.cpp
Commit 4dedd82cc99341d757a9cc07a8b7b22c8bb61d19 by sam.mccall
Re-land [clangd] Elide even more checks in SelectionTree.

This reverts commit 1093b9f2e9842982d97534940a643e3a4657c60b.

Fix added for implicit-include case.
The file was modifiedclang-tools-extra/clangd/Selection.cpp
The file was modifiedclang-tools-extra/clangd/unittests/SelectionTests.cpp
Commit 61d547e82494daa839731ba87e5b9ee20d12a22b by mubashar.ahmad
[Clang][AArch64][ARM] PMUv3 Option Added

An option has been added to Clang to enable or disable
the PMU v3 architecture extension.

Differential Revision: https://reviews.llvm.org/D116748
The file was modifiedllvm/include/llvm/Support/AArch64TargetParser.h
The file was modifiedllvm/unittests/Support/TargetParserTest.cpp
The file was modifiedllvm/lib/Support/AArch64TargetParser.cpp
The file was modifiedllvm/include/llvm/Support/AArch64TargetParser.def
The file was addedclang/test/Driver/aarch64-perfmon.c
Commit 524150fe070903772cc0c7215dad57ce50f61016 by flo
[LV] Add test coverage for reductions with odd interleave counts.

Add test coverage for loops with reductions and odd (3, 5) interleave
counts.
The file was addedllvm/test/Transforms/LoopVectorize/reduction-odd-interleave-counts.ll
Commit cee8b255be5cef1a8aa59413fd573d3a4b60225b by matthew.devereau
[AArch64][SVE] Remove Redundant aarch64.sve.convert.to.svbool

Generated code resulted in redundant aarch64.sve.convert.to.svbool
calls for AArch64 Binary Operations. Narrow the more precise operands
instead of widening the less precise operands

Differential Revision: https://reviews.llvm.org/D116730
The file was modifiedllvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
The file was addedllvm/test/Transforms/InstCombine/AArch64/sve-intrinsic-to-svbool-binops.ll
Commit 81004269e5c7d69f27b8273f48dd4d0f86ac1358 by Matthew.Arsenault
AMDGPU/GlobalISel: Fix test not matching test name

This was testing an s48 load instead of an s64 load as intended.
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-private.mir
Commit e09f98a69a8d223168f0766a3574c4a09b167b81 by Matthew.Arsenault
AMDGPU: Fix LiveVariables error after optimizing VGPR ranges

This was not removing the block from the live set depending on the
specific depth first visit order. Fixes a verifier error in the OpenCL
conformance tests.
The file was modifiedllvm/test/CodeGen/AMDGPU/vgpr-liverange-ir.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIOptimizeVGPRLiveRange.cpp
The file was addedllvm/test/CodeGen/AMDGPU/block-should-not-be-in-alive-blocks.mir
Commit d97fb55ff35699ed9da3744bc6b6d40a38e1c6f7 by Matthew.Arsenault
AMDGPU/GlobalISel: Add failing ABI lowering testcases
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/function-returns.v2i65.ll
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-function-args.v2i65.ll
Commit 95bf5ac8a827f55e70cc54e783b12b83ea0f56fd by simon.moll
[VE] select|vp.merge|vp.select v256 isel and tests

Use the `VMRG` for all three operations for now. `vp_select` will be
used in passthru patterns.

Reviewed By: kaz7

Differential Revision: https://reviews.llvm.org/D117206
The file was modifiedllvm/lib/Target/VE/VVPInstrPatternsVec.td
The file was modifiedllvm/lib/Target/VE/VEISelLowering.cpp
The file was addedllvm/test/CodeGen/VE/Vector/vec_select.ll
The file was addedllvm/test/CodeGen/VE/Vector/vp_select.ll
The file was modifiedllvm/lib/Target/VE/VVPNodes.def
The file was modifiedllvm/lib/Target/VE/VVPInstrInfo.td
The file was addedllvm/test/CodeGen/VE/Vector/vp_merge.ll
Commit c3a74183a52f5cecc19f947187921866665ef279 by Matthew.Arsenault
AMDGPU/GlobalISel: Fix legalization failure for s65 shifts

This was trying to clamp s65 down to s32, which wasn't handled so we
need to promote all the way to s128 first. Having to order the
legalization rules in just the right way is rather dissatisfying, but
I'm not sure how smart the legalizer should be in trying to interpret
the rules.
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/lshr.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-ashr.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-shl.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/shl.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/ashr.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-lshr.mir
Commit 0b1140e883527101599e09462d8aa353cdec1903 by Matthew.Arsenault
AMDGPU: Correct getMaxNumSGPR treatment of flat_scratch

This was approximating the entry point logic for flat_scratch_init,
which is not really the point. We need to account for whether we need
to reserve the SGPR pair used for flat_scratch, not whether we needed
the initialization kernel argument. If this was an arbitrary function,
we would end up over-reporting the number of potentially free
SGPRs. The logic for architected flat scratch also only applies to the
initialization in the kernel, not the reserved registers at the end.

Avoids compile failures in a future patch from allocating more SGPRs
than the subtarget supports.
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
The file was modifiedllvm/lib/Target/AMDGPU/GCNSubtarget.h
Commit 9392b40d4b1999c9b33490829552d928a2fa9bab by Matthew.Arsenault
AMDGPU/GlobalISel: Fix selection of constant 32-bit addrspace loads

Unfortunately the selection patterns still rely on the address space
from the memory operand instead of using the pointer type. Add this
address space to the list of cases supported by global-like loads.

Alternatively we would have to adjust the address space of the memory
operand to deviate from the underlying IR value, which looks ugly and
is more work in the legalizer.

This doesn't come up in the DAG path because it uses a different
selection strategy where the cast is inserted during the addressing
mode matching.
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstructions.td
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/load-constant32bit.ll
Commit dc2457c8cf096b35e3addb7fceb252d90803430f by Matthew.Arsenault
AMDGPU: Fix crashing on calls to C functions from graphics contexts

If we had one of the shader calling conventions calling a default
calling convention callee, this would crash when the caller did not
have anything to pass to the workitem ID.

This is illegal, but we still need to produce something
sensible. llvm-reduce likes to replace calls to intrinsics with calls
to null or undef, so this does appear and is helpful to avoid hard
erroring.

Pass undef in this case, as already happened for the other implicit
arguments. It might make sense to define the behavior here and pass
null for the pointers, and -1 for the workitem ID. We do have extra
bits in the workitem ID, so this wouldn't conflict with a valid value.
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-call.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/amdpal-callable.ll
The file was addedllvm/test/CodeGen/AMDGPU/gfx-call-non-gfx-func.ll
Commit e93f98f09c86b909d0ba76196cce57399bf23d6f by arthur.j.odwyer
[libc++] [test] Check for another kind of modulemap typo in lint_modulemap.sh.py.

Verify that the name of the private submodule matches the name of the detail header.

Differential Revision: https://reviews.llvm.org/D117438
The file was modifiedlibcxx/include/module.modulemap
The file was modifiedlibcxx/test/libcxx/lint/lint_modulemap.sh.py
Commit 0359b85c61b54354949a68f41a6881fb15f1c22b by arthur.j.odwyer
[libc++] [ABI BREAK] Conform lognormal_distribution::param_type.

Fixes #52906.

Differential Revision: https://reviews.llvm.org/D116344
The file was addedlibcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval_param.PR52906.pass.cpp
The file was modifiedlibcxx/include/__random/lognormal_distribution.h
The file was modifiedlibcxx/docs/ReleaseNotes.rst
Commit 578008789fd061a88ce47dac6ff627001b404348 by david.green
[DAG] Extend SearchForAndLoads with any_extend handling

This extends the code in SearchForAndLoads to be able to look through
ANY_EXTEND nodes, which can be created from mismatching IR types where
the AND node we begin from only demands the low parts of the register.
That turns zext and sext into any_extends as only the low bits are
demanded. To be able to look through ANY_EXTEND nodes we need to handle
mismatching types in a few places, potentially truncating the mask to
the size of the final load.

Differential Revision: https://reviews.llvm.org/D117457
The file was modifiedllvm/test/CodeGen/X86/pr35763.ll
The file was modifiedllvm/test/CodeGen/AArch64/combine-andintoload.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/test/CodeGen/X86/pr35765.ll
Commit 9fe67486cc06a02308a169a33ecbbf841017a27d by arthur.j.odwyer
[libc++] [test] Improve the test for `uniform_int_distribution<T>`.

Extracted from https://reviews.llvm.org/D114920
The file was modifiedlibcxx/test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/eval.pass.cpp
Commit 875117ae7a21f0282e09a72addaf41dfd033cc55 by yitzhakm
[clang][dataflow] Remove TestingSupport's dependency on gtest

Users outside of the clang repo may use different googletest versions. So, it's
better not to depend on llvm's googletest. This patch removes the dependency by
having `checkDataflow` return an `llvm::Error` instead of calling googletest's
`FAIL` or `ASSERT...` macros.

Differential Revision: https://reviews.llvm.org/D117304
The file was modifiedclang/unittests/Analysis/FlowSensitive/TestingSupportTest.cpp
The file was modifiedclang/unittests/Analysis/FlowSensitive/TransferTest.cpp
The file was modifiedclang/unittests/Analysis/FlowSensitive/SingleVarConstantPropagationTest.cpp
The file was modifiedclang/unittests/Analysis/FlowSensitive/TestingSupport.h
The file was modifiedclang/unittests/Analysis/FlowSensitive/MultiVarConstantPropagationTest.cpp
The file was modifiedclang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp
The file was modifiedclang/unittests/Analysis/FlowSensitive/TestingSupport.cpp
Commit 3130134d6e4823b5ee7619288a4b7e1e60831a82 by zhijian
[AIX] Support of Big archive (read)

Summary:

The patch is based on the EGuesnet's implement of the "Support of Big archive (read)
the first commit of the patch is come from https://reviews.llvm.org/D100651.

the rest of commits of the patch

1  Addressed the comments on the https://reviews.llvm.org/D100651
2  according to https://www.ibm.com/docs/en/aix/7.2?topic=formats-ar-file-format-big
using the "fl_fstmoff" for the first object file number, using "char ar_nxtmem[20]" to get next object file ,
using the "char fl_lstmoff[20]" for the last of the object file will fix the following problems:
   2.1 can not correct reading a archive files which has padding data between too object file
   2.2 can not correct reading a archive files from which some object file has be deleted

3 introduce a new derived class BigArchive for big ar file.

Reviewers: James Henderson
Differential Revision: https://reviews.llvm.org/D111889
The file was modifiedllvm/lib/Object/Archive.cpp
The file was addedllvm/test/Object/archive-big-print.test
The file was addedllvm/test/Object/archive-big-read.test
The file was modifiedllvm/test/tools/llvm-objdump/malformed-archives.test
The file was modifiedllvm/include/llvm/Object/Archive.h
The file was addedllvm/test/Object/archive-big-extract.test
The file was modifiedllvm/lib/Object/ArchiveWriter.cpp
The file was modifiedllvm/tools/llvm-ar/llvm-ar.cpp
The file was addedllvm/test/Object/Inputs/aix-big-archive.a
Commit bcf5e687c917ed35c41395b92a5af8f162f89efc by spatel
[InstCombine] add tests for fadd+fmul factorization fold; NFC

As shown in the tests, this transform exists partially already.
The file was modifiedllvm/test/Transforms/InstCombine/fadd.ll
Commit 4cdf30d9d36ea6a6dfee967414f9f0e1748350af by spatel
[InstCombine] FP with reassoc FMF: (X * C) + X --> X * (MulC + 1.0)

This fold already exists for scalars via FAddCombine (and that's
why 2 of the tests are only changed cosmetically), but that code
misses vectors and has largely been replaced by simpler folds
over time, so this is another step towards removing it.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
The file was modifiedllvm/test/Transforms/InstCombine/fadd.ll
Commit f104cc38f45ebbca065e78959c23d09f16b65bd5 by npopov
[ConstantFold] Don't fold load from non-byte-sized vector

Following up on https://github.com/llvm/llvm-project/commit/1470f94d71c544327f76b85c55cb6f7cb43a6cbb#r63981173:

The result here (probably) depends on endianness. Don't bother
trying to handle this exotic case, just bail out.
The file was modifiedllvm/lib/Analysis/ConstantFolding.cpp
The file was modifiedllvm/test/Transforms/InstCombine/load-store-forward.ll
Commit 8ea579203da0e2b2f3e9e04ea4b63b20248c52f3 by llvm-dev
[MCA][X86] Add missing zero-idioms test file coverage

atom/slm have no/limited zero-idioms handling but we should test all the common instructions anyhow

znver1/znver2 were just missing - I've copied the Haswell tests for consistent test coverage
The file was addedllvm/test/tools/llvm-mca/X86/SLM/zero-idioms.s
The file was addedllvm/test/tools/llvm-mca/X86/Znver1/zero-idioms.s
The file was addedllvm/test/tools/llvm-mca/X86/Znver2/zero-idioms.s
The file was addedllvm/test/tools/llvm-mca/X86/Atom/zero-idioms.s
Commit f98025d867e336ebc3c9cba7e66b6ad6261d0b38 by nicolas.vasilache
[mlir][Vector] Generalize and improve folding of ExtractOp from Insert/Transpose chain.

This revision fixes a bug where the iterative algorithm would walk back def-use chains to an incorrect operand.
This exposed opportunities for a larger refactoring and behavior improvement.
The new algorithm has improved folding behavior and proceeds by tracking both the
permutation of the extraction position and the internal vector permutation.
Multiple partial intersection cases with a candidate insertOp are supported.

The refactoring of the implementation should also help it generalize to strided insert/extract op.

This also subsumes the previous `foldExtractOpFromTranspose` which is now a simple special case and can be deleted.

Differential Revision: https://reviews.llvm.org/D117322
The file was modifiedmlir/test/Dialect/Vector/canonicalize.mlir
The file was modifiedmlir/lib/Dialect/Vector/VectorOps.cpp
Commit 1e512f022ad5c23dc4ef4e663f51d5d0bcbc7c69 by marek.kurdej+llvm.org
[clang-format] Treat ForEachMacros as loops

TT_ForEachMacro should be considered in rules AllowShortBlocksOnASingleLine
and AllowShortLoopsOnASingleLine.
Fixes https://github.com/llvm/llvm-project/issues/45432.

Reviewed By: MyDeveloperDay

Differential Revision: https://reviews.llvm.org/D94955
The file was modifiedclang/unittests/Format/FormatTest.cpp
The file was modifiedclang/lib/Format/UnwrappedLineFormatter.cpp
Commit 6f0977519d12fc337e8bacd31dbaf84923e49b57 by jakeegan10
[AIX][ZOS] Handle unsupported builtin function CFStringMakeConstantString

This patch emits an error on AIX and z/OS because XCOFF and GOFF does not currently implement builtin function `CFStringMakeConstantString`. Tests that use this builtin were also disabled.

Reviewed By: SeanP

Differential Revision: https://reviews.llvm.org/D117315
The file was modifiedclang/lib/Sema/SemaChecking.cpp
The file was modifiedclang/test/SemaCXX/builtins.cpp
The file was modifiedclang/test/Modules/builtins.m
The file was modifiedclang/test/Analysis/cfref_PR2519.c
The file was modifiedclang/test/CodeGen/cfstring2.c
Commit 76f1c396fad8b9281a1c96d266af357da0492344 by zhijian
Revert "[AIX] Support of Big archive (read)"

This reverts commit 3130134d6e4823b5ee7619288a4b7e1e60831a82.
The file was removedllvm/test/Object/archive-big-extract.test
The file was modifiedllvm/test/tools/llvm-objdump/malformed-archives.test
The file was modifiedllvm/include/llvm/Object/Archive.h
The file was removedllvm/test/Object/archive-big-read.test
The file was modifiedllvm/lib/Object/Archive.cpp
The file was removedllvm/test/Object/Inputs/aix-big-archive.a
The file was modifiedllvm/lib/Object/ArchiveWriter.cpp
The file was removedllvm/test/Object/archive-big-print.test
The file was modifiedllvm/tools/llvm-ar/llvm-ar.cpp