LLVM/project 9f9e15fclang/lib/CIR/CodeGen CIRGenExprScalar.cpp, clang/test/CIR/CodeGen size-of-vla.cpp

[CIR] Upstream SizeOf for VariableArrayType (#169993)

Upstream SizeOf support for VariableArrayType
DeltaFile
+156-0clang/test/CIR/CodeGen/size-of-vla.cpp
+18-13clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
+174-132 files

LLVM/project c752bb9llvm/lib/Transforms/Utils SimplifyIndVar.cpp, llvm/test/Transforms/IndVarSimplify widen-nonnegative-countdown.ll post-inc-range.ll

[IndVars] Strengthen inference of samesign flags (#170363)

When reviewing another change, I noticed that we were failing to infer
samsign for two cases: 1) an unsigned comparison, and 2) when both
arguments were known negative.

Using CVP and InstCombine as a reference, we need to be careful to not
allow eq/ne comparisons. I'm a bit unclear on the why of that, and for
now am going with the low risk change. I may return to investigate that
in a follow up.

Compile time results look like noise to me, see:
https://llvm-compile-time-tracker.com/compare.php?from=49a978712893fcf9e5f40ac488315d029cf15d3d&to=2ddb263604fd7d538e09dc1f805ebc30eb3ffab0&stat=instructions:u
DeltaFile
+13-13llvm/test/Transforms/LoopUnroll/runtime-loop-multiexit-dom-verify.ll
+12-12llvm/test/Transforms/IndVarSimplify/widen-nonnegative-countdown.ll
+8-8llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
+8-8llvm/test/Transforms/IndVarSimplify/post-inc-range.ll
+8-8llvm/test/Transforms/IndVarSimplify/floating-point-small-iv.ll
+7-7llvm/test/Transforms/IndVarSimplify/pr39673.ll
+56-5630 files not shown
+114-11536 files

LLVM/project ec6a15fllvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 masked_store_trunc_ssat.ll masked_store_trunc_usat.ll

