LLVM/project b3d6f49llvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/InstCombine frexp-implied-exponent-range-dominating-conditions.ll

ValueTracking: Generalize known frexp exponent range to any constant

Extend computeKnownExponentRangeFromContext beyond the special case of a
dominating fabs(V) compare against exactly 1.0 to any finite limit.

Generalizing below 1.0 exposes a soundness issue: frexp(0) has exponent
0, so a bound derived assuming a nonzero value could wrongly exclude it
when the limit implies a negative maximum exponent. Query fcZero and clamp
the maximum exponent to at least 0 when the source may be zero.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+456-38llvm/test/Transforms/InstCombine/frexp-implied-exponent-range-dominating-conditions.ll
+32-17llvm/lib/Analysis/ValueTracking.cpp
+488-552 files

LLVM/project b7cf10cclang/lib/Headers ptrauth.h, clang/lib/Sema SemaChecking.cpp

[arm64e] Add a builtin + intrinsic for arm64e PAuth_LR: __builtin_ptr_auth_auth_with_pc_and_resign (#202742)

The new builtin behaves like __builtin_ptrauth_auth_and_resign, but
incorporates the address of the signing instruction (i.e. the
`pacibsppc`/`paciasppc`) when performing the auth side, and subsequently
re-signs using a different scheme. Authenticating the re-signed value
will fail if and only if authenticating the original value with the
incorporated pc would have failed.
DeltaFile
+360-0llvm/test/CodeGen/AArch64/ptrauth-intrinsic-auth-with-pc-and-resign.ll
+101-31llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
+39-2clang/lib/Sema/SemaChecking.cpp
+38-0llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
+36-0llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
+36-0clang/lib/Headers/ptrauth.h
+610-3310 files not shown
+742-3416 files

LLVM/project 5c8d977clang/docs OpenMPSupport.md PointerAuthentication.md

[docs] Finish MyST migration for selected docs
DeltaFile
+83-3clang/docs/OpenMPSupport.md
+22-22clang/docs/PointerAuthentication.md
+27-11clang/docs/UsersManual.md
+10-15clang/docs/MisExpect.md
+10-2clang/docs/OpenCLSupport.md
+4-5clang/docs/StandardCPlusPlusModules.md
+156-5811 files not shown
+173-8717 files

LLVM/project 2bb7786clang/docs UsersManual.md StandardCPlusPlusModules.md

[docs] Convert selected rst docs with rst2myst
DeltaFile
+2,637-2,453clang/docs/UsersManual.md
+1,466-1,537clang/docs/StandardCPlusPlusModules.md
+568-701clang/docs/PointerAuthentication.md
+482-521clang/docs/HIPSupport.md
+550-444clang/docs/Modules.md
+231-612clang/docs/OpenMPSupport.md
+5,934-6,26814 files not shown
+7,523-8,02320 files

LLVM/project 318d3d0clang/docs UsersManual.md UsersManual.rst

[docs] Rename selected Clang docs to Markdown
DeltaFile
+6,268-0clang/docs/UsersManual.md
+0-6,268clang/docs/UsersManual.rst
+2,512-0clang/docs/StandardCPlusPlusModules.md
+0-2,512clang/docs/StandardCPlusPlusModules.rst
+1,729-0clang/docs/PointerAuthentication.md
+0-1,729clang/docs/PointerAuthentication.rst
+10,509-10,50934 files not shown
+17,190-17,19040 files

LLVM/project 9742275clang/include/clang/AST DeclTemplate.h, clang/lib/Sema SemaTemplateInstantiate.cpp SemaTemplateInstantiateDecl.cpp

Merge branch 'main' into revert-191268-feat/104057
DeltaFile
+0-33,233llvm/docs/LangRef.rst
+30,305-0llvm/docs/LangRef.md
+194-429clang/lib/Sema/SemaTemplateInstantiate.cpp
+301-165clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+151-147clang/lib/Sema/SemaTemplate.cpp
+96-95clang/include/clang/AST/DeclTemplate.h
+31,047-34,06982 files not shown
+32,503-35,02988 files

LLVM/project 52f6fa1clang/lib/AST ASTContext.cpp Type.cpp, clang/lib/Sema SemaOpenMP.cpp SemaTemplate.cpp

trivial changes
DeltaFile
+20-14clang/lib/Sema/SemaOpenMP.cpp
+18-14clang/lib/AST/ASTContext.cpp
+16-15clang/lib/Sema/SemaTemplate.cpp
+14-11clang/lib/AST/Type.cpp
+23-2clang/lib/AST/TextNodeDumper.cpp
+14-8clang/lib/AST/ASTDiagnostic.cpp
+105-6435 files not shown
+231-16241 files

LLVM/project 29011ebclang/include/clang/AST ASTContext.h, clang/lib/AST ASTContext.cpp ItaniumMangle.cpp

[clang] implement CWG2064: ignore value dependence for decltype

The 'decltype' for a value-dependent (but non-type-dependent) should be known,
so this patch makes them non-opaque instead.

This patch also implements what's neceessary to allow overloading
on pure differences in instantiation dependence, making `std::void_t`
usable for SFINAE purposes.

This also readds a few test cases from da98651, which was a previous attempt
at resolving CWG2064.

Fixes #8740
Fixes #61818
Fixes #190388
DeltaFile
+888-161clang/lib/AST/ASTContext.cpp
+328-12clang/test/SemaTemplate/instantiation-dependence.cpp
+178-96clang/lib/AST/ItaniumMangle.cpp
+62-57clang/lib/AST/Type.cpp
+71-44clang/lib/Sema/SemaTemplate.cpp
+88-11clang/include/clang/AST/ASTContext.h
+1,615-38168 files not shown
+2,311-72874 files

LLVM/project 2cb32e4llvm/docs LangRef.md

[docs] Rewrite LangRef.md as Markdown (#201975)

Tracking issue: #201242
Migration guide docs:
https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines
RFC:
https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840

This change migrates LangRef by itself, since it is quite a large
document with many idiosyncracies.

LangRef makes extensive use of definition lists, which apparently
require enabling the deflist MyST extension in Sphinx conf.py. In part
because definition list boundaries are controlled by indentation,
several of them required manual fixups to get the nesting right. Some of
the issues were pre-existing broken indentation, but this should now be
much better.

I have a verification script that tracks all anchors and ensures that
all previous anchors are carried over to the new document, so no
mid-document links are broken.
DeltaFile
+14,578-17,506llvm/docs/LangRef.md
+14,578-17,5061 files

LLVM/project 9fde845.github new-prs-labeler.yml, llvm/docs LangRef.md LangRef.rst

[docs] Rename LangRef.{rst|md} (#201974)

Tracking issue: #201242
Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines
RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840

This commit does not use valid markdown, so the docs will not build, but
they will be fixed in an immediate follow-up commit that does the
migration.
DeltaFile
+33,233-0llvm/docs/LangRef.md
+0-33,233llvm/docs/LangRef.rst
+1-1llvm/docs/AddingConstrainedIntrinsics.rst
+1-1.github/new-prs-labeler.yml
+33,235-33,2354 files

LLVM/project 031b773clang/include/clang/AST DeclTemplate.h, clang/lib/AST DeclTemplate.cpp

[clang] Reland: fix getTemplateInstantiationArgs (#208285)

Relands https://github.com/llvm/llvm-project/pull/199528
Previous: https://github.com/llvm/llvm-project/pull/207825

This implements a new strategy for collecting the template arguments, by
relying on the qualifiers and template parameter lists to navigate the
template
context of out-of-line definitions.

This greatly simplifies the signature of that function, by removing a
bunch
of workarounds, and simpliffying a couple that weren't removed yet.

Since this now relies on qualifiers and template parameter lists,
this patch expends most of its effort making sure these are placed,
transformed and propagated to template instantiations.

Also makes the explicit specialization AST nodes stop abusing the

    [14 lines not shown]
DeltaFile
+194-429clang/lib/Sema/SemaTemplateInstantiate.cpp
+301-165clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+151-147clang/lib/Sema/SemaTemplate.cpp
+96-95clang/include/clang/AST/DeclTemplate.h
+59-129clang/lib/Sema/SemaConcept.cpp
+60-92clang/lib/AST/DeclTemplate.cpp
+861-1,05764 files not shown
+1,626-1,73170 files

LLVM/project e07cdf3libc/src/mathvec/aarch64 expf.cpp common.h

[libc][mathvec][aarch64] Add AdvSIMD optimised expf (#206776)

This PR adds an AdvSIMD optimised version of the generic expf, using
intrinsics.
DeltaFile
+124-0libc/src/mathvec/aarch64/expf.cpp
+31-0libc/src/mathvec/aarch64/common.h
+21-0libc/src/mathvec/aarch64/CMakeLists.txt
+176-03 files

LLVM/project bd9554fllvm/include/llvm/ADT FunctionExtras.h

[ADT][NFC] UniqueFunction MSVC fix (#208293)

Fixup of #208251 for MSVC, which erroneously treats uses of non-static
constexpr variables as odr-use and requires them to be captured.
DeltaFile
+4-2llvm/include/llvm/ADT/FunctionExtras.h
+4-21 files

LLVM/project 2c6a3d2llvm/lib/Transforms/Utils SimplifyCFG.cpp, llvm/test/Transforms/SimplifyCFG rangereduce.ll

[SimplifyCFG] Improve reduceSwitchRange to avoid unnecessary subtractions (#198374)

Dense switch cases can sometimes be achieved with only a shift, avoiding
a subtract. Change reduceSwitchRange to check for such cases before
falling back to using a subtract.

The changes to test9 demonstrates that for the purpose of lookup-table
lowering (triggered by the switch-to-lookup flag), the switch range
still ends up normalized to start at 0, the subtraction just happens
after the fshl.

test10 demonstrates where this change is useful, resulting in a dense
switch case with one less subtract.

test11 demonstrates cases where the subtract is still needed in order to
form a dense switch case.
DeltaFile
+104-0llvm/test/Transforms/SimplifyCFG/rangereduce.ll
+60-28llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+164-282 files

LLVM/project c7c7cabbolt/lib/Core DIEBuilder.cpp, bolt/test/X86 dwarf5-locexpr-addrx.s

[BOLT] Fix DW_FORM_implicit_const values lost during DWARF5 rewriting (#192166)

Summary:
Fix two bugs in DIEBuilder that caused DW_FORM_implicit_const values to
be zeroed out when rewriting DWARF5 debug sections
(--update-debug-sections).

1. In constructDIEFast(), DWARFFormValue was constructed with just the
form code, leaving the value at 0. For DW_FORM_implicit_const,
extractValue() is a no-op since the value is expected to be pre-set.
Fix: use AttrSpec.getFormValue() which initializes the value from the
abbreviation table.

2. In assignAbbrev(), AddAttribute(Attr.getAttribute(), Attr.getForm())
used the two-argument overload which discards the implicit_const value.
Fix: use AddAttribute(Attr) to copy the full DIEAbbrevData.

Fixes https://github.com/llvm/llvm-project/issues/192084
DeltaFile
+2-2bolt/lib/Core/DIEBuilder.cpp
+2-0bolt/test/X86/dwarf5-locexpr-addrx.s
+4-22 files

LLVM/project 6ed1ae6llvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 ptrauth-isel.mir ptrauth-isel.ll

[AArch64][PAC] Reset `killed` operand flag in custom inserter of PAC pseudo (#158699)

If custom inserter changes the `AddrDisc` operand of `AArch64::PAC`
pseudo instruction, conservatively reset its `killed` flag. Keeping this
flag without checking if it is still legal may result in code of the
form

    %disc = MOVKXi %addr(tied-def 0), 1234, 48
    %signed = PAC %ptr(tied-def 0), 2, 0, killed %disc
    # %addr is used past this point and %disc is not

being turned into

    %signed = PAC %ptr(tied-def 0), 2, 1234, killed %addr
    # %addr is used past this point, but the operand of
    # the above instruction has killed flag
DeltaFile
+36-3llvm/test/CodeGen/AArch64/ptrauth-isel.mir
+3-3llvm/test/CodeGen/AArch64/ptrauth-isel.ll
+3-0llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+42-63 files

LLVM/project abc27e3llvm/include/llvm/CodeGen MachineRegisterInfo.h, llvm/lib/CodeGen MachineRegisterInfo.cpp

[MachineCopyPropagation] Fix debug info referring to subregisters. (#207861)

When copy propagation removes a copy, it fixes debug info that refers to
the old register to instead refer to the new register. This logic didn't
really deal with subregisters; it took any DBG_VALUE that pointed to a
subregister of the old register, and replaced it with the full new
register.

This patch adds logic for subregisters: if a DBG_VALUE refers to a
subregister of the source register, find the corresponding subregister
of the destination register.

Fixes #207682
DeltaFile
+113-0llvm/test/DebugInfo/AArch64/machine-cp-updates-dbg-reg-subreg.mir
+40-0llvm/lib/CodeGen/MachineRegisterInfo.cpp
+2-25llvm/include/llvm/CodeGen/MachineRegisterInfo.h
+155-253 files

LLVM/project 372ff7bclang/include/clang/AST DeclFriend.h, clang/lib/AST ASTImporter.cpp

Revert "[Clang] support friend declarations with a dependent nested-name-spec…"

This reverts commit dcf1b8f2c00b38777f71297afc7b575cd2d9300a.
DeltaFile
+105-658clang/lib/Sema/SemaAccess.cpp
+10-257clang/test/CXX/temp/temp.decls/temp.friend/p5.cpp
+90-131clang/lib/Sema/SemaDeclCXX.cpp
+62-141clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+101-24clang/include/clang/AST/DeclFriend.h
+18-92clang/lib/AST/ASTImporter.cpp
+386-1,30335 files not shown
+596-1,82641 files

LLVM/project 4045511llvm/include/llvm/Plugins PassPlugin.h, llvm/utils/git ids-check-helper.py

[ids-check] Add support for ignoring symbols (#208241)

`llvmGetPassPluginInfo()` is not exported from the LLVM dylib. It is
meant to be the entry point for a pass plugin in another dylib. As it
is, the ids-check workflow would automatically add the `LLVM_ABI`
annotation to it, which is incorrect.

This fixes the issue by explicitly marking the symbol as ignored.

The effort to build LLVM as a DLL is tracked in #109483.
DeltaFile
+9-0llvm/utils/git/ids-check-helper.py
+3-2llvm/include/llvm/Plugins/PassPlugin.h
+12-22 files

LLVM/project fd796cfllvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 vector-reduce-add-mask.ll vector-reduce-ctpop.ll

[X86] combineArithReduction - truncate from v4iXX to v4i16 for PSADBW add reduction patterns (#208286)

Noticed while trying to make ISD::VECREDUCE_ADD legal - if we're using
PSADBW, we don't need to truncate down to v4i8 and then zero-padd the
lowest v8i8/64-bits, we can just use v4i16 and bitcast to v8i8 since we
know the upper 8-bits are zero.
DeltaFile
+12-43llvm/test/CodeGen/X86/vector-reduce-add-mask.ll
+20-20llvm/test/CodeGen/X86/vector-reduce-ctpop.ll
+11-28llvm/test/CodeGen/X86/vector-reduce-add-zext.ll
+5-0llvm/lib/Target/X86/X86ISelLowering.cpp
+48-914 files

LLVM/project b3fb86eclang/docs UsersManual.md UsersManual.rst, llvm/docs LangRef.rst LangRef.md

Merge rebased markdown doc branches into markdown-docs
DeltaFile
+0-33,233llvm/docs/LangRef.rst
+30,305-0llvm/docs/LangRef.md
+6,468-0clang/docs/UsersManual.md
+0-6,268clang/docs/UsersManual.rst
+0-2,512clang/docs/StandardCPlusPlusModules.rst
+2,440-0clang/docs/StandardCPlusPlusModules.md
+39,213-42,01338 files not shown
+47,083-50,42544 files

LLVM/project 7f0d557clang/docs OpenMPSupport.md PointerAuthentication.md

[docs] Finish MyST migration for selected docs
DeltaFile
+83-3clang/docs/OpenMPSupport.md
+22-22clang/docs/PointerAuthentication.md
+27-11clang/docs/UsersManual.md
+10-15clang/docs/MisExpect.md
+10-2clang/docs/OpenCLSupport.md
+4-5clang/docs/StandardCPlusPlusModules.md
+156-5811 files not shown
+173-8717 files

LLVM/project 1bd2cffllvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/InstCombine frexp-implied-exponent-range-dominating-conditions.ll

ValueTracking: Fix off by one in known frexp exponent range

Also restrict the optimization to the exactly 1 case for now.
There was an additional bug for values less than 1 to be fixed
separately.

Fixes #208192

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+814-21llvm/test/Transforms/InstCombine/frexp-implied-exponent-range-dominating-conditions.ll
+11-4llvm/lib/Analysis/ValueTracking.cpp
+825-252 files

LLVM/project 695cb83llvm/docs LangRef.md

Migrate 11 tables back from list-table to regular markdown tables
DeltaFile
+80-202llvm/docs/LangRef.md
+80-2021 files

LLVM/project 21d0931llvm/docs LangRef.md

[docs] Rewrite LangRef.md as Markdown
DeltaFile
+14,701-17,507llvm/docs/LangRef.md
+14,701-17,5071 files

LLVM/project 3f9f05fclang/docs UsersManual.md StandardCPlusPlusModules.md

[docs] Convert selected rst docs with rst2myst
DeltaFile
+2,637-2,453clang/docs/UsersManual.md
+1,466-1,537clang/docs/StandardCPlusPlusModules.md
+568-701clang/docs/PointerAuthentication.md
+482-521clang/docs/HIPSupport.md
+550-444clang/docs/Modules.md
+231-612clang/docs/OpenMPSupport.md
+5,934-6,26814 files not shown
+7,523-8,02320 files

LLVM/project 4255250.github new-prs-labeler.yml, llvm/docs LangRef.rst LangRef.md

[docs] Rename LangRef.{rst|md}

Tracking issue: #201242

This commit does not use valid markdown, so the docs will not build, but they will be fixed in an immediate follow-up commit that does the migration.
DeltaFile
+0-33,233llvm/docs/LangRef.rst
+33,233-0llvm/docs/LangRef.md
+1-1llvm/docs/AddingConstrainedIntrinsics.rst
+1-1.github/new-prs-labeler.yml
+33,235-33,2354 files

LLVM/project cefd20cllvm/lib/Target/RISCV RISCVISelLowering.cpp

[RISCV] Use DCI.CombineTo instead of DAG.ReplaceAllUsesWith in performReverseEVLCombine. (#208275)

This makes sure the replaced node is deleted without relying on it still
being in the worklist, schedules its users for revisiting, and prints
the debug message for the replacement.
DeltaFile
+5-3llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+5-31 files

LLVM/project 3f5b3fcclang/docs UsersManual.md UsersManual.rst

[docs] Rename selected Clang docs to Markdown
DeltaFile
+6,268-0clang/docs/UsersManual.md
+0-6,268clang/docs/UsersManual.rst
+0-2,512clang/docs/StandardCPlusPlusModules.rst
+2,512-0clang/docs/StandardCPlusPlusModules.md
+1,729-0clang/docs/PointerAuthentication.md
+0-1,729clang/docs/PointerAuthentication.rst
+10,509-10,50934 files not shown
+17,190-17,19040 files

LLVM/project 6560fefclang/include/clang/ScalableStaticAnalysis BuiltinAnchorSources.def, clang/include/clang/ScalableStaticAnalysis/Analyses/OperatorNewDelete OperatorNewDeletePointers.h

[SSAF][Extractor] Extract operator new/delete overload entities that shall retain their types (#206600)

This commit creates an extractor for operator new/delete overloads.

Overloads of operator new shall retain their void* return type,
regardless of whether they are propagated by unsafe buffers. The same
applies to the parameters of operator delete overloads.

Therefore, clang-reforge eventually need this information.

rdar://179151541

---------

Co-authored-by: Balázs Benics <benicsbalazs at gmail.com>
DeltaFile
+260-0clang/unittests/ScalableStaticAnalysis/Analyses/OperatorNewDelete/OperatorNewDeletePointersExtractorTest.cpp
+118-0clang/lib/ScalableStaticAnalysis/Analyses/OperatorNewDelete/OperatorNewDeletePointersExtractor.cpp
+62-0clang/include/clang/ScalableStaticAnalysis/Analyses/OperatorNewDelete/OperatorNewDeletePointers.h
+11-6clang/lib/ScalableStaticAnalysis/Analyses/SSAFAnalysesCommon.h
+1-0clang/lib/ScalableStaticAnalysis/Analyses/CMakeLists.txt
+1-0clang/include/clang/ScalableStaticAnalysis/BuiltinAnchorSources.def
+453-61 files not shown
+454-67 files