LLVM/project 9525bccllvm/lib/CodeGen PeepholeOptimizer.cpp, llvm/test/CodeGen/X86 bitcnt-load-with-cmov.ll cttz.ll

[CodeGen] Fold load into LZCNT/TZCNT/POPCNT after compare elimination in peephole optimizer (#194662)

When a loaded value feeds both a bit-count instruction
(LZCNT/TZCNT/POPCNT) and an `icmp eq zero` / `select` sequence, ISel
emits the register form (`rr`) because the loaded value has two uses at
that point. The peephole optimizer later eliminates the redundant
compare (recognizing that LZCNT/TZCNT/POPCNT already set the necessary
EFLAGS), but failed to retry folding the load into the now single-use
bit-count instruction — because that instruction had already been
scanned.

The fix pre-saves the compared register before `optimizeCmpInstr` erases
the compare. After successful elimination, if the EFLAGS producer and
its defining load are both already-scanned and now have a single use,
fold immediately via `TII->optimizeLoadInstr`.

Before:
```
movq  (%rdi), %rax

    [10 lines not shown]
DeltaFile
+129-0llvm/test/CodeGen/X86/bitcnt-load-with-cmov.ll
+26-8llvm/lib/CodeGen/PeepholeOptimizer.cpp
+6-7llvm/test/CodeGen/X86/cttz.ll
+1-2llvm/test/CodeGen/X86/freeze-unary.ll
+162-174 files

LLVM/project 6d42b9allvm/test/Assembler disubprogram-type-required.ll, llvm/test/CodeGen/ARM analyze-branch-bkpt.ll

[DebugInfo] Enforce DISubprogram type as required in LLParser (#196299)

Add a parse-time check so that LLParser treats the `type:` field of
`DISubprogram` as required and non-null. Attempting to assemble IR with
  a missing or null `type:` now produces a clear parse-time error
("missing required field 'type'" or "'type' cannot be null") rather
than relying solely on the verifier warning added in #194556.
Update existing hand-written LLVM IR tests to supply a minimal valid
`DISubroutineType` where they are not intentionally testing malformed
debug info.
**Scope.** This patch covers the LLParser path only. Two entry points
are intentionally deferred:
- *MetadataLoader*: pre-LLVM-5 bitcode legitimately stores null
    `DISubprogram.type`; auto-upgrading that field requires more careful
backward-compatibility handling (see
`llvm/test/Bitcode/dityperefs-3.8.ll`).
- *BitcodeWriter*: IR written to bitcode has already passed the
verifier, which guarantees a non-null type; no additional check is
needed in the writer.
  Follow-up to #194556.
DeltaFile
+12-27llvm/test/Verifier/DISubprogram-type.ll
+29-0llvm/test/Assembler/disubprogram-type-required.ll
+6-5llvm/test/Transforms/WholeProgramDevirt/devirt-metadata.ll
+6-2mlir/test/Target/LLVMIR/Import/global-variables.ll
+5-3llvm/test/CodeGen/ARM/analyze-branch-bkpt.ll
+5-3llvm/test/Transforms/AddDiscriminators/dbg-declare-discriminator.ll
+63-4083 files not shown
+320-14089 files

LLVM/project 77781b0clang/lib/CIR/CodeGen CIRGenModule.cpp, clang/test/CIR/CodeGen self-ref-temporaries.cpp

[CIR] Lower materialize-global-temporaries that self-reference (#197314)

This showed up in a test suite, but cases where a materialized global
temporary references itself, we emitted an NYI. This patch implements it
by creating a 'throw-away' global op that can be referenced by name,
then erased/thrown away. Since it is referenced by name in global-view,
all of the uses I could reproduce didn't require a 'replaceAllUsesWith',
but the call is left in case some sort of initialization causes a
reference directly to the global.

Also, as a drive-by, `createGlobalOp` was a static member function that
took the CIRGenModule as an argument for some reason, so this patch just
makes it a member function.
DeltaFile
+32-0clang/test/CIR/CodeGen/self-ref-temporaries.cpp
+19-6clang/lib/CIR/CodeGen/CIRGenModule.cpp
+51-62 files

OpenZFS/src 58c8dc5module/os/linux/zfs zpl_super.c

linux/zpl_super: handle 'source' option directly

vfs_parse_fs_param_source() didn't appear until 5.14, and was not
backported to kernel.org LTS kernels. It's simple enough that it's
easier to just handle it ourselves rather than use a configure check.

Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18529
DeltaFile
+19-10module/os/linux/zfs/zpl_super.c
+19-101 files

OPNSense/core a7ec185src/opnsense/mvc/app/views/OPNsense/CaptivePortal vouchers.volt, src/opnsense/mvc/app/views/OPNsense/Diagnostics systemactivity.volt routes.volt

bootgrid: clean up converter compatibility code

Only other consumer is Nginx in plugins, but worst case scenario
these timestamps will render as... timestamps, which in that form
are sortable anyway. It's likely this was throwing an error anyway

The "sorters" weren't actually accounted for in the compat
translation, so this wasn't overridable. Fix this here.
DeltaFile
+5-18src/opnsense/www/js/opnsense_bootgrid.js
+3-13src/opnsense/mvc/app/views/OPNsense/CaptivePortal/vouchers.volt
+2-2src/opnsense/mvc/app/views/OPNsense/Diagnostics/systemactivity.volt
+1-1src/opnsense/mvc/app/views/OPNsense/Diagnostics/routes.volt
+11-344 files

LLVM/project 0c319d1llvm/include/llvm/ADT SmallVector.h, llvm/unittests/ADT SmallVectorTest.cpp

TODO
DeltaFile
+6-4llvm/include/llvm/ADT/SmallVector.h
+8-0llvm/unittests/ADT/SmallVectorTest.cpp
+14-42 files

LLVM/project edc56e0llvm/include/llvm/Object DXContainer.h, llvm/lib/Object DXContainer.cpp

[DirectX][ObjectYAML] Add ILDB program part support (#189685)

Add support for DXContainer ILDB parts in the ObjectYAML pipeline so
they can be represented in structured YAML and round-tripped through
yaml2obj/obj2yaml.

ILDB payloads use the same layout as DXIL, but contain debug IR. This
change treats ILDB as a DXIL-shaped program part.

FileSize and DXIL ProgramHeader Size values in DXILPart.yaml were
modified to make output binary correct/parseable by dxa utility.
DeltaFile
+56-0llvm/test/ObjectYAML/DXContainer/PSVv0-ILDB.yaml
+47-1llvm/unittests/Object/DXContainerTest.cpp
+37-0llvm/test/ObjectYAML/DXContainer/ILDB-ShaderKind-mismatch.yaml
+27-5llvm/test/tools/obj2yaml/DXContainer/DXILPart.yaml
+18-7llvm/lib/Object/DXContainer.cpp
+12-2llvm/include/llvm/Object/DXContainer.h
+197-156 files not shown
+219-2312 files

LLVM/project 32265d4llvm/test/CodeGen/X86 x86-shrink-wrapping.ll

[X86] x86-shrink-wrapping.ll - ensure we don't hide stack math in the CHECKS (#197446)

Better checking of matching stack addresses
DeltaFile
+5-5llvm/test/CodeGen/X86/x86-shrink-wrapping.ll
+5-51 files

LLVM/project 774e82blldb/include/lldb/Target Process.h, lldb/source/Commands CommandObjectProcess.cpp

[LLDB] Extract process arguments from core dump for Linux (#185338)

This PR adds the ability for lldb to print out how to reproduce the
crash by printing out the arguments used with the process on Linux.

This is implemented by extracting arguments from the field `pr_psargs`
of the struct `ELFLinuxPrPsInfo`, a note entries of an ELF coredump
file.

A limitation of this approach is that the `pr_psargs` char array is only
80 character long, so the command arguments that triggers a core dump
might not be fully captured. To alleviate this, if the arguments
extracted matches the maximal length, we emit `(command may be
truncated)` message when printing the arguments to the user.

Calling `process status -v` also prints out said arguments for users, as
suggested by #156427.

Not implemented for BSD-based OSs.

Assisted with Claude.
DeltaFile
+43-0lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py
+33-1lldb/include/lldb/Target/Process.h
+17-0lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
+5-2lldb/source/Target/Process.cpp
+4-0lldb/source/Plugins/Process/elf-core/ProcessElfCore.h
+1-1lldb/source/Commands/CommandObjectProcess.cpp
+103-42 files not shown
+107-48 files

LLVM/project 72facc5llvm/test/CodeGen/X86 select-big-integer.ll

[X86] select-big-integer.ll - add 32-bit test coverage (#197451)
DeltaFile
+794-350llvm/test/CodeGen/X86/select-big-integer.ll
+794-3501 files

LLVM/project 8b1221cllvm/test/MC/AMDGPU gfx13_asm_vop3.s gfx13_asm_vop3-fake16.s

merge

Created using spr 1.3.7
DeltaFile
+8,195-0llvm/test/MC/AMDGPU/gfx13_asm_vop3.s
+8,182-0llvm/test/MC/AMDGPU/gfx13_asm_vop3-fake16.s
+5,587-0llvm/test/MC/AMDGPU/gfx13_asm_vop3_dpp16.s
+5,574-0llvm/test/MC/AMDGPU/gfx13_asm_vop3_dpp16-fake16.s
+4,106-0llvm/test/MC/AMDGPU/gfx13_asm_vop3_from_vop1-fake16.s
+3,524-0llvm/test/MC/AMDGPU/gfx13_asm_vop3_dpp8.s
+35,168-0475 files not shown
+59,726-10,325481 files

LLVM/project 7ebb1b0llvm/test/MC/AMDGPU gfx13_asm_vop3.s gfx13_asm_vop3-fake16.s

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+8,195-0llvm/test/MC/AMDGPU/gfx13_asm_vop3.s
+8,182-0llvm/test/MC/AMDGPU/gfx13_asm_vop3-fake16.s
+5,587-0llvm/test/MC/AMDGPU/gfx13_asm_vop3_dpp16.s
+5,574-0llvm/test/MC/AMDGPU/gfx13_asm_vop3_dpp16-fake16.s
+4,106-0llvm/test/MC/AMDGPU/gfx13_asm_vop3_from_vop1-fake16.s
+3,524-0llvm/test/MC/AMDGPU/gfx13_asm_vop3_dpp8.s
+35,168-0476 files not shown
+59,727-10,326482 files

LLVM/project 246ce67llvm/test/MC/AMDGPU gfx13_asm_vop3.s gfx13_asm_vop3-fake16.s

fix type

Created using spr 1.3.7
DeltaFile
+8,195-0llvm/test/MC/AMDGPU/gfx13_asm_vop3.s
+8,182-0llvm/test/MC/AMDGPU/gfx13_asm_vop3-fake16.s
+5,587-0llvm/test/MC/AMDGPU/gfx13_asm_vop3_dpp16.s
+5,574-0llvm/test/MC/AMDGPU/gfx13_asm_vop3_dpp16-fake16.s
+4,106-0llvm/test/MC/AMDGPU/gfx13_asm_vop3_from_vop1-fake16.s
+3,524-0llvm/test/MC/AMDGPU/gfx13_asm_vop3_dpp8.s
+35,168-0476 files not shown
+59,727-10,326482 files

LLVM/project 6440319llvm/test/MC/AMDGPU gfx13_asm_vop3.s gfx13_asm_vop3-fake16.s

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+8,195-0llvm/test/MC/AMDGPU/gfx13_asm_vop3.s
+8,182-0llvm/test/MC/AMDGPU/gfx13_asm_vop3-fake16.s
+5,587-0llvm/test/MC/AMDGPU/gfx13_asm_vop3_dpp16.s
+5,574-0llvm/test/MC/AMDGPU/gfx13_asm_vop3_dpp16-fake16.s
+4,106-0llvm/test/MC/AMDGPU/gfx13_asm_vop3_from_vop1-fake16.s
+3,524-0llvm/test/MC/AMDGPU/gfx13_asm_vop3_dpp8.s
+35,168-0475 files not shown
+59,726-10,325481 files

LLVM/project 0d5ced8llvm/test/MC/AMDGPU gfx13_asm_vop3.s gfx13_asm_vop3-fake16.s

merge

Created using spr 1.3.7
DeltaFile
+8,195-0llvm/test/MC/AMDGPU/gfx13_asm_vop3.s
+8,182-0llvm/test/MC/AMDGPU/gfx13_asm_vop3-fake16.s
+5,587-0llvm/test/MC/AMDGPU/gfx13_asm_vop3_dpp16.s
+5,574-0llvm/test/MC/AMDGPU/gfx13_asm_vop3_dpp16-fake16.s
+4,106-0llvm/test/MC/AMDGPU/gfx13_asm_vop3_from_vop1-fake16.s
+3,524-0llvm/test/MC/AMDGPU/gfx13_asm_vop3_dpp8.s
+35,168-0475 files not shown
+59,726-10,325481 files

LLVM/project 0b35374llvm/test/MC/AMDGPU gfx13_asm_vop3.s gfx13_asm_vop3-fake16.s

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+8,195-0llvm/test/MC/AMDGPU/gfx13_asm_vop3.s
+8,182-0llvm/test/MC/AMDGPU/gfx13_asm_vop3-fake16.s
+5,587-0llvm/test/MC/AMDGPU/gfx13_asm_vop3_dpp16.s
+5,574-0llvm/test/MC/AMDGPU/gfx13_asm_vop3_dpp16-fake16.s
+4,106-0llvm/test/MC/AMDGPU/gfx13_asm_vop3_from_vop1-fake16.s
+3,524-0llvm/test/MC/AMDGPU/gfx13_asm_vop3_dpp8.s
+35,168-0475 files not shown
+59,726-10,325481 files

LLVM/project 813757a

merge

Created using spr 1.3.7
DeltaFile
+0-00 files

LLVM/project d0fc1a7lld/ELF SyntheticSections.cpp

fix typo

Created using spr 1.3.7
DeltaFile
+2-1lld/ELF/SyntheticSections.cpp
+2-11 files

OPNSense/core d4c4861src/opnsense/mvc/app/controllers/OPNsense/Firewall/Api FilterController.php, src/opnsense/mvc/app/views/OPNsense/Firewall filter_rule.volt

Ensure translations are passed through all the way to icon formatter in view
DeltaFile
+12-12src/opnsense/mvc/app/views/OPNsense/Firewall/filter_rule.volt
+11-6src/opnsense/scripts/filter/list_non_mvc_rules.php
+6-3src/opnsense/mvc/app/controllers/OPNsense/Firewall/Api/FilterController.php
+29-213 files

LLVM/project 5bff19clldb/bindings/lua CMakeLists.txt, lldb/bindings/python CMakeLists.txt

[lldb] fix the install-lldb target (#196070)

Fixes https://github.com/llvm/llvm-project/issues/189158 by copying the
required dependencies of lldb.
DeltaFile
+41-0lldb/cmake/modules/AddLLDB.cmake
+11-0lldb/bindings/python/CMakeLists.txt
+11-0lldb/bindings/lua/CMakeLists.txt
+63-03 files

LLVM/project 356b866llvm/lib/Target/AArch64 AArch64InstrInfo.cpp, llvm/unittests/Target/AArch64 InstSizes.cpp

[AArch64] Report accurate sizes for MOVaddr and MOVimm pseudos (#183506)
DeltaFile
+89-0llvm/unittests/Target/AArch64/InstSizes.cpp
+25-0llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+114-02 files

FreeBSD/src cc92108release Makefile Makefile.vm

release: Use make's `:H` rather than `/..`

In general we want to strip subdir components, rather than appending
`..`s.

Reviewed by:    lwhsu
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54373

(cherry picked from commit 3949c2b8c4691a6dff8be7b38805d56faab91187)
(cherry picked from commit 61f0453b3aa71e640a42085f67ce556ca3283c6c)
DeltaFile
+2-2release/Makefile
+1-1release/Makefile.vm
+3-32 files

LLVM/project fecfdfdlldb/source/Plugins/ScriptInterpreter/Python CMakeLists.txt

[lldb][Python] Include limited API library directory (#197185)

On Windows, when compiling with the limited API in non-debug mode,
Python will instruct the linker to link `python3.lib`
[here](https://github.com/python/cpython/blob/f5fb491341e566bbaf17d9bf3e4ec3af4a56bb3f/PC/pyconfig.h#L344-L345).

Currently, we don't directly specify the library in CMake. We specify
`python3xx.lib`. When the linker encounters the `python3.lib`
requirement, it errors out, because it doesn't know where that is. With
this PR, we add the directory of `python3xx.lib`. This is the same one
as `python3.lib`. So the linker can find the library.

This is more of a temporary fix. As commented in the code, we should use
`Python3_SABI_LIBRARY_DIRS` once we require CMake 3.26. Furthermore, I'm
not fully sure why we link to `python3xx.lib` when the limited API is
requested (presumably because of #167001?).
DeltaFile
+10-0lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
+10-01 files

FreeBSD/ports 7d952cceditors/pluma pkg-plist distinfo

editors/pluma: update to 1.28.1

Changelog: https://github.com/mate-desktop/pluma/releases/tag/v1.28.1

Fixes devel/libpeas1 update fallout.

Reported by: Ale
PR: 295224
DeltaFile
+31-0editors/pluma/pkg-plist
+3-3editors/pluma/distinfo
+3-3editors/pluma/Makefile
+37-63 files

LLVM/project 2273935lldb/test/API/api/command-return-object TestSBCommandReturnObject.py, lldb/test/API/api/multiple-targets TestMultipleTargets.py

[lldb][windows] enable TestMultipleTargets.py and TestSBCommandReturnObject.py (#197251)

These 2 tests are passing on Windows. Enable them.
DeltaFile
+0-3lldb/test/API/api/multiple-targets/TestMultipleTargets.py
+0-3lldb/test/API/api/command-return-object/TestSBCommandReturnObject.py
+0-62 files

LLVM/project ecf8a7dlldb/packages/Python/lldbsuite/test lldbtest.py

[lldb][windows] preserve PATH in lldbtest (#197232)

On Windows the shlib environment variable is `PATH`. In swiftlang, it
carries essential runtime paths (Swift runtime, etc.).
`SetEnvironmentEntries` with append=True replaces any matching key, so
simply returning "PATH=<test-build-dir>" currently wipes out the
inherited `PATH` and breaks DLL resolution.

This patch prepends the shlib directories to the inherited `PATH`
instead.
DeltaFile
+10-0lldb/packages/Python/lldbsuite/test/lldbtest.py
+10-01 files

FreeBSD/ports 3a6bff0graphics/eom pkg-plist Makefile, graphics/eom/files patch-po_LINGUAS

graphics/eom: update to 1.28.1

Changelog: https://github.com/mate-desktop/eom/releases/tag/v1.28.1

Fixes devel/libpeas1 update fallout.

Reported by: Ale
PR: 295223
DeltaFile
+17-57graphics/eom/pkg-plist
+10-7graphics/eom/Makefile
+0-17graphics/eom/files/patch-po_LINGUAS
+3-3graphics/eom/distinfo
+30-844 files

LLVM/project 4667810clang/lib/CIR/Dialect/Transforms LoweringPrepare.cpp, clang/test/CIR/CodeGen global-tls-simple-init.cpp global-tls-dyn-init.cpp

[CIR] Global-TLS Wrapper/init func lowering- (#197265)

This patch does most of the rest of the Global-TLS lowering prepare
feature. It makes sure the individual 'init' functions are generated,
  and properly generates the 'wrapper' to call the 'init'.

It is missing(to come in the followup patch):
1- Generation of the actual 'call all inits' function. 2- Emitting the
'guard' functionality in unordered inits.

---------

Co-authored-by: Andy Kaylor <akaylor at nvidia.com>
DeltaFile
+158-42clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp
+99-46clang/test/CIR/CodeGen/global-tls-simple-init.cpp
+92-22clang/test/CIR/CodeGen/global-tls-dyn-init.cpp
+92-18clang/test/CIR/CodeGen/global-tls-templates.cpp
+441-1284 files

LLVM/project 4a8900flldb/source/Plugins/Platform/Windows PlatformWindows.cpp

[lldb][windows] add sibling-import fallback to LoadImage helper (#197218)

`PlatformWindows::DoLoadImage` injects `__lldb_LoadLibraryHelper` which
registers each caller-supplied search path via `AddDllDirectory()` and
calls `LoadLibraryExW(name, nullptr, LOAD_LIBRARY_SEARCH_DEFAULT_DIRS)`.
In practice however, this flow fails for a common layout where a DLL
lives next to its sibling imports. LoadLibraryExW returns
ERROR_CANT_RESOLVE_FILENAME and the load is reported as unrecoverable,
even though every required DLL is present in one of the search paths.

This patch adds a fallback after the first `LoadLibraryExW(name,
nullptr, LOAD_LIBRARY_SEARCH_DEFAULT_DIRS)` call: if it fails, iterate
the caller-provided search paths and try `LoadLibraryExW(path, nullptr,
LOAD_WITH_ALTERED_SEARCH_PATH)`. `LOAD_WITH_ALTERED_SEARCH_PATH`
instructs the Windows loader to add the DLL's own directory to the
dependency search.

See
https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-loadlibraryexa.

    [3 lines not shown]
DeltaFile
+31-0lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
+31-01 files

FreeBSD/ports a2fbe12games/xonix pkg-descr

games/xonix: Fix typos in pkg-descr
DeltaFile
+1-1games/xonix/pkg-descr
+1-11 files