LLVM/project 594cce3llvm/lib/Target/AMDGPU SIWholeQuadMode.cpp, llvm/test/CodeGen/AMDGPU uniform-intrin-combine-wqm-demote.ll

[AMDGPU] Change static NOP last terminator SI_DEMOTE_I1 to be replaced by S_BRANCH instead of assert (#204649)

This issue was first discovered in some testing downstream. A specific
chain of transformations on a ballot instruction with a constant
argument followed by an llvm.amgcn.wqm.demote call leads to an
instruction of `SI_DEMOTE_I1 -1, 0` being the last terminator of a block
with a single successor. This instruction is a NOP and can safely be
replaced with an S_BRANCH to the block's successor instead of asserting
failure.

The test added in this change is a very simplified recreation of the
pattern seen in the shader compilation in the downstream that lead to
assertion failure
DeltaFile
+17-0llvm/test/CodeGen/AMDGPU/uniform-intrin-combine-wqm-demote.ll
+1-1llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
+18-12 files

LLVM/project 094c10fclang/lib/CIR/Dialect/Transforms/TargetLowering CIRABIRewriteContext.cpp, clang/test/CIR/Transforms/abi-lowering indirect-byval.cir

[CIR] Lower byval/byref args in CallConvLowering (#201717)

[CIR] Lower byval/byref args in CallConvLowering

ArgKind::Indirect arguments were hitting an errorNYI in
CIRABIRewriteContext.  Add the lowering: in the callee the block argument
type changes to !cir.ptr<T>, a load is inserted at entry so the body sees
the original value type, and llvm.byval or llvm.byref is attached based on
ownership.  At call sites, both byval and byref are lowered by allocating a
stack slot, copying the value in, and passing the pointer.

For byval, llvm.noalias and llvm.noundef are also added -- llvm.noalias
because the call-site rewrite always produces a fresh alloca+store
(equivalent to -fpass-by-value-is-noalias), and llvm.noundef because the
copy is always fully defined.  byref carries only llvm.byref and llvm.align
since it does not assert exclusive ownership.
DeltaFile
+242-0clang/test/CIR/Transforms/abi-lowering/indirect-byval.cir
+147-66clang/lib/CIR/Dialect/Transforms/TargetLowering/CIRABIRewriteContext.cpp
+389-662 files

LLVM/project 4c02baalldb/source/Plugins/Process/elf-core CMakeLists.txt

[lldb] Add missing dependency on lldbPluginObjectFilePlaceholder (#204831)

Fixes shared library build after 882d0251.
DeltaFile
+1-0lldb/source/Plugins/Process/elf-core/CMakeLists.txt
+1-01 files

LLVM/project 8413e55flang/lib/Lower/OpenMP Utils.cpp ClauseProcessor.cpp

Remove unnecessary lambda and helpers
DeltaFile
+5-10flang/lib/Lower/OpenMP/Utils.cpp
+3-9flang/lib/Lower/OpenMP/ClauseProcessor.cpp
+8-192 files

LLVM/project 7347f56flang/lib/Lower/OpenMP Utils.cpp, flang/test/Lower/OpenMP motion-iterator.f90

Preserve descriptor strides for iterator map bounds

Iterator map lowering keeps a stable array base pointer and describes the
selected element or section with bounds inside omp.iterator. For boxed arrays,
those bounds must use the byte stride stored for each descriptor dimension.

Use fir.box_dims for boxed iterator map bounds and pass through each
dimension's descriptor byte stride. This preserves non-contiguous
assumed-shape actuals while keeping unit element strides for non-box arrays.
DeltaFile
+38-0flang/test/Lower/OpenMP/motion-iterator.f90
+21-4flang/lib/Lower/OpenMP/Utils.cpp
+59-42 files

LLVM/project f9db256llvm/lib/Target/X86 X86FrameLowering.cpp X86InstrInfo.cpp, llvm/lib/Target/X86/GISel X86InstructionSelector.cpp

[X86] Hoist getMOVriOpcode to X86InstrInfo.h and share it, NFC (#205187)

The x86 backend often needs to materialize potentially 64-bit immediates
into registers, and the logic to pick between the available opcodes
exists in 3 places at least. Move this to X86InstrInfo.h so we can share
it over the x86 backend without copying it.

An LLM did the refactoring.
DeltaFile
+9-18llvm/lib/Target/X86/X86FrameLowering.cpp
+12-0llvm/lib/Target/X86/X86InstrInfo.cpp
+2-8llvm/lib/Target/X86/X86FastISel.cpp
+1-6llvm/lib/Target/X86/GISel/X86InstructionSelector.cpp
+3-0llvm/lib/Target/X86/X86InstrInfo.h
+27-325 files

LLVM/project 92f058allvm/lib/DebugInfo/PDB/Native TpiStream.cpp, llvm/test/tools/llvm-pdbutil forward-cxx-to-c-odr.test forward-cxx-to-c.test

[DebugInfo][CodeView] Resolve forward references to types without unique name (#203781)

In the following code:
```cpp
// header.h
typedef struct lua_State lua_State;
lua_State *getState();

// source.c
#include "header.h"
struct lua_State { int field; };

lua_State *getState() {
    static lua_State state = {.field=42}; // make sure the type is emitted
    return &state;
}

// main.cpp
extern "C" {

    [16 lines not shown]
DeltaFile
+116-0llvm/test/tools/llvm-pdbutil/forward-cxx-to-c-odr.test
+89-0llvm/test/tools/llvm-pdbutil/forward-cxx-to-c.test
+15-8llvm/lib/DebugInfo/PDB/Native/TpiStream.cpp
+220-83 files

LLVM/project bc756cdlibcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members get_long_double_zh_CN.pass.cpp, libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members put_long_double_zh_CN.pass.cpp

fixup! [libc++][FreeBSD] Fix localization test on FreeBSD
DeltaFile
+0-2libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp
+0-2libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp
+0-42 files

LLVM/project 0e98dd5llvm/include/llvm/Support GlobPattern.h, llvm/lib/Support GlobPattern.cpp

Revert "[NFC][Support] Implement slash-agnostic path matching in GlobPattern …"

This reverts commit 63e33c6aeed23e71763ea0dea89621d89866446e.
DeltaFile
+0-62llvm/unittests/Support/GlobPatternTest.cpp
+14-37llvm/lib/Support/GlobPattern.cpp
+3-6llvm/include/llvm/Support/GlobPattern.h
+17-1053 files

LLVM/project 0b5c006clang/docs SanitizerSpecialCaseList.rst ReleaseNotes.rst, clang/unittests/Basic DiagnosticTest.cpp

Revert "Make sanitizer special case list slash-agnostic" (#205399)

Reverts llvm/llvm-project#149886 as part of the process of reverting
https://github.com/llvm/llvm-project/pull/202854 due to downstream
breakage (see discussion in
https://github.com/llvm/llvm-project/pull/202854#issuecomment-4746579478)
DeltaFile
+0-35clang/unittests/Basic/DiagnosticTest.cpp
+6-25llvm/lib/Support/SpecialCaseList.cpp
+0-20llvm/unittests/Support/SpecialCaseListTest.cpp
+0-12clang/docs/SanitizerSpecialCaseList.rst
+0-5clang/docs/ReleaseNotes.rst
+6-975 files

LLVM/project 6709bcdllvm/unittests/Support GlobPatternTest.cpp

Revert "[NFC][Support] Add test for inverted slash-agnostic matching" (#205397)

Reverts llvm/llvm-project#203290 as part of the process of reverting
https://github.com/llvm/llvm-project/pull/202854 due to downstream
breakage (see discussion in
https://github.com/llvm/llvm-project/pull/202854#issuecomment-4746579478)
DeltaFile
+0-14llvm/unittests/Support/GlobPatternTest.cpp
+0-141 files

LLVM/project 5ab7ad9llvm/lib/Target/RISCV RISCVInstrInfoXCV.td

[RISCV][XCV] Add missing IsRV32 predicate to the XCVmac block (#205095)

The XCVmac instruction block was missing the `IsRV32` predicate that
every other XCV block already carries. `HasVendorXCVmac` on its own does
not require RV32, so `-mtriple=riscv64 -mattr=+xcvmac` could select
these RV32-only vendor instructions on RV64. Add `IsRV32` to the XCVmac
block to match the other XCV extensions and prevent selecting invalid
instructions on RV64.

Split out of #204879 at review request (one fix per PR).

Part of a CORE-V (XCV) series; see RFC:
https://discourse.llvm.org/t/rfc-core-v-xcv-support-for-cv32e40p-clang-builtins-xcvsimd-intrinsics-and-generic-auto-selection/91111
DeltaFile
+1-1llvm/lib/Target/RISCV/RISCVInstrInfoXCV.td
+1-11 files

LLVM/project 0628d35clang/include/clang/CIR/Dialect/IR CIRAttrs.td, clang/lib/CIR/CodeGen CIRGenStmt.cpp

[CIR] Implement support for emitting label address constants (#203644)

The evalloop.c test in the llvm-test-suite single source tests contains
a static array that is initialized with the address of labels within the
enclosing function. This wasn't implemented in CIR.

This change adds an implementation. The constant emitter change was
trivial. We just needed to create a #cir.block_addr_info attribute.
However, using that attribute as an initializer for a global requires
some additional handling and special lowering for the initializer.

The goto solver also needed to be updated to consider uses of labels in
global initializers.

The test case here was copied over directly from classic codegen. The
original test has an additional test case for the difference between two
label addresses. Support for that case will be added in a future change.

Assisted-by: Cursor / claude-opus-4.8
DeltaFile
+78-0clang/test/CIR/CodeGen/const-label-addr.c
+47-12clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+28-3clang/lib/CIR/Dialect/Transforms/GotoSolver.cpp
+14-7clang/include/clang/CIR/Dialect/IR/CIRAttrs.td
+9-4clang/lib/CIR/CodeGen/CIRGenStmt.cpp
+5-6clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+181-324 files not shown
+202-3610 files

LLVM/project 7a4dfabclang/include/clang/Basic SourceManager.h, clang/lib/Basic SourceManager.cpp

[clang] Fix incorrect filenames for hardlinks (#189475)

Previously hardlinked files would be discovered based on their inode,
leading to incorrect filepaths printed in some cases.

Fixes https://github.com/llvm/llvm-project/issues/26953
Fixes https://github.com/llvm/llvm-project/issues/58726

Related https://reviews.llvm.org/D137304

Assisted-by: codex
DeltaFile
+126-1clang/unittests/Basic/SourceManagerTest.cpp
+44-16clang/lib/Basic/SourceManager.cpp
+42-0clang/test/Preprocessor/hardlink-include-names.c
+6-0clang/include/clang/Basic/SourceManager.h
+2-2clang/test/DebugInfo/Generic/macro.c
+220-195 files

LLVM/project b5e9e48flang/lib/Semantics check-omp-structure.cpp, flang/test/Semantics/OpenMP if-clause-45-suggestion.f90 if-clause-50-suggestion.f90

Fix directive-name-modifier check
DeltaFile
+52-20flang/lib/Semantics/check-omp-structure.cpp
+18-0flang/test/Semantics/OpenMP/if-clause-45-suggestion.f90
+14-0flang/test/Semantics/OpenMP/if-clause-50-suggestion.f90
+84-203 files

LLVM/project dcec4ddllvm/test/CodeGen/SystemZ misched-prera-pdiffs.mir misched-prera-loads.mir

[SystemZ] Add missing asserts requirement for pre-RA sched mir tests (#205403)

This is based off https://github.com/llvm/llvm-project/pull/188823 and
is needed because tests are failing in release (non-asserts) builds
DeltaFile
+1-0llvm/test/CodeGen/SystemZ/misched-prera-pdiffs.mir
+1-0llvm/test/CodeGen/SystemZ/misched-prera-loads.mir
+2-02 files

LLVM/project 45b441cllvm/test/CodeGen/RISCV clmul.ll, llvm/test/CodeGen/RISCV/rvv clmulh-sdnode.ll clmul-sdnode.ll

Rebase, address comments

Created using spr 1.3.7
DeltaFile
+25,784-36,416llvm/test/CodeGen/RISCV/rvv/clmulh-sdnode.ll
+12,227-23,140llvm/test/CodeGen/RISCV/rvv/clmul-sdnode.ll
+12,991-3,310llvm/test/MC/AMDGPU/gfx13_asm_vop3_dpp16.s
+11,856-3,719llvm/test/MC/AMDGPU/gfx12_asm_vop3_dpp16.s
+4,004-11,142llvm/test/CodeGen/RISCV/clmul.ll
+3,502-9,174llvm/test/CodeGen/X86/clmul-vector.ll
+70,364-86,9013,168 files not shown
+195,856-201,8313,174 files

LLVM/project 6a6e74ellvm/lib/Analysis BasicAliasAnalysis.cpp, llvm/test/Analysis/BasicAA recphi.ll

Merge branch 'main' into users/aokblast/moneypunct_fbsd_test
DeltaFile
+24-58llvm/test/Transforms/LoopVectorize/X86/gather_scatter.ll
+13-55llvm/test/Transforms/LoopVectorize/AArch64/transform-narrow-interleave-to-widen-memory-derived-ivs.ll
+10-47llvm/test/Transforms/LoopVectorize/ARM/pointer_iv.ll
+9-38llvm/test/Transforms/LoopVectorize/RISCV/pointer-induction.ll
+12-6llvm/lib/Analysis/BasicAliasAnalysis.cpp
+7-10llvm/test/Analysis/BasicAA/recphi.ll
+75-2143 files not shown
+82-2219 files

LLVM/project 95decf7llvm/lib/Analysis BasicAliasAnalysis.cpp, llvm/test/Analysis/BasicAA recphi.ll

[BasicAA] Allow some more recursion across GEPs/phis. (#205010)

Allow recursive base-object analysis for some GEPs. The new version
still retains some bail-outs to avoid some redundant work.

This has a notable impact across a large IR corpus (32k modules from
large set of C/C++ workloads).

Some of the highlights include:

   aa.NumNoAlias                  +1.52%
   aa.NumMayAlias                 −0.10%
   licm.NumMovedLoads             +20.47%
   licm.NumHoisted                +2.03%
   early-cse.NumCSELoad           +1.59%
   SLP.NumVectorInstructions      +0.86%
   loop-vectorize.LoopsVectorized +0.21%
   instcount.TotalInsts           −0.05%
   instcount.NumLoadInst          −0.10%

    [17 lines not shown]
DeltaFile
+24-58llvm/test/Transforms/LoopVectorize/X86/gather_scatter.ll
+13-55llvm/test/Transforms/LoopVectorize/AArch64/transform-narrow-interleave-to-widen-memory-derived-ivs.ll
+10-47llvm/test/Transforms/LoopVectorize/ARM/pointer_iv.ll
+9-38llvm/test/Transforms/LoopVectorize/RISCV/pointer-induction.ll
+12-6llvm/lib/Analysis/BasicAliasAnalysis.cpp
+7-10llvm/test/Analysis/BasicAA/recphi.ll
+75-2143 files not shown
+82-2219 files

LLVM/project c28c92ellvm/test/tools/dsymutil/X86 bundle-mtime.test

Merge branch 'main' into users/aokblast/moneypunct_fbsd_test
DeltaFile
+4-4llvm/test/tools/dsymutil/X86/bundle-mtime.test
+4-41 files

LLVM/project 3f48c67llvm/test/tools/dsymutil/X86 bundle-mtime.test

[dsymutil] Use more portable way to compare timestamp (NFC) (#204680)

`find` on AIX does not support `-maxpath` option. This patch is
to use python to compare the `mtime` of the file/directory.
DeltaFile
+4-4llvm/test/tools/dsymutil/X86/bundle-mtime.test
+4-41 files

LLVM/project 1b691d1llvm/test/CodeGen/RISCV clmul.ll clmulr.ll, llvm/test/CodeGen/RISCV/rvv clmulh-sdnode.ll clmul-sdnode.ll

Merge branch 'main' into users/aokblast/moneypunct_fbsd_test
DeltaFile
+31,001-87,165llvm/test/CodeGen/RISCV/rvv/clmulh-sdnode.ll
+15,519-26,130llvm/test/CodeGen/RISCV/rvv/clmul-sdnode.ll
+12,134-24,576llvm/test/CodeGen/RISCV/clmul.ll
+8,309-12,701llvm/test/CodeGen/RISCV/clmulr.ll
+7,962-12,501llvm/test/CodeGen/RISCV/clmulh.ll
+8,361-8,920llvm/test/CodeGen/RISCV/rvv/expandload.ll
+83,286-171,99311,422 files not shown
+907,925-618,59811,428 files

LLVM/project 361f3b2clang/include/clang/Analysis/Analyses/LifetimeSafety FactsGenerator.h, clang/lib/Analysis/LifetimeSafety FactsGenerator.cpp

[LifetimeSafety] Model GNU statement expressions (#204841)
DeltaFile
+70-0clang/test/Sema/LifetimeSafety/safety.cpp
+15-0clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+1-0clang/include/clang/Analysis/Analyses/LifetimeSafety/FactsGenerator.h
+86-03 files

LLVM/project dd1685dllvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/RISCV rotated-strided-loads.ll

[SLP] Don't recognize rotated widened strided stores in analyzeRtStrideCandidate() (#204013)

These cases which are nearly strided stores are being incorrectly
recognized as strided stores. Fixes #204011
DeltaFile
+68-9llvm/test/Transforms/SLPVectorizer/RISCV/rotated-strided-loads.ll
+12-0llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+80-92 files

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

[Bazel] Fixes 7591910 (#205377)

This fixes 759191045115d966dffc99901e9086289767ff5c.

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+18-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+18-01 files

LLVM/project c70d01alldb/include/lldb/Core Module.h, lldb/source/Core Module.cpp

[lldb] Fix data race in Module::GetSectionList (#205226)

Module::GetSectionList built the section list (m_sections_up) without a
lock, so parallel module loading (e.g. crashlog.py's thread pool) could
race two builders on the unique_ptr and the SectionList vector, crashing
in AppleObjCRuntime::GetObjCVersion.

Build through ObjectFile::GetSectionList instead of locking the module
mutex and calling CreateSections directly: that path locks the object
file's section mutex before the module mutex, and the build can re-enter
it, so holding the module mutex across the build would invert the order
and risk a deadlock. The Module-level counterpart to a0176fd9dfc5.

rdar://180308581
DeltaFile
+93-0lldb/unittests/Core/ModuleTest.cpp
+5-3lldb/source/Core/Module.cpp
+3-0lldb/include/lldb/Core/Module.h
+101-33 files

LLVM/project 3954707clang/docs SanitizerSpecialCaseList.rst ReleaseNotes.rst, clang/unittests/Basic DiagnosticTest.cpp

Revert "Make sanitizer special case list slash-agnostic (#149886)"

This reverts commit 2916c779f63b6391669cd87421aca000e1418247.
DeltaFile
+0-35clang/unittests/Basic/DiagnosticTest.cpp
+6-25llvm/lib/Support/SpecialCaseList.cpp
+0-20llvm/unittests/Support/SpecialCaseListTest.cpp
+0-12clang/docs/SanitizerSpecialCaseList.rst
+0-5clang/docs/ReleaseNotes.rst
+6-975 files

LLVM/project 51eee20clang/lib/CIR/Dialect/Transforms/TargetLowering CIRABIRewriteContext.cpp, clang/test/CIR/Transforms/abi-lowering indirect-byval.cir

[CIR] Lower byval/byref args in CallConvLowering

ArgKind::Indirect arguments were hitting an errorNYI in
CIRABIRewriteContext.  Add the lowering: in the callee the block argument
type changes to !cir.ptr<T>, a load is inserted at entry so the body sees
the original value type, and llvm.byval or llvm.byref is attached based on
ownership.  At call sites, both byval and byref are lowered by allocating a
stack slot, copying the value in, and passing the pointer.

For byval, llvm.noalias and llvm.noundef are also added -- llvm.noalias
because the call-site rewrite always produces a fresh alloca+store
(equivalent to -fpass-by-value-is-noalias), and llvm.noundef because the
copy is always fully defined.  byref carries only llvm.byref and llvm.align
since it does not assert exclusive ownership.
DeltaFile
+242-0clang/test/CIR/Transforms/abi-lowering/indirect-byval.cir
+147-66clang/lib/CIR/Dialect/Transforms/TargetLowering/CIRABIRewriteContext.cpp
+389-662 files

LLVM/project 289e243flang/include/flang/Evaluate tools.h, flang/lib/Evaluate tools.cpp

Revert "[flang][cuda] Do not emit data transfer for constant read on the rhs" (#205394)

Reverts llvm/llvm-project#205185

this is making couple of downstream tests failing. Another approach is
needed
DeltaFile
+0-27flang/include/flang/Evaluate/tools.h
+1-13flang/test/Lower/CUDA/cuda-data-transfer.cuf
+2-1flang/lib/Evaluate/tools.cpp
+3-413 files

LLVM/project 88eaad8clang/docs InternalsManual.rst, clang/lib/Frontend CompilerInvocation.cpp

[llvm][option] Remove bitfield marshalling (#203051)

Marshaling of bitfield options is adding some extra complexity in the
form of extractors and mergers, but is now unused. This PR removes that
feature.
DeltaFile
+10-36clang/lib/Frontend/CompilerInvocation.cpp
+4-8clang/docs/InternalsManual.rst
+0-12llvm/include/llvm/Option/OptParser.td
+0-9llvm/utils/TableGen/OptionParserEmitter.cpp
+1-2llvm/unittests/Option/OptionMarshallingTest.cpp
+15-675 files