LLVM/project 205baf1llvm/test/Transforms/SLPVectorizer/X86 bool-mask.ll

[SLP][NFC]Add extra test for bit mask reductions, NFC



Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/224135
DeltaFile
+206-2llvm/test/Transforms/SLPVectorizer/X86/bool-mask.ll
+206-21 files

LLVM/project 0038be8mlir/lib/Conversion/ConvertToEmitC ConvertToEmitCPass.cpp

[MLIR] Wrap block with debug-only loop in LLVM_DEBUG (NFC). (#224124)

This fixes a build-failure with Werror in release builds introduced in
https://github.com/llvm/llvm-project/pull/223974. `iface` is unused in
release builds. Wrap the whole block into `LLVM_DEBUG`

PR: https://github.com/llvm/llvm-project/pull/224124
DeltaFile
+8-6mlir/lib/Conversion/ConvertToEmitC/ConvertToEmitCPass.cpp
+8-61 files

LLVM/project 16fa456utils/bazel/llvm-project-overlay/libc/startup/linux BUILD.bazel

[bazel] Port 2c930a5 (#224130)
DeltaFile
+1-0utils/bazel/llvm-project-overlay/libc/startup/linux/BUILD.bazel
+1-01 files

LLVM/project c1ad400clang/lib/CIR/Dialect/Transforms CallConvLoweringPass.cpp, clang/test/CIR/CodeGen call-conv-lowering-x86_64-non-byval.cpp call-conv-lowering-x86_64-union-no-span.cpp

[CIR] Accept a union whose members do not cover its declared size (#223594)

`union { unsigned Words[3]; void *Ptr; }` is 16 bytes because the
pointer's alignment rounds it up, and no member covers that size. The
pass refused to classify unions like that at all, so anything holding
one failed to compile. Tail padding doesn't change how an eightbyte
classifies, so this drops the precondition and classifies the union from
its own size.
DeltaFile
+46-132clang/test/CIR/Transforms/abi-lowering/x86_64-aggregate-nyi.cir
+162-0clang/test/CIR/CodeGen/call-conv-lowering-x86_64-union-tail-padding.c
+152-0clang/test/CIR/CodeGen/call-conv-lowering-x86_64-union-no-span.cpp
+65-59clang/lib/CIR/Dialect/Transforms/CallConvLoweringPass.cpp
+41-0clang/test/CIR/Transforms/abi-lowering/x86_64-union.cir
+24-0clang/test/CIR/CodeGen/call-conv-lowering-x86_64-non-byval.cpp
+490-1913 files not shown
+507-2059 files

LLVM/project 2558e6d.ci compute_projects_test.py compute_projects.py

[CI] Make updates to .ci actually test everything (#224125)

We ran into an issue where test failures in cross-project-tests were not
surfaced when bumping the image to Ubuntu 26.04 due to the script not
correctly calculating dependencies for changes to .ci and the premerge
workflow. This patch fixes that by ensuring the projects executed for
.ci/workflow changes are derived from everything else which means we do
not need to manually maintain the list and risk leaving it out of date.
DeltaFile
+53-55.ci/compute_projects.py
+7-7.ci/compute_projects_test.py
+60-622 files

LLVM/project 952d860llvm/lib/CAS MappedFileRegionArena.cpp

[CAS] Read a CAS file's reserved size from st_blocks, not st_blksize (#224104)

FileSizeInfo reports how much disk a file already has, which
MappedFileRegionArena records so it knows how far ahead it has reserved.
However the file size was accidentally computed from st_blksize which is
the preferred I/O size, not the number of allocated blocks for the file.

The value is read when a database is created or reopened, so a reopened
database believed almost none of its disk was reserved and reserved it
again from near zero, a megabyte per allocation. Fix the problem by
using the correct size.
DeltaFile
+1-1llvm/lib/CAS/MappedFileRegionArena.cpp
+1-11 files

LLVM/project 3cda174clang/test/CodeGen thread-model.c, llvm/lib/Target/WebAssembly WebAssemblyCoalesceFeaturesAndStripAtomics.cpp

[WebAssembly] Use Single as the default Triple thread model (#223917)

Clang defaults WebAssembly to a single-threaded model unless atomics and
bulk-memory are enabled, whereas Triple::getDefaultThreadModel()
previously defaulted to POSIX for all targets. Because Clang only emits
the "thread-model" module flag when the active thread model differs from
the triple's default, single-threaded Wasm objects recorded
"thread-model"="single" while multithreaded objects omitted the flag.
When linking mixed objects in LTO, the merged module inherited "single",
causing passes like LICM and AtomicExpand to treat multithreaded
programs as single-threaded.

Change Triple::getDefaultThreadModel() to return ThreadModel::Single for
WebAssembly so that multithreaded objects explicitly record
"thread-model"= "posix" and single-threaded objects omit the flag.
Additionally, update WebAssemblyCoalesceFeaturesAndStripAtomics to set
the module thread model to POSIX when threading features are enabled and
no explicit module flag is present, ensuring backend passes like
AtomicExpandPass preserve atomics in raw IR modules compiled via llc.

Assisted-By: Gemini
DeltaFile
+44-0llvm/test/CodeGen/WebAssembly/coalesce-features-thread-model.ll
+9-1llvm/lib/Target/WebAssembly/WebAssemblyCoalesceFeaturesAndStripAtomics.cpp
+8-0clang/test/CodeGen/thread-model.c
+5-1llvm/lib/TargetParser/Triple.cpp
+66-24 files

LLVM/project 29b702ecompiler-rt/lib/scudo/standalone secondary.h, compiler-rt/lib/scudo/standalone/tests secondary_test.cpp

[scudo] Do not trim the secondary cache if releasing is disabled. (#223881)

When the ReleaseInterval is set to less than zero, then releasing has
been disabled. In this case, honor this and do not trim the cache using
the MaxCacheResidentyBytes value.

Add a test to verify this behavior.
DeltaFile
+36-4compiler-rt/lib/scudo/standalone/tests/secondary_test.cpp
+7-1compiler-rt/lib/scudo/standalone/secondary.h
+43-52 files

LLVM/project 55488f9llvm/utils/gn/secondary/compiler-rt/test BUILD.gn

[gn] port 988c5a95ffa7d118 (HIP GPU OFFLOAD compiler-rt lit stuff) (#224129)
DeltaFile
+5-0llvm/utils/gn/secondary/compiler-rt/test/BUILD.gn
+5-01 files

LLVM/project 7b6e373llvm/utils/gn/secondary/llvm/lib/Transforms/Utils BUILD.gn

[gn build] Port d8a3beaf4553 (#224128)
DeltaFile
+0-1llvm/utils/gn/secondary/llvm/lib/Transforms/Utils/BUILD.gn
+0-11 files

LLVM/project 4cd54b6compiler-rt/lib/copyprof copyprof_state.h copyprof_shadow.cpp, compiler-rt/lib/copyprof/tests CMakeLists.txt copyprof_shadow_test.cpp

[CopyProf] Implement minimal CopyProf runtime. (#223458)

The runtime tracks object copies using shadow memory (with a 1:8
compression scale).

Each thread uses TLS to keep track of whether execution is currently
inside a special member function. Copy functions mark corresponding
shadow memory as a copy. Upon destruction, if an object was marked as a
copy and never modified, it is classified as an unnecessary copy, and a
report with a stack trace is generated.

RFC:
https://discourse.llvm.org/t/rfc-copysanitizer-csan-detecting-unneccessary-object-copies-at-runtime/91038
Previous PR: https://github.com/llvm/llvm-project/pull/207385

---------

Co-authored-by: jannewger <jannewger at google.com>
DeltaFile
+178-0compiler-rt/lib/copyprof/tests/copyprof_state_test.cpp
+164-0compiler-rt/lib/copyprof/tests/copyprof_shadow_test.cpp
+155-0compiler-rt/lib/copyprof/copyprof.cpp
+112-0compiler-rt/lib/copyprof/copyprof_shadow.cpp
+73-0compiler-rt/lib/copyprof/tests/CMakeLists.txt
+70-0compiler-rt/lib/copyprof/copyprof_state.h
+752-020 files not shown
+1,132-426 files

LLVM/project 1e3aae0utils/bazel/llvm-project-overlay/libc/test libc_test_rules.bzl, utils/bazel/llvm-project-overlay/libc/test/UnitTest BUILD.bazel

[bazel][test][libc] Use clock LLVM-libc entrypoint in overlay tests
DeltaFile
+2-6utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl
+1-1utils/bazel/llvm-project-overlay/libc/test/UnitTest/BUILD.bazel
+3-72 files

LLVM/project 7b72868libc/test/UnitTest BazelFilePath.cpp

[bazel][libc] Do not depend on system `getenv` in BazelFilePath.cpp

This PR models after https://github.com/llvm/llvm-project/commit/ee407f7e7069cccfdc1815de07e17cebf83d19f9 in order to conditionally use LLVM-libc's `getenv` when compiling in full-build mode.
DeltaFile
+13-3libc/test/UnitTest/BazelFilePath.cpp
+13-31 files

LLVM/project 2b3c865utils/bazel/llvm-project-overlay/libc/startup/linux BUILD.bazel startup_rules.bzl

[bazel][libc] Be explicit about pic/nopic in startup_rules.bzl

Currently, this implementation gets object files from `OuputGroupInfo.compilation_outputs`, which isn't very well documented any will often just choose the PIC variant: [`cc_helper.bzl`](https://github.com/bazelbuild/rules_cc/blob/661b75de668c3b673f5550e0340e134ccf923956/cc/common/cc_helper.bzl#L192).

This PR updates `merge_relocatable_object` to propagate both pic/nopic variants of the merged object, and updates `libc_startup_object` to be explicit about its choice of pic/nopic.

The exact choice of how to handle pic/nopic may need to be updated in the future, but the changes in this PR is better than just using compilation_outputs verbatim.
DeltaFile
+103-52utils/bazel/llvm-project-overlay/libc/startup/linux/startup_rules.bzl
+20-3utils/bazel/llvm-project-overlay/libc/startup/linux/BUILD.bazel
+123-552 files

LLVM/project a2bdcfcutils/bazel/llvm-project-overlay/libc/test libc_test_rules.bzl, utils/bazel/llvm-project-overlay/libc/test/include BUILD.bazel

[test][bazel][libc] Fix dependencies for some tests under full-build
DeltaFile
+82-59utils/bazel/llvm-project-overlay/libc/test/include/BUILD.bazel
+37-4utils/bazel/llvm-project-overlay/libc/test/src/stdio/BUILD.bazel
+16-4utils/bazel/llvm-project-overlay/libc/test/src/string/BUILD.bazel
+6-2utils/bazel/llvm-project-overlay/libc/utils/MPCWrapper/BUILD.bazel
+3-3utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl
+4-1utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel
+148-736 files

LLVM/project 12c138autils/bazel/llvm-project-overlay/libc/startup/linux startup_rules.bzl, utils/bazel/llvm-project-overlay/libc/test libc_test_rules.bzl

[test][bazel][libc] Allow LLVM-libc tests to be run in full-build mode

This PR makes the required changes to run LLVM-libc full build tests in Bazel. After this PR, most tests pass:

```
bazel test @llvm-project//libc/test/... --config=ci --@llvm-project//libc:build_mode=full --keep_going
Executed 680 out of 853 tests: 681 tests pass and 172 fail to build.
```

Follow on PRs will fix specific tests that are failing (lots of missing deps etc).

This PR mostly involves propagating the correct dependencies and compiler/linker options from [`add_libc_hermetic`](https://github.com/llvm/llvm-project/blob/4098f568c46e06b6df470111868b4c165dd80f4d/libc/cmake/modules/LLVMLibCTestRules.cmake#L750). Slightly more involved changes:
- `BazelFilePath.cpp` also had to be fixed so that it doesn't depend on the non-namespaced `getenv` function. This PR models after https://github.com/llvm/llvm-project/commit/ee407f7e7069cccfdc1815de07e17cebf83d19f9 in order to conditionally use LLVM-libc's getenv under full-build mode.
- All tests have a dependency against `crt1.o` when run under full-build. This PR updates `merge_relocatable_object` so it also exposes a `CcInfo` with the merged object file and its transitive deps. In order to do so, this PR also makes the logic a little more careful about PIC vs non-PIC deps.
DeltaFile
+59-17utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl
+48-3utils/bazel/llvm-project-overlay/libc/test/UnitTest/BUILD.bazel
+19-0utils/bazel/llvm-project-overlay/libc/startup/linux/startup_rules.bzl
+126-203 files

LLVM/project b9e3a29utils/bazel/llvm-project-overlay/libc BUILD.bazel

[bazel][libc] Allow libc:types_char8_t to compile in full-build mode
DeltaFile
+4-4utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+4-41 files

LLVM/project df4c21bllvm/include/llvm/CodeGen Passes.h ResetMachineFunctionPass.h, llvm/include/llvm/Passes MachinePassRegistry.def

[CodeGen][NPM] Port ResetMachineFunction to NPM
DeltaFile
+77-62llvm/lib/CodeGen/ResetMachineFunctionPass.cpp
+36-0llvm/include/llvm/CodeGen/ResetMachineFunctionPass.h
+3-3llvm/test/CodeGen/AMDGPU/llc-pipeline-npm.ll
+2-1llvm/include/llvm/CodeGen/Passes.h
+1-1llvm/lib/CodeGen/TargetPassConfig.cpp
+1-1llvm/include/llvm/Passes/MachinePassRegistry.def
+120-683 files not shown
+123-689 files

LLVM/project 2b16c36.github/workflows/containers/github-action-ci-tooling Dockerfile, .github/workflows/containers/libc Dockerfile

[Github] Use explicit --progress for large wget downloads (#224092)

Otherwise we get a log line every 50k which is exceedingly annoying as
it generates thousands of lines of output. Use mega/giga (3M/50M
respectively) depending upon the download size so we end up with about
20 lines of output.
DeltaFile
+2-2.github/workflows/containers/libc/Dockerfile
+1-1.github/workflows/containers/github-action-ci-tooling/Dockerfile
+3-32 files

LLVM/project ac499e5clang/test/CodeGen PR44896.ll

clang: Require x86 to be built for PR44896.ll test (#224117)
DeltaFile
+1-0clang/test/CodeGen/PR44896.ll
+1-01 files

LLVM/project 7201475flang/test/Semantics/OpenMP threadprivate01.f90 sections02.f90

[flang][OpenMP] Remove dependency on openmp-runtime where not needed,… (#224122)

… NFC

Several tests claimed dependence on openmp-runtime and had USE omp_lib
statements even though they didn't use anything from it.
DeltaFile
+0-4flang/test/Semantics/OpenMP/allocate-clause01.f90
+0-3flang/test/Semantics/OpenMP/threadprivate01.f90
+0-3flang/test/Semantics/OpenMP/sections02.f90
+0-3flang/test/Semantics/OpenMP/parallel-sections01.f90
+0-3flang/test/Semantics/OpenMP/omp-atomic-assignment-stmt.f90
+0-3flang/test/Semantics/OpenMP/declare-target01.f90
+0-199 files not shown
+0-4415 files

LLVM/project dcfed7coffload/include PluginManager.h, offload/liboffload/src OffloadImpl.cpp

[offload][omp] Load plugins through liboffload
DeltaFile
+15-11offload/libompaccsupport/PluginManager.cpp
+11-0offload/liboffload/src/OffloadImpl.cpp
+2-1offload/include/PluginManager.h
+28-123 files

LLVM/project 6c1d82boffload/liboffload/API Platform.td, offload/liboffload/src OffloadImpl.cpp

[OFFLOAD] add olIteratePlatforms
DeltaFile
+45-0offload/unittests/OffloadAPI/platform/olIteratePlatforms.cpp
+23-0offload/liboffload/API/Platform.td
+11-0offload/liboffload/src/OffloadImpl.cpp
+79-03 files

LLVM/project 56da9a1offload/liboffload/src OffloadImpl.cpp

[offload] lazily load liboffload
DeltaFile
+242-90offload/liboffload/src/OffloadImpl.cpp
+242-901 files

LLVM/project a67aac8offload CMakeLists.txt, offload/liboffload CMakeLists.txt

[offload][omp] Link libomptarget against static liboffload
DeltaFile
+27-14offload/liboffload/CMakeLists.txt
+3-3offload/libomptarget/CMakeLists.txt
+3-3offload/liboffload/src/OffloadImpl.cpp
+2-1offload/CMakeLists.txt
+35-214 files

LLVM/project 91d66ffllvm/lib/Target/AMDGPU AMDGPUPromoteAlloca.cpp, llvm/test/CodeGen/AMDGPU eliminate-frame-index-select.ll promote-alloca-homogeneous-struct.ll

Reland "[AMDGPU] PromoteAlloca: flatten homogeneous structs to vectors" (#221058)

This relands #217055

The original commit revealed a latent issue in eliminateFrameIndex in
SIRegisterInfo where SCC can be clobbered before reading it on
gfx900/gfx90a. This change itself has no known issues.
DeltaFile
+152-0llvm/test/CodeGen/AMDGPU/promote-alloca-homogeneous-struct.ll
+23-6llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+6-1llvm/test/CodeGen/AMDGPU/eliminate-frame-index-select.ll
+181-73 files

LLVM/project 529efedllvm/lib/Target/AMDGPU SIRegisterInfo.cpp, llvm/test/CodeGen/AMDGPU sgpr-spill-to-vmem-scc-clobber-reserved-exec-copy.mir

[AMDGPU] Don't spill an SGPR while SCC is live in frame index lowering

When SCC is live into a scalar frame index user, the scaling path avoids
SALU ops that write SCC by computing the address in a VGPR and reading it
back with V_READFIRSTLANE_B32. If the destination of that readfirstlane is
scavenged with spilling allowed, an AMDGPU SGPR spill writes inactive
lanes, so it flips EXEC with S_NOT_B64 and clobbers SCC. Instead, scavenge
that register with AllowSpill=false.
DeltaFile
+207-0llvm/test/CodeGen/AMDGPU/sgpr-spill-to-vmem-scc-clobber-reserved-exec-copy.mir
+30-11llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
+237-112 files

LLVM/project e4aadb9llvm/lib/Target/AMDGPU SIRegisterInfo.cpp, llvm/test/CodeGen/AMDGPU sgpr-spill-to-vmem-scc-clobber-reserved-exec-copy.mir

[AMDGPU] Only scale the frame register in place for the last frame index

When nothing can be scavenged, eliminateFrameIndex falls back to scaling
FrameReg in place and restoring it after MI. With two frame indices on
one instruction that fallback fires while lowering the first one, and
FrameReg is left scaled for everything that follows: the second frame
index is then scaled a second time from the already-scaled value, and any
emergency spill emitted in between uses it as its scratch offset.
DeltaFile
+78-0llvm/test/CodeGen/AMDGPU/sgpr-spill-to-vmem-scc-clobber-reserved-exec-copy.mir
+9-0llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
+87-02 files

LLVM/project 8380e05llvm/lib/Target/AMDGPU SIRegisterInfo.cpp, llvm/test/CodeGen/AMDGPU eliminate-frame-index-scalar-scc-clobber.mir

[AMDGPU] Prevent SCC clobber in frame index lowering in scaling path

eliminateFrameIndex has two lowering strategies, but only one has the
proper handling for checking SCC-liveness to prevent clobbering. Unify
them with a helper function to ensure both paths handle the same
DeltaFile
+343-4llvm/test/CodeGen/AMDGPU/eliminate-frame-index-scalar-scc-clobber.mir
+9-5llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
+352-92 files

LLVM/project 34d59e0llvm/test/CodeGen/AArch64 machine-combiner-fma-chain.ll, llvm/test/CodeGen/RISCV machine-combiner-fma-chain.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+348-0llvm/test/CodeGen/AArch64/machine-combiner-fma-chain.ll
+323-0llvm/test/CodeGen/X86/machine-combiner-fma-chain.ll
+112-0llvm/test/CodeGen/RISCV/machine-combiner-fma-chain.ll
+783-03 files