LLVM/project 1fadc09mlir/lib/Dialect/XeGPU/IR XeGPUDialect.cpp, mlir/test/Dialect/XeGPU propagate-layout-subgroup.mlir

[MLIR][XeGPU] Fix order remapping in layout transpose (#205212)

LayoutAttr::transposeDims and LayoutAttr::isTransposeOf mishandled the
`order` field when transposing a layout. The `order` field is
fundamentally different from the size-valued fields (sg_layout, sg_data,
inst_data, lane_layout, lane_data): its values are dimension indices
(order[0] is the fastest-varying dim), not per-position sizes. The two
require different transpose rules:
    - Size fields — reindex by position: new[i] = orig[perm[i]]
- order — relabel values through the inverse permutation: newOrder[i] =
inversePerm[origOrder[i]]

Both functions incorrectly applied the size-field rule to `order`.
Because the bug was applied consistently in both places, it stayed
hidden for trivial/symmetric (e.g. 2D [1,0]) permutations, where the two
rules happen to coincide. It only surfaces for non-trivial permutations
such as the 3D [1,0,2] produced by a broadcast→transpose chain.
   
   Assist-by-Claude

    [3 lines not shown]
DeltaFile
+36-5mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp
+19-0mlir/test/Dialect/XeGPU/propagate-layout-subgroup.mlir
+55-52 files

LLVM/project 4efc6efllvm/lib/Target/RISCV RISCVAsmPrinter.cpp, llvm/test/CodeGen/RISCV option-arch-experimental.ll

[RISCV] Emit .option arch extensions without the "experimental-" prefix (#205471)

We currently emit the "experimental-" prefix in .option arch, e.g.
`.option arch, +experimental-zicfiss`, but the assembler can't parse
that back.

There are two ways to fix this:

1. Teach the assembler to accept `.option arch, +experimental-zicfiss`.
2. Emit `.option arch, +zicfiss` instead of `.option arch,
+experimental-zicfiss`.

This patch takes the second approach, which better fits the .option arch
syntax we defined. Experimental extensions are still guarded by
`-menable-experimental-extensions`.
DeltaFile
+13-0llvm/test/CodeGen/RISCV/option-arch-experimental.ll
+3-1llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
+16-12 files

LLVM/project 39ed392llvm/lib/CodeGen/SelectionDAG DAGCombiner.cpp, llvm/test/CodeGen/RISCV rvp-srl-bitcast-bv.ll

[DAG] Fix illegal type in srl(bitcast(build_vector)) fold (#205074)

The fold

```
  (srl (bitcast (build_vector e1, ..., eN)), (N-1) * eltsize) -> (zext eN)
```

added in #181412 built the result through a narrow element integer type,
which
can be illegal (e.g. i16 on RV32 with the P extension, where `<2 x i16>`
is
legal). When the fold runs in the last DAG combine that illegal type
hits the
"Unexpected illegal type!" assert.

Build the result directly in the result type `VT` and mask off the high
bits
instead:

    [13 lines not shown]
DeltaFile
+36-0llvm/test/CodeGen/RISCV/rvp-srl-bitcast-bv.ll
+4-3llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+40-32 files

LLVM/project 89ac672libclc/clc/lib/nvptx CMakeLists.txt, libclc/clc/lib/nvptx/relational clc_isinf.cl

[libclc] Delete wrong implementation nvptx clc_isinf (#205699)

The file calls __nv_isinf which return 1 for true on vector input, while
the generic clc_isinf which return -1 for true on vector input. Using
nvptx clc_isinf in OpenCL isinf violates OpenCL spec.

Found the issue in https://github.com/intel/llvm/pull/22413
DeltaFile
+0-33libclc/clc/lib/nvptx/relational/clc_isinf.cl
+0-1libclc/clc/lib/nvptx/CMakeLists.txt
+0-342 files

LLVM/project f4a1491llvm/include/llvm/Target TargetLoweringObjectFile.h, llvm/lib/CodeGen TargetLoweringObjectFileImpl.cpp

[x86] Handle implicit sections when determining if a global is large (#204247)

Just like explicit sections.

We were seeing globals with implicit sections marked large under the
medium code model.

Assisted-by: Gemini
DeltaFile
+134-0llvm/test/CodeGen/X86/large-implicit-section.ll
+5-24llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+14-8llvm/lib/Target/TargetMachine.cpp
+19-0llvm/lib/Target/TargetLoweringObjectFile.cpp
+5-0llvm/include/llvm/Target/TargetLoweringObjectFile.h
+177-325 files

LLVM/project 635ed0elibc/src/__support/OSUtil/linux/stat kernel_statx_types.h stat_via_statx.h, libc/src/sys/stat/linux kernel_statx.h CMakeLists.txt

[libc][stat] Move internal statx type definition into OSUtil/linux (#203975)

This PR refactors the internally defined `statx` buffer to a shareable
location so other LLVM-libc linux entrypoints may call `statx` without
concern for name conflicts around `linux/stat.h`.

Specifically, this PR moves `libc/src/sys/stat/linux/kernel_statx.h` to
`libc/src/__support/OSUtil/linux/stat/` and splits it into two files,
`kernel_statx_types.h` + `stat_via_statx.h`.

This will be used by `realpath`.
DeltaFile
+0-107libc/src/sys/stat/linux/kernel_statx.h
+72-0libc/src/__support/OSUtil/linux/stat/kernel_statx_types.h
+66-0libc/src/__support/OSUtil/linux/stat/stat_via_statx.h
+51-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+9-15libc/src/sys/stat/linux/CMakeLists.txt
+22-0libc/src/__support/OSUtil/linux/stat/CMakeLists.txt
+220-1224 files not shown
+256-14010 files

LLVM/project 61cbfabcompiler-rt/lib/instrumentor-tools instrumentor_runtime.h, compiler-rt/lib/instrumentor-tools/flop-counter flop_counter_runtime.cpp CMakeLists.txt

[Instrumentor] Add runtime examples: [1/N] A flop counter

This adds a instrumentor-tools folder into compiler RT to showcase
use cases of the instrumentor. The initial example is a program that,
via instrumentation, counts the number of flops performed. Call and
intrinsic support will follow after #198042.

Partially developped by Claude (AI), tested and verified by me.
DeltaFile
+293-0compiler-rt/lib/instrumentor-tools/instrumentor_runtime.h
+164-0compiler-rt/lib/instrumentor-tools/flop-counter/flop_counter_runtime.cpp
+82-0compiler-rt/lib/instrumentor-tools/flop-counter/CMakeLists.txt
+77-0compiler-rt/lib/instrumentor-tools/flop-counter/README.md
+75-0compiler-rt/test/instrumentor-tools/lit.cfg.py
+49-0compiler-rt/test/instrumentor-tools/simple_flops.c
+740-020 files not shown
+966-126 files

LLVM/project a130299clang/include/clang/AST OpenMPClause.h, clang/lib/AST OpenMPClause.cpp

[OpenMP][Clang] Fix parsing of num_teams lower-bound modifier
DeltaFile
+46-35clang/lib/Sema/SemaOpenMP.cpp
+12-44clang/lib/Parse/ParseOpenMP.cpp
+41-2clang/include/clang/AST/OpenMPClause.h
+15-15clang/lib/AST/OpenMPClause.cpp
+17-11clang/test/OpenMP/teams_num_teams_messages.cpp
+16-7clang/lib/Sema/TreeTransform.h
+147-11412 files not shown
+209-13118 files

LLVM/project 2e09869compiler-rt/lib/instrumentor-tools instrumentor_runtime.h, compiler-rt/lib/instrumentor-tools/flop-counter flop_counter_runtime.cpp CMakeLists.txt

[Instrumentor] Add runtime examples: [1/N] A flop counter

This adds a instrumentor-tools folder into compiler RT to showcase
use cases of the instrumentor. The initial example is a program that,
via instrumentation, counts the number of flops performed. Call and
intrinsic support will follow after #198042.

Partially developped by Claude (AI), tested and verified by me.
DeltaFile
+293-0compiler-rt/lib/instrumentor-tools/instrumentor_runtime.h
+164-0compiler-rt/lib/instrumentor-tools/flop-counter/flop_counter_runtime.cpp
+82-0compiler-rt/lib/instrumentor-tools/flop-counter/CMakeLists.txt
+77-0compiler-rt/lib/instrumentor-tools/flop-counter/README.md
+75-0compiler-rt/test/instrumentor-tools/lit.cfg.py
+53-0compiler-rt/test/instrumentor-tools/CMakeLists.txt
+744-020 files not shown
+971-126 files

LLVM/project b37b10dclang/lib/Driver Driver.cpp, clang/test/Driver sycl-print-internal-defines.cpp

[Driver][SYCL] Treat stdin as C++ when -fsycl is active (#204968)

1723b7a30145 added a frontend check that rejects C inputs when SYCL mode
is active (since SYCL requires C++). The stdin path in BuildInputs
hardcoded TY_C regardless of driver mode, so `-fsycl -dM -E -` would
pass -x c to cc1 and trigger the new diagnostic.

Fix: use TY_CXX for stdin when IsSYCL.

Also, upstream a downstream test that fails due to 1723b7a30145.

---------

Co-authored-by: Claude Sonnet 4.6 <noreply at anthropic.com>
DeltaFile
+8-0clang/test/Driver/sycl-print-internal-defines.cpp
+4-0clang/lib/Driver/Driver.cpp
+12-02 files

LLVM/project 2ce6fc6llvm/include/llvm/IR DiagnosticInfo.h, llvm/unittests/IR DiagnosticInfoTest.cpp CMakeLists.txt

[IR] Fix invalid debug metadata diagnostic kind (#205648)

This type is only ever passed to LLVMContext::diagnose directly, and
there are no downcasts to this type, so classof is effectively dead, but
we should fix this oversight.

Fixes #205340
DeltaFile
+36-0llvm/unittests/IR/DiagnosticInfoTest.cpp
+3-3llvm/include/llvm/IR/DiagnosticInfo.h
+1-0llvm/unittests/IR/CMakeLists.txt
+40-33 files

LLVM/project 8a531c3libcxx/include text_encoding, libcxx/src/support/win32 locale_win32.cpp

[libc++] Implement P1885R12: `<text_encoding>` (#141312)

Resolves #105373, resolves #118371 and resolves #105332

- Implements `<text_encoding>`
- Adds availability macros for LLVM 23.
- The data is stored in three tables:
  - One giant string split by null-terminators to represent the aliases
- An index table which stores indexes into the string, each entry
representing the first character of an alias
- Text encoding data, which stores an index to the index table, the MIB,
and the number of aliases the encoding has.

Storing it in the above manner allows us to make significant savings in
binary file size and required runtime storage for the data.

As required by the LLVM Project's AI use policy:
- The implementation for `__get_locale_encoding(const char*)` for
Windows has been developed with the assistance of AI.

    [3 lines not shown]
DeltaFile
+1,171-0libcxx/test/std/text/text_encoding/test_text_encoding.h
+835-0libcxx/include/text_encoding
+281-0libcxx/test/std/text/text_encoding/text_encoding.members/id.compile.pass.cpp
+260-0libcxx/src/support/win32/locale_win32.cpp
+156-0libcxx/test/std/text/text_encoding/text_encoding.members/text_encoding.aliases_view/iterator.pass.cpp
+79-0libcxx/test/std/text/text_encoding/text_encoding.members/environment.pass.cpp
+2,782-068 files not shown
+4,447-3874 files

LLVM/project c424935clang/lib/ScalableStaticAnalysis/Core/Serialization/JSONFormat JSONFormatImpl.cpp, clang/lib/ScalableStaticAnalysisFramework/Core/Serialization/JSONFormat JSONFormatImpl.cpp

[clang][ssaf] Shorten directory name to ScalableStaticAnalysis (#204697)

The directory name ScalableStaticAnalysisFramework produces build paths
that exceed Windows' MAX_PATH limit (260 chars) on downstream CI bots.

The clang-ssaf-format / clang-ssaf-linker tool names and SSAF-prefixed
source filenames are unchanged.

Assisted-By: Claude Opus 4.7

---------

Co-authored-by: Aviral Goel <goel.aviral at gmail.com>
Co-authored-by: Aviral Goel <aviralg at users.noreply.github.com>
DeltaFile
+0-1,443clang/unittests/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowTest.cpp
+1,443-0clang/unittests/ScalableStaticAnalysis/Analyses/PointerFlow/PointerFlowTest.cpp
+1,380-0clang/lib/ScalableStaticAnalysis/Core/Serialization/JSONFormat/JSONFormatImpl.cpp
+0-1,380clang/lib/ScalableStaticAnalysisFramework/Core/Serialization/JSONFormat/JSONFormatImpl.cpp
+783-0clang/unittests/ScalableStaticAnalysis/Analyses/UnsafeBufferUsage/UnsafeBufferUsageTest.cpp
+0-783clang/unittests/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsageTest.cpp
+3,606-3,606347 files not shown
+22,495-22,498353 files

LLVM/project b266361compiler-rt/lib/instrumentor-tools instrumentor_runtime.h, compiler-rt/lib/instrumentor-tools/flop-counter flop_counter_runtime.cpp README.md

Revert "[Instrumentor] Add runtime examples: [1/N] A flop counter (#205221)" (#205696)
DeltaFile
+0-293compiler-rt/lib/instrumentor-tools/instrumentor_runtime.h
+0-164compiler-rt/lib/instrumentor-tools/flop-counter/flop_counter_runtime.cpp
+0-77compiler-rt/lib/instrumentor-tools/flop-counter/README.md
+0-75compiler-rt/test/instrumentor-tools/lit.cfg.py
+0-74compiler-rt/lib/instrumentor-tools/flop-counter/CMakeLists.txt
+0-54compiler-rt/test/instrumentor-tools/CMakeLists.txt
+0-73710 files not shown
+1-94816 files

LLVM/project 3105315clang/lib/UnifiedSymbolResolution USRGeneration.cpp, clang/unittests/Index IndexTests.cpp

address comments
DeltaFile
+9-8clang/unittests/Index/IndexTests.cpp
+11-5clang/lib/UnifiedSymbolResolution/USRGeneration.cpp
+20-132 files

LLVM/project 0b24f16clang/include/clang/Options Options.td, clang/lib/CodeGen BackendUtil.cpp

fix

Created using spr 1.3.7
DeltaFile
+41-56clang/lib/CodeGen/BackendUtil.cpp
+1-2clang/include/clang/Options/Options.td
+42-582 files

LLVM/project ac20606clang/lib/UnifiedSymbolResolution USRGeneration.cpp

address comments
DeltaFile
+1-1clang/lib/UnifiedSymbolResolution/USRGeneration.cpp
+1-11 files

LLVM/project c6a17f1compiler-rt/lib/instrumentor-tools/flop-counter CMakeLists.txt

[Instrumentor][FIX] Ensure CXX headers are available (#205693)

Try to address failure in #205221, which results in <atomic> not found.
This is CMake code copied from other compiler-rt projects using
<atomic>.
DeltaFile
+7-0compiler-rt/lib/instrumentor-tools/flop-counter/CMakeLists.txt
+7-01 files

LLVM/project 8e20284clang/lib/UnifiedSymbolResolution USRGeneration.cpp, clang/unittests/Index IndexTests.cpp

address comments
DeltaFile
+64-14clang/unittests/Index/IndexTests.cpp
+7-7clang/lib/UnifiedSymbolResolution/USRGeneration.cpp
+71-212 files

LLVM/project 86ecfffclang/include/clang/AST DeclBase.h, clang/lib/Sema SemaDeclCXX.cpp

[Clang] Don't suppress vtable emission for classes with -fmodules-debuginfo (#204662)

847f9cb0e868 made `Sema::DefineUsedVTables` skip
`Consumer.HandleVTable()` when `Class->shouldEmitInExternalSource()` is
true. This works for named C++20 modules as they have an object file,
but does not hold for -fmodules-debuginfo / -fpch-debuginfo.

This patch additionally gates that on `Class->isInNamedModule()`. This
is the same pattern used by the rest of codegen for this situation.

Needing to check this everywhere is a bit unfortunate. It would be good
to eventually refactor this class of checks to have clearer semantics
around named modules, debug info, and -fmodules-codgen.

Fixes https://github.com/llvm/llvm-project/issues/198587

Assisted-by: Claude Code: opus-4-8
DeltaFile
+28-0clang/test/PCH/pch-debuginfo-vtable.cpp
+6-1clang/lib/Sema/SemaDeclCXX.cpp
+4-0clang/include/clang/AST/DeclBase.h
+38-13 files

LLVM/project 66ed5f9lldb/include/lldb/Target Language.h, lldb/source/Breakpoint BreakpointResolverName.cpp

[lldb][NFC] Remove ConstString from Language::MethodNameVariant (#205688)

Language::MethodNameVariant is for when a given method name may have
several language-defined variants. For example, we may see an
objective-C method name with a category that should be searchable via
the name without the category.

The ObjCLanguage plugin computes these names without checking that they
are actually useful or even exist. Because these variant names are
stored in ConstString, they will live forever even if they are never
used.
DeltaFile
+8-8lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp
+6-6lldb/include/lldb/Target/Language.h
+4-4lldb/source/Symbol/Symtab.cpp
+1-1lldb/source/Plugins/Language/ObjC/ObjCLanguage.h
+1-1lldb/source/Breakpoint/BreakpointResolverName.cpp
+20-205 files

LLVM/project 51312e9clang/include/clang/AST OpenMPClause.h, clang/lib/AST OpenMPClause.cpp

[OpenMP][Clang] Fix parsing of num_teams lower-bound modifier
DeltaFile
+46-35clang/lib/Sema/SemaOpenMP.cpp
+12-44clang/lib/Parse/ParseOpenMP.cpp
+41-2clang/include/clang/AST/OpenMPClause.h
+15-15clang/lib/AST/OpenMPClause.cpp
+17-11clang/test/OpenMP/teams_num_teams_messages.cpp
+16-7clang/lib/Sema/TreeTransform.h
+147-11412 files not shown
+204-13018 files

LLVM/project 518040aclang/lib/Driver ToolChain.cpp, clang/test/Driver print-multi-selection-flags.c

[RISCV][clang] Use fcf-protection flag in Multilib Selection (#205202)

This ensures that we can separate out multilibs that are or are not
built with control flow protection enabled.

The initial version of the patch claims all values of these flags are
incompatible. It might be the case that we could make this logic more
complex if some versions do become compatible.
DeltaFile
+13-0clang/test/Driver/print-multi-selection-flags.c
+12-0clang/lib/Driver/ToolChain.cpp
+25-02 files

LLVM/project 0e46814compiler-rt/lib/instrumentor-tools/flop-counter CMakeLists.txt

[Instrumentor][FIX] Ensure CXX headers are available
DeltaFile
+7-0compiler-rt/lib/instrumentor-tools/flop-counter/CMakeLists.txt
+7-01 files

LLVM/project ea36234clang/test/AST ast-dump-openmp-teams-distribute-parallel-for-simd.c ast-dump-openmp-teams-distribute-parallel-for.c, clang/test/OpenMP target_teams_distribute_simd_codegen.cpp target_parallel_for_simd_codegen.cpp

Merge branch 'main' into users/kparzysz/c01-clause-check
DeltaFile
+1,701-810llvm/test/CodeGen/AMDGPU/llvm.set.rounding.ll
+0-2,193clang/test/AST/ast-dump-openmp-teams-distribute-parallel-for-simd.c
+0-2,193clang/test/AST/ast-dump-openmp-teams-distribute-parallel-for.c
+1,076-934clang/test/OpenMP/target_teams_distribute_simd_codegen.cpp
+1,070-932clang/test/OpenMP/target_parallel_for_simd_codegen.cpp
+0-1,970clang/test/AST/ast-dump-openmp-target-teams-distribute-parallel-for-simd.c
+3,847-9,032389 files not shown
+16,465-28,209395 files

LLVM/project b576ec6compiler-rt/lib/instrumentor-tools instrumentor_runtime.h, compiler-rt/lib/instrumentor-tools/flop-counter flop_counter_runtime.cpp README.md

[Instrumentor] Add runtime examples: [1/N] A flop counter (#205221)

This adds a instrumentor-tools folder into compiler RT to showcase
use cases of the instrumentor. The initial example is a program that,
via instrumentation, counts the number of flops performed. Call and
 intrinsic support will follow after #198042.

Partially developed by Claude (AI), tested and verified by me.
DeltaFile
+293-0compiler-rt/lib/instrumentor-tools/instrumentor_runtime.h
+164-0compiler-rt/lib/instrumentor-tools/flop-counter/flop_counter_runtime.cpp
+77-0compiler-rt/lib/instrumentor-tools/flop-counter/README.md
+75-0compiler-rt/test/instrumentor-tools/lit.cfg.py
+67-0compiler-rt/lib/instrumentor-tools/flop-counter/CMakeLists.txt
+54-0compiler-rt/test/instrumentor-tools/CMakeLists.txt
+730-010 files not shown
+941-116 files

LLVM/project 6cc609bllvm/lib/Target/Xtensa XtensaInstrInfo.td XtensaISelLowering.cpp, llvm/test/CodeGen/Xtensa trap.ll

[Xtensa] Fix trap/debugtrap operations lowering. (#200872)

Fix debug operation lowering for Xtensa.

Co-authored-by: Andrei Safronov <safronov at espressif.com>
DeltaFile
+136-0llvm/test/CodeGen/Xtensa/trap.ll
+22-2llvm/lib/Target/Xtensa/XtensaInstrInfo.td
+2-0llvm/lib/Target/Xtensa/XtensaISelLowering.cpp
+1-0llvm/lib/Target/Xtensa/XtensaSubtarget.h
+161-24 files

LLVM/project 1c83076compiler-rt/lib/instrumentor-tools instrumentor_runtime.h, compiler-rt/lib/instrumentor-tools/flop-counter flop_counter_runtime.cpp README.md

[Instrumentor] Add runtime examples: [1/N] A flop counter

This adds a instrumentor-tools folder into compiler RT to showcase
use cases of the instrumentor. The initial example is a program that,
via instrumentation, counts the number of flops performed. Call and
intrinsic support will follow after #198042.

Partially developped by Claude (AI), tested and verified by me.
DeltaFile
+293-0compiler-rt/lib/instrumentor-tools/instrumentor_runtime.h
+164-0compiler-rt/lib/instrumentor-tools/flop-counter/flop_counter_runtime.cpp
+77-0compiler-rt/lib/instrumentor-tools/flop-counter/README.md
+75-0compiler-rt/test/instrumentor-tools/lit.cfg.py
+67-0compiler-rt/lib/instrumentor-tools/flop-counter/CMakeLists.txt
+54-0compiler-rt/test/instrumentor-tools/CMakeLists.txt
+730-010 files not shown
+941-116 files

LLVM/project f820ecellvm/test/CodeGen/AMDGPU rewrite-vgpr-mfma-to-agpr-spill-joint-dom.ll rewrite-vgpr-mfma-to-agpr-spill-joint-dom-mir.mir

Removed extra space from flat-wg-size.
DeltaFile
+1-1llvm/test/CodeGen/AMDGPU/rewrite-vgpr-mfma-to-agpr-spill-joint-dom.ll
+1-1llvm/test/CodeGen/AMDGPU/rewrite-vgpr-mfma-to-agpr-spill-joint-dom-mir.mir
+2-22 files

LLVM/project 817bf6dllvm/lib/Target/AMDGPU AMDGPURewriteAGPRCopyMFMA.cpp

Added braces to conform to AMDGPU coding style.
DeltaFile
+2-1llvm/lib/Target/AMDGPU/AMDGPURewriteAGPRCopyMFMA.cpp
+2-11 files