LLVM/project c248304 — llvm/lib/Target/AVR AVRISelLowering.h AVRInstrInfo.td, llvm/test/CodeGen/AVR issue-245758.ll

[AVR] Fix a bug in expansion of ADJCALLSTACKDOWN/ADJCALLSTACKUP (#246377)

Fixes https://github.com/llvm/llvm-project/issues/245758.
DeltaFile
+135-0llvm/test/CodeGen/AVR/issue-245758.ll
+19-0llvm/lib/Target/AVR/AVRISelLowering.cpp
+6-8llvm/lib/Target/AVR/AVRInstrInfo.td
+3-0llvm/lib/Target/AVR/AVRISelLowering.h
+163-84 files

LLVM/project e094f79 — clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr p3-2b.cpp, clang/test/Sema warn-unused-but-set-static-global.cpp init.c

[SystemZ][Clang] Mark clang failures for z/OS for TLS lit tests (#238354)

Mark the TLS related tests as a unsupported on z/OS (mostly by #if-ing
out the code). In addition, the current versions of z/OS have limited
support for TLS.

The support for TLS on z/OS 3.1/3.2 is limited to compile time
expressions for initialization. Eventually ctors/dtors and runtime
expressions for initializers will be supported. Until then update the
tests so the non-TLS parts are run.
DeltaFile
+39-4clang/test/SemaCXX/attr-require-constant-initialization.cpp
+20-2clang/test/SemaCXX/no_destroy.cpp
+12-1clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3-2b.cpp
+7-2clang/test/Sema/init.c
+6-2clang/test/Sema/LifetimeSafety/noescape-violation.cpp
+8-0clang/test/Sema/warn-unused-but-set-static-global.cpp
+92-1117 files not shown
+163-1423 files

LLVM/project e23f42d — llvm/test/CodeGen/RISCV/GlobalISel/legalizer merge-unmerge-rv32d.mir

[RISCV] Use concrete types and G_BITCAST in merge-unmerge-rv32d.mir. NFC
DeltaFile
+14-12llvm/test/CodeGen/RISCV/GlobalISel/legalizer/merge-unmerge-rv32d.mir
+14-121 files

LLVM/project 029299f — llvm/lib/Target/RISCV/GISel RISCVLegalizerInfo.cpp, llvm/test/CodeGen/RISCV/GlobalISel double-intrinsics.ll

[RISCV][GISel] Use iXLen in G_BITCAST legalizer rule.
DeltaFile
+138-162llvm/test/CodeGen/RISCV/GlobalISel/double-intrinsics.ll
+3-3llvm/test/CodeGen/RISCV/GlobalISel/irtranslator/bitcast-between-f64-and-i64.ll
+1-1llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
+142-1663 files

LLVM/project 6afdd30 — clang/include/clang/Lex Preprocessor.h, clang/lib/Lex Pragma.cpp

[clang] Avoid a redundant missing attribute diagnostic after a nested pragma

The preceding change rejects nested pragmas during preprocessing.
Skipping a nested pragma can leave its enclosing pragma with an empty
argument list and lead to a secondary diagnostic.

For `#pragma clang attribute`, omit the missing attribute diagnostic
when rejecting a nested pragma left the argument list empty. Continue
diagnosing an ordinary empty argument list.

``` cc
#pragma clang attribute (_Pragma("clang attribute push"))
```

The preceding change reports both errors.

```text
attribute.cc:1:26: error: nested pragma is not allowed
attribute.cc:1:57: error: expected an attribute after '('

    [10 lines not shown]
DeltaFile
+12-1clang/test/Preprocessor/pragma-nested.c
+5-1clang/lib/Parse/ParsePragma.cpp
+6-0clang/include/clang/Lex/Preprocessor.h
+4-1clang/lib/Lex/Pragma.cpp
+27-34 files

LLVM/project 8b1b4ca — clang/include/clang/Lex Preprocessor.h, clang/lib/Lex PPMacroExpansion.cpp Pragma.cpp

[clang][lex] Reject nested pragmas during preprocessing

Executing a nested pragma while reading the enclosing pragma's arguments
can inject annotation tokens where ordinary tokens are expected.

Track when a pragma is active so the preprocessor can diagnose and skip
nested pragmas. Expand deferred pragma arguments while the pragma is
active and disable macro expansion when replaying those tokens.

For example:

``` cc
#pragma clang attribute (_Pragma("clang attribute push"))
```

Clang emits:

```text
attribute.cc:1:26: error: nested pragma is not allowed

    [5 lines not shown]
DeltaFile
+114-40clang/lib/Lex/Pragma.cpp
+78-0clang/test/Preprocessor/pragma-nested.c
+26-4clang/include/clang/Lex/Preprocessor.h
+2-8clang/test/OpenMP/assumes_messages.c
+3-7clang/lib/Lex/PPMacroExpansion.cpp
+4-4clang/lib/Parse/ParsePragma.cpp
+227-634 files not shown
+241-6410 files

LLVM/project 72f8c94 — llvm/lib/ProfileData/Coverage CoverageMapping.cpp

[reviews] Avoid linear scan.
DeltaFile
+17-18llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
+17-181 files

LLVM/project e74fcc2 — bolt/lib/Core BinaryContext.cpp, bolt/test/X86 dwarf-inline-cross-cu-file.s

[BOLT][DWARF] Fix directory and MD5 of files added from another CU (#246126)

When BOLT inlines a function from a different CU, the inlined
instructions carry the callee's line info, which refers to files in the
callee's line table. Since BOLT writes these rows into the caller's line
table, `addDebugFilenameToUnit()` adds the callee's file to the caller's
line table, so that the rows can refer to it.

With DWARF 5 line tables, though, the added file comes out wrong in two
ways:

- It gets the wrong directory. In DWARF 5, directory indices start at 0
(directory #0 is the compilation directory), but
`addDebugFilenameToUnit()` assumes they start at 1 like in DWARF 4. So
for any file that is not in the compilation directory, it picks the
directory right before the correct one. In the new test, for example,
code inlined from `inc/helper.h` symbolizes to `./helper.h` instead of
`./inc/helper.h`.


    [10 lines not shown]
DeltaFile
+73-0bolt/test/X86/dwarf-inline-cross-cu-file.s
+11-12bolt/lib/Core/BinaryContext.cpp
+84-122 files

LLVM/project c90f2e9 — llvm/lib/ProfileData/Coverage CoverageMapping.cpp

Use more specific std functions.
DeltaFile
+6-5llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
+6-51 files

LLVM/project bf35c62 — llvm/lib/ProfileData/Coverage CoverageMapping.cpp

[reviews] fix warnings.
DeltaFile
+2-0llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
+2-01 files

LLVM/project 2e6f63f — llvm/lib/Analysis VectorUtils.cpp, llvm/test/Transforms/LoopVectorize/AArch64 loop-vectorization-factors.ll

[VectorUtils] Refine live-ins handling in computeMinimumValueSizes

Prior to this patch, instructions outside of the analyzed blocks
were visited as part of the traversal. As the result, their
function-wide demanded bits were mixed into the analyzed class
making their out-of-the-loop users broaden demanded bits.

For this reason, we were making different decisions depending
on whether a live-in is an argument (didn't participate in the
traversal) or an instruction (did participate):
https://llvm.godbolt.org/z/5haMTGrY3

This change handles live-ins separately by adding demanded
bits only for their concrete in-loop users and excluding
them from non-traversed user checks.
DeltaFile
+40-14llvm/lib/Analysis/VectorUtils.cpp
+18-14llvm/test/Transforms/LoopVectorize/AArch64/loop-vectorization-factors.ll
+58-282 files

LLVM/project 005472f — llvm/test/Transforms/LoopVectorize/AArch64 loop-vectorization-factors.ll

[LV] Add pre-commit tests (NFC)
DeltaFile
+344-0llvm/test/Transforms/LoopVectorize/AArch64/loop-vectorization-factors.ll
+344-01 files

LLVM/project fdf1b30 — llvm/include/llvm/MC MCAsmInfo.h, llvm/lib/MC MCSectionMachO.cpp MCAsmInfoWasm.cpp

[spr] initial version

Created using spr 2.0.0-beta.2
DeltaFile
+83-82llvm/lib/MC/MCAsmInfoCOFF.cpp
+77-75llvm/lib/MC/MCAsmInfoELF.cpp
+41-39llvm/lib/MC/MCAsmInfoXCOFF.cpp
+24-21llvm/lib/MC/MCAsmInfoWasm.cpp
+8-7llvm/lib/MC/MCSectionMachO.cpp
+13-2llvm/include/llvm/MC/MCAsmInfo.h
+246-22614 files not shown
+257-25220 files

LLVM/project 06c9aa1 — llvm/lib/Target/AArch64/MCTargetDesc AArch64MCAsmInfo.cpp, llvm/lib/Target/ARM/MCTargetDesc ARMMCAsmInfo.cpp

[MC] Replace MCAsmInfo::printSpecifierExpr with func ptr (#246714)

Avoid a virtual function by using a function pointer for printing
MCSpecifierExpr. Saves ~400B of .data.rel.ro.
DeltaFile
+54-60llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp
+40-32llvm/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp
+30-30llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp
+23-23llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp
+20-20llvm/lib/Target/Lanai/MCTargetDesc/LanaiMCAsmInfo.cpp
+13-20llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCAsmInfo.cpp
+180-18523 files not shown
+255-34029 files

LLVM/project 319e80b — llvm/test/CodeGen/SPIRV/debug-info debug-amd-vendor-defaults.ll

Update test.
DeltaFile
+42-21llvm/test/CodeGen/SPIRV/debug-info/debug-amd-vendor-defaults.ll
+42-211 files

LLVM/project d4e3b6f — llvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.cpp

Format.
DeltaFile
+2-2llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+2-21 files

LLVM/project 0d67554 — llvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.h SPIRVNonSemanticDebugHandler.cpp, llvm/test/CodeGen/SPIRV/debug-info debug-amd-vendor-defaults.ll

[SPIRV] Enable NSDI features by default for AMD

Enable -spirv-debug-lexical-block-discriminator-scope,
-spirv-debug-scope-forward-refs and -spirv-debug-declare-untyped-variable
when the target vendor is AMD.
DeltaFile
+73-0llvm/test/CodeGen/SPIRV/debug-info/debug-amd-vendor-defaults.ll
+16-5llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+11-5llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h
+100-103 files

LLVM/project 11cad64 — llvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.h SPIRVOptions.td, llvm/test/CodeGen/SPIRV/debug-info debug-amd-vendor-defaults.ll

[SPIRV] Let explicit NSDI flags override AMD defaults
DeltaFile
+5-4llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+4-4llvm/lib/Target/SPIRV/SPIRVOptions.td
+3-2llvm/test/CodeGen/SPIRV/debug-info/debug-amd-vendor-defaults.ll
+2-2llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h
+14-124 files

LLVM/project 64bd72e — llvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.cpp, llvm/test/CodeGen/SPIRV/debug-info debug-declare-untyped-variable.ll

[SPIRV] Treat OpUntypedVariableKHR as a function-level variable (#245593)

With `SPV_KHR_untyped_pointers`, locals are `OpUntypedVariableKHR`, so
`DebugFunctionDefinition` was emitted before those variables, which is
illegal.

This change treats `OpUntypedVariableKHR` the same as `OpVariable` when
finding the last function-level variable.
DeltaFile
+10-8llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+2-0llvm/test/CodeGen/SPIRV/debug-info/debug-declare-untyped-variable.ll
+12-82 files

LLVM/project 4ad3b1f — llvm/include/llvm/Analysis ScalarEvolution.h, llvm/lib/Analysis ScalarEvolution.cpp

[SCEV] Add recursion depth limit to isKnownPredicate (NFC). (#246438)

Add a depth limit to isKnownPredicate, to restrict the depth of
recursive reasoning. The new isKnownPredicateImpl takes the current
recurion depth and gives up once the limit is reached.

Currently this only passes the depth through to
isKnownPredicateViaSplitting. isKnownViaInduction is not as
straight-forward, as it only indirectly calls isKnownPredicate via
isLoopEntryGuardedByCond/isLoopBackedgeGuardedByCond.

Split off from https://github.com/llvm/llvm-project/pull/208546.

PR: https://github.com/llvm/llvm-project/pull/246438
DeltaFile
+13-5llvm/lib/Analysis/ScalarEvolution.cpp
+5-4llvm/include/llvm/Analysis/ScalarEvolution.h
+18-92 files

LLVM/project e3ee4b7 — llvm/lib/Target/X86 X86.td, llvm/test/Transforms/LoopVectorize/X86 prefer-256-novalake.ll

[X86] Prefer 256-bit vectors for novalake (#238053)

As in title. This was missed during initial implementation. Novalake
should be inline with other arches wrt. to TuningPrefer256Bit
DeltaFile
+244-0llvm/test/Transforms/LoopVectorize/X86/prefer-256-novalake.ll
+2-1llvm/lib/Target/X86/X86.td
+246-12 files

LLVM/project fa9061f — offload/libacctarget DeviceManager.h DeviceManager.cpp, offload/test/acc api-no-device.f90 api-device-threads.f90

[offload][acc] Add the OpenACC DeviceManager

The DeviceManager maps the OpenACC device types and device numbers to the
devices of the plugin manager, and keeps the device selection ICVs of each
thread. Implement acc_get_num_devices, acc_get_device_type,
acc_set_device_type, acc_get_device_num and acc_set_device_num on top of it.

Add Fortran tests of these routines and of the ICVs being per thread. They use
the libacctarget_test module to bring the runtime up and down, until the
compiler driver does it.

Assisted-by: Claude Sonnet 5.5
DeltaFile
+301-0offload/libacctarget/DeviceManager.cpp
+152-0offload/test/acc/api-device.f90
+147-0offload/libacctarget/DeviceManager.h
+112-0offload/test/acc/api-device-threads.f90
+47-0offload/test/acc/api-no-device.f90
+23-0offload/test/acc/Inputs/libacctarget_test.f90
+782-04 files not shown
+819-510 files

LLVM/project c0abc97 — offload/tools/offload-tblgen AccGen.cpp

Fix alias insertion
DeltaFile
+2-2offload/tools/offload-tblgen/AccGen.cpp
+2-21 files

LLVM/project 8175905 — llvm/lib/Frontend/Offloading Utility.cpp

[Offload][NFC] Drop redundant using-directive for offloading::sycl (#246526)

Utility.cpp already qualifies its only sycl definition as
sycl::writeSymbolTable, so the file-scope using-directive for
llvm::offloading::sycl is unnecessary.

Assisted-By: Claude Code
DeltaFile
+0-1llvm/lib/Frontend/Offloading/Utility.cpp
+0-11 files

LLVM/project 379c7a0 — clang/docs ReleaseNotes.md, clang/lib/Analysis CFG.cpp UninitializedValues.cpp

Reapply "[clang] Suppress -Wuninitialized for unevaluated builtin args" (#245821)

This reapplies f19973fdd2fe (#217816), reverted in 550bc0246c54, with a
different implementation.

f19973fdd2fe left the arguments of every builtin with the
`UnevaluatedArguments` attribute out of the CFG, as CFGBuilder already
did for `__builtin_object_size` and `__builtin_dynamic_object_size`.
A warning queued with DiagRuntimeBehavior is kept when its expression
has no CFG block, so warnings in branches of those arguments that fold
away were no longer dropped. This broke -Werror builds of the Linux
kernel, where MAYBE_BUILD_BUG_ON wraps ilog2() in
`__builtin_constant_p`:

__builtin_constant_p(n) ? ... : (sizeof(n) <= 4) ? __ilog2_u32(n) : ...

Now only the two object size builtins leave their arguments out of the
CFG, as before f19973fdd2fe. Instead, the uninitialized values analysis
ignores references in the arguments of any call for which

    [22 lines not shown]
DeltaFile
+27-0clang/test/Sema/uninit-variables.c
+27-0clang/lib/Analysis/UninitializedValues.cpp
+23-0clang/test/Analysis/cfg.cpp
+7-0clang/test/Sema/constant-conversion.c
+5-0clang/docs/ReleaseNotes.md
+3-0clang/lib/Analysis/CFG.cpp
+92-06 files

LLVM/project e361f9a — llvm/lib/Target/Mips Mips16HardFloat.cpp, llvm/test/CodeGen/Mips mips16-hf-strictfp.ll

[Mips] Do not create MIPS16 FP call stubs for constrained intrinsics (#246086)

Mips16HardFloat creates FP call stubs for calls to functions with FP
arguments or return values, except for a list of intrinsics that are
lowered inline. Constrained FP intrinsics were not on that list, so a
stub was created with the intrinsic's signature, including its metadata
parameters, and the module failed verification.

Treat constrained FP intrinsics like the unconstrained operations they
correspond to.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+45-0llvm/test/CodeGen/Mips/mips16-hf-strictfp.ll
+4-0llvm/lib/Target/Mips/Mips16HardFloat.cpp
+49-02 files

LLVM/project 9aafaa3 — llvm/lib/Target/AArch64/MCTargetDesc AArch64MCAsmInfo.cpp, llvm/lib/Target/ARM/MCTargetDesc ARMMCAsmInfo.cpp

[spr] initial version

Created using spr 2.0.0-beta.2
DeltaFile
+54-60llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp
+40-32llvm/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp
+30-30llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp
+23-23llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp
+20-20llvm/lib/Target/Lanai/MCTargetDesc/LanaiMCAsmInfo.cpp
+13-20llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCAsmInfo.cpp
+180-18523 files not shown
+255-34029 files

LLVM/project 4092f92 — llvm/include/llvm/MC MCSectionCOFF.h MCAsmInfo.h, llvm/lib/MC MCAsmInfo.cpp MCAsmInfoCOFF.cpp

[MC][NFC] Remove virtual shouldOmitSectionDirective (#246682)

Remove the virtual hook shouldOmitSectionDirective in favor of a small
string set of section names that can be used without a .section
directive in MCAsmInfo. Also fold UsesELFSectionDirectiveForBSS into
this set and require explicit addition of .bss, as most targets do not
support .bss without .section.
DeltaFile
+7-18llvm/include/llvm/MC/MCAsmInfo.h
+7-12llvm/lib/MC/MCAsmInfoCOFF.cpp
+5-10llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp
+0-11llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.h
+0-6llvm/lib/MC/MCAsmInfo.cpp
+0-4llvm/include/llvm/MC/MCSectionCOFF.h
+19-6124 files not shown
+43-9230 files

LLVM/project 92335b1 — llvm/lib/Support KnownFPClass.cpp

[KnownFPClass][NFC] Separate the negative zero deductions in sinh/tanh/asin (#246172)

Refactors `KnownFPClass::sinh/tanh/asin` so that they rule out
`fcNegZero` in a separate/dedicated clause. In general, these functions
are sign-preserving but have extra complexities when ruling out
-0.0/+0.0 (due to denormal flushing, and compensating for low quality
`libm` implementations), which is why these functions only attempt to
rule out -0.0 but not +0.0.

This also makes it more clear where `nsz` is applicable for
https://github.com/llvm/llvm-project/pull/241661
DeltaFile
+12-8llvm/lib/Support/KnownFPClass.cpp
+12-81 files

LLVM/project fad1241 — flang/docs Aliasing.md, flang/lib/Lower ConvertVariable.cpp Bridge.cpp

[flang] Mark all visible Cray pointer targets (#241388)

When a Cray pointer is set to a variable's address, flang gives that
variable the TARGET attribute so alias analysis knows the pointee can
modify it. It only caught `ptr = loc(x)` with nothing else on the
right-hand side, and it only marked `x`.

This patch marks anything passed to LOC or %LOC anywhere in the
procedure, its host or their internal procedures, however the result
is used. It also marks the variable behind an ASSOCIATE name,
everything that shares storage with a marked variable through
EQUIVALENCE or COMMON, and assumed-shape dummies, which were missed
before.

This fixes an EQUIVALENCE case that is already wrong at -O1 on main,
and it is needed before #230699 can remove the runtime call on
pointee references.

Assisted-by: Claude Code

    [3 lines not shown]
DeltaFile
+202-4flang/test/Lower/HLFIR/visible-cray-pointer-target.f90
+143-54flang/lib/Lower/Bridge.cpp
+6-0flang/docs/Aliasing.md
+2-0flang/lib/Lower/ConvertVariable.cpp
+353-584 files