LLVM/project 4f82841libcxx/test/libcxx/containers/views/mdspan/mdspan assert.at.pass.cpp, libcxx/test/std/containers/views/mdspan/mdspan at.pass.cpp

[libc++][test] Merge test files for `mdspan::at` (#199330)

`libcxx/test/libcxx/containers/views/mdspan/mdspan/assert.at.pass.cpp`
caused build bot failures for
- sanitizer-aarch64-linux-bootstrap-asan
- sanitizer-aarch64-linux-bootstrap-hwasan
- sanitizer-aarch64-linux-bootstrap-msan

It's not yet clear why current mechanisms don't work for these builds.
`TEST_HAS_NO_EXCEPTIONS` should have been working.

Also remove one unnecessary `static` and use `std::string_view(e.what())
== "mdspan"`.
DeltaFile
+0-112libcxx/test/libcxx/containers/views/mdspan/mdspan/assert.at.pass.cpp
+73-1libcxx/test/std/containers/views/mdspan/mdspan/at.pass.cpp
+73-1132 files

LLVM/project 12e366allvm/lib/CodeGen/SelectionDAG SelectionDAG.cpp, llvm/test/CodeGen/X86 known-never-zero.ll

[DAG] UDIV/SDIV exact nodes support DemandedElts + add test (#198715)

Resolves #183047

This patch updates isKnownNeverZero to handle DemandedElts for UDIV and SDIV exact nodes.
DeltaFile
+6-12llvm/test/CodeGen/X86/known-never-zero.ll
+1-1llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+7-132 files

LLVM/project 017f352llvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 vector-fshr-rot-128.ll vector-fshr-rot-256.ll

[X86] Lower vector 8-bit rotr(x, 1) to pavgb pattern (#198980)

Fixes #198060
DeltaFile
+14-17llvm/test/CodeGen/X86/vector-fshr-rot-128.ll
+14-16llvm/test/CodeGen/X86/vector-fshr-rot-256.ll
+10-0llvm/lib/Target/X86/X86ISelLowering.cpp
+38-333 files

LLVM/project 3106698clang-tools-extra/clang-doc BitcodeWriter.cpp

[clang-doc][nfc] Avoid combining constexpr with std::initializer_list as this seems to give MSVC trouble. (#199311)

Some Windows bots using MSVC 2019 and 2022 get assertion errors in the
clang-doc lit tests (see
[here](https://github.com/llvm/llvm-project/pull/198066). This seems to
be due to MSVC having trouble with a correctly initializing structures
using std::initializer_list when embedded in a struct declared with
constexpr.

This workaround changes constexpr to const in a struct definition to
avoid this issue.
DeltaFile
+1-1clang-tools-extra/clang-doc/BitcodeWriter.cpp
+1-11 files

LLVM/project 5e8be92llvm/lib/Target/X86 X86ISelLowering.cpp

[X86] combineVectorInsert - use generic zext/shift/or pattern for constant concatenation (#199344)

Generalised the code added in #198273 to make it easier to support other
combos in future patches.

Hopefully we can get load combining to work here soon.
DeltaFile
+8-5llvm/lib/Target/X86/X86ISelLowering.cpp
+8-51 files

LLVM/project ad72dfblibcxx/test/support copy_move_types.h

[libc++][test] Make `copy_move_types.h` usable in old modes (#199183)

This PR makes types in `copy_move_types.h` usable in C++03/11 modes.
Because it is discovered that some types in `copy_move_types.h` are
useful for testing uninitialized memory algorithms in pre-C++20 modes.
DeltaFile
+143-136libcxx/test/support/copy_move_types.h
+143-1361 files

LLVM/project 9863053llvm/include/llvm/IR IntrinsicsNVVM.td, llvm/lib/IR AutoUpgrade.cpp

[NVPTX] Auto-upgrade llvm.nvvm.abs with int-min poison (#198646)

Update the auto-upgrade for llvm.nvvm.abs.i and llvm.nvvm.abs.ll to use
the generic llvm.abs intrinsic with is_int_min_poison=true. The previous
expansion used neg/icmp/select which gives defined INT_MIN -> INT_MIN
behavior, but loses the poison/undefined signed-min semantics needed for
NVPTX to select PTX abs.s32 and abs.s64 instrucitons when the source
operation permits signed-min overflow to be undefined. This is a
followup to #183851 . Using llvm.abs(..., true) preserves intended IR
semantics and lowers through the new ABS_MIN_POISON. We also update the
tests and add NVPTX CodeGen coverage for the legacy nvvm abs intrinsics.
DeltaFile
+24-0llvm/test/CodeGen/NVPTX/nvvm-abs.ll
+2-6llvm/test/Assembler/auto_upgrade_nvvm_intrinsics.ll
+3-4llvm/lib/IR/AutoUpgrade.cpp
+2-2llvm/include/llvm/IR/IntrinsicsNVVM.td
+31-124 files

LLVM/project ec771f7llvm/test/Transforms/LoopVectorize/AArch64 transform-narrow-interleave-to-widen-memory-metadata.ll

[LV] Add narrowing interleave group test with preservable metadata (NFC) (#199335)

Drop stale fixme and add test showing missed metadata preservation.
DeltaFile
+47-8llvm/test/Transforms/LoopVectorize/AArch64/transform-narrow-interleave-to-widen-memory-metadata.ll
+47-81 files

LLVM/project 38e0a91clang/include/clang/CIR MissingFeatures.h, clang/lib/CIR/CodeGen CIRGenItaniumCXXABI.cpp

[CIR] Attach noreturn attribute to __cxa_bad_cast (#198727)

## Summary

  - Mark `__cxa_bad_cast` as `noreturn` in CIR, mirroring the existing
`__cxa_bad_typeid` handling. The attribute is now set on every `CallOp`
that targets it,
    covering both the CodeGen direct path (`emitCallToBadCast`) and the
    target-lowering path (`buildBadCastCall`).
  - Drop the now-fulfilled `MissingFeatures::opFuncNoReturn` entry and
    the corresponding TODO/assert at the lone caller in
    `LowerItaniumCXXABI.cpp`.
  - Update FileCheck expectations in `dynamic-cast.cpp`,
    `dynamic-cast-exact.cpp`, and `abi-lower-after-unreachable.cpp` to
    require the `{noreturn}` attribute on the lowered
    `cir.call @__cxa_bad_cast()`.
DeltaFile
+5-4clang/lib/CIR/Dialect/Transforms/TargetLowering/LowerItaniumCXXABI.cpp
+5-1clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp
+2-2clang/test/CIR/CodeGen/dynamic-cast-exact.cpp
+1-1clang/test/CIR/CodeGen/abi-lower-after-unreachable.cpp
+1-1clang/test/CIR/CodeGen/dynamic-cast.cpp
+0-1clang/include/clang/CIR/MissingFeatures.h
+14-106 files

LLVM/project 23c92delibcxx/test/std/utilities/memory/specialized.algorithms destroy.h

[libc++][test] Add backported `destroy({_at,_n})` for tests (#199185)

It would be convenient to use `destroy_at`, `destroy`, and `destroy_n`
in tests for pre-C++17 uninitialized memory algorithms. So this PR add
backported versions of them for tests.
DeltaFile
+47-0libcxx/test/std/utilities/memory/specialized.algorithms/destroy.h
+47-01 files

LLVM/project 85c3fd0libc/test/shared shared_math_test.cpp

[libc] Fix shared math tests for gcc-13. (#199318)
DeltaFile
+11-6libc/test/shared/shared_math_test.cpp
+11-61 files

LLVM/project 0d8ba1dclang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVM.cpp

[CIR] Extract CIR_ClassCastOp base class for BaseClassAddrOp and DerivedClassAddrOp

Both ops have identical structure (arguments, results, assembly format)
and differ only in mnemonic and description. Extract a shared TableGen
base class to eliminate the duplication. Also improve the assembly format
to print nonnull before the operand and place the type after the offset.
DeltaFile
+22-33clang/include/clang/CIR/Dialect/IR/CIROps.td
+8-8clang/test/CIR/CodeGen/vtt.cpp
+5-5clang/test/CIR/CodeGen/derived-to-base.cpp
+5-5clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+4-4clang/test/CIR/CodeGen/inherited-ctors.cpp
+3-3clang/test/CIR/Lowering/vtt-addrpoint.cir
+47-5814 files not shown
+77-8820 files

LLVM/project 7bcc8e6llvm/lib/Target/X86 X86TargetTransformInfo.cpp, llvm/test/Analysis/CostModel/X86 reduce-umax.ll reduce-umin.ll

[CostModel][X86] Update VECREDUCE MINMAX costs based off llvm-mca analysis (#199208)

Add full CostKinds, to improve a lot of reduction matching in
vectorcombine/slp passes

These are based off SMIN/UMIN numbers, and a few SMAX/UMAX numbers don't
always match, but are typically within +/-1
DeltaFile
+150-150llvm/test/Analysis/CostModel/X86/reduce-umax.ll
+150-150llvm/test/Analysis/CostModel/X86/reduce-umin.ll
+150-150llvm/test/Analysis/CostModel/X86/reduce-smin.ll
+150-150llvm/test/Analysis/CostModel/X86/reduce-smax.ll
+79-148llvm/test/Transforms/SLPVectorizer/X86/horizontal-minmax.ll
+128-41llvm/lib/Target/X86/X86TargetTransformInfo.cpp
+807-7899 files not shown
+992-1,22715 files

LLVM/project 111464cclang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVM.cpp

[CIR] Extract CIR_ClassCastOp base class for BaseClassAddrOp and DerivedClassAddrOp

Both ops have identical structure (arguments, results, assembly format)
and differ only in mnemonic and description. Extract a shared TableGen
base class to eliminate the duplication. Also improve the assembly format
to print nonnull before the operand and place the type after the offset.
DeltaFile
+22-33clang/include/clang/CIR/Dialect/IR/CIROps.td
+18-18clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+8-8clang/test/CIR/CodeGen/vtt.cpp
+5-5clang/test/CIR/CodeGen/derived-to-base.cpp
+4-4clang/test/CIR/CodeGen/inherited-ctors.cpp
+3-3clang/test/CIR/CodeGen/ctor-null-init.cpp
+60-7114 files not shown
+90-10120 files

LLVM/project 9c15582clang/tools/libclang CIndex.cpp

[clang] Fix crash in getCursorRawComments.

Fix a regression introduced in PR #198452 where querying raw comments on invalid cursors caused a segmentation fault due to unconditional ASTContext lookup. Adding an early exit for unsupported cursor kinds at the top of getCursorRawComment safely avoids resolving the context on invalid cursors with null translation units.
DeltaFile
+2-0clang/tools/libclang/CIndex.cpp
+2-01 files

LLVM/project fc082e1llvm/lib/CodeGen/GlobalISel CallLowering.cpp, llvm/lib/Target/RISCV/GISel RISCVCallLowering.cpp

[RISCV][GlobalISel]Implement support for vector calling convention with fixed length vectors (#199227)

Implementing IRTranslator support for fixed length vectors when the V
extension is used. This implementation works similar to SelecionDAGs. We
use insert and extract subvector OPs to get the fixed length vectors out
of the scalable length vectors.
DeltaFile
+607-0llvm/test/CodeGen/RISCV/GlobalISel/irtranslator/fixed-vectors-calling-conv.ll
+47-12llvm/lib/Target/RISCV/GISel/RISCVCallLowering.cpp
+1-0llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
+655-123 files

LLVM/project 1d2c3a7llvm/test/Transforms/EarlyCSE/AArch64 intrinsics-1xN.ll

fixup! [AArch64][TTI][EarlyCSE] Add support for ld1xN and st1xN intrinsics
DeltaFile
+161-350llvm/test/Transforms/EarlyCSE/AArch64/intrinsics-1xN.ll
+161-3501 files

LLVM/project 94373a9libc/include math.yaml

[libc][math] Add iscanonical functions to math.yaml

Surface the existing iscanonical, iscanonicalf, iscanonicalf128, iscanonicalf16, and iscanonicall
implementations through the generated math.h.

To test:
`cmake -Bbuild -Sruntimes -GNinja -DLLVM_ENABLE_RUNTIMES=libc -DLLVM_LIBC_FULL_BUILD=ON`
`pip install pyyaml`
`ninja -C build libc.include.math.__generated_hdr__`
Then check `build/libc/include/math.h` for their signatures.

Add `-DLIBC_TYPES_HAS_FLOAT128=ON` to test for iscanonicalf128
in cmake invocation if host does not support it.
And `-DLIBC_TYPES_HAS_FLOAT16=ON` for iscanonicalf16.
DeltaFile
+32-0libc/include/math.yaml
+32-01 files

LLVM/project d27f84clibc/include math.yaml

[libc][math] Add iscanonical functions to math.yaml

Surface the existing iscanonical, iscanonicalf, iscanonicalf128, iscanonicalf16, and iscanonicall
implementations through the generated math.h.

To test:
`cmake -Bbuild -Sruntimes -GNinja -DLLVM_ENABLE_RUNTIMES=libc -DLLVM_LIBC_FULL_BUILD=ON`
`pip install pyyaml`
`ninja -C build libc.include.math.__generated_hdr__`
Then check `build/libc/include/math.h` for their signatures.

Add `-DLIBC_TYPES_HAS_FLOAT128=ON` to test for iscanonicalf128
in cmake invocation if host does not support it.
And `LIBC_TYPES_HAS_FLOAT16=ON` for iscanonicalf16.
DeltaFile
+32-0libc/include/math.yaml
+32-01 files

LLVM/project 44eca06libc/include math.yaml

[libc][math] Add iscanonical functions to math.yaml

Surface the existing iscanonical, iscanonicalbf16, iscanonicalf, iscanonicalf128, iscanonicalf16, and iscanonicall
implementations through the generated math.h.

To test:
`cmake -Bbuild -Sruntimes -GNinja -DLLVM_ENABLE_RUNTIMES=libc -DLLVM_LIBC_FULL_BUILD=ON`
`pip install pyyaml`
`ninja -C build libc.include.math.__generated_hdr__`
Then check `build/libc/include/math.h` for their signatures.

Add `-DLIBC_TYPES_HAS_FLOAT128=ON` to test for iscanonicalf128
in cmake invocation if host does not support it.
And `LIBC_TYPES_HAS_FLOAT16=ON` for iscanonicalf16.
DeltaFile
+38-0libc/include/math.yaml
+38-01 files

LLVM/project 5ecbf12bolt/lib/Rewrite RewriteInstance.cpp

format

Created using spr 1.3.4
DeltaFile
+2-1bolt/lib/Rewrite/RewriteInstance.cpp
+2-11 files

LLVM/project a8e5595llvm/lib/Target/RISCV RISCVTargetTransformInfo.cpp, llvm/test/Analysis/CostModel/RISCV shuffle-load.ll

[RISCV][TTI] Make getShuffleCost check we have a vector before querying getVectorElementCount (#199286)

Fixes the assert reported here:

<https://github.com/llvm/llvm-project/pull/198446#issuecomment-4522589671>

I believe this happens when the element type isn't a legal RVV element
type and so has been scalarised by type legalisation.

Adding this guard also matches the AArch64 implementation.

The test change is LLM generated.
DeltaFile
+13-0llvm/test/Analysis/CostModel/RISCV/shuffle-load.ll
+3-2llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
+16-22 files

LLVM/project d6be71fclang/lib/CodeGen CGCall.cpp, clang/test/CodeGenCXX noescape.cpp

[Clang][CodeGen] map `noescape` to capture(address) (was capture(none)) (#199281)

`capture(none)` has very restrictive semantics and an easy footgun to
accidentally fire some UB into your code with. Most significantly it
does not allow any visible side-effects of whether a pointer was null or
not to escape the function. This means that the function cannot perform
different side effects depending on whether a pointer marked `noescape`
is null. Relax this to `captures(address)`, which allows information
about the numerical address to escape the function, but no provenance
(i.e. nothing that could be dereferenced) may escape.

As discussed in
https://discourse.llvm.org/t/rfc-updating-the-semantics-of-the-noescape-attribute/90326.
DeltaFile
+15-15clang/test/CodeGenCXX/noescape.cpp
+13-13clang/test/CodeGenObjC/noescape.m
+2-1clang/lib/CodeGen/CGCall.cpp
+30-293 files

LLVM/project 37c7143bolt/include/bolt/Profile DataAggregator.h, bolt/lib/Profile DataAggregator.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.4
DeltaFile
+115-47bolt/lib/Profile/DataAggregator.cpp
+6-24bolt/tools/driver/llvm-bolt.cpp
+19-4bolt/include/bolt/Profile/DataAggregator.h
+21-2bolt/tools/merge-fdata/merge-fdata.cpp
+22-0bolt/test/merge-fdata-no-lbr-event-multi.test
+18-0bolt/test/merge-fdata-no-lbr-event.test
+201-776 files not shown
+234-8812 files

LLVM/project ff0a797bolt/include/bolt/Profile DataAggregator.h, bolt/lib/Profile DataAggregator.cpp

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.4

[skip ci]
DeltaFile
+67-43bolt/lib/Profile/DataAggregator.cpp
+3-22bolt/tools/driver/llvm-bolt.cpp
+21-2bolt/tools/merge-fdata/merge-fdata.cpp
+22-0bolt/test/merge-fdata-no-lbr-event-multi.test
+18-0bolt/test/merge-fdata-no-lbr-event.test
+7-1bolt/include/bolt/Profile/DataAggregator.h
+138-686 files

LLVM/project 2464812bolt/include/bolt/Profile DataAggregator.h, bolt/lib/Profile DataAggregator.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.4
DeltaFile
+67-43bolt/lib/Profile/DataAggregator.cpp
+3-22bolt/tools/driver/llvm-bolt.cpp
+21-2bolt/tools/merge-fdata/merge-fdata.cpp
+22-0bolt/test/merge-fdata-no-lbr-event-multi.test
+18-0bolt/test/merge-fdata-no-lbr-event.test
+7-1bolt/include/bolt/Profile/DataAggregator.h
+138-686 files

LLVM/project bfd5335bolt/include/bolt/Profile DataAggregator.h, bolt/lib/Profile DataAggregator.cpp

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.4

[skip ci]
DeltaFile
+67-43bolt/lib/Profile/DataAggregator.cpp
+3-22bolt/tools/driver/llvm-bolt.cpp
+7-1bolt/include/bolt/Profile/DataAggregator.h
+77-663 files

LLVM/project 30ed3e3bolt/include/bolt/Profile DataAggregator.h, bolt/lib/Profile DataAggregator.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.4
DeltaFile
+67-43bolt/lib/Profile/DataAggregator.cpp
+3-22bolt/tools/driver/llvm-bolt.cpp
+7-1bolt/include/bolt/Profile/DataAggregator.h
+77-663 files

LLVM/project 44df393bolt/include/bolt/Profile DataAggregator.h, bolt/lib/Profile DataAggregator.cpp

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.4

[skip ci]
DeltaFile
+67-43bolt/lib/Profile/DataAggregator.cpp
+7-1bolt/include/bolt/Profile/DataAggregator.h
+74-442 files

LLVM/project 96a78debolt/include/bolt/Profile DataAggregator.h, bolt/lib/Profile DataAggregator.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.4
DeltaFile
+67-43bolt/lib/Profile/DataAggregator.cpp
+7-1bolt/include/bolt/Profile/DataAggregator.h
+74-442 files