[X86] optimize masked truncated saturating stores (#169827)

Combine the saturating operation into the masked truncating store.

https://godbolt.org/z/n1YfavKP6

```asm
_mm256_mask_cvtusepi16_storeu_epi8_manual: # @_mm256_mask_cvtusepi16_storeu_epi8_manual
        kmovd   k1, esi
        vmovdqa ymm0, ymmword ptr [rdx]
        vpminuw ymm0, ymm0, ymmword ptr [rip + .LCPI0_0]
        vpmovwb xmmword ptr [rdi] {k1}, ymm0
        vzeroupper
        ret
_mm256_mask_cvtusepi16_storeu_epi8_intrinsic: # @_mm256_mask_cvtusepi16_storeu_epi8_intrinsic
        kmovd   k1, esi
        vmovdqa ymm0, ymmword ptr [rdx]
        vpmovuswb       xmmword ptr [rdi] {k1}, ymm0
        vzeroupper
        ret
```
DeltaFile
+60-70llvm/test/CodeGen/X86/masked_store_trunc_ssat.ll
+57-52llvm/test/CodeGen/X86/masked_store_trunc_usat.ll
+42-14llvm/lib/Target/X86/X86ISelLowering.cpp
+159-1363 files

LLVM/project bd21095llvm/lib/CodeGen MachineBasicBlock.cpp, llvm/test/CodeGen/NVPTX switch-loop-header.mir switch.ll

[MachineBasicBlock] Don't split loop header successor if the terminator is unanalyzable (#170146)

Fixes https://github.com/llvm/llvm-project/issues/170051
The previous implementation allows splitting the successor if it's the
loop header, regardless of whether the terminator of `this` is
analyzable.
DeltaFile
+182-0llvm/test/CodeGen/NVPTX/switch-loop-header.mir
+73-0llvm/test/CodeGen/NVPTX/switch.ll
+8-8llvm/lib/CodeGen/MachineBasicBlock.cpp
+263-83 files

LLVM/project 58d74fellvm/include/llvm/Support/LSP Protocol.h, llvm/lib/Support/LSP Protocol.cpp

[SupportLSP] Add ShowMessageParams (#164626)

Adds ShowMessageParams to LSP support according to the [LSP
specification](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#showMessageRequestParams).
DeltaFile
+27-0llvm/include/llvm/Support/LSP/Protocol.h
+18-0llvm/lib/Support/LSP/Protocol.cpp
+45-02 files

LLVM/project eb7db0bmlir/test/Dialect/XeGPU xegpu-wg-to-sg-unify-ops.mlir xegpu-wg-to-sg-unify-ops-rr.mlir

[mlir][xegpu] Change `index` arithmetic ops to `arith` ops. (#170390)

Index ops cause some issues during SIMT distribution because they don't
have the `Elementwise` mappable trait. This PR replaces all index
arithmetic ops with matching `arith` dialect ops.
DeltaFile
+58-61mlir/test/Dialect/XeGPU/xegpu-wg-to-sg-unify-ops.mlir
+19-23mlir/test/Dialect/XeGPU/xegpu-wg-to-sg-unify-ops-rr.mlir
+14-14mlir/test/Dialect/XeGPU/xegpu-wg-to-sg.mlir
+12-12mlir/test/Dialect/XeGPU/subgroup-distribute.mlir
+8-10mlir/test/Dialect/XeGPU/xegpu-attr-interface.mlir
+7-7mlir/test/Dialect/XeGPU/xegpu-wg-to-sg-rr.mlir
+118-1272 files not shown
+123-1348 files

LLVM/project 267865allvm/include/llvm/Analysis ScalarEvolution.h, llvm/lib/Analysis ScalarEvolution.cpp

[SCEV] Factor out utility for proving same sign of two SCEVs [nfc] (#170376)

This is a slightly different API than ConstantRange's
areInsensitiveToSignednessOfICmpPredicate. The only actual difference
(beyond naming) is the handling of empty ranges (i.e. unreachable code).
I wanted to keep the existing SCEV behavior for the unreachable code as
we should be folding that to poison, not reasoning about samesign. I
tried the other variant locally, and saw no test changes.
DeltaFile
+6-2llvm/lib/Analysis/ScalarEvolution.cpp
+3-0llvm/include/llvm/Analysis/ScalarEvolution.h
+9-22 files

LLVM/project ccd4e7bllvm/lib/Transforms/Scalar LoopStrengthReduce.cpp, llvm/test/CodeGen/AArch64 complex-deinterleaving-reductions-predicated-scalable.ll

[LSR] Make OptimizeLoopTermCond able to handle some non-cmp conditions (#165590)

Currently OptimizeLoopTermCond can only convert a cmp instruction to
using a postincrement induction variable, which means it can't handle
predicated loops where the termination condition comes from
get_active_lane_mask. Relax this restriction so that we can handle any
kind of instruction, though only if it's the instruction immediately
before the branch (except for possibly an extractelement).
DeltaFile
+205-0llvm/test/Transforms/LoopStrengthReduce/AArch64/non-cmp-cond.ll
+19-21llvm/test/CodeGen/AArch64/complex-deinterleaving-reductions-predicated-scalable.ll
+21-12llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+245-333 files

LLVM/project c128fd9clang/docs ReleaseNotes.rst, clang/include/clang/Lex Token.h

[Clang] prevent crash on invalid nested name specifiers with a single colon (#169246)

Fixes #167905

--- 

This patch addresses an issue where invalid nested name specifier
sequences containing a single colon (`a:c::`) could be treated during
recovery as valid scope specifiers, which in turn led to a crash


https://github.com/llvm/llvm-project/blob/c543615744d61e0967b956c402e310946d741570/clang/lib/Parse/ParseExprCXX.cpp#L404-L418


For malformed inputs like `a:c::`, the single colon recovery incorrectly
triggers and produces an `annot_cxxscope`. When tentative parsing later
runs



    [9 lines not shown]
DeltaFile
+10-0clang/test/Parser/cxx-nested-name-spec.cpp
+7-1clang/include/clang/Lex/Token.h
+2-0clang/docs/ReleaseNotes.rst
+1-1clang/lib/Parse/ParseTentative.cpp
+20-24 files

LLVM/project d0f5a49llvm/include/llvm/Support DebugCounter.h, llvm/lib/Support DebugCounter.cpp

[Support] Support debug counters in non-assertion builds (#170468)

This enables the use of debug counters in (non-assertion) release
builds. This is useful to enable debugging without having to switch to
an assertion-enabled build, which may not always be easy.

After some recent improvements, always supporting debug counters no
longer has measurable overhead.
DeltaFile
+0-5llvm/include/llvm/Support/DebugCounter.h
+0-5llvm/lib/Support/DebugCounter.cpp
+0-5llvm/test/CodeGen/NVPTX/param-add.ll
+0-2llvm/test/Transforms/WholeProgramDevirt/calls-to-devirt.ll
+0-2llvm/test/CodeGen/AArch64/GlobalISel/counter-fallback.ll
+0-2llvm/test/CodeGen/X86/dag-combine-counter.ll
+0-2115 files not shown
+0-3821 files

LLVM/project 5ab8c3autils/bazel/llvm-project-overlay/lldb/source/Plugins BUILD.bazel

[LLDB|BUILD] Fix for c50802cb (#170484)

Fix after #170236
DeltaFile
+1-0utils/bazel/llvm-project-overlay/lldb/source/Plugins/BUILD.bazel
+1-01 files

LLVM/project 4c09e45mlir/lib/Target/LLVMIR/Dialect/OpenMP OpenMPToLLVMIRTranslation.cpp

[MLIR] Apply clang-tidy fixes for llvm-qualified-auto in OpenMPToLLVMIRTranslation.cpp (NFC)
DeltaFile
+3-3mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+3-31 files

LLVM/project 45b697ellvm/lib/Analysis MemoryBuiltins.cpp, llvm/test/Transforms/LowerConstantIntrinsics builtin-object-size-idxsize.ll

[MemoryBuiltins] Consider index type size when aggregating gep offsets (#132365)

[MemoryBuiltins] Consider index type size when aggregating gep offsets
Main goal here is to fix some bugs seen with LowerConstantIntrinsics
pass and the lowering of llvm.objectsize.

In ObjectSizeOffsetVisitor::computeImpl we are using an external
analysis together with stripAndAccumulateConstantOffsets. The idea
is to compute the Min/Max value of individual offsets within a GEP.
The bug solved here is that when doing the Min/Max comparisons the
external analysis wasn't considering the index type size (given by
the data layout), it was simply using the type from the IR. Since a
GEP is defined as sext/truncating indices we need to consider the
index type size in the external analysis.

This solves a regression (false ubsan warnings) seen after commit

https://github.com/llvm/llvm-project/commit/02b8ee281947f6cb39c7eb3c4bbba59322e9015b
(https://github.com/llvm/llvm-project/pull/117849).
DeltaFile
+23-15llvm/lib/Analysis/MemoryBuiltins.cpp
+10-10llvm/test/Transforms/LowerConstantIntrinsics/builtin-object-size-idxsize.ll
+33-252 files

LLVM/project 2222ab0libunwind/test eh_frame_fde_pc_range.pass.cpp forceunwind.pass.cpp

Revert "libunwind: Remove OS requirements from tests to make them run on more…"

This reverts commit 33bcde0678707ffffb7f01188d530da05bed47b8.
DeltaFile
+2-3libunwind/test/eh_frame_fde_pc_range.pass.cpp
+1-3libunwind/test/forceunwind.pass.cpp
+1-2libunwind/test/bad_unwind_info.pass.cpp
+1-2libunwind/test/aarch64_za_unwind.pass.cpp
+1-2libunwind/test/floatregister.pass.cpp
+1-2libunwind/test/aarch64_vg_unwind.pass.cpp
+7-144 files not shown
+11-2110 files

LLVM/project aa4c2d2flang/include/flang/Parser openmp-utils.h, flang/lib/Semantics resolve-directives.cpp

Flag unrelated types as arguments to GetOmpObjectList
DeltaFile
+44-18flang/include/flang/Parser/openmp-utils.h
+1-1flang/lib/Semantics/resolve-directives.cpp
+45-192 files

LLVM/project 045331emlir/unittests/IR SymbolTableTest.cpp

[MLIR] Apply clang-tidy fixes for performance-unnecessary-value-param in SymbolTableTest.cpp (NFC)
DeltaFile
+6-6mlir/unittests/IR/SymbolTableTest.cpp
+6-61 files

LLVM/project b1d0605clang/docs ReleaseNotes.rst, clang/include/clang/AST Decl.h

[Clang] adjust caret placement for the suggested attribute location for enum class (#168092)

Fixes #163224

---

This patch addresses the issue by correcting the caret insertion
location for attributes incorrectly positioned before an enum. The
location is now derived from the associated `EnumDecl`: for named enums,
the attribute is placed before the identifier, while for anonymous enum
definitions, it is placed before the opening brace, with a fallback to
the semicolon when no brace is present.

For example:

```cpp
  [[nodiscard]] enum class E1 {};
```


    [4 lines not shown]
DeltaFile
+48-0clang/test/FixIt/fixit-cxx0x-attributes.cpp
+18-23clang/lib/Parse/Parser.cpp
+7-3clang/lib/Sema/SemaDecl.cpp
+9-0clang/include/clang/AST/Decl.h
+2-0clang/docs/ReleaseNotes.rst
+84-265 files

LLVM/project 9fd32acllvm/include/llvm/MC MCSymbolGOFF.h MCGOFFStreamer.h, llvm/lib/MC MCGOFFStreamer.cpp MCSymbolGOFF.cpp

Address most review comments
DeltaFile
+1-67llvm/lib/MC/MCGOFFStreamer.cpp
+58-6llvm/lib/MC/MCSymbolGOFF.cpp
+13-1llvm/include/llvm/MC/MCSymbolGOFF.h
+3-9llvm/lib/MC/GOFFObjectWriter.cpp
+0-6llvm/include/llvm/MC/MCGOFFStreamer.h
+0-4llvm/lib/Target/SystemZ/MCTargetDesc/SystemZTargetStreamer.cpp
+75-932 files not shown
+76-958 files

LLVM/project be3204aclang/lib/Format FormatTokenLexer.cpp, clang/unittests/Format TokenAnnotatorTest.cpp FormatTestVerilog.cpp

[clang-format] Ignore C++ keywords when formatting Verilog (#167984)

In the sample below, the `private` identifier is the name of the type,
and the `try` identifier is the name of the variable.

new

```SystemVerilog
begin
  private try;
end
```

old

```SystemVerilog
begin
private
  try

    [3 lines not shown]
DeltaFile
+7-0clang/unittests/Format/TokenAnnotatorTest.cpp
+5-0clang/unittests/Format/FormatTestVerilog.cpp
+2-0clang/lib/Format/FormatTokenLexer.cpp
+14-03 files

LLVM/project 75c85baclang/lib/Format ContinuationIndenter.cpp ContinuationIndenter.h, clang/unittests/Format FormatTest.cpp FormatTestObjC.cpp

[clang-format] Continue aligned lines without parentheses (#167979)

before, with the options `AlignConsecutiveDeclarations` and
`AlignConsecutiveAssignments` enabled

```C++
veryverylongvariablename = somethingelse;
shortervariablename      = anotherverylonglonglongvariablename + //
                      somevariablethatwastoolongtofitonthesamerow;

double i234 = 0;
auto   v    = false ? type{}
                    : type{
                     1,
                 };
```

after


    [31 lines not shown]
DeltaFile
+85-36clang/lib/Format/ContinuationIndenter.cpp
+59-0clang/unittests/Format/FormatTest.cpp
+43-8clang/lib/Format/ContinuationIndenter.h
+24-19clang/lib/Format/WhitespaceManager.cpp
+26-0clang/unittests/Format/FormatTestObjC.cpp
+19-6clang/lib/Format/WhitespaceManager.h
+256-691 files not shown
+259-727 files

LLVM/project f83f6f5llvm/utils/lit/tests lit.cfg windows-pools.py

Fix lit testing to support standalone testing (#170365)

To be able to test lit without having a configuration of LLVM, we need
to support invocations that are not going through the lit.site.cfg and
thus don't have a llvm_config set-up.
DeltaFile
+4-1llvm/utils/lit/tests/lit.cfg
+1-1llvm/utils/lit/tests/windows-pools.py
+5-22 files

LLVM/project cb5362aflang/include/flang/Parser parse-tree.h, flang/lib/Parser openmp-parsers.cpp unparse.cpp

[flang][OpenMP] Rename OmpLoopRangeClause to OmpLooprangeClause, NFC (#170370)

The convention is to change spelling from snake_case to UpperCamel, and
use the result as a stem in derived names, e.g.
- spelling is "some_clause" -> stem is SomeClause
- spelling is "someclause" -> stem is Someclause

Member of the OmpClause variant is <stem> itself, e.g. Looprange as in
parser::OmpClause::Looprange.

Specific clause class name is Omp<stem>Clause, e.g. OmpLooprangeClause.
DeltaFile
+3-3flang/include/flang/Parser/parse-tree.h
+2-2flang/lib/Parser/openmp-parsers.cpp
+2-2llvm/include/llvm/Frontend/OpenMP/ClauseT.h
+1-1flang/lib/Parser/unparse.cpp
+1-1flang/test/Parser/OpenMP/fuse-looprange.f90
+1-1llvm/include/llvm/Frontend/OpenMP/OMP.td
+10-103 files not shown
+13-139 files

LLVM/project 21d006cflang/lib/Semantics resolve-names.cpp, flang/test/Semantics equiv-kind.f90

[flang] Support kind/index lookup inside of EQUIVALENCE (#170056)

Turn off "in EQUIVALENCE" check for processing of array subscripts,
since subscripts themselves are not part of the EQUIVALENCE.

Fixes #169590
DeltaFile
+19-0flang/test/Semantics/equiv-kind.f90
+10-0flang/lib/Semantics/resolve-names.cpp
+29-02 files

LLVM/project 00c8e61llvm/lib/Target/AArch64 AArch64InstrFormats.td AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 arm64-int-neon.ll arm64-vmul.ll

[AArch64] Add bitcasts for lowering saturating add/sub and shift intrinsics.  (#161840)

This is followup patch to #157680 . In this patch, we are adding
explicit bitcasts to floating-point type when lowering saturating
add/sub and shift NEON scalar intrinsics using SelectionDAG, so they can
be picked up by patterns added in first part of this series. To do that,
we have to create new nodes for these intrinsics, which operate on
floating-point types and wrap them in bitcast nodes.
DeltaFile
+238-0llvm/test/CodeGen/AArch64/arm64-int-neon.ll
+100-84llvm/test/CodeGen/AArch64/arm64-vmul.ll
+43-13llvm/lib/Target/AArch64/AArch64InstrFormats.td
+44-4llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+28-17llvm/lib/Target/AArch64/AArch64InstrInfo.td
+12-22llvm/test/CodeGen/AArch64/arm64-vshift.ll
+465-1406 files

LLVM/project 8b94997lldb/source/Plugins/Process/Windows/Common ProcessWindows.cpp, lldb/source/Plugins/Process/gdb-remote ProcessGDBRemote.cpp

[lldb][windows] fix invalid corefile error message (#170471)

DeltaFile
+3-5lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+3-1lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
+6-62 files

LLVM/project 2fc1275llvm/lib/Target/RISCV RISCVVectorPeephole.cpp, llvm/test/CodeGen/RISCV/rvv vmerge-peephole.mir

[RISCV] Fix corner cases after #170070 (#170438)

There are two fixes:

1. Clear kill flags for `FalseReg` in foldVMergeToMask or we can't
pass the MachineVerifier because of using a killed virtual register.
2. Restrict `lookThruCopies` to only look through COPYs with
one non-debug use.

This was found when backporting #170070 to 21.x branch.
DeltaFile
+45-0llvm/test/CodeGen/RISCV/rvv/vmerge-peephole.mir
+9-3llvm/lib/Target/RISCV/RISCVVectorPeephole.cpp
+54-32 files

LLVM/project 6af1c3fllvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/InstCombine known-bits.ll

[ValueTracking] Support scalable vector splats in computeKnownBits (#170345)

Similar to https://github.com/llvm/llvm-project/pull/170325, this patch
adds support for scalable vector splats in computeKnownBits.
DeltaFile
+17-0llvm/test/Transforms/InstCombine/known-bits.ll
+3-3llvm/test/Transforms/LoopVectorize/AArch64/sve-interleaved-accesses.ll
+5-0llvm/lib/Analysis/ValueTracking.cpp
+25-33 files

LLVM/project 2e87463clang/include/clang/Lex PPCallbacks.h, clang/lib/Lex PPDirectives.cpp

[Clang] Fix `PPChainedCallbacks::EmbedFileNotFound()` (#170293)

We've had internal test failures since #166188 landed. The root cause is
that `PPChainedCallbacks::EmbedFileNotFound()` incorrectly calls
`PPCallbacks::FileNotFound()` not `PPCallbacks::EmbedFileNotFound()`.
DeltaFile
+52-4clang/unittests/Lex/PPCallbacksTest.cpp
+6-5clang/lib/Lex/PPDirectives.cpp
+2-2clang/include/clang/Lex/PPCallbacks.h
+60-113 files

LLVM/project 09efb48llvm/utils/gn/secondary/lldb/source/Plugins/Language/CPlusPlus BUILD.gn

[gn build] Port e9bda498e6a0
DeltaFile
+1-0llvm/utils/gn/secondary/lldb/source/Plugins/Language/CPlusPlus/BUILD.gn
+1-01 files

LLVM/project e9bda49lldb/source/Plugins/Language/CPlusPlus LibStdcppSpan.cpp CPlusPlusLanguage.cpp, lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/span TestDataFormatterStdSpan.py

[lldb] add libstdcpp span formatter (#168705)

DeltaFile
+112-0lldb/source/Plugins/Language/CPlusPlus/LibStdcppSpan.cpp
+19-7lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/span/TestDataFormatterStdSpan.py
+9-0lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
+4-0lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.h
+1-0lldb/source/Plugins/Language/CPlusPlus/CMakeLists.txt
+145-75 files