LLVM/project 1262871llvm/lib/CodeGen/SelectionDAG LegalizeVectorTypes.cpp, llvm/test/CodeGen/AArch64 intrinsic-cttz-elts-sve.ll

[LegalizeTypes] Don't pad cttz_elts_zero_poison with ones when widening op (#206705)

We only need to pad the widened lanes with ones to handle the case for
an all zeroes input. But for cttz_elts_zero_poison, this is already
poison.

The RISC-V scalable vector test can't be precomitted because it crashes
otherwise trying to lower a get_active_lane_mask from
getMaskFromElementCount.

Also while we're here, switch to using TLI.getTypeToTransformTo to be
consistent with other `WidenVecOp_*` implementations.
DeltaFile
+36-0llvm/test/CodeGen/RISCV/rvv/cttz-elts.ll
+11-5llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+2-9llvm/test/CodeGen/AArch64/intrinsic-cttz-elts-sve.ll
+2-2llvm/test/CodeGen/Hexagon/cttz-elts-widen.ll
+51-164 files

LLVM/project 0c97959llvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll amdgcn.bitcast.512bit.ll, llvm/test/tools/llvm-mca/AArch64/Cortex C1Ultra-sve-instructions.s C1Ultra-neon-instructions.s

rebase

Created using spr 1.3.7
DeltaFile
+19,967-19,033llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+13,779-6,871llvm/test/tools/llvm-mca/AArch64/Cortex/C1Ultra-sve-instructions.s
+6,927-5,721llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+5,374-4,577llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.960bit.ll
+6,359-3,161llvm/test/tools/llvm-mca/AArch64/Cortex/C1Ultra-neon-instructions.s
+4,813-4,311llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.896bit.ll
+57,219-43,674700 files not shown
+178,580-93,260706 files

LLVM/project 0cee0f5llvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll amdgcn.bitcast.512bit.ll, llvm/test/tools/llvm-mca/AArch64/Cortex C1Ultra-sve-instructions.s C1Ultra-neon-instructions.s

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+19,967-19,033llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+13,779-6,871llvm/test/tools/llvm-mca/AArch64/Cortex/C1Ultra-sve-instructions.s
+6,927-5,721llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+5,374-4,577llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.960bit.ll
+6,359-3,161llvm/test/tools/llvm-mca/AArch64/Cortex/C1Ultra-neon-instructions.s
+4,813-4,311llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.896bit.ll
+57,219-43,674700 files not shown
+178,580-93,260706 files

LLVM/project 22103d6llvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll amdgcn.bitcast.512bit.ll, llvm/test/tools/llvm-mca/AArch64/Cortex C1Ultra-sve-instructions.s C1Ultra-neon-instructions.s

rebase

Created using spr 1.3.7
DeltaFile
+19,967-19,033llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+13,779-6,871llvm/test/tools/llvm-mca/AArch64/Cortex/C1Ultra-sve-instructions.s
+6,927-5,721llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+5,374-4,577llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.960bit.ll
+6,359-3,161llvm/test/tools/llvm-mca/AArch64/Cortex/C1Ultra-neon-instructions.s
+4,813-4,311llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.896bit.ll
+57,219-43,674700 files not shown
+178,580-93,260706 files

LLVM/project 613aed2llvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll amdgcn.bitcast.512bit.ll, llvm/test/tools/llvm-mca/AArch64/Cortex C1Ultra-sve-instructions.s C1Ultra-neon-instructions.s

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+19,967-19,033llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+13,779-6,871llvm/test/tools/llvm-mca/AArch64/Cortex/C1Ultra-sve-instructions.s
+6,927-5,721llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+5,374-4,577llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.960bit.ll
+6,359-3,161llvm/test/tools/llvm-mca/AArch64/Cortex/C1Ultra-neon-instructions.s
+4,813-4,311llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.896bit.ll
+57,219-43,674700 files not shown
+178,580-93,260706 files

LLVM/project 4a478ffflang/lib/Parser openmp-parsers.cpp

[flang][OpenMP] Compute the set of loop directives in parser, NFC

Use the constexpr functions for association and source language
to compute the set of loop-associated directives instead of listing
them individually.
DeltaFile
+15-42flang/lib/Parser/openmp-parsers.cpp
+15-421 files

