LLVM/project 40304d8llvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize iv-select-cmp-decreasing.ll vector-loop-backedge-elimination.ll

Reapply "[VPlan] Remove manual region removal when simplifying for VF and UF. (#181252)" (#188589)

This reverts commit e30f9c19464bcf1bf1e9f69b63884fb78ad2d05d.

Re-land, now that the reported crash causing the revert has been fixed
as part of 77fb84889 (#187504).

Original message:

Replace manual region dissolution code in
simplifyBranchConditionForVFAndUF with using general
removeBranchOnConst. simplifyBranchConditionForVFAndUF now just creates
a (BranchOnCond true) or updates BranchOnTwoConds.

The loop then gets automatically removed by running removeBranchOnConst.

This removes a bunch of special logic to handle header phi replacements
and CFG updates. With the new code, there's no restriction on what kind
of header phi recipes the loop contains.

    [8 lines not shown]
DeltaFile
+82-200llvm/test/Transforms/LoopVectorize/iv-select-cmp-decreasing.ll
+266-0llvm/test/Transforms/LoopVectorize/vector-loop-backedge-elimination.ll
+37-100llvm/test/Transforms/LoopVectorize/load-deref-pred-poison-ub-ops-feeding-pointer.ll
+36-77llvm/test/Transforms/LoopVectorize/AArch64/optsize_minsize.ll
+27-77llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+37-64llvm/test/Transforms/LoopVectorize/X86/load-deref-pred.ll
+485-51820 files not shown
+665-79826 files

LLVM/project 45d243dlldb/test/API/functionalities/scripted_frame_provider/circular_dependency TestFrameProviderCircularDependency.py, lldb/test/API/functionalities/scripted_frame_provider/pass_through_prefix TestFrameProviderPassThroughPrefix.py

[lldb/test] Remove stale arm Linux expectedFailure decorators (NFC)

These tests no longer fail on arm Linux after the frame provider
re-entrancy fixes, so remove the decorators.

XPASS: https://lab.llvm.org/buildbot/#/builders/18/builds/25348

Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>
DeltaFile
+0-2lldb/test/API/functionalities/scripted_frame_provider/circular_dependency/TestFrameProviderCircularDependency.py
+0-1lldb/test/API/functionalities/scripted_frame_provider/pass_through_prefix/TestFrameProviderPassThroughPrefix.py
+0-32 files

LLVM/project 067c0acclang/include/clang/CIR/Dialect/IR CIROps.td

[CIR] Add calling convention values to CIR_CallingConv
DeltaFile
+8-3clang/include/clang/CIR/Dialect/IR/CIROps.td
+8-31 files

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

update

Signed-off-by: Ruoyu Qiu <cabbaken at outlook.com>
DeltaFile
+59-0llvm/test/Analysis/DependenceAnalysis/weak-crossing-siv-overflow.ll
+16-15llvm/lib/Analysis/DependenceAnalysis.cpp
+75-152 files

LLVM/project 158282blibclc/clc/lib/generic/math clc_atan2.inc clc_atan2.cl

libclc: Update atan2 (#188706)

This was originally ported from rocm device libs in
f9caca8b9dd26a9e7a13e5ca8be57100578e3432. Update for more
recent changes.
DeltaFile
+79-210libclc/clc/lib/generic/math/clc_atan2.inc
+5-6libclc/clc/lib/generic/math/clc_atan2.cl
+84-2162 files

LLVM/project 48911callvm/include/llvm/DebugInfo/LogicalView/Core LVSupport.h, llvm/include/llvm/DebugInfo/LogicalView/Readers LVCodeViewVisitor.h

[llvm-debuginfo-analyzer] Support `S_DEFRANGE_REGISTER_REL_INDIR` (#187531)

#186410 added support for reading `S_DEFRANGE_REGISTER_REL_INDIR` in
LLVM's CodeView. This adds support for printing it in
llvm-debuginfo-analyzer. This record is not (yet) generated by LLVM. It
encodes an indirect location like `S_REGREL32_INDIR` but for a range (so
it's conceptually a child of `S_LOCAL` which only encodes _some_
variable in a function).

---------

Co-authored-by: Javier Lopez-Gomez <javier.lopez.gomez at proton.me>
DeltaFile
+301-0llvm/test/tools/llvm-debuginfo-analyzer/COFF/Inputs/defrange-regrel-indir-clang.yaml
+41-0llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewVisitor.cpp
+40-0llvm/test/tools/llvm-debuginfo-analyzer/COFF/07-coff-regrel-indir.test
+6-0llvm/lib/DebugInfo/LogicalView/Core/LVLocation.cpp
+3-0llvm/include/llvm/DebugInfo/LogicalView/Readers/LVCodeViewVisitor.h
+1-0llvm/include/llvm/DebugInfo/LogicalView/Core/LVSupport.h
+392-06 files

LLVM/project 42a77ceorc-rt/include/orc-rt Error.h, orc-rt/lib/executor SimpleNativeMemoryMap.cpp Error.cpp

[orc-rt] Add missing includes for Linux/ARM builds (#188702)

Fixes compilation errors due to missing includes.
DeltaFile
+2-0orc-rt/lib/executor/SimpleNativeMemoryMap.cpp
+1-0orc-rt/include/orc-rt/Error.h
+1-0orc-rt/lib/executor/Error.cpp
+4-03 files

LLVM/project 465f969lldb/source/Core Module.cpp

[lldb][Module][NFC] Extract script loading logic into helper (#188712)

Planning on re-using this within the same function. Extracting into
helper makes that slightly more readable.
DeltaFile
+15-7lldb/source/Core/Module.cpp
+15-71 files

LLVM/project 066af61libclc/clc/lib/generic/workitem clc_get_sub_group_id.cl

libclc: Implement get_sub_group_id with get_local_linear_id
DeltaFile
+3-13libclc/clc/lib/generic/workitem/clc_get_sub_group_id.cl
+3-131 files

LLVM/project 948a914lldb/source/Core Module.cpp

[lldb][Module][NFC] Remove redundant FileSpec validity check (#188708)

We already do the validity check inside of
`FileSystem::Instance().Exists`.
DeltaFile
+1-1lldb/source/Core/Module.cpp
+1-11 files

LLVM/project 778637dlibclc/clc/lib/generic/math clc_atan2pi.inc clc_atan2pi.cl

libclc: Update atan2pi

This was originally ported from rocm device libs in
37406a209c75a09f850cd5e5498568d34a6f05d1. Merge in more
recent changes.
DeltaFile
+63-186libclc/clc/lib/generic/math/clc_atan2pi.inc
+5-5libclc/clc/lib/generic/math/clc_atan2pi.cl
+68-1912 files

LLVM/project 8b479d9libclc/clc/lib/generic/math clc_atan2.inc clc_atan2.cl

libclc: Update atan2

This was originally ported from rocm device libs in
f9caca8b9dd26a9e7a13e5ca8be57100578e3432. Update for more
recent changes.
DeltaFile
+79-210libclc/clc/lib/generic/math/clc_atan2.inc
+5-6libclc/clc/lib/generic/math/clc_atan2.cl
+84-2162 files

LLVM/project 8083183compiler-rt/lib/builtins CMakeLists.txt, compiler-rt/lib/builtins/arm dunder.c dnorm2.c

[compiler-rt][ARM] Double-precision FP support functions (#179920)

This commit adds C helper functions `dnan2`, `dnorm2` and `dunder` for
handling the less critical edge cases of double-precision arithmetic,
similar to `fnan2`, `fnorm2` and `funder` that were added in commit
f7e652127772e93.

It also adds a header file that defines some register aliases for
handling double-precision numbers in AArch32 software floating point in
an endianness-independent way, by providing aliases `xh` and `xl` for
the high and low words of the first double-precision function argument,
regardless of which of them is in r0 and which in r1, and similarly `yh`
and `yl` for the second argument in r2/r3.
DeltaFile
+78-0compiler-rt/lib/builtins/arm/dunder.c
+59-0compiler-rt/lib/builtins/arm/dnorm2.c
+44-0compiler-rt/lib/builtins/arm/dnan2.c
+39-0compiler-rt/lib/builtins/arm/endian.h
+3-0compiler-rt/lib/builtins/CMakeLists.txt
+223-05 files

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