LLVM/project 25b205eflang/lib/Optimizer/Transforms FIRToMemRef.cpp

[FIRToMemRef] Doc collectSliceInfoFrom, getMemrefIndices, canonicalizeIndex (#207699)

Also drops the unused `converted` parameter from getMemrefIndices. The
internal workings of these functions were not easy to understand for me
so I worked with Claude to document with examples. Hopefully, that makes
the code easier to read. I reviewed the docs and corrected some obvious
hallucinations produced by the agent.

Co-Authored-By: Claude Sonnet 4.6 noreply at anthropic.com
DeltaFile
+187-4flang/lib/Optimizer/Transforms/FIRToMemRef.cpp
+187-41 files

LLVM/project 54e768bllvm/utils/FileCheck FileCheck.cpp

Merge branch 'filecheck-diag-annotator' into filecheck-pattern-notes
DeltaFile
+10-10llvm/utils/FileCheck/FileCheck.cpp
+10-101 files

LLVM/project 026c974llvm/utils/FileCheck FileCheck.cpp

Merge branch 'filecheck-improve-labeler' into filecheck-diag-annotator
DeltaFile
+10-10llvm/utils/FileCheck/FileCheck.cpp
+10-101 files

LLVM/project 1561bb2llvm/utils/FileCheck FileCheck.cpp

Use DenseMap not std::map
DeltaFile
+10-10llvm/utils/FileCheck/FileCheck.cpp
+10-101 files

LLVM/project 26fbd61lld/test/ELF gc-sections-keep-shared-start.s

[ELF,test] Fix FileCheck RUN line in gc-sections-keep-shared-start.s (#207678)

Fix a malformed multiline RUN line.

---------

Co-authored-by: Fangrui Song <i at maskray.me>
DeltaFile
+5-6lld/test/ELF/gc-sections-keep-shared-start.s
+5-61 files

LLVM/project b838b0cllvm/lib/Target/RISCV RISCVInstrInfoZclsd.td, llvm/test/MC/RISCV rv32zclsd-invalid.s

[RISCV][MC] Improve diagnostics for Zclsd RV32 GPR pair operands (#207639)

Add dedicated assembler diagnostics for the RV32 GPR pair operands used
by
Zclsd compressed load/store pair instructions.

After the RISC-V asm parser started reporting multiple near-miss
reasons, these
operands still fell back to the generic "invalid operand for
instruction" note.
Give them explicit diagnostic types and messages so invalid register
pairs report
the expected pair constraints.
DeltaFile
+4-4llvm/test/MC/RISCV/rv32zclsd-invalid.s
+4-0llvm/lib/Target/RISCV/RISCVInstrInfoZclsd.td
+8-42 files

LLVM/project 025e2adlldb/source/Host/freebsd Host.cpp

[LLDB][FreeBSD] Fix build from FileSpec change (#207819)

FileSpec now returns llvm::StringRef instead of ConstString. As a
result, we don't need to use GetCString to get the raw string. Remove it
to fix build failure.

Fixes: f9b5264523b1 (#206802)
DeltaFile
+1-1lldb/source/Host/freebsd/Host.cpp
+1-11 files

LLVM/project fa9fac7llvm/docs LFI.rst, llvm/lib/Target/X86/MCTargetDesc X86MCLFIRewriter.cpp X86MCLFIRewriter.h

Revert "[LFI][X86] Add X86 LFI target and system instruction rewrites" (#207891)

Reverts llvm/llvm-project#189569
DeltaFile
+0-248llvm/lib/Target/X86/MCTargetDesc/X86MCLFIRewriter.cpp
+9-120llvm/docs/LFI.rst
+0-96llvm/test/MC/X86/LFI/thread-pointer.s
+0-54llvm/lib/Target/X86/MCTargetDesc/X86MCLFIRewriter.h
+0-21llvm/test/CodeGen/X86/lfi-sibcall.ll
+0-19llvm/test/MC/X86/LFI/thread-pointer-errors.s
+9-55812 files not shown
+12-63818 files

LLVM/project a849f52llvm/lib/Transforms/InstCombine InstCombineShifts.cpp, llvm/test/Transforms/InstCombine conditional-variable-length-signext-after-high-bit-extract.ll

[InstCombine] Fix assertion failure in `foldVariableSignZeroExtensionOfVariableHighBitExtract` (#205148)

This PR fixes crash for the following program:
```
define i16 @d(i16 %x, i4 %n) {
entry:
  %highbits = lshr i16 %x, 1
  %sub1 = sub i4 0, %n
  %z1 = zext i4 %sub1 to i16
  %shl = shl i16 %highbits, %z1
  %sub2 = sub i4 0, %n
  %z2 = zext i4 %sub2 to i16
  %ashr = ashr i16 %shl, %z2
  ret i16 %ashr
}
```
when running `opt -passes=instcombine prog.ll -S`.

Assisted-by: Codex
DeltaFile
+21-0llvm/test/Transforms/InstCombine/conditional-variable-length-signext-after-high-bit-extract.ll
+2-4llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
+23-42 files

LLVM/project b068ae9llvm/docs LFI.rst, llvm/lib/Target/X86/MCTargetDesc X86MCLFIRewriter.cpp X86MCLFIRewriter.h

[LFI][X86] Add X86 LFI target and system instruction rewrites (#189569)

This PR introduces an x86-64 backend for Lightweight Fault Isolation
(LFI), similar to the one being developed for AArch64. LFI is a
compiler-based mechanism that enables efficient in-process sandboxing.
See the RFC from last fall for details.

This PR adds the `x86_64_lfi` target (similar to `aarch64_lfi`), sets up
reserved registers, and implements some initial rewrites for system
instructions (system calls and TLS accesses). The rewrites are done at
the MC level, using the `MCLFIRewriter` infrastructure. I have updated
the documentation to describe the x86-64 sandboxing scheme and to list
rewrites that will be implemented in future PRs (to keep each individual
PR small).

For performance and compatibility reasons, the plan is currently to use
bundling for maintaining control-flow integrity in the sandbox, which
is not yet supported. For now we are setting up the rewrites without using
bundling, but we can also use a CFI mechanism based on shadow
stack+endbr in order to have something usable while bundling is
in progress.
DeltaFile
+248-0llvm/lib/Target/X86/MCTargetDesc/X86MCLFIRewriter.cpp
+120-9llvm/docs/LFI.rst
+96-0llvm/test/MC/X86/LFI/thread-pointer.s
+54-0llvm/lib/Target/X86/MCTargetDesc/X86MCLFIRewriter.h
+21-0llvm/test/CodeGen/X86/lfi-sibcall.ll
+19-0llvm/test/MC/X86/LFI/thread-pointer-errors.s
+558-912 files not shown
+638-1218 files

LLVM/project 2ef13cellvm/lib/Target/AMDGPU SIFrameLowering.cpp, llvm/test/CodeGen/AMDGPU whole-wave-functions.ll whole-wave-functions-pei.mir

[AMDGPU] Fix whole-wave function prologue to set EXEC to -1 (#207781)

A whole-wave function body must run with all lanes on. With no WWM
spills the prologue emitted `S_XOR_SAVEEXEC`, giving `EXEC` =
`~entryEXEC`
DeltaFile
+5-5llvm/test/CodeGen/AMDGPU/whole-wave-functions.ll
+1-4llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
+1-1llvm/test/CodeGen/AMDGPU/whole-wave-functions-pei.mir
+7-103 files

LLVM/project c392657llvm/lib/Target/SPIRV SPIRVGlobalRegistry.cpp, llvm/test/CodeGen/SPIRV/pointers array-stride-subbyte.ll

[SPIR-V] Fix ArrayStride truncation to 0 for sub-byte element types (#207140)

addArrayStrideDecorations computed the stride as `getTypeSizeInBits/8`
which truncates to 0 for sub-byte element types such as i1

0 strides are disallowed in spec

---------

Co-authored-by: Juan Manuel Martinez Caamaño <jmartinezcaamao at gmail.com>
DeltaFile
+21-0llvm/test/CodeGen/SPIRV/pointers/array-stride-subbyte.ll
+1-1llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp
+22-12 files

LLVM/project c45ff74llvm/lib/Target/RISCV RISCVSystemOperands.td

[RISCV] Sync RISCVSystemOperands.td order/sections with priv-csrs.adoc from riscv-isa-manual. NFC (#207803)
DeltaFile
+110-90llvm/lib/Target/RISCV/RISCVSystemOperands.td
+110-901 files

LLVM/project 664e704flang/include/flang/Semantics semantics.h, flang/lib/Semantics resolve-names.cpp

[flang] Add ability to implicitly use a module (#207824)

Add parser and semantics plumbing for configured implicit USE modules,
reusing
the normal USE-association path so public symbols and common blocks are
imported
consistently.
DeltaFile
+64-21flang/lib/Semantics/resolve-names.cpp
+26-0flang/test/Driver/bbc-implicit-use-module.f90
+8-0flang/include/flang/Semantics/semantics.h
+5-0flang/tools/bbc/bbc.cpp
+103-214 files

LLVM/project 5c715d5clang-tools-extra/docs ReleaseNotes.rst, clang/lib/Tooling Tooling.cpp

[Tooling] Preserve backslashes in POSIX source paths (#207499)

On POSIX, backslashes are valid filename characters. Avoid converting
them to slashes when computing absolute source paths in LibTooling,
since doing so changes paths such as `a\b.cc` into `a/b.cc`.

Closes #207396
DeltaFile
+24-0clang/unittests/Tooling/ToolingTest.cpp
+3-0clang-tools-extra/docs/ReleaseNotes.rst
+1-1clang/lib/Tooling/Tooling.cpp
+28-13 files

LLVM/project 1b9723bllvm/include/llvm/ADT APInt.h, llvm/unittests/ADT APIntTest.cpp

Fix APInt::concat for zero-width operands (#207475)

APInt::concat triggered undefined behavior (invalid shift exponent) when
concatenating a zero-width operand with a 64-bit operand on the fast
path (combined width <= 64). For example, `I0.concat(I64)` resulted in
`U.VAL << 64`, which is UB.
Fix by checking for zero-width operands early and returning the other
operand. Added regression tests to `APIntTest.cpp`.
DeltaFile
+2-0llvm/include/llvm/ADT/APInt.h
+1-0llvm/unittests/ADT/APIntTest.cpp
+3-02 files

LLVM/project d49c6da.ci compute_projects_test.py compute_projects.py, .github/workflows libclang-python-tests.yml

CI: move libclang python bindings tests to main CI (#201677)

This removes the separate python bindings CI, which run on the GitHub
free runners and take more than one hour to build libclang.

The tests are executed instead in the monolithic pipelines, whenever
clang would be tested.
That only tests whatever python version we set up for that pipeline.

This is fine in terms of resources because all the dependencies are
built anyway, and the tests themselves take less than one second to run
on the free runners.
DeltaFile
+0-59.github/workflows/libclang-python-tests.yml
+13-12.ci/compute_projects_test.py
+1-1.ci/compute_projects.py
+14-723 files

LLVM/project 0ad19f4libc/shared builtins.h, libc/shared/builtins subsf3.h

[libc] add shared subsf3 builtin (#205677)

Re-exposes LLVM-libc's `__subsf3` as `shared::subsf3` for reuse by
compiler-rt's builtins.

Stacked change - merge these first:
- #200094
- #205669
- #205670
- #205671
- #205672
- #205673
- #205674
- #205675
- #205676

Part of #197824
DeltaFile
+32-0libc/src/__support/builtins/subsf3.h
+29-0libc/shared/builtins/subsf3.h
+9-0libc/src/__support/builtins/CMakeLists.txt
+1-0libc/shared/builtins.h
+1-0libc/test/shared/CMakeLists.txt
+1-0libc/test/shared/shared_builtins_test.cpp
+73-06 files

LLVM/project 5cd8f2fllvm/test/CodeGen/AMDGPU eliminate-frame-index-v-add-co-u32.mir eliminate-frame-index-s-add-u32.mir

[CodeGen] Rename prologpeilog to prolog-epilog (#207870)

This is primarily to ensure consistenct with the new pass manager where
the name of the pass is already prolog-epilog, which is more consistent
with our existing naming scheme. This is necessary to be able to run
existing llc invocations that explicitly specify prolog-epilog under the
NewPM automatically.

Assisted by Gemini.
DeltaFile
+9-9llvm/test/CodeGen/AMDGPU/eliminate-frame-index-v-add-co-u32.mir
+8-8llvm/test/CodeGen/AMDGPU/eliminate-frame-index-s-add-u32.mir
+8-8llvm/test/CodeGen/AMDGPU/pei-build-av-spill.mir
+8-8llvm/test/CodeGen/AMDGPU/pei-build-spill.mir
+8-8llvm/test/CodeGen/AMDGPU/eliminate-frame-index-s-add-i32.mir
+8-8llvm/test/CodeGen/AMDGPU/eliminate-frame-index-scalar-bit-ops.mir
+49-49275 files not shown
+462-462281 files

LLVM/project a42a1c8llvm/unittests/ExecutionEngine/Orc InProcessEPCTest.cpp

[ORC] Fix reinterpret_cast warning. (#207874)

https://github.com/llvm/llvm-project/pull/206725#issuecomment-4896222897
reported warnings on windows builds due to reinterpret_cast:

warning C4312: 'reinterpret_cast': conversion from 'unsigned int' to
'void *' of greater size

This commit fixes the issue by using ExecutorAddr::toPtr for conversion
instead of reinterpret_cast.
DeltaFile
+2-2llvm/unittests/ExecutionEngine/Orc/InProcessEPCTest.cpp
+2-21 files

LLVM/project 4cfd754.ci compute_projects_test.py compute_projects.py, .github/workflows libclang-python-tests.yml

CI: move libclang python byindings tests to main CI

This removes the separate python bindings CI, which run on the GitHub free
runners and take more than one hour to build libclang.

The tests are executed instead in the monolithic pipelines,
whenever clang would be tested.

This is fine in terms of resources because all the dependencies are
built anyway, and the tests themselves take less than one second to
run on the free runners.
DeltaFile
+0-59.github/workflows/libclang-python-tests.yml
+13-12.ci/compute_projects_test.py
+1-1.ci/compute_projects.py
+14-723 files

LLVM/project 52f1b75clang/bindings/python/tests/cindex test_source_range.py test_translation_unit.py

[clang] workaround libclang-python windows CI failures (#207875)
DeltaFile
+8-3clang/bindings/python/tests/cindex/test_source_range.py
+3-1clang/bindings/python/tests/cindex/test_translation_unit.py
+11-42 files

LLVM/project a37bb29llvm/lib/Target/NVPTX NVPTXLowerArgs.cpp, llvm/test/CodeGen/NVPTX lower-byval-args-mem-attrs.ll

[NVPTX] Assign correct memory attrs to args in NVPTXLowerArgs (#207461)
DeltaFile
+84-0llvm/test/CodeGen/NVPTX/lower-byval-args-mem-attrs.ll
+23-2llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp
+107-22 files

LLVM/project 2846784clang/bindings/python/tests/cindex test_source_range.py test_translation_unit.py

[clang] workaround libclang-python windows CI failures
DeltaFile
+8-3clang/bindings/python/tests/cindex/test_source_range.py
+3-1clang/bindings/python/tests/cindex/test_translation_unit.py
+11-42 files

LLVM/project a2dbd23utils/bazel/llvm-project-overlay/clang-tools-extra/clang-doc BUILD.bazel, utils/bazel/llvm-project-overlay/clang-tools-extra/unittests BUILD.bazel

[Bazel] Fixes cc048e8 (#207873)

This fixes cc048e80b670a5262500612069d1c2d065b53f15.

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+10-0utils/bazel/llvm-project-overlay/clang-tools-extra/clang-doc/BUILD.bazel
+1-0utils/bazel/llvm-project-overlay/clang-tools-extra/unittests/BUILD.bazel
+11-02 files

LLVM/project cc048e8clang-tools-extra/clang-doc/markdown Markdown.h Markdown.cpp, clang-tools-extra/clang-doc/support Markdown.h Markdown.cpp

[clang-doc] Move Markdown into its own subdirectory (#207856)

Removes the need for PARTIAL_SOURCES_INTENDED by giving clangDocMarkdown
its own directory. Addresses post-merge feedback on #205609.
DeltaFile
+0-315clang-tools-extra/clang-doc/support/Markdown.h
+315-0clang-tools-extra/clang-doc/markdown/Markdown.h
+0-99clang-tools-extra/clang-doc/support/Markdown.cpp
+99-0clang-tools-extra/clang-doc/markdown/Markdown.cpp
+0-7clang-tools-extra/clang-doc/support/CMakeLists.txt
+7-0clang-tools-extra/clang-doc/markdown/CMakeLists.txt
+421-4212 files not shown
+423-4228 files

LLVM/project 8f3e619libc/config/linux/riscv entrypoints.txt

[libc][RISC-V] Temporarily disable dirent (#207867)

The RISC-V 32 QEMU buildbot is failing due to missing SYS_fcntl, which
is needed for fdopendir. Since that syscall is referenced in the shared
dir code it's easiest to just disable all the dirent functions for now.
DeltaFile
+6-5libc/config/linux/riscv/entrypoints.txt
+6-51 files

LLVM/project 06f4b02llvm/lib/Target/NVPTX NVVMReflect.cpp

[NFC][LLVM][NVPTX] Minor code cleanup in NVVMReflect (#207549)

Use explicit types instead of auto when the type is not obvious. Use
`StringRef` type in the range for loop over `ReflectList`, allowing
additional code cleanups.
DeltaFile
+19-20llvm/lib/Target/NVPTX/NVVMReflect.cpp
+19-201 files

LLVM/project a51dcf7llvm/lib/Target/AMDGPU AMDGPUSearchableTables.td

Combine expressions

Change-Id: I535d5b8ee3eef19008536c0890a2901d2138908c
DeltaFile
+39-168llvm/lib/Target/AMDGPU/AMDGPUSearchableTables.td
+39-1681 files

LLVM/project 81200d7llvm/lib/Target/NVPTX NVVMProperties.cpp NVPTXUtilities.cpp

[NFC][LLVM][NVPTX] Use namespace qualifiers to define functions (#207546)

Use namespace qualifiers to define functions in `llvm` namespace, per
https://llvm.org/docs/CodingStandards.html#use-namespace-qualifiers-to-define-previously-declared-symbols.
DeltaFile
+21-22llvm/lib/Target/NVPTX/NVVMProperties.cpp
+11-13llvm/lib/Target/NVPTX/NVPTXUtilities.cpp
+2-4llvm/lib/Target/NVPTX/NVPTXRegisterInfo.cpp
+34-393 files