LLVM/project 12de945llvm/include/llvm/Analysis TargetTransformInfo.h

[InferAS][NFC] Improve documentation for getAddrSpaceCastPreservedPtrMask (#185239)

Clarify the description of the preserved pointer bit mask and its
purpose in address space inference. Reformat the example for better
readability.

Co-authored-by: Yuanke Luo <ykluo at birentech.com>
DeltaFile
+13-7llvm/include/llvm/Analysis/TargetTransformInfo.h
+13-71 files

LLVM/project c400db3llvm/test/Analysis/DependenceAnalysis weak-zero-siv-overflow.ll

[DA] Fix test case for the Weak Zero SIV tests (NFC) (#185555)

The IR does not match the pseudo code. The pseudo code is intentional,
so update the IR accordingly.
DeltaFile
+1-1llvm/test/Analysis/DependenceAnalysis/weak-zero-siv-overflow.ll
+1-11 files

LLVM/project 9a89af9lldb/test/Shell/ScriptInterpreter/Python python-bytecode.test

[lldb] Update test diff invocation for portability (#185557)

Use --strip-trailing-cr to ignore line ending differences. Fixes
failures on windows.
DeltaFile
+1-1lldb/test/Shell/ScriptInterpreter/Python/python-bytecode.test
+1-11 files

LLVM/project 5111b03llvm/lib/Target/RISCV RISCVISelLowering.cpp

Use std::swap

Created using spr 1.3.6-beta.1
DeltaFile
+8-15llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+8-151 files

LLVM/project 88bd3f4clang/lib/Basic DiagnosticIDs.cpp, clang/test/Misc diag-mapping.c

[clang] Adjust -pedantic-errors -WX/-Wno-error=X interaction (#184756)

While -Wno-long-long suppresses -pedantic-errors diagnostics in both GCC
and Clang, GCC -Wno-error=long-long emits warnings while Clang still
emits errors.

```
% echo 'long long x = 0;' | gcc -std=c89 -pedantic-errors -Wno-error=long-long -x c -fsyntax-only -
<stdin>:1:6: warning: ISO C90 does not support 'long long' [-Wlong-long]
% echo 'long long x = 0;' | clang -std=c89 -pedantic-errors -Wno-error=long-long -x c -fsyntax-only -
<stdin>:1:1: error: 'long long' is an extension when C99 mode is not enabled [-Werror,-Wlong-long]
    1 | long long x = 0;
      | ^
1 error generated.
```

The order of -pedantic-errors and -Wno-error=long-long does not matter.

Two fixes to how extension diagnostics interact with -pedantic-errors

    [20 lines not shown]
DeltaFile
+10-3clang/lib/Basic/DiagnosticIDs.cpp
+7-2clang/test/Misc/diag-mapping.c
+17-52 files

LLVM/project c5ae919llvm/test/CodeGen/AArch64 clmul-fixed.ll, llvm/test/MC/AMDGPU gfx1170_asm_vop3_dpp16.s gfx1170_asm_vop3.s

Merge branch 'main' into users/ssahasra/const-ast-context
DeltaFile
+853-1,663llvm/test/CodeGen/AArch64/clmul-fixed.ll
+1,273-36llvm/test/MC/AMDGPU/gfx1170_asm_vop3_dpp16.s
+1,219-12llvm/test/MC/AMDGPU/gfx1170_asm_vop3.s
+1,081-0llvm/test/MC/AMDGPU/gfx1170_asm_vop3-fake16.s
+1,054-0llvm/test/MC/AMDGPU/gfx1170_asm_vop3_dpp16-fake16.s
+1,010-16llvm/test/MC/AMDGPU/gfx1170_asm_vop3_dpp8.s
+6,490-1,727683 files not shown
+26,899-7,422689 files

LLVM/project 24bf26cclang/test/CodeGenHLSL/groupsharedArgs TemplateTest.hlsl Overloads.hlsl, clang/test/SemaHLSL/Language/groupsharedArgs InOut.hlsl ExplicitCast.hlsl

[HLSL] Add support for groupshared args (#181886)

Add support for groupshared args to HLSL.
Some support for template errors and warnings still needs to be added in
a follow up (tracked by #182535)
Closes #174472
DeltaFile
+90-0clang/test/SemaHLSL/Language/groupsharedArgs/InOut.hlsl
+55-0clang/test/CodeGenHLSL/groupsharedArgs/TemplateTest.hlsl
+38-0clang/test/CodeGenHLSL/groupsharedArgs/Overloads.hlsl
+31-0clang/test/SemaHLSL/Language/groupsharedArgs/ExplicitCast.hlsl
+30-0clang/test/SemaHLSL/Language/groupsharedArgs/ScalarTest.hlsl
+28-0clang/test/SemaHLSL/Language/groupsharedArgs/Pre202xWarning.hlsl
+272-016 files not shown
+475-1522 files

LLVM/project 018acc6libunwind/src libunwind.cpp, libunwind/test cfi_violating_handler.pass.cpp

[libunwind][PAC] Defang ptrauth's PC in valid CFI range abort

It turns out making the CFI check a release mode abort causes many,
if not the majority, of JITs to fail during unwinding as they do not
set up CFI sections for their generated code. As a result any JITs
that do nominally support unwinding (and catching) through their JIT
or assembly frames trip this abort.

rdar://170862047
DeltaFile
+53-0libunwind/test/cfi_violating_handler.pass.cpp
+11-17libunwind/src/libunwind.cpp
+64-172 files

LLVM/project 4e986efllvm/lib/Analysis DependenceAnalysis.cpp, llvm/test/Analysis/DependenceAnalysis weak-zero-siv-delta-signed-min.ll

[DA] Fix the Weak Zero SIV tests when Delta is a signed minimum.
DeltaFile
+33-4llvm/lib/Analysis/DependenceAnalysis.cpp
+6-6llvm/test/Analysis/DependenceAnalysis/weak-zero-siv-delta-signed-min.ll
+39-102 files

LLVM/project e253867llvm/test/Analysis/DependenceAnalysis weak-zero-siv-delta-signed-min.ll

[DA] Add tests for the Weak Zero SIV tests miss dependency (NFC)
DeltaFile
+111-0llvm/test/Analysis/DependenceAnalysis/weak-zero-siv-delta-signed-min.ll
+111-01 files

LLVM/project 72c8d8allvm/include/llvm/Analysis DependenceAnalysis.h, llvm/lib/Analysis DependenceAnalysis.cpp

[DA] Rewrite formula in the Weak Zero SIV tests
DeltaFile
+31-36llvm/lib/Analysis/DependenceAnalysis.cpp
+8-8llvm/test/Analysis/DependenceAnalysis/weak-zero-siv-large-btc.ll
+4-8llvm/include/llvm/Analysis/DependenceAnalysis.h
+2-6llvm/test/Analysis/DependenceAnalysis/weak-zero-siv-overflow.ll
+45-584 files

LLVM/project 29cb6f0clang/lib/CodeGen CodeGenFunction.h CGHLSLRuntime.cpp

[Clang] Track alloca element types to avoid getAllocatedType() calls (#181740)

Store alloca element types alongside alloca pointers in Clang's CodeGen,
eliminating the need to query getAllocatedType() later.

Changes:
- CodeGenFunction.h: Modified DominatingLLVMValue::saved_type to track
type Uses Type==nullptr as sentinel for "not saved" instead of separate
bool. Fixes a bug where it previously tried to use the addrspacecasted
value constructor and later cast it to an alloca.
- CGHLSLRuntime.cpp: Changed OutputSemantic map to store (Value*, Type*)
pairs to trivially remove getAllocatedType calls.

Co-authored-by: Claude Sonnet 4.5 <noreply at anthropic.com>
DeltaFile
+23-12clang/lib/CodeGen/CodeGenFunction.h
+9-6clang/lib/CodeGen/CGHLSLRuntime.cpp
+32-182 files

LLVM/project eebc390llvm/lib/Analysis DependenceAnalysis.cpp, llvm/test/Analysis/DependenceAnalysis weak-zero-siv-overflow.ll

[DA] Fix overflows when calculating Delta in the Weak Zero SIV tests (#184997)

Add overflow checks when computing `Delta` in the Weak Zero SIV tests.
The tests bail out if we cannot prove that the `Delta` computation does
not overflow. These calculations are also moved later so that some
analyses that do not require these checks can run first.

Fix part of the test cases added in #164246.
DeltaFile
+8-4llvm/lib/Analysis/DependenceAnalysis.cpp
+4-7llvm/test/Analysis/DependenceAnalysis/weak-zero-siv-overflow.ll
+12-112 files

LLVM/project 3545e51llvm/lib/Target/AMDGPU AMDGPULowerKernelAttributes.cpp, llvm/lib/Target/AMDGPU/Utils AMDGPUBaseInfo.h AMDGPUBaseInfo.cpp

Revert "AMDGPU: Annotate group size ABI loads with range metadata (#185420)" (#185521)

This reverts commit 76daf31b4000623d5c9548348a859ea3ed8712e1.

Bot failure.
DeltaFile
+15-122llvm/test/CodeGen/AMDGPU/implicit-arg-v5-opt.ll
+19-48llvm/lib/Target/AMDGPU/AMDGPULowerKernelAttributes.cpp
+7-8llvm/test/CodeGen/AMDGPU/amdgpu-max-num-workgroups-load-annotate.ll
+7-8llvm/test/CodeGen/AMDGPU/implicit-arg-block-count.ll
+2-5llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
+5-0llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+55-1912 files not shown
+57-1938 files

LLVM/project 34b2de9lld/MachO ConcatOutputSection.h ConcatOutputSection.cpp, lld/test/MachO arm64-thunk-icf-body-dedup.s

[lld][MachO] Deduplicate branch-extension thunks for ICF-folded symbols (#185396)

After ICF, multiple symbols may resolve to the same address but remain
as distinct Symbol pointers. When used as keys in thunkMap, this caused
redundant branch-extension thunks to be created for the same target. Fix
this by providing a custom DenseMapInfo for thunkMap that hashes and
compares Defined symbols by (isec, value) instead of pointer identity.
DeltaFile
+80-0lld/test/MachO/arm64-thunk-icf-body-dedup.s
+27-3lld/MachO/ConcatOutputSection.h
+1-1lld/MachO/ConcatOutputSection.cpp
+108-43 files

LLVM/project 2c21266bolt/include/bolt/Passes DataflowAnalysis.h

[BOLT] Speed up dataflow analysis with RPO (#183704)
DeltaFile
+33-14bolt/include/bolt/Passes/DataflowAnalysis.h
+33-141 files

LLVM/project 44fd3fdllvm/test/CodeGen/AArch64 fp-maximumnum-minimumnum.ll clmul-fixed.ll, llvm/test/CodeGen/X86 wide-scalar-shift-by-byte-multiple-legalization.ll andnot-sink-not.ll

Merge branch 'main' into users/kasuga-fj/da-fix-weak-zero-siv-delta-ovfl
DeltaFile
+1,561-2,812llvm/test/CodeGen/X86/wide-scalar-shift-by-byte-multiple-legalization.ll
+2,071-1,930llvm/test/CodeGen/AArch64/fp-maximumnum-minimumnum.ll
+3,114-0llvm/test/CodeGen/X86/andnot-sink-not.ll
+969-2,001llvm/test/CodeGen/X86/bit-manip-i512.ll
+853-1,663llvm/test/CodeGen/AArch64/clmul-fixed.ll
+538-1,357llvm/test/CodeGen/X86/shift-i512.ll
+9,106-9,7631,961 files not shown
+72,474-34,8041,967 files

LLVM/project 23cf668llvm/test/Analysis/CostModel/AMDGPU exp2.ll exp10.ll, llvm/test/CodeGen/AArch64 clmul-fixed.ll

Merge branch 'main' into users/arsenm/revert-185420
DeltaFile
+853-1,663llvm/test/CodeGen/AArch64/clmul-fixed.ll
+192-192llvm/test/Analysis/CostModel/AMDGPU/exp2.ll
+192-192llvm/test/Analysis/CostModel/AMDGPU/exp10.ll
+192-192llvm/test/Analysis/CostModel/AMDGPU/exp.ll
+243-48llvm/test/CodeGen/WebAssembly/simd-reductions.ll
+68-87llvm/test/CodeGen/X86/clmul-vector.ll
+1,740-2,37455 files not shown
+2,716-2,66361 files

LLVM/project c6bde83clang/lib/AST TypePrinter.cpp, clang/test/AST/HLSL ByteAddressBuffers-AST.hlsl Texture2D-vector-AST.hlsl

[HLSL] Fix interleaved vector and matrix return types in AST dump (#184888)

HLSL vector and matrix types were previously printed with their closing
syntax (', N>') in 'printAfter', causing them to interleave with
function
parameters when used as return types (e.g., 'vector<float (args), 4>').

This change moves the HLSL vector and matrix closing syntax into
'printBefore' when 'UseHLSLTypes' is enabled, ensuring the type is
printed completely before the parameter list.

Note that address space qualifiers are now printed after the type
(e.g., 'vector<float, 4>hlsl_device'). This is because
'canPrefixQualifiers' in 'TypePrinter.cpp' returns false for these
types.
We cannot easily change this to check 'UseHLSLTypes' because
'canPrefixQualifiers' is a static method and does not have access to the
PrintingPolicy at that point.


    [4 lines not shown]
DeltaFile
+56-40clang/lib/AST/TypePrinter.cpp
+30-30clang/test/AST/HLSL/ByteAddressBuffers-AST.hlsl
+27-27clang/test/AST/HLSL/Texture2D-vector-AST.hlsl
+16-16clang/test/AST/HLSL/Texture2D-scalar-AST.hlsl
+5-5clang/test/AST/HLSL/pch_with_matrix_element_accessor.hlsl
+3-3clang/test/SemaHLSL/Types/BuiltinMatrix/MatrixFloatPrecisionWarnings.hlsl
+137-1215 files not shown
+143-12711 files

LLVM/project 51aad69llvm/lib/CodeGen/AsmPrinter DwarfCompileUnit.cpp DwarfDebug.h, llvm/lib/Target/NVPTX NVPTXDwarfDebug.cpp NVPTXDwarfDebug.h

[NFC] Migrate NVPTX specific debug info code to separate class

This refactors the dwarf emission code to pull out the rest of the NVPTX specific code into it's own subclass for debug info handling and architecture specific differences.

Tested with ninja check-all on OSX.
DeltaFile
+97-2llvm/lib/Target/NVPTX/NVPTXDwarfDebug.cpp
+14-68llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+39-1llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
+7-22llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+19-8llvm/lib/Target/NVPTX/NVPTXDwarfDebug.h
+1-1llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
+177-1026 files

LLVM/project 4095ac9clang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/CodeGen CIRGenBuiltin.cpp CIRGenCall.cpp

[CIR][CIRGen] Upstream support for `__builtin_bcopy` (#185038)

This adds CIR support for the bcopy builtin.
DeltaFile
+116-0clang/test/CIR/CodeGenBuiltins/builtin-bcopy.cpp
+29-1clang/include/clang/CIR/Dialect/IR/CIROps.td
+12-2clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
+9-0clang/lib/CIR/CodeGen/CIRGenCall.cpp
+9-0clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+7-0clang/lib/CIR/CodeGen/CIRGenFunction.h
+182-31 files not shown
+187-37 files

LLVM/project 27e7502llvm/test/CodeGen/AArch64 fp-maximumnum-minimumnum.ll, llvm/test/CodeGen/X86 wide-scalar-shift-by-byte-multiple-legalization.ll andnot-sink-not.ll

Merge branch 'main' into users/s-perron/fix-vector-type-printer
DeltaFile
+1,561-2,812llvm/test/CodeGen/X86/wide-scalar-shift-by-byte-multiple-legalization.ll
+2,071-1,930llvm/test/CodeGen/AArch64/fp-maximumnum-minimumnum.ll
+3,114-0llvm/test/CodeGen/X86/andnot-sink-not.ll
+969-2,001llvm/test/CodeGen/X86/bit-manip-i512.ll
+538-1,357llvm/test/CodeGen/X86/shift-i512.ll
+1,273-36llvm/test/MC/AMDGPU/gfx1170_asm_vop3_dpp16.s
+9,526-8,1361,961 files not shown
+75,334-34,0311,967 files

LLVM/project 1b396eeutils/bazel/llvm-project-overlay/libc BUILD.bazel

[Bazel] Fix 6a6564cd1476270e9342b6be0792109516ddd99c

Introduced a new header/dependencies on said header.
DeltaFile
+6-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+6-01 files

LLVM/project 982beb1clang/lib/Basic/Targets SPIR.h, clang/test/Sema scoped-atomic-ops.c

[SPIR] Do not warn on 64-bit atomics (#185502)

Summary:
SPIR-V's Int64Atomics capability is not dependent on its addressing mode
as far as I am aware. These 32-bit SPIR targets already claim to support
the cl_khr_int64 atomics and we already emit 64-bit atomics in the
backend. Additionally, this is already accepted as a hack due to the
fact that the host will increase it in offloading usage. I do not see a
reason to keep these at 32, which causes numerous warnings inside of the
`libclc` build.
DeltaFile
+5-0clang/test/Sema/scoped-atomic-ops.c
+2-2clang/lib/Basic/Targets/SPIR.h
+7-22 files

LLVM/project 0b5c16blibclc/opencl/lib/amdgcn/printf __printf_alloc.cl, libclc/opencl/lib/generic/atomic atomic_fetch_add.cl atomic_fetch_sub.cl

[libclc] Replace last of `opencl` atomics with `__scoped_` versions (#185515)

Summary:
These were the only uses of the old atomics. The old definition guards
stay as those prevent us from compiling the unsupported uintptr_t atomic
type on nvptx which does not define it. Could probably be improved
later.
DeltaFile
+6-6libclc/opencl/lib/generic/atomic/atomic_fetch_add.cl
+6-6libclc/opencl/lib/generic/atomic/atomic_fetch_sub.cl
+5-5libclc/opencl/lib/amdgcn/printf/__printf_alloc.cl
+17-173 files

LLVM/project 367569ellvm/lib/CodeGen/SelectionDAG TargetLowering.cpp, llvm/test/CodeGen/AArch64 clmul-fixed.ll

[SelectionDAG] Use ExpandIntRes_CLMUL  to expand vector CLMUL via  narrower legal types (#184468)

Reuse the ExpandIntRes_CLMUL identity to expand vector
CLMUL/CLMULR/CLMULH on wider element types (vXi16, vXi32, vXi64) by
decomposing into half-element-width operations that eventually reach a
legal CLMUL type.

Three generic strategies in expandCLMUL:
1. Halve: halve element width (e.g. v8i16 -> v8i8 on AArch64)
2. promote to double : zext to wider type if CLMUL is legal there (e.g.
x86)
3. Count widen: pad with undef to double element count (e.g. v4i16 ->
v8i16)

A helper canNarrowCLMULToLegal() guides strategy selection and prevents
circular expansion in the CLMULH bitreverse path.

Also add Custom BITREVERSE lowering for v4i16/v8i16 on AArch64 using
REV16+RBIT, which the CLMULH expansion relies on.

Fixes #183768
DeltaFile
+853-1,663llvm/test/CodeGen/AArch64/clmul-fixed.ll
+68-87llvm/test/CodeGen/X86/clmul-vector.ll
+143-10llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+1,064-1,7603 files

LLVM/project 1324ea1llvm/lib/Target/WebAssembly WebAssemblyInstrSIMD.td, llvm/test/CodeGen/WebAssembly simd-reductions.ll simd-memcmp.ll

[WebAssembly] Fold any/alltrue SIMD boolean reductions with eqz (#184704)

Existing ISel patterns match setne/seteq following SIMD boolean reductions
any_true and all_true, and drop the ones that are redundant (because the
reductions always return 1 or 0). This adds patterns to also produce eqz
instructions instead of a comparison with a const.
DeltaFile
+243-48llvm/test/CodeGen/WebAssembly/simd-reductions.ll
+1-2llvm/test/CodeGen/WebAssembly/simd-memcmp.ll
+2-0llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
+246-503 files

LLVM/project 331a91cllvm/lib/Target/AMDGPU AMDGPULowerVGPREncoding.cpp

[NFC][AMDGPU] Add debug print to `AMDGPULowerVGPREncoding.cpp` (#185331)
DeltaFile
+91-3llvm/lib/Target/AMDGPU/AMDGPULowerVGPREncoding.cpp
+91-31 files

LLVM/project a8b726aflang-rt/lib/runtime execute.cpp, flang-rt/unittests/Runtime CommandTest.cpp

[flang-rt] Need to pad the output of execute_command_line(..., CMDMSG) (#185509)

Previously the error message was copied, but not padded for cases where
the message was shorter than the passed CMDMSG string. Add the padding
and also change the test case to test padding on all platforms.
DeltaFile
+12-5flang-rt/unittests/Runtime/CommandTest.cpp
+4-8flang-rt/lib/runtime/execute.cpp
+16-132 files

LLVM/project f2dc489llvm/test/Analysis/CostModel/AMDGPU exp.ll exp10.ll

[AMDGPU] Replace undef with poison in exp/exp2/exp10 cost tests NFC (#185527)
DeltaFile
+192-192llvm/test/Analysis/CostModel/AMDGPU/exp.ll
+192-192llvm/test/Analysis/CostModel/AMDGPU/exp10.ll
+192-192llvm/test/Analysis/CostModel/AMDGPU/exp2.ll
+576-5763 files