LLVM/project 62889d4llvm/lib/TargetParser RISCVISAInfo.cpp

Update llvm/lib/TargetParser/RISCVISAInfo.cpp

Co-authored-by: Craig Topper <craig.topper at sifive.com>
DeltaFile
+3-5llvm/lib/TargetParser/RISCVISAInfo.cpp
+3-51 files

LLVM/project 8e1afdacompiler-rt/lib/asan asan_shadow_setup.cpp

[ASan] Skip high-shadow and gap setup when HighMem region is empty (#202037)

On targets where the shadow offset sits above all addressable user
memory (e.g. Alpha with ASAN_SHADOW_OFFSET=0x70000000000 and a 42-bit
user VAS), kHighMemBeg is set above kHighMemEnd so the HighMem region is
empty. Since MEM_TO_SHADOW is monotonically increasing, kHighMemBeg >
kHighMemEnd implies kHighShadowBeg > kHighShadowEnd. Calling
ReserveShadowMemoryRange(kHighShadowBeg, kHighShadowEnd) passes size =
kHighShadowEnd - kHighShadowBeg + 1, which underflows to a large
negative value, and mmap() fails with ENOMEM.

ProtectGap is also skipped: there is no meaningful shadow gap between
LowShadow and an empty HighShadow.

Guard both operations on kHighMemBeg <= kHighMemEnd.
DeltaFile
+13-5compiler-rt/lib/asan/asan_shadow_setup.cpp
+13-51 files

LLVM/project 7ef1b22llvm/test/CodeGen/AMDGPU vector-reduce-fmax.ll vector-reduce-fmin.ll

[AMDGPU][GISel] Fold 'min(min(x,y),z)' and 'max(max(x,y),z)' into min3 and max3 (#200410)

Original PR: https://github.com/llvm/llvm-project/pull/124263
Fixes: https://github.com/llvm/llvm-project/issues/123079
DeltaFile
+579-699llvm/test/CodeGen/AMDGPU/vector-reduce-fmax.ll
+579-699llvm/test/CodeGen/AMDGPU/vector-reduce-fmin.ll
+371-552llvm/test/CodeGen/AMDGPU/vector-reduce-smin.ll
+371-552llvm/test/CodeGen/AMDGPU/vector-reduce-smax.ll
+363-547llvm/test/CodeGen/AMDGPU/vector-reduce-umax.ll
+301-443llvm/test/CodeGen/AMDGPU/vector-reduce-umin.ll
+2,564-3,49211 files not shown
+4,046-3,74817 files

LLVM/project 1ab6164bolt/include/bolt/Passes DataflowAnalysis.h SplitFunctions.h, bolt/include/bolt/Profile DataReader.h

[BOLT] Remove unused DenseMapInfo::getEmptyKey (#201986)

After #201281 DenseMapInfo<T>::getEmptyKey() is no longer used by
DenseMap. Remove the unused getEmptyKey definitions and dead sentinel
uses.
DeltaFile
+0-5bolt/include/bolt/Passes/DataflowAnalysis.h
+0-3bolt/include/bolt/Profile/DataReader.h
+0-1bolt/include/bolt/Passes/SplitFunctions.h
+0-93 files

LLVM/project 6b5883bpolly/include/polly/Support VirtualInstruction.h

[Polly] Remove unused DenseMapInfo::getEmptyKey (#201992)

After #201281 DenseMapInfo<T>::getEmptyKey() is no longer used by
DenseMap. Remove the unused getEmptyKey definitions and dead sentinel
uses.
DeltaFile
+0-7polly/include/polly/Support/VirtualInstruction.h
+0-71 files

LLVM/project eafc7b6lld/COFF Chunks.h, lld/MachO ConcatOutputSection.h

[lld] Remove unused DenseMapInfo::getEmptyKey (#201989)

After #201281 DenseMapInfo<T>::getEmptyKey() is no longer used by
DenseMap. Remove the unused getEmptyKey definitions and dead sentinel
uses.
DeltaFile
+0-11lld/MachO/ConcatOutputSection.h
+0-5lld/wasm/SyntheticSections.h
+0-3lld/COFF/Chunks.h
+0-193 files

LLVM/project d5a05acllvm/lib/Target/AArch64 AArch64StackTaggingPreRA.cpp, llvm/lib/Target/AMDGPU GCNHazardRecognizer.cpp

[Target] Remove unused DenseMapInfo::getEmptyKey (#201993)

After #201281 DenseMapInfo<T>::getEmptyKey() is no longer used by
DenseMap. Remove the unused getEmptyKey definitions and dead sentinel
uses.
DeltaFile
+0-14llvm/lib/Target/X86/X86OptimizeLEAs.cpp
+0-10llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp
+0-3llvm/lib/Target/CSKY/MCTargetDesc/CSKYTargetStreamer.h
+0-3llvm/lib/Target/SPIRV/SPIRVTypeInst.h
+0-1llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
+0-1llvm/lib/Target/AArch64/AArch64StackTaggingPreRA.cpp
+0-326 files

LLVM/project 4bdd4ebllvm/include/llvm/ADT DenseMapInfo.h

[ADT] Don't use getEmptyKey() when hashing std::optional (#202002)

DenseMapInfo<std::optional<T>>::getHashValue() calls T's getEmptyKey()
for the nullopt case. This blocks removing the now-unused getEmptyKey()
from DenseMapInfo specializations: a leaf type that drops getEmptyKey()
fails to compile wherever std::optional<T> is used as a DenseMap key
(e.g. DenseMapInfo<mlir::spirv::StorageClass>).

Compute the hash directly instead. Prerequisite for the getEmptyKey()
removal series; #201281 made getEmptyKey() unused by DenseMap.
DeltaFile
+3-3llvm/include/llvm/ADT/DenseMapInfo.h
+3-31 files

LLVM/project 42ec0c6flang/include/flang/Lower IterationSpace.h, flang/include/flang/Lower/Support Utils.h

[flang] Remove unused DenseMapInfo::getEmptyKey (#201988)

After #201281 DenseMapInfo<T>::getEmptyKey() is no longer used by
DenseMap. Remove the unused getEmptyKey definitions and dead sentinel
uses.
DeltaFile
+0-8flang/lib/Lower/Support/Utils.cpp
+0-6flang/include/flang/Lower/Support/Utils.h
+0-5flang/include/flang/Semantics/symbol.h
+0-3flang/include/flang/Lower/IterationSpace.h
+0-224 files

LLVM/project 0b156e1clang-tools-extra/clang-doc Representation.cpp Representation.h

[clang-doc] Clean up implementation with better casting

Having access to RTTI style casting lets us use slightly nicer
structures to clean up the overly complicated dispatch logic in merging
and other places.
DeltaFile
+19-51clang-tools-extra/clang-doc/Representation.cpp
+15-5clang-tools-extra/clang-doc/Representation.h
+34-562 files

LLVM/project 83acb62clang-tools-extra/clang-doc Representation.h Representation.cpp

[clang-doc] Use llvm RTTI over handrolled casting

Clang-Doc has a limited amount of polymorphism over Info types.
Historically, these have just been cast directly in a few places, but we
can use the existing llvm RTTI implementation to more rigorously
dispatch and query the types involved with only limited extra code.
This should make future changes a bit harder to get wrong.
DeltaFile
+36-0clang-tools-extra/clang-doc/Representation.h
+10-17clang-tools-extra/clang-doc/Representation.cpp
+8-8clang-tools-extra/clang-doc/BitcodeWriter.cpp
+6-6clang-tools-extra/clang-doc/Serialize.cpp
+5-5clang-tools-extra/clang-doc/MDGenerator.cpp
+5-5clang-tools-extra/clang-doc/JSONGenerator.cpp
+70-412 files not shown
+77-528 files

LLVM/project 3ab0c51libc/src/link CMakeLists.txt

[libc] Add missing `dl_iterate_phdr` dependencies to avoid spurious build failures (#201574)

Example:
https://github.com/llvm/llvm-project/actions/runs/26945498241/job/79504837451?pr=201452

"Spurious" means, in this case, that the build may succeed or fail
depending on whether the files were generated before the dependent is
built.
DeltaFile
+2-0libc/src/link/CMakeLists.txt
+2-01 files

LLVM/project 5133256clang-tools-extra/clang-doc JSONGenerator.cpp HTMLGenerator.cpp

[clang-doc] Move Generator classes into the anonymous namespace

Clang-Tidy suggest moving these classes into the anonymous namespace,
to enforce internal linkage.
DeltaFile
+21-21clang-tools-extra/clang-doc/JSONGenerator.cpp
+11-11clang-tools-extra/clang-doc/HTMLGenerator.cpp
+12-9clang-tools-extra/clang-doc/MDGenerator.cpp
+8-4clang-tools-extra/clang-doc/MDMustacheGenerator.cpp
+52-454 files

LLVM/project 9aef315lldb/include/lldb/API SBDebugger.h, lldb/include/lldb/Core Debugger.h

[lldb] Add SBDebugger::SetTerminalDimensions to set width and height atomically (#201965)

Terminal width and height were communicated to the debugger separately,
via SetTerminalWidth() and SetTerminalHeight(). Each notified the
IOHandler and the statusline, so on a resize they recomputed their
layout twice: once with one dimension updated and the other still stale.

Add Debugger::SetTerminalDimensions(width, height) (exposed through
SBDebugger) that updates both properties before notifying, and
reimplement the single-axis setters and the driver's resize handler in
terms of it.

Also fix SBDebugger::GetTerminalHeight(), which returned the width.
DeltaFile
+13-16lldb/source/Core/Debugger.cpp
+19-0lldb/test/API/python_api/debugger/TestDebuggerAPI.py
+7-4lldb/tools/driver/Driver.cpp
+9-1lldb/source/API/SBDebugger.cpp
+8-0lldb/include/lldb/API/SBDebugger.h
+4-0lldb/include/lldb/Core/Debugger.h
+60-216 files

LLVM/project c1ee07bllvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 split-node-reused-and-reordered-operand.ll

Revert "[SLP]Keep reuse mask in sync when reordering split node operand"

This reverts commit dee1687bdba79e729b4ddf3e2c37ff9b5766dc75 to pacify
buildbots after failures in
https://lab.llvm.org/buildbot/#/builders/25/builds/18282 and others.

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/202057
DeltaFile
+0-104llvm/test/Transforms/SLPVectorizer/X86/split-node-reused-and-reordered-operand.ll
+1-13llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+1-1172 files

LLVM/project e6fab59lldb/include/lldb/Symbol Symbol.h

[lldb] Change Symbol size assert to 64 bit only (#202042)

Follow up to
https://github.com/llvm/llvm-project/pull/200919#issuecomment-4635479078
DeltaFile
+0-4lldb/include/lldb/Symbol/Symbol.h
+0-41 files

LLVM/project 35d520allvm/include/llvm/IR Intrinsics.td Intrinsics.h, llvm/lib/IR Intrinsics.cpp

[NFC][LLVM] Introduce `IIT_MATCH` to represents `LLVMMatchType` (#202034)

Currently, the fully dependent identity type `LLVMMatchType` is
represented in the IIT encoding table as `IIT_ANY` with `AK_MatchType`
argument kind. Instead, add a new IIT code `IIT_MATCH` to represent such
dependent types, so that `IIT_ANY` is used to represent just the core
overload types.
DeltaFile
+18-13llvm/lib/IR/Intrinsics.cpp
+5-7llvm/include/llvm/IR/Intrinsics.td
+6-4llvm/include/llvm/IR/Intrinsics.h
+29-243 files

LLVM/project 79da521.github/workflows libcxx-run-benchmarks.yml

workflows/libcxx-run-benchmarks: Remove template expansion (#200282)

https://docs.zizmor.sh/audits/#template-injection

https://github.com/llvm/llvm-project/security/code-scanning/1648
https://github.com/llvm/llvm-project/security/code-scanning/1649
https://github.com/llvm/llvm-project/security/code-scanning/1650
https://github.com/llvm/llvm-project/security/code-scanning/1651
DeltaFile
+8-3.github/workflows/libcxx-run-benchmarks.yml
+8-31 files

LLVM/project 5458641llvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 sve2-rsh.ll

[AArch64] Fix and vs or in tryCombineExtendRShTrunc (#202053)

This condition should be checking that both are true.
DeltaFile
+28-0llvm/test/CodeGen/AArch64/sve2-rsh.ll
+1-1llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+29-12 files

LLVM/project 4706906clang/lib/Interpreter Value.cpp, clang/unittests/Interpreter InterpreterTest.cpp

[clang-repl] Fix Value's move ctor releasing storage on construction (#200888)

Value::Value(Value &&) called Release() on the just-moved-into storage,
decrementing the refcount to zero on the only remaining reference.
Subsequent reads -- including ~Value() running clear(), which calls
Release() a second time on the now-freed allocation -- hit
use-after-free.

The move should transfer the existing reference: the source clears
IsManuallyAlloc so its destructor will not Release, and *this assumes
ownership of the same refcount. Neither side needs to Retain or Release
to keep the count correct.

Add a regression test exercising move-construction, move-assignment, and
follow-on copy-construction on a K_PtrOrObj Value. AddressSanitizer
catches the bug without the fix.
DeltaFile
+51-0clang/unittests/Interpreter/InterpreterTest.cpp
+4-3clang/lib/Interpreter/Value.cpp
+55-32 files

LLVM/project 6808d14llvm/lib/Transforms/InstCombine InstCombineVectorOps.cpp, llvm/test/Transforms/InstCombine shuffle_select.ll shuffle_select-inseltpoison.ll

[InstCombine] Drop `ninf` FMF when input element can be `Inf` in shuffle-select transform (#201315)

Solves https://github.com/llvm/llvm-project/issues/74326

When binary operation has `ninf` FMF, but the input does not have
`nofpclass(inf)`, we should not propagate the `ninf` FMF. Because the
transformation may produce poison value when the input has an `Inf`
element, whereas the original code will simply pass through the `Inf`
element.

Alive proof: https://alive2.llvm.org/ce/z/nkv-vE
DeltaFile
+36-0llvm/test/Transforms/InstCombine/shuffle_select.ll
+36-0llvm/test/Transforms/InstCombine/shuffle_select-inseltpoison.ll
+10-3llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
+82-33 files

LLVM/project 6eb47bbllvm/include/llvm/IR PatternMatch.h, llvm/lib/Transforms/InstCombine InstCombineCasts.cpp

[InstCombine] Migrate undef -> poison only for certain cast-related optimizations (#201631)

Further deprecate UndefValue by restricting several related
optimizations in InstCombineCasts to PoisonValue only. Update regression
tests to reflect these changes.
DeltaFile
+30-35llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
+14-14llvm/test/Transforms/InstCombine/vector-casts.ll
+14-14llvm/test/Transforms/InstCombine/vector-casts-inseltpoison.ll
+5-5llvm/test/Transforms/InstCombine/fpextend.ll
+4-0llvm/include/llvm/IR/PatternMatch.h
+67-685 files

LLVM/project 638abbbflang/lib/Semantics resolve-names.cpp, flang/test/Semantics/OpenMP declare-target-common-block2.f90

Don't replace symbols that are in a common block
DeltaFile
+23-0flang/test/Semantics/OpenMP/declare-target-common-block2.f90
+3-2flang/lib/Semantics/resolve-names.cpp
+26-22 files

LLVM/project 74b1449llvm/include/llvm/Support Enum.h

gcc compatibility

Created using spr 1.3.8-wip
DeltaFile
+6-4llvm/include/llvm/Support/Enum.h
+6-41 files

LLVM/project 2853284llvm/lib/Transforms/Vectorize VectorCombine.cpp, llvm/test/Transforms/VectorCombine/X86 shuffle-of-shuffles.ll

[VectorCombine] foldShuffleOfShuffles - replace IR with poison on the !NewX path (#201826)

The function returns bool. The early return `return
PoisonValue::get(ShuffleDstTy);` relies on implicit pointer-to-bool
conversion of a non-null PoisonValue*, so the caller records a change
and invalidates non-CFG analyses while the original shuffle is never
replaced.

Call replaceValue(I, *PoisonValue::get(ShuffleDstTy)) and return true so
the fold actually fires. Downstream InstCombine usually cleans up the
residual shuffle via simplifyShuffleVectorInst, which masks the bug at
-O2 but leaves vector-combine producing the wrong result on its own.

Adds a regression test covering the case where both inner shuffles have
all-poison masks, so the merge loop never assigns NewX.

This was found as part of jlebar's X86 LLVM bug hunt / FuzzX effort:
https://github.com/SemiAnalysisAI/FuzzX/tree/master/x86 :
[024-foldshuffleofshuffles-poison-bool-cast](https://github.com/SemiAnalysisAI/FuzzX/tree/master/x86/bugs/024-foldshuffleofshuffles-poison-bool-cast)
DeltaFile
+13-0llvm/test/Transforms/VectorCombine/X86/shuffle-of-shuffles.ll
+5-2llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+18-22 files

LLVM/project f272347llvm/include/llvm/Support Enum.h ScopedPrinter.h, llvm/unittests/Support ScopedPrinterTest.cpp

[spr] initial version

Created using spr 1.3.8-wip
DeltaFile
+320-0llvm/unittests/Support/ScopedPrinterTest.cpp
+153-0llvm/include/llvm/Support/Enum.h
+45-0llvm/include/llvm/Support/ScopedPrinter.h
+518-03 files

LLVM/project 428a03dclang/lib/CIR/CodeGen CIRGenAtomic.cpp CIRGenFunction.cpp, clang/test/CIR/CodeGen complex-compound-assignment.cpp

[CIR] Implement CompoundAssignLValue for Atomic Complex (#201895)

Implement CompoundAssignLValue support for Atomic Complex

Issue https://github.com/llvm/llvm-project/issues/192331
DeltaFile
+65-0clang/test/CIR/CodeGen/complex-compound-assignment.cpp
+33-6clang/lib/CIR/CodeGen/CIRGenAtomic.cpp
+2-5clang/lib/CIR/CodeGen/CIRGenFunction.cpp
+0-5clang/lib/CIR/CodeGen/CIRGenExprComplex.cpp
+100-164 files

LLVM/project 7564cffclang/lib/Driver/ToolChains Flang.cpp, flang/test/Driver offload-device.f90

[Flang][Driver] Fix -foffload-device misspelling (#201857)

#200863 added a new `-foffload-device` argument for informing the
frontend that it compiling for the device-side (and as a consequence
must not overwrite any module files compiled for the host), but the
driver was mistakenly adding `-offload-device`.

Also fix the condition and add a regression test for the driver.
DeltaFile
+24-0flang/test/Driver/offload-device.f90
+2-2clang/lib/Driver/ToolChains/Flang.cpp
+26-22 files

LLVM/project 3ca2f00mlir/lib/Conversion/ComplexToSPIRV ComplexToSPIRV.cpp, mlir/test/Conversion/ComplexToSPIRV complex-to-spirv.mlir

[mlir][SPIR-V] Convert complex.abs (#202026)
DeltaFile
+37-0mlir/test/Conversion/ComplexToSPIRV/complex-to-spirv.mlir
+31-1mlir/lib/Conversion/ComplexToSPIRV/ComplexToSPIRV.cpp
+68-12 files

LLVM/project dee1687llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 split-node-reused-and-reordered-operand.ll

[SLP]Keep reuse mask in sync when reordering split node operand

When reorderBottomToTop uses an operand order for a split vectorize
node and the operand has both reordered and reused scalars, only the
reorder indices were cleared while the reuse mask was left stale. This
diverged the split node scalars from the operand effective order.
Fold the reorder into the reuse mask (getCommonMask), reorder it by the
used mask, then clear the reorder indices, so the operand effective
order stays consistent with the reordered split node.

Fixes #202003

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/202041
DeltaFile
+104-0llvm/test/Transforms/SLPVectorizer/X86/split-node-reused-and-reordered-operand.ll
+13-1llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+117-12 files