LLVM/project 3aa2a68flang/lib/Evaluate fold-integer.cpp fold-implementation.h, flang/lib/Semantics expression.cpp

Conversion to KindsEnum
DeltaFile
+123-120flang/unittests/Evaluate/IntegerValueTest.cpp
+124-114flang/unittests/Evaluate/RealValueTest.cpp
+94-89flang/lib/Evaluate/fold-implementation.h
+90-72flang/lib/Semantics/expression.cpp
+70-65flang/unittests/Evaluate/intrinsics.cpp
+65-57flang/lib/Evaluate/fold-integer.cpp
+566-51795 files not shown
+2,056-1,686101 files

LLVM/project 625f7e5llvm/lib/Target/RISCV RISCVInstrInfo.td, llvm/lib/Target/RISCV/Disassembler RISCVDisassembler.cpp

[RISCV][Disassembler] Symbolize UImm20 and SImm12Lo operands (#217550)

he RISC-V disassembler currently decodes operands represented by
`UImm20OperandMaybeSym` and `Simm12LoOp` directly into immediate
operands. As a result, an installed `MCSymbolizer` has no opportunity to
recover relocation-backed symbolic expressions for these operands.

Enable `MCSymbolizer` handling for RISC-V `UImm20` and `SImm12Lo`
operands. Fall back to the original immediate when symbolization is not
available. `SImm12Lo` values are sign-extended, while `UImm20` values
remain unchanged.

This enables clients such as BOLT to reconstruct symbolic operands for
HI20/LO12, PC-relative, and GOT relocations during instruction decoding.

This change only adds symbolizer hooks for these operands; the actual
symbolization is delegated to the installed `MCSymbolizer`. When no
symbolizer is installed, the existing immediate-based disassembly
behavior is preserved. Test coverage may need to be added after
RISCVMCSymbolizer is implemented in BOLT.
DeltaFile
+46-0llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
+2-0llvm/lib/Target/RISCV/RISCVInstrInfo.td
+48-02 files

LLVM/project 4b95627llvm/lib/IR RuntimeLibcalls.cpp, llvm/test/Transforms/Util/DeclareRuntimeLibcalls divmod.ll

RuntimeLibcalls: Describe register-returning divmod libcall ABIs

Teach RuntimeLibcallsInfo::getFunctionTy about the ARM AEABI
(__aeabi_*divmod) and Windows (__rt_*div*) divmod sigantures. Currently
the custom lowering to these calls hardcodes the call signature information,
but in the future this should be automatically handled.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+57-0llvm/lib/IR/RuntimeLibcalls.cpp
+26-0llvm/test/Transforms/Util/DeclareRuntimeLibcalls/divmod.ll
+83-02 files

LLVM/project 9687b66clang/lib/CodeGen CodeGenFunction.h CGExpr.cpp, clang/test/CodeGen attr-sized-by-for-pointers.c attr-counted-by-or-null-for-pointers.c

[CodeGen] Fix -fsanitize=array-bounds for __sized_by / _or_null pointers

`EmitCountedByBoundsChecking()` assumed a CountAttributedType is always
a __counted_by pointer. That isn't true, there are four versions of the
attribute:

* `__counted_by`: Already handled correctly.
* `__counted_by_or_null`: Incorectly handled.
* `__sized_by`: Incorreclty handled.
* `__sized_by_or_null`: Incorreclty handled.

In particular:

* __sized_by / __sized_by_or_null: the loaded bound is a byte count, but the
  element index was compared against it directly, so an access was only
  flagged once the index exceeded the byte count -- missing out-of-bounds
  accesses for a pointee larger than one byte. Scale the index to bytes
  ('index * sizeof(element)') before comparing. counted_by counts elements
  and is unchanged; a void (or otherwise zero-sized) pointee uses the GNU

    [15 lines not shown]
DeltaFile
+396-173clang/test/CodeGen/attr-sized-by-or-null-for-pointers.c
+295-98clang/test/CodeGen/attr-counted-by-or-null-for-pointers.c
+291-81clang/test/CodeGen/attr-sized-by-for-pointers.c
+43-9clang/lib/CodeGen/CGExpr.cpp
+2-1clang/lib/CodeGen/CodeGenFunction.h
+1,027-3625 files

LLVM/project 54a930fclang/lib/CodeGen CGBuiltin.cpp, clang/test/CodeGen attr-counted-by-for-pointers.c attr-sized-by-for-pointers.c

[CodeGen] Fix __builtin_dynamic_object_size for __sized_by / _or_null pointers (#213794)

`emitCountedByPointerSize()` assumed a CountAttributedType is always
a __counted_by pointer. That isn't true, there are four versions of the
attribute:

* `__counted_by`: Already handled correctly.
* `__counted_by_or_null`: Incorectly handled.
* `__sized_by`: Incorreclty handled.
* `__sized_by_or_null`: Incorreclty handled.

In particular:

* __sized_by / __sized_by_or_null: the attribute argument is a byte count, but
the object size was computed as count * sizeof(*ptr), over-reporting by the
element size for any pointee larger than one byte. Use the count directly for
the byte-counting variants.

* __counted_by_or_null / __sized_by_or_null: a null pointer describes no

    [20 lines not shown]
DeltaFile
+655-0clang/test/CodeGen/attr-sized-by-or-null-for-pointers.c
+514-0clang/test/CodeGen/attr-counted-by-or-null-for-pointers.c
+401-2clang/test/CodeGen/attr-sized-by-for-pointers.c
+169-5clang/test/CodeGen/attr-counted-by-for-pointers.c
+98-43clang/lib/CodeGen/CGBuiltin.cpp
+1,837-505 files

LLVM/project fb7a341llvm/lib/Target/AMDGPU VOP3Instructions.td

[AMDGPU] Update the comment regarding opsel[0] for v_cvt_sr_fp8/bf8_f16, NFC (#217796)

To be consistent with the actual implementation, OPSEL[0] can be
non-zero to select high 16-bit of src0.
DeltaFile
+2-1llvm/lib/Target/AMDGPU/VOP3Instructions.td
+2-11 files

LLVM/project d2c4cedllvm/lib/Transforms/Vectorize LoopVectorizationPlanner.h VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize/RISCV tail-folding-complex-mask.ll

[VPlan] Append recipes created via builder to worklist

The previous PR appended the top most created recipe to the worklist, and this PR extends it to any other nested recipes that were created, similar to InstCombine.

This removes the header mask in a good few more places on RISC-V as measured on SPEC CPU 2017, e.g. for the following loop:

```c
long f(const int *p, const int *q, long n) {
  long a = 0, b = 0;
  for (long i = 0;; i++) {
    if (p[i] && q[i]) { a += i; b += i; }
    if (i + 1 == n) break;
  }
  return a + b;
}
```

Before:


    [49 lines not shown]
DeltaFile
+24-7llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+11-4llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
+5-7llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-complex-mask.ll
+40-183 files

LLVM/project 3769d38llvm/test/Transforms/LoopVectorize/RISCV tail-folding-complex-mask.ll

Precommit test
DeltaFile
+163-0llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-complex-mask.ll
+163-01 files

LLVM/project 5b7cd73llvm/test/Transforms/LoopVectorize blend-i1.ll

Precommit test
DeltaFile
+58-0llvm/test/Transforms/LoopVectorize/blend-i1.ll
+58-01 files

LLVM/project 09a2a83llvm/lib/Transforms/Vectorize VPlanTransforms.cpp

[VPlan] Make simplifyRecipe more like InstCombine

Most combines in simplifyRecipe RAUW a value, but not all of them erase the old recipe.
Unify them and bring it in line with InstCombine by having it return a VPValue, which simplifyRecipes can then call RAUW with, and automatically erase the old recipe.

Similarly to InstCombine, combines that modify a recipe should return the same recipe.
DeltaFile
+1-0llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+1-01 files

LLVM/project dc8bf36llvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize blend-i1.ll dont-fold-tail-for-divisible-TC.ll

[VPlan] Process simplifyRecipes in a worklist

This brings simplifyRecipes further in line with InstCombine, and asides from unlocking more simplifications it also helps avoid spurious test churn whenever passes are moved around simplifyRecipes.

For now just push the new recipe onto the worklist, not its users.
This uses a post order traversal so we maintain the same simplification order as before.

I've gone through and checked every simplification we do is a canonicalisation that converges, and I checked on llvm-test-suite + SPEC CPU 2017 in various configurations that we don't hit any cycles.
DeltaFile
+23-14llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+4-8llvm/test/Transforms/LoopVectorize/dont-fold-tail-for-divisible-TC.ll
+2-3llvm/test/Transforms/LoopVectorize/blend-i1.ll
+29-253 files

LLVM/project ff040a9llvm/lib/Transforms/Vectorize VPlanTransforms.cpp

Update trunc combine, fix m_Not return position
DeltaFile
+4-4llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+4-41 files

LLVM/project e4ff683llvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize/VPlan constant-fold.ll

[VPlan] Make simplifyRecipe more like InstCombine

Most combines in simplifyRecipe RAUW a value, but not all of them erase the old recipe.
Unify them and bring it in line with InstCombine by having it return a VPValue, which simplifyRecipes can then call RAUW with, and automatically erase the old recipe.

Similarly to InstCombine, combines that modify a recipe should return the same recipe.
DeltaFile
+116-153llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+6-9llvm/test/Transforms/LoopVectorize/X86/funclet.ll
+0-11llvm/test/Transforms/LoopVectorize/VPlan/constant-fold.ll
+122-1733 files

LLVM/project 9632bb8llvm/test/Transforms/LoopVectorize/X86 funclet.ll

[LV] Add back constant-folded operand bundle libcall test. NFC (#217255)
DeltaFile
+59-0llvm/test/Transforms/LoopVectorize/X86/funclet.ll
+59-01 files

LLVM/project 85666a5clang-tools-extra/docs/clang-tidy/checks/altera single-work-item-barrier.md struct-pack-align.md, clang-tools-extra/docs/clang-tidy/checks/boost use-ranges.md

[clang-tidy][docs] Rewrite check docs in six modules to Markdown
DeltaFile
+187-188clang-tools-extra/docs/clang-tidy/checks/cert/err33-c.md
+155-155clang-tools-extra/docs/clang-tidy/checks/boost/use-ranges.md
+71-73clang-tools-extra/docs/clang-tidy/checks/altera/unroll-loops.md
+38-39clang-tools-extra/docs/clang-tidy/checks/altera/struct-pack-align.md
+34-36clang-tools-extra/docs/clang-tidy/checks/altera/single-work-item-barrier.md
+31-33clang-tools-extra/docs/clang-tidy/checks/concurrency/mt-unsafe.md
+516-5244 files not shown
+621-63310 files

LLVM/project 3a21307clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVM.cpp, clang/test/CIR/CodeGen vector-bool.cpp

[CIR] Support Vector of bool ty in VecCmpOp (#216400)

Support the Vector of bool in VecCmpOp
DeltaFile
+81-0clang/test/CIR/CodeGen/vector-bool.cpp
+9-2clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+90-22 files

LLVM/project e4ab7d4lldb/source/Plugins/Process/Linux NativeRegisterContextLinux_x86.h NativeRegisterContextLinux_x86.cpp, lldb/source/Plugins/Process/gdb-remote GDBRemoteCommunicationServerLLGS.cpp

[lldb] Support i386 Linux TLS thread pointers (DW_OP_form_tls_address) (#216463)

Fixes #211473.

On i386 Linux, `gs` contains a segment selector rather than the
thread-pointer address. LLDB's i386 native register context did not
expose `LLDB_REGNUM_GENERIC_TP`, so
`DynamicLoaderPOSIXDYLD::GetThreadLocalData` could not locate the
current thread's DTV and module TLS block. As a result, valid
`DW_OP_form_tls_address` and `DW_OP_GNU_push_tls_address` expressions
failed to evaluate.

Mapping the existing `gs` register to the generic thread pointer would
be incorrect because it would expose the selector as an address. The
selector's GDT entry must instead be resolved by the Linux process
tracing the inferior.

## Fix


    [38 lines not shown]
DeltaFile
+112-5lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86.cpp
+46-0lldb/test/API/linux/i386/tls-address/TestI386TLSAddress.py
+11-0lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86.h
+6-0lldb/test/API/linux/i386/tls-address/main.c
+3-0lldb/test/API/linux/i386/tls-address/Makefile
+2-0lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+180-56 files

LLVM/project 31b84cbllvm/lib/Target/RISCV RISCVCodeGenPassBuilder.cpp RISCVOptWInstrs.h, llvm/test/CodeGen/RISCV O3-newpm-pipeline.ll O1-newpm-pipeline.ll

[RISCV] Port Opt W Instrs to NewPM

Assisted-by: AI
DeltaFile
+44-22llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp
+35-0llvm/lib/Target/RISCV/RISCVOptWInstrs.h
+2-3llvm/lib/Target/RISCV/RISCVCodeGenPassBuilder.cpp
+4-0llvm/test/CodeGen/RISCV/prefer-w-inst.mir
+2-1llvm/test/CodeGen/RISCV/O3-newpm-pipeline.ll
+2-1llvm/test/CodeGen/RISCV/O1-newpm-pipeline.ll
+89-276 files not shown
+96-2812 files

LLVM/project aafdc82llvm/lib/Target/RISCV RISCVTargetMachine.cpp RISCVOptWInstrs.cpp

Header to RISCV.h, rename to createRISCVOptWInstrsLegacyPass
DeltaFile
+0-35llvm/lib/Target/RISCV/RISCVOptWInstrs.h
+8-2llvm/lib/Target/RISCV/RISCV.h
+2-2llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp
+1-2llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
+11-414 files

LLVM/project a448cb3llvm/lib/Target/RISCV RISCVCodeGenPassBuilder.cpp RISCVTargetMachine.cpp, llvm/test/CodeGen/RISCV fold-mem-offset.mir O3-newpm-pipeline.ll

[RISCV] Port Fold Memory Offset Pass to NewPM (#215672)

Assisted-by: AI
DeltaFile
+38-16llvm/lib/Target/RISCV/RISCVFoldMemOffset.cpp
+9-2llvm/lib/Target/RISCV/RISCV.h
+2-2llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
+1-1llvm/lib/Target/RISCV/RISCVCodeGenPassBuilder.cpp
+1-0llvm/test/CodeGen/RISCV/fold-mem-offset.mir
+1-0llvm/test/CodeGen/RISCV/O3-newpm-pipeline.ll
+52-212 files not shown
+54-218 files

LLVM/project 708fab7llvm/docs/DirectX DXContainer.md DXILResources.md, llvm/docs/PDB CodeViewTypes.md DbiStream.md

[docs] Address PDB and DirectX migration review

Fix MyST cross-references and emphasis in the PDB documentation. Replace all DirectX DXContainer and DXILResources reST list-tables with native MyST list-tables, preserve local external-link definitions, and format the nested Root Signature table for source readability.

Validation:
- ninja -C build docs-llvm-html
- validate_rst_md_html_ids.py on the four touched documents (stable IDs preserved; existing MyST heading permalink context noise remains)
- check_markdown_html_render.py on the four touched documents
- git diff --check
- scanned touched files for internal-only markers
DeltaFile
+304-314llvm/docs/DirectX/DXILResources.md
+120-122llvm/docs/DirectX/DXContainer.md
+3-3llvm/docs/PDB/DbiStream.md
+2-2llvm/docs/PDB/CodeViewTypes.md
+429-4414 files

LLVM/project 3f22626llvm/test/CodeGen/RISCV shadowcallstack-frame-flags.ll option-arch-experimental.ll, llvm/test/MC/RISCV zicfiss-invalid.s zicfiss-valid.s

[RISCV] Remove experimental from Zicfiss. (#217794)

Use zimop in test command lines were possible.

At this point9, no code checks Zicfiss being enabled. Everything is
based on Zimop. I don't know for sure if shadow stack support is
complete at this point, but the extension being marked experimental
isn't enough to warn users.
DeltaFile
+6-6llvm/test/MC/RISCV/compressed-zicfiss.s
+6-6llvm/test/CodeGen/RISCV/shadowcallstack.ll
+5-5llvm/test/MC/RISCV/zicfiss-valid.s
+2-2llvm/test/MC/RISCV/zicfiss-invalid.s
+2-2llvm/test/CodeGen/RISCV/shadowcallstack-frame-flags.ll
+2-2llvm/test/CodeGen/RISCV/option-arch-experimental.ll
+23-237 files not shown
+31-3313 files

LLVM/project f66c70cllvm/lib/Target/RISCV RISCVTargetMachine.cpp RISCVOptWInstrs.cpp

Header to RISCV.h, rename to createRISCVOptWInstrsLegacyPass
DeltaFile
+0-35llvm/lib/Target/RISCV/RISCVOptWInstrs.h
+8-2llvm/lib/Target/RISCV/RISCV.h
+2-2llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp
+1-2llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
+11-414 files

LLVM/project b720149llvm/lib/Target/RISCV RISCVCodeGenPassBuilder.cpp RISCVOptWInstrs.h, llvm/test/CodeGen/RISCV O3-newpm-pipeline.ll O1-newpm-pipeline.ll

[RISCV] Port Opt W Instrs to NewPM

Assisted-by: AI
DeltaFile
+44-22llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp
+35-0llvm/lib/Target/RISCV/RISCVOptWInstrs.h
+2-3llvm/lib/Target/RISCV/RISCVCodeGenPassBuilder.cpp
+4-0llvm/test/CodeGen/RISCV/prefer-w-inst.mir
+2-1llvm/test/CodeGen/RISCV/O3-newpm-pipeline.ll
+2-1llvm/test/CodeGen/RISCV/O1-newpm-pipeline.ll
+89-276 files not shown
+96-2812 files

LLVM/project 52b1957llvm/lib/Target/RISCV RISCVTargetMachine.cpp RISCVCodeGenPassBuilder.cpp, llvm/test/CodeGen/RISCV fold-mem-offset.mir

[RISCV] Port Fold Memory Offset Pass to NewPM

Assisted-by: AI
DeltaFile
+37-16llvm/lib/Target/RISCV/RISCVFoldMemOffset.cpp
+36-0llvm/lib/Target/RISCV/RISCVFoldMemOffset.h
+0-3llvm/lib/Target/RISCV/RISCV.h
+1-1llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
+1-1llvm/lib/Target/RISCV/RISCVCodeGenPassBuilder.cpp
+1-0llvm/test/CodeGen/RISCV/fold-mem-offset.mir
+76-213 files not shown
+79-219 files

LLVM/project e22ebd0llvm/lib/Target/RISCV RISCVTargetMachine.cpp RISCVFoldMemOffset.cpp

Header to RISCV.h, rename to createRISCVFoldMemOffsetLegacyPass
DeltaFile
+0-36llvm/lib/Target/RISCV/RISCVFoldMemOffset.h
+10-0llvm/lib/Target/RISCV/RISCV.h
+2-2llvm/lib/Target/RISCV/RISCVFoldMemOffset.cpp
+1-1llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
+13-394 files

LLVM/project abf09fallvm/lib/Target/RISCV RISCVFoldMemOffset.cpp

Preserve MachineRegisterClassAnalysis
DeltaFile
+1-0llvm/lib/Target/RISCV/RISCVFoldMemOffset.cpp
+1-01 files

LLVM/project 52a4632llvm/lib/Target/RISCV RISCVCodeGenPassBuilder.cpp RISCVTargetMachine.cpp, llvm/test/CodeGen/RISCV/rvv vmv.v.v-peephole.mir rvv-peephole-vmerge-to-vmv.mir

[RISCV] Port Vector Peephole to NewPM (#215671)

Assisted-by: AI
DeltaFile
+67-44llvm/lib/Target/RISCV/RISCVVectorPeephole.cpp
+12-2llvm/lib/Target/RISCV/RISCV.h
+2-2llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
+1-1llvm/lib/Target/RISCV/RISCVCodeGenPassBuilder.cpp
+2-0llvm/test/CodeGen/RISCV/rvv/vmv.v.v-peephole.mir
+2-0llvm/test/CodeGen/RISCV/rvv/rvv-peephole-vmerge-to-vmv.mir
+86-496 files not shown
+92-4912 files

LLVM/project 9bc7c3ellvm/test/CodeGen/AMDGPU global-atomicrmw-fmin.ll amdgcn.bitcast.512bit.ll

[AMDGPU][True16] Improve 16-bit argument handling

This PR adds an extra fixup in PostprocessISelDAG for 16-bit VGPR arguments to
indicate that only the lower 16 bits are used. This can improve code quality in
some cases and save a VGPR. Even if we support true16 in our ABI in the future,
this might still be useful when two 16-bit arguments aren't adjacent.
DeltaFile
+296-362llvm/test/CodeGen/AMDGPU/bf16.ll
+153-314llvm/test/CodeGen/AMDGPU/global-atomicrmw-fadd.ll
+225-225llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+224-224llvm/test/CodeGen/AMDGPU/calling-conventions.ll
+222-222llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+156-180llvm/test/CodeGen/AMDGPU/global-atomicrmw-fmin.ll
+1,276-1,52763 files not shown
+3,253-3,74969 files

LLVM/project e47b407llvm/lib/Target/RISCV RISCVAsmPrinter.cpp

[RISCV] Fix stage2 bootstrap crash caused by f6ea145aa8e89631ae04f72df32580b20256d40c (#217809)

It's not possible to compute an allocation granule for an unsized type.
DeltaFile
+3-0llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
+3-01 files