LLVM/project 3aeea10libclc/clc/lib/generic/math clc_erfc.cl clc_erfc.inc

libclc: Update erfc (#188570)

This was originally ported from rocm device libs in
2cf4d5f31204c873d76953bfe3c8b5602b29e789. Merge in more
recent changes.
DeltaFile
+5-507libclc/clc/lib/generic/math/clc_erfc.cl
+221-0libclc/clc/lib/generic/math/clc_erfc.inc
+226-5072 files

LLVM/project 2f11484libclc/clc/lib/generic/math clc_erf.cl clc_erf.inc

libclc: Update erf (#188569)

This was originally ported from rocm device libs in
c374cb76f467f01a3f60740703f995a0e1f7a89a. Merge in more
recent changes. Also enables vectorization.
DeltaFile
+5-496libclc/clc/lib/generic/math/clc_erf.cl
+208-0libclc/clc/lib/generic/math/clc_erf.inc
+213-4962 files

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

address review comments
DeltaFile
+23-36llvm/lib/Analysis/DependenceAnalysis.cpp
+5-4llvm/include/llvm/Analysis/DependenceAnalysis.h
+28-402 files

LLVM/project e69c731clang/test/CodeGenOpenCL builtins-amdgcn-gfx1250-wmma-w32.cl, llvm/lib/IR AutoUpgrade.cpp

[AMDGPU] Disable neg_lo[0:1] and neg_hi[0:1] on wmma_f32_16x16x32_bf16 (#188649)

This is the pilot change, the rest will follow the same idea.
DeltaFile
+46-46clang/test/CodeGenOpenCL/builtins-amdgcn-gfx1250-wmma-w32.cl
+53-31llvm/lib/Target/AMDGPU/VOP3PInstructions.td
+30-30llvm/test/CodeGen/AMDGPU/wmma-nop-hoisting.mir
+51-9llvm/lib/IR/AutoUpgrade.cpp
+4-52llvm/test/CodeGen/AMDGPU/llvm.amdgcn.wmma.imod.gfx1250.w32.ll
+20-20llvm/test/CodeGen/AMDGPU/wmma-coexecution-valu-hazards.mir
+204-18813 files not shown
+268-21519 files

LLVM/project a0181d0llvm/lib/Target/AArch64 AArch64TargetTransformInfo.cpp, llvm/test/CodeGen/AArch64 neon-bitwise-instructions.ll logical-op-with-not.ll

[AArch64] Sink NOT to be fold into BIC/ORN/EON (#176194)

Undoes a negation being hoisted out of a loop, so that if can be fold
into an inverted bitwise operation in the loop.

Implements #108840 on AArch64
DeltaFile
+664-0llvm/test/CodeGen/AArch64/neon-bitwise-instructions.ll
+418-0llvm/test/CodeGen/AArch64/logical-op-with-not.ll
+362-1llvm/test/CodeGen/AArch64/sve-int-log.ll
+47-0llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+1,491-14 files

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

[DA] Fix overflow of calculation in weakCrossingSIVtest

This patch fixes a correctness issue where integer overflow in the
upper bound calculation of weakCrossingSIVtest caused the pass to
incorrectly prove independence.

The previous logic used `SCEV::getMulExpr` to calculate
`2 * ConstCoeff * UpperBound` and compared it to `Delta` using
`isKnownPredicate`. In the presence of overflow, this could yield
unsafe results.

This change replaces the SCEV arithmetic with `ConstantRange` and
its operation (`smul_fast`). If the calculation overflows,
`intersectWith(MLRange).isEmptySet()` would be false, ensures we
conservatively assume a dependence if the bounds cannot be proven
safe.

Signed-off-by: Ruoyu Qiu <cabbaken at outlook.com>
DeltaFile
+12-6llvm/lib/Analysis/DependenceAnalysis.cpp
+2-2llvm/test/Analysis/DependenceAnalysis/weak-crossing-siv-overflow.ll
+14-82 files

LLVM/project 9247950llvm/lib/Analysis DependenceAnalysis.cpp

[DA] Hoist division check for early exit in weakCrossingSIVtest (NFC)

This patch moves the check that `Coeff` divides `Delta` earlier in the
function to enable an early exit. Potentially improve performance.

Signed-off-by: Ruoyu Qiu <cabbaken at outlook.com>
DeltaFile
+21-21llvm/lib/Analysis/DependenceAnalysis.cpp
+21-211 files

LLVM/project 4651faallvm/lib/Analysis DependenceAnalysis.cpp, llvm/test/Analysis/DependenceAnalysis rdiv-large-btc.ll

[DA] Add precondition `0 <=s UB` to function `inferAffineDomain`
DeltaFile
+23-12llvm/lib/Analysis/DependenceAnalysis.cpp
+2-2llvm/test/Analysis/DependenceAnalysis/rdiv-large-btc.ll
+25-142 files

LLVM/project 8e2a5e3llvm/include/llvm/Analysis DependenceAnalysis.h, llvm/lib/Analysis DependenceAnalysis.cpp

[DA] Consolidate the core logic of the Weak Zero SIV tests (NFCI) (#185577)

There have existed two functions `weakZeroSrcSIVtest` and
`weakZeroDstSIVtest`, which are almost identical, except for some minor
differences (e.g., the Direction to be updated). This patch consolidates
the shared core logic into a single function `weakZeroSIVtestImpl` then
calls it from both `weakZeroSrcSIVtest` and `weakZeroDstSIVtest`,
passing the appropriate parameters to handle the differences. This
reduces code duplication and improves maintainability.
DeltaFile
+80-124llvm/lib/Analysis/DependenceAnalysis.cpp
+5-0llvm/include/llvm/Analysis/DependenceAnalysis.h
+85-1242 files

LLVM/project 3009211flang/include/flang/Optimizer/Passes Pipelines.h, flang/lib/Frontend FrontendActions.cpp

[LLVM-Flang] Add support for -fdebug-info-for-profiling option (#188022)

Added support for option "-fdebug-info-for-profiling" in flang.

- When the option `-fdebug-info-for-profiling` option is passed, 
compiler sets the `DebugInfoForProfiling` flag and triggers the
`AddDiscriminatorsPass`. This pass inserts additional debug metadata,
specifically discriminator values into the IR to improve the profiling
precision.
- Additionally `-add-debug-info` pass has been updated to emit an extra
field, `debugInfoForProfiling: true` inside the generated DICompileUnit
metadata node.
DeltaFile
+23-23mlir/test/Target/LLVMIR/llvmir-debug.mlir
+34-0flang/test/Driver/fdebug-info-for-profiling.f90
+13-21flang/lib/Optimizer/Passes/Pipelines.cpp
+32-0flang/test/Integration/debug-info-for-profiling.f90
+15-9flang/lib/Frontend/FrontendActions.cpp
+4-10flang/include/flang/Optimizer/Passes/Pipelines.h
+121-6320 files not shown
+170-8526 files

LLVM/project f2f9459lldb/source/Target Thread.cpp

[lldb] Protect frame provider construction from re-entrant frame access

When a scripted frame provider calls HandleCommand or other
frame-accessing APIs during __init__, GetStackFrameList() re-enters
without the re-entrancy guard, causing infinite recursion. On Windows
(1MB default stack), this results in a stack overflow (0xC00000FD)
before Python's recursion limit can intervene.

The existing PushProviderFrameList/PopProviderFrameList guard only
protected GetFrameAtIndex calls in FetchFramesUpTo. This wraps the
CreateInstance call in LoadScriptedFrameProvider with the same guard
so that provider construction is also protected.

Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>
DeltaFile
+7-0lldb/source/Target/Thread.cpp
+7-01 files

LLVM/project 8f195e7llvm/test/CodeGen/X86 vector-interleaved-store-i64-stride-7.ll vector-interleaved-store-i64-stride-6.ll

Merge branch 'main' into users/kasuga-fj/da-refactor-weak-zero-siv-tests
DeltaFile
+4,978-4,984llvm/test/CodeGen/X86/vector-interleaved-store-i64-stride-7.ll
+4,590-4,623llvm/test/CodeGen/X86/vector-interleaved-store-i64-stride-6.ll
+3,850-4,310llvm/test/CodeGen/X86/vector-interleaved-load-i8-stride-8.ll
+3,562-3,632llvm/test/CodeGen/X86/vector-interleaved-load-i16-stride-8.ll
+2,430-2,474llvm/test/CodeGen/X86/vector-interleaved-load-i8-stride-7.ll
+1,815-1,852llvm/test/CodeGen/X86/vector-interleaved-load-i16-stride-7.ll
+21,225-21,8751,274 files not shown
+58,767-41,8181,280 files

LLVM/project 74ece21lld/wasm SyntheticSections.cpp

Fix lld/wasm/SyntheticSections.cpp after SyntheticSections.h #undef

SyntheticSections.cpp uses LLVM_DEBUG but had no #define DEBUG_TYPE,
relying on the leaked "lld" from SyntheticSections.h. Add an
explicit #define DEBUG_TYPE.
DeltaFile
+2-0lld/wasm/SyntheticSections.cpp
+2-01 files

LLVM/project 25904accompiler-rt/lib/sanitizer_common sanitizer_unwind_aix.cpp CMakeLists.txt

[sanitizer_common] Implement address sanitizer on AIX: stack unwinding (#138188)

Implement unwind.h-based stack unwinding routines on AIX.

Issue: https://github.com/llvm/llvm-project/issues/138916
DeltaFile
+68-0compiler-rt/lib/sanitizer_common/sanitizer_unwind_aix.cpp
+1-0compiler-rt/lib/sanitizer_common/CMakeLists.txt
+69-02 files

LLVM/project 36aef4blld/test/ELF merge-piece-oob.s relocation-past-merge-end.s

[ELF,test] Combine merge section out-of-bounds tests into merge-piece-oob.s (#188688)
DeltaFile
+39-0lld/test/ELF/merge-piece-oob.s
+0-17lld/test/ELF/relocation-past-merge-end.s
+0-9lld/test/ELF/relocation-before-merge-start.s
+39-263 files

LLVM/project be63993lld/wasm Relocations.cpp

Fix lld/wasm/Relocations.cpp after SyntheticSections.h #undef

Relocations.cpp uses LLVM_DEBUG but had no #define DEBUG_TYPE,
relying on the leaked "lld" from SyntheticSections.h. Add an
explicit #define DEBUG_TYPE.
DeltaFile
+2-0lld/wasm/Relocations.cpp
+2-01 files

LLVM/project dfab4fbllvm/lib/Target/RISCV RISCVFrameLowering.cpp RISCVFeatures.td, llvm/test/CodeGen/RISCV spacemitx60-stack-reorder.ll

[RISCV] Add TunePreferAscendingLoadStore for SpacemiT X60 LD/ST fusion (#186967)

Add a tune feature that reverses the callee-saved register spill/restore
order so that addresses are ascending, enabling LD/ST fusion on
processors like SpacemiT X60.

Co-authored-by: LiqinWeng <liqin.weng at spacemit.com>
Co-authored-by: Claude Opus 4.6 <noreply at anthropic.com>
DeltaFile
+58-0llvm/test/CodeGen/RISCV/spacemitx60-stack-reorder.ll
+27-12llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
+21-12llvm/unittests/TargetParser/RISCVTargetParserTest.cpp
+16-16llvm/test/CodeGen/RISCV/rvv/vxrm-insert-out-of-loop.ll
+6-0llvm/lib/Target/RISCV/RISCVFeatures.td
+2-1llvm/lib/Target/RISCV/RISCVProcessors.td
+130-411 files not shown
+131-417 files

LLVM/project 28497b7llvm/lib/Target/AMDGPU AMDGPUPromoteAlloca.cpp, llvm/test/CodeGen/AMDGPU promote-alloca-proper-value-replacement.ll

AMDGPU: Make VarIndex a WeakVH in AMDGPUPromoteAlloca (#188662)

The VarIndex might come from (like load) another alloca which maybe
promoted before. The value will replaced in this case. WeakVH correctly
handles this.
DeltaFile
+29-0llvm/test/CodeGen/AMDGPU/promote-alloca-proper-value-replacement.ll
+1-1llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+30-12 files

LLVM/project aa7a05allvm/lib/IR DebugInfo.cpp Instructions.cpp

Fix DebugInfo.cpp and Instructions.cpp after ConstantsContext.h #undef

Both files were relying on DEBUG_TYPE "ir" leaked from
ConstantsContext.h. Add explicit #define DEBUG_TYPE to each file.
DeltaFile
+3-1llvm/lib/IR/DebugInfo.cpp
+2-0llvm/lib/IR/Instructions.cpp
+5-12 files

LLVM/project 2ae8f2fllvm/lib/CodeGen TypePromotion.cpp, llvm/lib/Target/AArch64 AArch64ISelDAGToDAG.cpp AArch64SRLTDefineSuperRegs.cpp

Add #undef PASS_NAME to all files that define it

43 source files define a PASS_NAME macro that is never undefined,
which can leak into subsequent translation units in unity builds.
Add #undef PASS_NAME at the end of each file.
DeltaFile
+2-0llvm/lib/CodeGen/TypePromotion.cpp
+2-0llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
+2-0llvm/lib/Target/AArch64/AArch64SRLTDefineSuperRegs.cpp
+2-0llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp
+2-0llvm/lib/Target/ARC/ARCISelDAGToDAG.cpp
+2-0llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
+12-037 files not shown
+86-043 files

LLVM/project 3894ddemlir/lib/Dialect/SparseTensor/Transforms/Utils LoopEmitter.cpp SparseTensorIterator.cpp

[SparseTensor] Add missing #undef REMUI and DIVUI

LoopEmitter.cpp and SparseTensorIterator.cpp define REMUI and DIVUI
macros but the existing #undef block at the end of each file omits
them. This can leak the macros into subsequent translation units in
unity builds.
DeltaFile
+2-0mlir/lib/Dialect/SparseTensor/Transforms/Utils/LoopEmitter.cpp
+2-0mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.cpp
+4-02 files

LLVM/project cc82aecmlir/lib/Dialect/SparseTensor/IR/Detail DimLvlMapParser.cpp LvlTypeParser.cpp

[SparseTensor] Add #undef FAILURE_IF_FAILED and ERROR_IF

Both DimLvlMapParser.cpp and LvlTypeParser.cpp define FAILURE_IF_FAILED
and ERROR_IF macros that are never undefined, which can leak into
subsequent translation units in unity builds. Add #undef at the end
of each file.
DeltaFile
+3-0mlir/lib/Dialect/SparseTensor/IR/Detail/DimLvlMapParser.cpp
+3-0mlir/lib/Dialect/SparseTensor/IR/Detail/LvlTypeParser.cpp
+6-02 files

LLVM/project 65f7e02llvm/lib/Object COFFObjectFile.cpp WindowsResource.cpp, llvm/tools/llvm-rc ResourceFileWriter.cpp ResourceScriptParser.cpp

Add #undef RETURN_IF_ERROR to files that define it

Five files define a RETURN_IF_ERROR macro that is never undefined,
which can leak into subsequent translation units in unity builds.
Add #undef RETURN_IF_ERROR at the end of each file.
DeltaFile
+2-0llvm/lib/Object/COFFObjectFile.cpp
+2-0llvm/lib/Object/WindowsResource.cpp
+2-0llvm/tools/llvm-rc/ResourceFileWriter.cpp
+2-0llvm/tools/llvm-rc/ResourceScriptParser.cpp
+2-0llvm/unittests/tools/llvm-profdata/OutputSizeLimitTest.cpp
+10-05 files

LLVM/project b6aca46clang/lib/StaticAnalyzer/Checkers CStringChecker.cpp CheckSecuritySyntaxOnly.cpp

[StaticAnalyzer] Add #undef REGISTER_CHECKER to files that define it

Eight StaticAnalyzer checker files define a REGISTER_CHECKER macro
that is never undefined, which can leak into subsequent translation
units in unity builds. Add #undef REGISTER_CHECKER at the end of
each file.
DeltaFile
+2-0clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
+2-0clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
+2-0clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp
+2-0clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
+2-0clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp
+2-0clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp
+12-02 files not shown
+16-08 files

LLVM/project 767b601llvm/lib/Target/X86 X86FlagsCopyLowering.cpp X86LoadValueInjectionLoadHardening.cpp

[X86] Add #undef PASS_KEY to files that define it

Five X86 source files define a PASS_KEY macro that is never undefined,
which can leak into subsequent translation units in unity builds. Add
#undef PASS_KEY at the end of each file.
DeltaFile
+2-0llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
+2-0llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp
+2-0llvm/lib/Target/X86/X86LoadValueInjectionRetHardening.cpp
+2-0llvm/lib/Target/X86/X86ReturnThunks.cpp
+2-0llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp
+10-05 files

LLVM/project e33ca78llvm/lib/Support regcomp.c regexec.c

[Support] Add #undef GOODFLAGS to regcomp.c and regexec.c

Both files define a GOODFLAGS macro that is never undefined, which
can leak into subsequent translation units in unity builds. Add
#undef GOODFLAGS at the end of each file.
DeltaFile
+2-0llvm/lib/Support/regcomp.c
+2-0llvm/lib/Support/regexec.c
+4-02 files

LLVM/project c93970allvm/test/CodeGen/AMDGPU asyncmark-gfx12plus.ll

don't use -march, remove stale pre-gfx12 comments
DeltaFile
+6-13llvm/test/CodeGen/AMDGPU/asyncmark-gfx12plus.ll
+6-131 files

LLVM/project 0041bf4llvm/lib/ExecutionEngine/RuntimeDyld/Targets RuntimeDyldCOFFThumb.h RuntimeDyldCOFFI386.h, llvm/lib/IR ConstantsContext.h

Add missing #undef DEBUG_TYPE to headers that #define it

Several headers define DEBUG_TYPE but never undefine it before the
closing include guard. This means any translation unit that includes
these headers (directly or transitively) gets the header's DEBUG_TYPE
leaked into its scope, which can silently override or conflict with
the file's own DEBUG_TYPE.

Add the missing #undef DEBUG_TYPE before the final #endif in each
affected header, matching the convention used by the majority of
LLVM/Clang/LLD headers that define DEBUG_TYPE.

Affected headers:
- lld/wasm/SyntheticSections.h
- llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
- llvm/lib/ExecutionEngine/JITLink/COFFLinkGraphBuilder.h
- llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h
- llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFThumb.h
- llvm/lib/IR/ConstantsContext.h

    [3 lines not shown]
DeltaFile
+2-0llvm/tools/llvm-mca/Views/InstructionInfoView.h
+2-0llvm/tools/llvm-mca/PipelinePrinter.h
+2-0llvm/tools/llvm-ir2vec/lib/Utils.h
+2-0llvm/lib/IR/ConstantsContext.h
+2-0llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFThumb.h
+2-0llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h
+12-03 files not shown
+18-09 files

LLVM/project 8514c66clang/include/clang/CIR/Dialect/IR CIRCUDAAttrs.td, clang/lib/CIR/CodeGen CIRGenCall.cpp

address more string copies stuff yo
DeltaFile
+4-3clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp
+4-2clang/lib/CIR/CodeGen/CIRGenCall.cpp
+1-1clang/include/clang/CIR/Dialect/IR/CIRCUDAAttrs.td
+9-63 files

LLVM/project 9143998llvm/test/CodeGen/DirectX llc-pipeline.ll

[DirectX] Fix llc-pipeline test after #188573 (#188676)

Missed this update in the previous commit. We now expect CycleInfo
instead of LoopInfo.
DeltaFile
+1-1llvm/test/CodeGen/DirectX/llc-pipeline.ll
+1-11 files