LLVM/project bbf80c5llvm/lib/Target/MSP430 MSP430.h MSP430ISelDAGToDAG.cpp

[MSP430] Port SelctionDAGISel to NewPM

Similar to Lanai (81a2ac204aea4281c8ed9162db5d4ed491cb2cfa) and X86
(7652a59407018c057cdc1163c9f64b5b6f0954eb).

Reviewers: asl

Pull Request: https://github.com/llvm/llvm-project/pull/206615
DeltaFile
+6-0llvm/lib/Target/MSP430/MSP430.h
+5-0llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp
+11-02 files

LLVM/project 16ee9adllvm/test/CodeGen/AArch64 sve-pred-log.ll sve-intrinsics-pred-operations.ll

[NFC][LLVM][CodeGen] Refactor testing of SVE predicate logical instructions. (#206737)
DeltaFile
+788-227llvm/test/CodeGen/AArch64/sve-pred-log.ll
+129-46llvm/test/CodeGen/AArch64/sve-intrinsics-pred-operations.ll
+120-28llvm/test/CodeGen/AArch64/sve-select.ll
+1,037-3013 files

LLVM/project 083d2c4offload/libomptarget private.h, offload/libomptarget/OpenMP API.cpp

[Offload][OpenMP] Accept `omp_initial_device` for runtime calls (#205290)

In OpenMP v5.2, the constant `omp_initial_device` was introduced, which
was defined as a value of `-1`.
Support for this value was added to Clang and Flang in
09cd2944821fa43d97d8259194b9a0c4fa22de16 and
3c14034c55a296306ad0ea4990f0f1b34e9e5d6e.

However, runtime calls are not aware of this constant. As such,
execution of a runtime function, passing `omp_initial_device` as the
`device_num`, would abort with e.g.,:

```
omptarget fatal error -1: "invalid value" device number '-1' out of range, only 1 devices available
```

To fix this issue, also extend the host device checks in the API
functions to also check for `omp_initial_device`.
For testing, extend API tests using `omp_get_initial_device()` to also

    [10 lines not shown]
DeltaFile
+12-12offload/libomptarget/OpenMP/API.cpp
+9-3offload/test/api/omp_host_pinned_memory.c
+11-0offload/libomptarget/private.h
+6-2offload/test/api/omp_target_memcpy_async2.c
+6-2offload/test/api/omp_target_memset.c
+6-2offload/test/api/omp_target_memcpy_rect_async2.c
+50-215 files not shown
+73-2811 files

LLVM/project 1556da0lldb/source/Commands CommandObjectDiagnostics.cpp, lldb/source/Plugins/BugReporter CMakeLists.txt

[lldb] Add a GitHub bug reporter (#206607)

Add a BugReporter plugin that files a diagnostics bundle as an
llvm/llvm-project GitHub issue. File() renders a short Markdown body
from the Diagnostics::Report (version, host, invocation, and a pointer
to the bundle directory to attach), truncates it under a GET-safe URL
length on a UTF-8 character boundary, and opens a pre-filled issues/new
page with Host::OpenURL.

It is gated by LLDB_ENABLE_GITHUB_BUG_REPORTER (default on) and
registers ahead of the no-op fallback, so it is the default destination
for "diagnostics report" while a downstream tree can still register its
own reporter ahead of it.
DeltaFile
+66-0lldb/source/Plugins/BugReporter/GitHub/GitHubReporter.cpp
+33-0lldb/source/Plugins/BugReporter/GitHub/GitHubReporter.h
+8-2lldb/source/Commands/CommandObjectDiagnostics.cpp
+9-0lldb/source/Plugins/BugReporter/GitHub/CMakeLists.txt
+7-0lldb/source/Plugins/BugReporter/CMakeLists.txt
+4-1lldb/test/Shell/Diagnostics/TestReport.test
+127-31 files not shown
+130-37 files

LLVM/project 57414efcross-project-tests/debuginfo-tests/dexter/dex/debugger DAP.py, cross-project-tests/debuginfo-tests/dexter/dex/evaluation StateMatch.py

[Dexter] Avoid incorrect state matching against frames below main (#206732)

This patch fixes an error that caused some Dexter test failures, driven
by two separate causes. The first issue is that frames below main were
appearing in the program stacktrace; while Dexter tries to filter frames
below main during the stacktrace collection step based on a pre-written
list, this list may not be comprehensive enough, as the symbol
"___lldb_unnamed_symbol_2a150" has also appeared. In order to guard
against this and future cases that might appear, this patch adds a check
to Dexter for "presentationHint: deemphasize" in the DAP response; this
is added by LLDB (and other dap-based debuggers) as a hint that the
frame is not user source, and should be a generally useful way of
avoiding evaluating frames that are not wanted.

The second issue is a mismatch between the breakpoint-setting logic and
the state-matching logic: the former allows root !where nodes to omit
the "file" field, using the script file as a default file. The state
matching logic does not perform any checking for an omitted file.
Together, this means that we may correctly set breakpoints for e.g.

    [4 lines not shown]
DeltaFile
+9-4cross-project-tests/debuginfo-tests/dexter/dex/debugger/DAP.py
+7-3cross-project-tests/debuginfo-tests/dexter/dex/evaluation/StateMatch.py
+16-72 files

LLVM/project f801f9dcompiler-rt/lib/hwasan hwasan_platform_interceptors.h, compiler-rt/lib/sanitizer_common sanitizer_common_interceptors.inc sanitizer_platform_interceptors.h

compiler-rt: intercept fortified read/pread wrappers (#206228)

Add TSAN/common interceptors for glibc fortified read/pread calls, so
that they follow the same blocking and signal-handling path as the plain
libc symbols.

The regression test from https://github.com/llvm/llvm-project/pull/77789
for `read`, when compiled with `-D_FORTIFY_SOURCE=3` fails without the
new interceptors.

I have a regression test for pread(64) as well, but I am not sure if
there is much value in adding it.

I've added a read smoke test in sanitizer common.

---------

Co-authored-by: MarcoFalke <*~=`'#}+{/-|&$^_ at 721217.xyz>
DeltaFile
+60-0compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
+43-0compiler-rt/test/sanitizer_common/TestCases/Linux/read_pread_chk.c
+9-0compiler-rt/lib/hwasan/hwasan_platform_interceptors.h
+3-0compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
+1-0compiler-rt/test/tsan/signal_in_read.c
+116-05 files

LLVM/project 84e496dclang/lib/StaticAnalyzer/Core ExprEngineC.cpp

[NFC][analyzer] Improve code quality in VisitBinaryOperator (#205151)

I started out to remove the `NodeBuilder` in
`ExprEngine::VisitBinaryOperator` (as a part of my commit series that
removes `NodeBuilder`s), but I noticed that this method is full of
technical debt, so I decided to do a through clean-up (which includes
the removal of the trivial `NodeBuilder`).
DeltaFile
+43-73clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
+43-731 files

LLVM/project 95b72fellvm/test/tools/llvm-profdata malformed-not-space-for-another-header.test

[PGO] Fix malformed raw profile test (#206738)

A hand-written raw profile test still wrote one extra word in the data
record after the raw profile format changed.

Remove the extra word so the name section starts at the offset expected
by the reader. This keeps the test focused on the trailing garbage that
should report that there is not enough space for another header.

Buildbot failure:
https://github.com/llvm/llvm-project/pull/190708#issuecomment-4839831651
DeltaFile
+0-1llvm/test/tools/llvm-profdata/malformed-not-space-for-another-header.test
+0-11 files

LLVM/project 05a6990clang/lib/Driver OffloadBundler.cpp, clang/test/Driver clang-offload-bundler-magic-collision.c

[OffloadBundler] Bound compressed bundles by header size, not magic scan

When multiple offload bundles are concatenated, the unbundler
(clang-offload-bundler) and llvm-objdump --offloading located the end of a
compressed bundle, and the start of the next one, by scanning for the next
"CCOB" magic string starting right after the current header.

A zstd/zlib-compressed payload can legally contain those four bytes, so the
scan could stop in the middle of the compressed data and truncate the
bundle, corrupting the embedded code object. In practice this produced a
"decomposition" failure for hipBLASLt bf16 GEMMs on gfx942.

Use the authoritative total-size field recorded in the compressed bundle
header (format V2/V3) to compute the exact bundle boundary, and only scan
for the next magic past that point. Legacy bundles without a recorded size
(V1) keep the previous magic-scan fallback.

A skippable-frame fixture that embeds "CCOB" inside the compressed payload
is added to exercise the boundary logic from both clang-offload-bundler and
llvm-objdump --offloading.
DeltaFile
+104-0clang/test/Driver/Inputs/clang-offload-bundler-magic-collision.py
+37-4clang/lib/Driver/OffloadBundler.cpp
+35-0llvm/test/tools/llvm-objdump/Offloading/fatbin-magic-collision.test
+28-5llvm/lib/Object/OffloadBundle.cpp
+27-0clang/test/Driver/clang-offload-bundler-magic-collision.c
+0-0clang/test/Driver/Inputs/clang-offload-bundler-magic-collision.co
+231-96 files

LLVM/project 473b717llvm/lib/Object OffloadBundle.cpp

[Offload] Make compressed offload bundle header little-endian

The compressed offload bundle (CCOB) header integer fields (Magic,
Version, Method, FileSize, UncompressedFileSize, Hash) were serialized
and read in host-native byte order. The on-disk format is little-endian,
so on big-endian hosts these fields were byte-swapped: writing produced a
malformed header and reading misparsed the size, making
llvm-objdump --offloading crash/misbehave on s390x.

Use support::ulittleN_t for the header fields on the read side and
support::endian::Writer on the write side, so the header is always
little-endian regardless of host endianness.

Co-authored-by: Nikita Popov <npopov at redhat.com>
DeltaFile
+22-27llvm/lib/Object/OffloadBundle.cpp
+22-271 files

LLVM/project f121215clang/include/clang/Driver OffloadBundler.h, clang/lib/Driver OffloadBundler.cpp

[Offload][NFC] Deduplicate CompressedOffloadBundle into llvm::object

The compressed offload bundle (CCOB) format had two byte-for-byte
identical implementations: one in clang/lib/Driver/OffloadBundler.cpp and
the canonical one in llvm/lib/Object/OffloadBundle.cpp (already used by
llvm-objdump, comgr and others).

Remove the Clang-side copy (class declaration, compress/decompress/
tryParse, the RawCompressedBundleHeader union, getHeaderSize, the
formatWithCommas helper and the private timer group) and route the driver
through llvm::object::CompressedOffloadBundle, which is already linked via
the Object component.

The only API difference is the verbose-reporting channel (bool Verbose vs.
raw_ostream *VerboseStream); the driver now passes &llvm::errs() when
verbose output is requested, preserving the previous behavior.

No functional change intended.
DeltaFile
+9-347clang/lib/Driver/OffloadBundler.cpp
+0-36clang/include/clang/Driver/OffloadBundler.h
+9-3832 files

LLVM/project 6befe13cross-project-tests lit.cfg.py CMakeLists.txt

[Dexter] Require lldb-dap for Dexter and log when Dexter is disabled (#206734)

For some time, Dexter tests have been run using lldb-dap when it is
available rather than just lldb/lldb-server. However, the cross project
test dependencies have not been updated since then, meaning that
lldb-dap is not automatically built by check-cross-project. The
Dexter-specific lit config then skips the Dexter tests if lldb-dap is
unavailable, which leads to some check-cross-project builds never
running the Dexter tests. This patch adds lldb-dap to the build
dependencies, and also adds a small log message to inform when the
Dexter tests are skipped; most cases where we skip the Dexter test were
already logged, and this addition expands that to cover all cases.
DeltaFile
+5-0cross-project-tests/lit.cfg.py
+1-1cross-project-tests/CMakeLists.txt
+6-12 files

LLVM/project f0ca72cllvm/test/CodeGen/X86 vector-fshr-rot-256.ll vector-fshl-rot-256.ll

[X86] Lower vector 8-bit `rotl(x, 1)` to `(x + x) - (x < 0)` pattern (#206221)

Fixes #198059
DeltaFile
+44-48llvm/test/CodeGen/X86/vector-fshr-rot-256.ll
+35-37llvm/test/CodeGen/X86/vector-fshl-rot-256.ll
+28-33llvm/test/CodeGen/X86/vector-fshl-rot-128.ll
+22-24llvm/test/CodeGen/X86/vector-rotate-256.ll
+18-22llvm/test/CodeGen/X86/vector-fshr-rot-128.ll
+16-19llvm/test/CodeGen/X86/vector-rotate-128.ll
+163-1831 files not shown
+172-1837 files

LLVM/project b4ba747llvm/utils profcheck-xfail.txt

[ProfCheck] Exclude FixIrreducible Test (#206731)

From #206057. We have not gotten to fixing FixIrreducible yet, so
exclude the test for now.
DeltaFile
+1-0llvm/utils/profcheck-xfail.txt
+1-01 files

LLVM/project 8e61b6allvm/lib/ProfileData InstrProf.cpp

[PGO][NFC] Avoid floating-point block uniformity check (#206547)

Use an integer threshold when deciding whether a block is mostly
uniform.

This keeps the 90% rule exact and avoids relying on floating-point
arithmetic in profile merging.
DeltaFile
+2-2llvm/lib/ProfileData/InstrProf.cpp
+2-21 files

LLVM/project f74bff2clang/docs LanguageExtensions.rst, clang/include/clang/Options Options.td

Enable driver changes for fexec-charset
DeltaFile
+14-6clang/lib/Driver/ToolChains/Clang.cpp
+14-4clang/include/clang/Options/Options.td
+11-3clang/test/Driver/clang_f_opts.c
+10-0llvm/lib/Support/TextEncoding.cpp
+4-3clang/test/Driver/cl-options.c
+3-3clang/docs/LanguageExtensions.rst
+56-193 files not shown
+60-199 files

LLVM/project 2b60f6fclang/include/clang/Options Options.td, clang/lib/Driver/ToolChains Clang.cpp

address comments
DeltaFile
+3-3clang/include/clang/Options/Options.td
+1-1clang/lib/Driver/ToolChains/Clang.cpp
+4-42 files

LLVM/project d1a4ea5clang/lib/AST ASTContext.cpp, clang/lib/Lex TextEncoding.cpp

Convert the key before cache lookup to prevent encoding differences
DeltaFile
+9-9clang/lib/AST/ASTContext.cpp
+2-2clang/lib/Lex/TextEncoding.cpp
+11-112 files

LLVM/project 9644d95clang/include/clang/Basic TargetInfo.h, clang/lib/AST ASTContext.cpp

convert to exec-charset inside getPredefinedStringLiteralFromCache, test __builtin_FILE()
DeltaFile
+10-0clang/lib/AST/ASTContext.cpp
+4-0clang/test/CodeGen/systemz-charset.cpp
+3-0clang/lib/Basic/TargetInfo.cpp
+2-1clang/lib/Lex/TextEncoding.cpp
+2-0clang/include/clang/Basic/TargetInfo.h
+21-15 files

LLVM/project 635c84eclang/lib/Lex TextEncoding.cpp, clang/lib/Sema SemaChecking.cpp

do not convert character by character
DeltaFile
+6-4clang/lib/Sema/SemaChecking.cpp
+1-1clang/lib/Lex/TextEncoding.cpp
+7-52 files

LLVM/project 4f335beclang/include/clang/Lex TextEncoding.h, clang/lib/Lex TextEncoding.cpp

fix CI
DeltaFile
+2-2clang/lib/Lex/TextEncoding.cpp
+1-0clang/include/clang/Lex/TextEncoding.h
+3-22 files

LLVM/project 23c7a50clang/lib/AST PrintfFormatString.cpp FormatString.cpp, clang/lib/Sema SemaChecking.cpp

Add format string handling
DeltaFile
+58-31clang/lib/AST/PrintfFormatString.cpp
+46-40clang/lib/AST/FormatString.cpp
+33-21clang/lib/Sema/SemaChecking.cpp
+25-11clang/lib/AST/FormatStringParsing.h
+15-8clang/lib/AST/ScanfFormatString.cpp
+19-0llvm/lib/Support/TextEncoding.cpp
+196-1117 files not shown
+233-12013 files

LLVM/project af9c7c5clang/include/clang/Sema Sema.h

Fix build failure
DeltaFile
+1-0clang/include/clang/Sema/Sema.h
+1-01 files

LLVM/project 0db480eclang/include/clang/Sema Sema.h

Remove old include
DeltaFile
+0-1clang/include/clang/Sema/Sema.h
+0-11 files