LLVM/project 27c0861 — .ci/green-dragon clang-stage1-RA-expensive.groovy clang-stage1-RA-cmake-incremental.groovy

[green-dragon] Run clang stage 1 jobs on macos-arm64-xcode-27 nodes (#248193)
DeltaFile
+2-1.ci/green-dragon/clang-stage1-RA.groovy
+1-0.ci/green-dragon/clang-stage1-RA-expensive.groovy
+1-0.ci/green-dragon/clang-stage1-RA-cmake-incremental.groovy
+4-13 files

LLVM/project 7bb1081 — llvm/docs/CommandGuide llvm-profgen.md, llvm/test/tools/llvm-profgen/X86 unsymbolized-profile-comments.test

[llvm-profgen] Ignore comment lines in unsymbolized profiles (#248812)

Android's `simpleperf inject --output profgen` emits trailing `//
build_id:` and `// <binary_path>` metadata comments matching AutoFDO's
`create_llvm_prof` text format. Unlike `create_llvm_prof`,
`llvm-profgen`'s `UnsymbolizedProfileReader` reads until EOF to support
multiple context blocks and previously rejected `//` comment lines.

Skip full-line `//` comments (with optional leading whitespace) inside
`UnsymbolizedProfileReader` while advancing `TraceStream`'s line number
so error diagnostics preserve accurate 1-based line numbers.

Also handle empty or comment-only inputs cleanly by initializing an
empty sample counter entry (matching `PerfScriptReader` and
`ETMReader`), and reject unexpected trailing content or extra counter
blocks in non-CS profiles as well as unheadered blocks in CS profiles so
unsplit multi-binary profiles fail with a diagnostic rather than
silently merging unrelated addresses.

Assisted-by: Antigravity
DeltaFile
+223-0llvm/test/tools/llvm-profgen/X86/unsymbolized-profile-comments.test
+45-10llvm/tools/llvm-profgen/PerfReader.cpp
+3-1llvm/tools/llvm-profgen/PerfReader.h
+1-1llvm/docs/CommandGuide/llvm-profgen.md
+272-124 files

LLVM/project 4806b5b — .ci/green-dragon clang-san-iossim.groovy

[green-dragon] Run clang-san-iossim arm64 simulator tests on arm64 nodes (#248713)
DeltaFile
+17-16.ci/green-dragon/clang-san-iossim.groovy
+17-161 files

LLVM/project 54bfddf — .ci/green-dragon clang-san-iossim.groovy, compiler-rt/test lit.common.cfg.py

[compiler-rt][test] Dynamically detect the iOS simulator device (#248711)
DeltaFile
+18-3compiler-rt/test/lit.common.cfg.py
+0-3.ci/green-dragon/clang-san-iossim.groovy
+18-62 files

LLVM/project b0f04c5 — utils/bazel/llvm-project-overlay/clang BUILD.bazel

[bazel] Remove unused warning disable (#249133)

Seems like the need for this is gone
DeltaFile
+0-5utils/bazel/llvm-project-overlay/clang/BUILD.bazel
+0-51 files

LLVM/project a4fd48d — llvm/lib/Target/LoongArch LoongArchISelDAGToDAG.cpp, llvm/test/CodeGen/LoongArch and-known-bits.ll

[LoongArch] Select cheaper constants for AND using known bits

The target-independent combines clear the bits of an AND mask that are known
to be zero in the other operand. That can make the mask more expensive to
materialize, e.g. -27 becomes 0xffffffe5 if the upper 32 bits are known to be
zero:

```
  addi.w  $a1, $zero, -27
  lu32i.d $a1, 0
  and     $a0, $a0, $a1
```

Set the leading bits again at instruction selection if the mask has no other
users and that makes it cheaper, or allows to use bstrins:

```
  addi.w  $a1, $zero, -27
  and     $a0, $a0, $a1

    [6 lines not shown]
DeltaFile
+42-0llvm/lib/Target/LoongArch/LoongArchISelDAGToDAG.cpp
+3-11llvm/test/CodeGen/LoongArch/and-known-bits.ll
+45-112 files

LLVM/project 1b56e66 — llvm/test/CodeGen/LoongArch and-known-bits.ll

[LoongArch][NFC] Add tests for AND with constants and known bits

Add tests for AND with constants, where the leading bits are known to be zero
in the other operand.

Assisted-By: LLM
DeltaFile
+237-0llvm/test/CodeGen/LoongArch/and-known-bits.ll
+237-01 files

LLVM/project 5ddf94d — llvm/lib/Target/LoongArch LoongArchISelDAGToDAG.cpp, llvm/test/CodeGen/LoongArch mul-zext-i32-const.ll

[LoongArch] Select MULW_D_WU for zext i32 multiplied by a 32-bit constant (#238658)

i32 udiv/urem by a constant is lowered on LA64 to
(mul (bstrpick X, 31, 0), C). MULW_D_WU only reads the low 32 bits of
its operands, so select it directly: the BSTRPICK goes away and, when
bit 31 of C is set, the constant can be materialized sign-extended
without LU32I_D.

rustc-perf fmt-write-str on LA664: 3998.1M -> 3988.1M instructions
(-0.25%).

Assisted-by: LLM
DeltaFile
+80-30llvm/lib/Target/LoongArch/LoongArchISelDAGToDAG.cpp
+9-20llvm/test/CodeGen/LoongArch/mul-zext-i32-const.ll
+89-502 files

LLVM/project 6d664bd — llvm/test/CodeGen/LoongArch mul-zext-i32-const.ll

[LoongArch][NFC] Pre-commit tests for multiplying zext i32 by a constant (#238657)

Assisted-by: LLM
DeltaFile
+148-0llvm/test/CodeGen/LoongArch/mul-zext-i32-const.ll
+148-01 files

LLVM/project 9a183a6 — clang/lib/Tooling/Refactoring/Rename USRLocFinder.cpp

[NFC][Tooling] Remove getParentTypeLoc from RenameLocFinder (#249060)

getParentTypeLoc has a dangling pointer issue but it is a private member
and is not used, so this change will just remove it. The code is almost
ten years old.

This change was brought in by 74f823a0459e382bf75e39ba5563a9e1586ce7cc
DeltaFile
+0-10clang/lib/Tooling/Refactoring/Rename/USRLocFinder.cpp
+0-101 files

LLVM/project 43acfe6 — clang/lib/Driver/ToolChains AMDGPU.cpp, clang/test/Driver amdgpu-assembler-xnack-sramecc.s amdgpu-xnack-sramecc-flags.c

clang/AMDGPU: Warn on xnack/sramecc flags for unsupported targets

-mxnack/-mno-xnack and -msramecc/-mno-sramecc can only select a mode
on processors with a configurable mode. In the assembler case, this
would forward the old subtarget feature names and warn on an
unrecognized feature.

Assisted-by: Claude
DeltaFile
+41-0clang/test/Driver/amdgpu-xnack-sramecc-flags.c
+32-0clang/lib/Driver/ToolChains/AMDGPU.cpp
+18-0clang/test/Driver/amdgpu-assembler-xnack-sramecc.s
+91-03 files

LLVM/project bdea32b — llvm/test/Transforms/LoopVectorize fmax-without-fast-math-flags-interleave.ll fmax-select-without-fast-math-flags-tail-folding.ll, llvm/test/Transforms/LoopVectorize/AArch64 fmax-without-fast-math-flags.ll

Revert "[LV] Vectorize select-based FP min/max reductions without fast-math." (#249077)

Reverts llvm/llvm-project#243462 due to assertion failure.
DeltaFile
+73-405llvm/test/Transforms/LoopVectorize/fmax-without-fast-math-flags.ll
+58-373llvm/test/Transforms/LoopVectorize/fmin-without-fast-math-flags.ll
+36-202llvm/test/Transforms/LoopVectorize/fmax-select-without-fast-math-flags-tail-folding.ll
+0-176llvm/test/Transforms/LoopVectorize/VPlan/vplan-printing-reductions.ll
+19-112llvm/test/Transforms/LoopVectorize/fmax-without-fast-math-flags-interleave.ll
+10-83llvm/test/Transforms/LoopVectorize/AArch64/fmax-without-fast-math-flags.ll
+196-1,35115 files not shown
+251-1,69321 files

LLVM/project d3c4010 — clang/test/Misc time-passes.c, llvm/lib/IR PassTimingInfo.cpp

[Timer] Use unique keys for JSON output for -ftime-report=per-pass-run (#248299)

-ftime-report=per-pass-run is supposed to display separate pass
invocations as separate entries. But in the JSON we'd put them all as
the same key (e.g. "InstCombine").

Now we output a key like "InstCombine_1" to distinguish separate pass
invocations.

Assisted by Gemini
DeltaFile
+9-0clang/test/Misc/time-passes.c
+2-1llvm/lib/IR/PassTimingInfo.cpp
+11-12 files

LLVM/project d38f314 — llvm/lib/DebugInfo/BTF BTFParser.cpp, llvm/unittests/DebugInfo/BTF BTFParserTest.cpp

[BPF] Fix printing of unsigned 32-bit enum values in CO-RE relocations (#249079)

llvm-objdump shows the value of an enumerator in an enumval relocation.
The value of a 32-bit enumerator, BTFEnum::Val, is int32_t and was
always sign-extended, so a value of an unsigned enum in [0x80000000,
0xffffffff] was printed as a huge 64-bit value:
```
  enum U { M = 0x80000000 };
  ... __builtin_preserve_enum_value(*(enum U *)M, 1) ...

  CO-RE <enumval_value> [4] enum U::M = 18446744071562067968
```
Extend the value according to the signedness of its enum, i.e.,
sign-extend it if ENUM_SIGNED_FLAG is set, and zero-extend it otherwise:
```
  CO-RE <enumval_value> [4] enum U::M = 2147483648
```
DeltaFile
+14-0llvm/unittests/DebugInfo/BTF/BTFParserTest.cpp
+4-1llvm/lib/DebugInfo/BTF/BTFParser.cpp
+18-12 files

LLVM/project 028efc4 — clang/test/CIR/CodeGen trivial-abi.cpp vector-ext-element.cpp, clang/test/CIR/CodeGenCXX x86_64-arguments.cpp new-array-init.cpp

[CIR] Add inbounds and nuw flags to cir.ptr_stride (#249016)

[CIR] Add inbounds and nuw flags to cir.ptr_stride
    
CIR lowered pointer arithmetic and strides to a `getelementptr` with no
no-wrap flags, where classic codegen marks most of them `inbounds`, and
also `nuw` for an unsigned index that is added.
    
`cir.ptr_stride` now has the same optional inbounds and `nuw` flags as
`cir.get_element`, and LowerToLLVM maps them to the GEP's no-wrap flags.

NOTE: Most changes are missing inbounds in our tests, and were added by
claude
all of those make sense to me.
DeltaFile
+77-82clang/test/CIR/CodeGen/paren-list-agg-init.cpp
+70-70clang/test/CIR/CodeGenCXX/new-array-init.cpp
+138-0clang/test/CIR/CodeGen/pointer-arith-inbounds.c
+5-118clang/test/CIR/CodeGen/vector-ext-element.cpp
+32-68clang/test/CIR/CodeGenCXX/x86_64-arguments.cpp
+35-63clang/test/CIR/CodeGen/trivial-abi.cpp
+357-401103 files not shown
+1,526-1,467109 files

LLVM/project c1a0b47 — llvm/lib/Transforms/InstCombine InstCombineCompares.cpp, llvm/test/Transforms/InstCombine load-cmp.ll

[InstCombine] Skip vector loads in foldCmpLoadFromIndexedGlobal (#248330)

This patch fixes https://github.com/llvm/llvm-project/issues/248279.
This fold tracks one boolean per index and produces a scalar i1. When
the constant offset equals the size of the global, there are no elements
to scan, so the fold tries to replace a vector comparison with scalar
false. So just bail out early for vector loads. By the way, this crash
was exposed by https://github.com/llvm/llvm-project/pull/222574.

Assisted-by: OpenAI Codex
DeltaFile
+18-0llvm/test/Transforms/InstCombine/load-cmp.ll
+4-0llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+22-02 files

LLVM/project 665907b — llvm/lib/Support/Unix Path.inc

[Support][Haiku] Use the app image path in getMainExecutable() (#246810)

On Haiku getMainExecutable() only searched for argv[0]. Callers such
as LibTooling pass a placeholder ("clang_tool"), so the lookup failed
and tools like clang-tidy could not find the Clang resource directory.

Get the path of the app image from get_next_image_info() instead.

https://github.com/haikuports/haikuports/issues/15124
DeltaFile
+15-6llvm/lib/Support/Unix/Path.inc
+15-61 files

LLVM/project 1a2ae20 — clang/include/clang/Basic BuiltinsAMDGPU.td, clang/test/SemaOpenCL builtins-amdgcn-error-gfx12-ids.cl

review feedback
DeltaFile
+1-2clang/include/clang/Basic/BuiltinsAMDGPU.td
+2-1clang/test/SemaOpenCL/builtins-amdgcn-error-gfx12-ids.cl
+1-1llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+1-1llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
+5-54 files

LLVM/project d161385 — mlir/include/mlir/Dialect/LLVMIR ROCDLOps.td

Move the new op to a partition since we just landed those
DeltaFile
+1-0mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td
+1-01 files

LLVM/project 6753c99 — clang/include/clang/Basic BuiltinsAMDGPU.td

Feature declaration in clang
DeltaFile
+2-1clang/include/clang/Basic/BuiltinsAMDGPU.td
+2-11 files

LLVM/project 6ab0143 — clang/include/clang/Basic BuiltinsAMDGPU.td BuiltinsAMDGPUDocs.td, clang/test/CodeGenOpenCL builtins-amdgcn-gfx12.cl

[AMDGPU] Add an intrinsic and builtin to access the dispatch index

This PR adds an intrinsic (and corresponding builtin and MLIR
operation) for accessing the dispatch index on gfx12+, since it can be
needed in some low-level contexts.

AI disclosure: None, I did this by hand
DeltaFile
+106-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.dispatch.index.ll
+19-0mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td
+14-0clang/test/CodeGenOpenCL/builtins-amdgcn-gfx12.cl
+9-0clang/include/clang/Basic/BuiltinsAMDGPUDocs.td
+6-0llvm/include/llvm/IR/IntrinsicsAMDGPU.td
+4-0clang/include/clang/Basic/BuiltinsAMDGPU.td
+158-04 files not shown
+167-010 files

LLVM/project cca8362 — clang/include/clang/Basic BuiltinsAMDGPUDocs.td, clang/test/CodeGenOpenCL builtins-amdgcn-gfx12.cl

[AMDGPU] Refactor wave ID intrinsic handling and expose a Clang builtin (#247799)

This PR refactors how the architecture-provided wave ID on gfx12 is
exposed, including by generalizing its lowering in preparation for
adding a dispatch.index intrinsic.

This PR also annotates the wave-id intrinsic with `TargetFeatures`,
meaning that it no longer is a selection failure to use it on a target
without the architected SGPRs feature, but a failure earlier in the
pipeline.

In addition, this PR exposes this id as __builtin_amdgcn_wave_id() in
Clang, matching MLIR, and adds documentation that clarifies the
properties of the ID.

AI disclosure: None, I did this by hand
DeltaFile
+10-8llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
+9-6llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+14-0clang/test/CodeGenOpenCL/builtins-amdgcn-gfx12.cl
+12-0clang/include/clang/Basic/BuiltinsAMDGPUDocs.td
+8-2llvm/include/llvm/IR/IntrinsicsAMDGPU.td
+8-0clang/test/SemaOpenCL/builtins-amdgcn-error-gfx12-ids.cl
+61-166 files not shown
+77-2612 files

LLVM/project 2e14f22 — .ci monolithic-linux.sh

[CI] Check Linux premerge build dependencies with Ninja

Run missingdeps at the end of monolithic-linux.sh, after project checks
and both runtime reconfigurations, so compiler dependencies have been
recorded. Include the selected check targets alongside all.

Use start-group to give the check a named log section, and capture its
output in ninja_missingdeps.log for artifact collection. Keep the check
in the shared Linux build script rather than a GitHub-only workflow
step.

Validated shell syntax, workflow YAML, and a whole-script harness with
real Ninja dependency checks. The check runs after all build phases,
records diagnostics, fails for a missing generator dependency, and
passes when that dependency is declared.

Assisted-by: Codex
DeltaFile
+8-0.ci/monolithic-linux.sh
+8-01 files

LLVM/project e2ba26a — llvm/examples/Bye CMakeLists.txt, llvm/examples/IRTransforms CMakeLists.txt

[LLVM][CMake] Order generated analysis headers for pass plugins

The example and unit-test pass plugins include TargetLibraryInfo.inc
through LLVM analysis headers. They rely on the host process for LLVM
symbols, so their compile steps need an explicit analysis_gen
prerequisite.

Add analysis_gen alongside intrinsics_gen and express the unit plugins'
prerequisites on their library declarations. With the machine pass
manager include pruning in the preceding commit, these plugins no longer
include GenVT.inc and do not need vt_gen.

Validated a fresh build of all six plugin objects with precompiled
headers disabled and GenVT.inc absent. Their recorded dependencies still
include TargetLibraryInfo.inc, and ninja -t missingdeps is clean.

Assisted-by: Codex
DeltaFile
+4-3llvm/unittests/Passes/Plugins/TestPlugin/CMakeLists.txt
+4-3llvm/unittests/Passes/Plugins/DoublerPlugin/CMakeLists.txt
+4-3llvm/unittests/Analysis/InlineOrderPlugin/CMakeLists.txt
+4-3llvm/unittests/Analysis/InlineAdvisorPlugin/CMakeLists.txt
+1-0llvm/examples/IRTransforms/CMakeLists.txt
+1-0llvm/examples/Bye/CMakeLists.txt
+18-126 files

LLVM/project b801719 — llvm/include/llvm/CodeGen MachinePassManager.h MFPropsModifier.h, llvm/include/llvm/Passes StandardInstrumentations.h

[LLVM] Prune machine IR includes from pass manager interfaces (#249025)

Move MFPropsModifier into its own header and include it at its use
sites,
So MachinePassManager.h no longer needs to include MachineFunction.h.
This removes many dependencies on vt_gen which was needed for a
transitive tablegen generated header from codegen.

Assisted-by: Codex
DeltaFile
+160-0llvm/include/llvm/CodeGen/MachineFunctionProperties.h
+1-140llvm/include/llvm/CodeGen/MachineFunction.h
+93-0llvm/include/llvm/CodeGen/MFPropsModifier.h
+0-68llvm/include/llvm/CodeGen/MachinePassManager.h
+19-19llvm/include/llvm/Passes/StandardInstrumentations.h
+10-0llvm/lib/Passes/StandardInstrumentations.cpp
+283-22786 files not shown
+367-23192 files

LLVM/project 8d1e8aa — mlir/lib/Conversion/LLVMCommon TypeConverter.cpp, mlir/lib/Conversion/MemRefToLLVM MemRefToLLVM.cpp

[mlir][MemRefToLLVM] Don't assert on non-integer memory spaces of unranked memrefs (#247338)

The lowerings of memref.dealloc and
memref.extract_aligned_pointer_as_index build the element pointer type
of an unranked memref with getMemorySpaceAsInt(). That accessor asserts
on any memory space that is not a plain integer, for example
#spirv.storage_class<StorageBuffer>, and --finalize-memref-to-llvm
aborts. Ranked memrefs don't get this far because their type conversion
already fails on such a memory space, but an unranked memref always
converted to {index, ptr} and nobody looked at its memory space.

Make convertUnrankedMemRefType fail when the memory space has no integer
address space, with the same error as for ranked memrefs, so the
patterns don't run on such operands at all. structFuncArgTypeConverter
returned the descriptor fields of an unranked memref without converting
the type, so it needs the same check, otherwise the function signature
still converts and packing the argument crashes on the null type. This
also fixes that crash for an unranked memref whose element type does not
convert.

    [17 lines not shown]
DeltaFile
+23-0mlir/test/Conversion/GPUToNVVM/unranked-memref-address-space.mlir
+21-0mlir/test/Conversion/MemRefToLLVM/invalid.mlir
+17-0mlir/test/Conversion/FuncToLLVM/invalid.mlir
+10-4mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
+12-0mlir/lib/Conversion/LLVMCommon/TypeConverter.cpp
+83-45 files

LLVM/project abf0807 — llvm/test/CodeGen/MLRegAlloc dev-mode-prio-logging.ll, llvm/test/CodeGen/MLRegAlloc/Inputs reference-log-noml.txt reference-prio-log-noml.txt

[MLGO] Update test expectations after 1048ab9 (#249129)

Assisted-By: LLM
DeltaFile
+41-41llvm/test/CodeGen/MLRegAlloc/Inputs/reference-prio-log-noml.txt
+32-32llvm/test/CodeGen/MLRegAlloc/Inputs/reference-log-noml.txt
+2-2llvm/test/CodeGen/MLRegAlloc/dev-mode-prio-logging.ll
+75-753 files

LLVM/project ca474e6 — llvm/lib/Target/SPIRV SPIRVLegalizerInfo.cpp SPIRVInstructionSelector.cpp, llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_long_vector scmp-ucmp-bool.ll

[SPIR-V] Use generic lowering for G_SCMP and G_UCMP (#248911)

Extend bool operands first, since SPIR-V has no relational compares on
bools
DeltaFile
+107-26llvm/test/CodeGen/SPIRV/llvm-intrinsics/ucmp.ll
+107-26llvm/test/CodeGen/SPIRV/llvm-intrinsics/scmp.ll
+0-61llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
+44-0llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_long_vector/scmp-ucmp-bool.ll
+21-1llvm/lib/Target/SPIRV/SPIRVLegalizerInfo.cpp
+279-1145 files

LLVM/project 8aa7819 — compiler-rt/lib/sanitizer_common sanitizer_stoptheworld_linux_libcdep.cpp

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+6-5compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
+6-51 files

LLVM/project f934488 — clang/docs ReleaseNotes.md, clang/lib/Driver/ToolChains Cuda.cpp

[Clang][Object][SYCL][CUDA] Add --[no-]offload-embed-virtual-arch (#242407)

Add `--[no-]offload-embed-virtual-arch` for SYCL and CUDA.

A SYCL device image compiled ahead of time for Intel GPUs keeps the
SPIR-V by default, so it can still run on other GPUs of the same IGCA
target. `--no-offload-embed-virtual-arch` drops it. `-Xarch_<IGCA
target>`, e.g. `-Xarch_igca_40r --no-offload-embed-virtual-arch`,
applies it to one IGCA target only. If `--offload-arch` also names the
IGCA target itself, e.g. `--offload-arch=xe-mtl-u,igca_30r`, the SPIR-V
for that target is kept. If nothing is compiled ahead of time for an
Intel GPU, clang warns that the option is unused.

The driver records `embed-virtual-arch=0` on the device image.
clang-linker-wrapper passes `--no-embed-virtual-arch` to
clang-sycl-linker when every non-generic device image asks for it, and
otherwise keeps the virtual architecture code and warns.
clang-sycl-linker then passes `-exclude_ir` to ocloc.


    [2 lines not shown]
DeltaFile
+56-0clang/test/Driver/sycl-embed-virtual-arch.cpp
+37-0clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
+24-12clang/lib/Driver/ToolChains/Cuda.cpp
+30-0clang/test/Driver/cuda-options.cu
+21-0clang/test/OffloadTools/clang-linker-wrapper/linker-wrapper.c
+19-0clang/docs/ReleaseNotes.md
+187-1212 files not shown
+294-1518 files