On 7/25/26 13:16, Fabian Grünbichler wrote:
On Sat, Jul 25, 2026, at 6:03 PM, Andres Salomon wrote:
On 7/25/26 04:38, Fabian Grünbichler wrote:
On Fri, Jul 24, 2026, at 7:25 PM, Fabian Grünbichler wrote:
On Fri, Jul 24, 2026, at 6:35 PM, Andres Salomon wrote:
On 7/24/26 11:39, Fabian Grünbichler wrote:
On Thu, Jul 23, 2026, at 7:04 PM, Andres Salomon wrote:
On 7/6/26 14:37, Andres Salomon wrote:
[...]
Okay, that took a little longer than expected because building chromium
on trixie with llvm-toolchain-22 broke (related to trixie's older
bindgen), but we have a workaround for chromium and I was able to test
chromium builds with this new ~deb13u2 package.
I've attached the full debdiff between sid's version and this backport,
but the only non-changelog difference between ~deb13u1 and ~deb13u2 is
the bit at the end:
[...]
it would probably be good if we could wait for this MR to land:
https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/merge_requests/224
to avoid the need for another bump for rustc(-web)?
Ah jeez - if that were a smaller commit, I'd just cherry-pick it and
roll a ~deb13u3. Given the size though, I'll wait for the llvm packages
to pick it up and migrate to forky.
FWIW, the actual change is the first small hunk, the rest is testsuite
changes that I don't think the Debian build even runs. Let me
double-check and verify (and minimize accordingly).
updated MR (original one got merged already) opened, since what I wrote
above holds.
I'm not seeing an updated MR, but if it's just skipping all the test/
stuff that's easy enough. I'll start up a deb13u3 build shortly.
https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/merge_requests/226
and yes, exactly, same patch, just without all the test hunks :)
Okay, I stuck the new packages at
https://people.debian.org/~dilinger/llvm22/. If you have a way of
reproducing the OOB issue, would you mind giving them another whirl
building rustc to make sure the included fix works as intended? If
everything looks good I'll upload them tonight or tomorrow. I've already
successfully built chromium with these.
diff -urN a/debian/changelog b/debian/changelog
--- a/debian/changelog 2026-06-18 15:26:30.000000000 +0000
+++ b/debian/changelog 2026-07-25 18:50:17.994650322 +0000
@@ -1,3 +1,36 @@
+llvm-toolchain-22 (1:22.1.8-1~deb13u3) trixie; urgency=medium
+
+ * d/patches/x86-fix-incorrect-load-combining-causing-oob-reads.patch:
+ Pull in upstream fix for llvm's tendency to miscompile rustc; see
+ https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/merge_requests/224
+
+ -- Andres Salomon <[email protected]> Sat, 25 Jul 2026 18:45:26 +0000
+
+llvm-toolchain-22 (1:22.1.8-1~deb13u2) trixie; urgency=medium
+
+ * Update d/rules to liboffload depend on llvm 19's libomp.
+
+ -- Andres Salomon <[email protected]> Mon, 20 Jul 2026 08:12:18 +0000
+
+llvm-toolchain-22 (1:22.1.8-1~deb13u1) trixie; urgency=medium
+
+ * Non-maintainer upload.
+ * Rebuild for trixie.
+ * Change build-dep from sid's llvm-spirv-22 to trixie's llvm-spirv-19.
+ * Add s390x to g++-multilib build-dep.
+ * Set SKIP_COMMON_PACKAGES=yes in d/rules to skip building the
+ non-versioned library packages. Set the NEW_LLVM_VERSION to 19 (instead of
+ 23; not what the maintainers intended, but it works).
+ * Regenerate d/control, dropping libc++1, libc++abi1, llvm-libunwind1, and
+ libomp5 binary packages, and also adding build-deps on trixie's
+ libc++1-19, libc++abi1-19, libomp5-19, libunwind-19, and libllvm19.
+ * Add depends for the various -dev packages to those -19 shared lib
+ packages, but also note in package descriptions that dynamic linking is
+ unsupported. It *will* fail, as -22-dev headers include symbols that -19
+ doesn't have.
+
+ -- Andres Salomon <[email protected]> Tue, 23 Jun 2026 03:24:19 +0000
+
llvm-toolchain-22 (1:22.1.8-1) unstable; urgency=medium
* New upstream release
diff -urN a/debian/control b/debian/control
--- a/debian/control 2026-05-06 07:45:48.000000000 +0000
+++ b/debian/control 2026-07-25 18:51:14.830697911 +0000
@@ -8,14 +8,14 @@
chrpath, texinfo, sharutils,
libelf-dev,
libffi-dev,
- lsb-release, patchutils, diffstat, xz-utils, python3-dev,
+ lsb-release, patchutils, diffstat, xz-utils, python3-dev, libc++1-19, libc++abi1-19, libomp5-19 [amd64 arm64 armhf i386 loong64 mips64el ppc64 ppc64el riscv64 hurd-amd64], libunwind-19, libllvm19,
libedit-dev, libncurses-dev, swig, python3-sphinx (>= 1.3.6),
binutils-dev, lld [amd64 arm64 armel armhf i386 loong64 ppc64el riscv64 s390x] | hello [amd64 arm64 armel armhf i386 loong64 ppc64el riscv64 s390x],
libxml2-dev,
libipt-dev [amd64 i386],
lcov, procps, help2man,
zlib1g-dev, libzstd-dev,
- g++-multilib [amd64 i386 mips64 mips64el mipsel powerpc ppc64 sparc sparc64 x32] | hello [amd64 i386 mips64 mips64el mipsel powerpc ppc64 sparc sparc64 x32],
+ g++-multilib [amd64 i386 mips64 mips64el mipsel powerpc ppc64 s390x sparc sparc64 x32] | hello [amd64 i386 mips64 mips64el mipsel powerpc ppc64 s390x sparc sparc64 x32],
libjs-mathjax, python3-myst-parser | python3-recommonmark, python3-pexpect,
doxygen, time,
dh-exec, dh-python, ocaml-base [amd64 arm64 ppc64el riscv64 s390x] <!pkg.llvm.noocaml> | ocaml-nox [amd64 arm64 ppc64el riscv64 s390x] <!pkg.llvm.noocaml>, ocaml-findlib [amd64 arm64 ppc64el riscv64 s390x] <!pkg.llvm.noocaml>, libctypes-ocaml-dev [amd64 arm64 ppc64el riscv64 s390x] <!pkg.llvm.noocaml>, dh-ocaml [amd64 arm64 ppc64el riscv64 s390x] <!pkg.llvm.noocaml>,
@@ -23,7 +23,7 @@
# "| hello" is for older buster/bionic distros without spirv support
# We need to keep the constraints coherent between the two alternatives, otherwise
# hello would get installed unexpectedly and prevent e.g. wasi-libc from getting pulled
- llvm-spirv-22 [amd64 arm64 armhf i386 ppc64 ppc64el riscv64 s390x] <!stage1> | hello [amd64 arm64 armhf i386 ppc64 ppc64el riscv64 s390x] <!stage1>,
+ llvm-spirv-19 [amd64 arm64 armhf i386 ppc64 ppc64el riscv64 s390x] <!stage1> | hello [amd64 arm64 armhf i386 ppc64 ppc64el riscv64 s390x] <!stage1>,
spirv-tools [amd64 arm64 armhf i386 ppc64 ppc64el riscv64 s390x] <!stage1> | hello [amd64 arm64 armhf i386 ppc64 ppc64el riscv64 s390x] <!stage1>,
wasi-libc | hello,
mingw-w64-common,
@@ -650,7 +650,7 @@
Build-Profiles: <!pkg.llvm.noclang>
Section: libdevel
Architecture: amd64 arm64 armhf i386 loong64 mips64el ppc64 ppc64el riscv64 hurd-amd64
-Depends: libomp5 (>= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Depends: libomp5-19, ${shlibs:Depends}, ${misc:Depends}
Suggests: libomp-22-doc
Breaks: libomp-dev (<< 3.7-1), libomp5 (<< 1:22~++20251023025710+3f47a7be1ae6-1~exp4)
Provides: libomp-x.y-dev
@@ -660,20 +660,8 @@
The runtime is the part of the OpenMP implementation that your code is
linked against, and that manages the multiple threads in an OpenMP program
while it is executing.
-
-Package: libomp5
-Build-Profiles: <!pkg.llvm.noclang>
-Architecture: amd64 arm64 armhf i386 loong64 mips64el ppc64 ppc64el riscv64 hurd-amd64
-Multi-Arch: same
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Provides: libomp-x.y
-Conflicts: libomp-x.y
-Breaks: libomp5-22
-Replaces: libomp5-22, libomp-x.y
-Description: LLVM OpenMP runtime
- The runtime is the part of the OpenMP implementation that your code is
- linked against, and that manages the multiple threads in an OpenMP program
- while it is executing.
+ .
+ NOTE: dynamic linking is not supported in this backport.
Package: libomp-22-doc
Build-Profiles: <!pkg.llvm.noclang>
@@ -724,36 +712,11 @@
# ------------- libcxx -------------
-Package: libc++1
-Build-Profiles: <!pkg.llvm.noclang>
-Section: libs
-Architecture: amd64 arm64 armel armhf hurd-amd64 hurd-i386 i386 loong64 m68k mips64el mipsel powerpc ppc64 ppc64el riscv64 s390x sparc sparc64 x32
-Multi-Arch: same
-Pre-Depends: ${misc:Pre-Depends}
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Suggests: clang
-Provides: libc++-x.y
-Conflicts: libc++-x.y
-Replaces: libc++1-21, libc++-x.y
-Breaks: libc++1-21, libc++1-19, libc++abi1-19, libc++1-14, libc++abi1-14
-Description: LLVM C++ Standard library
- libc++ is another implementation of the C++ standard library.
- .
- Features and Goals
- .
- * Correctness as defined by the C++ standards.
- * Fast execution.
- * Minimal memory use.
- * Fast compile times.
- * ABI compatibility with gcc's libstdc++ for some low-level features such
- as exception objects, rtti and memory allocation.
- * Extensive unit tests.
-
Package: libc++-22-dev
Build-Profiles: <!pkg.llvm.noclang>
Section: libdevel
Architecture: amd64 arm64 armel armhf hurd-amd64 hurd-i386 i386 loong64 m68k mips64el mipsel powerpc ppc64 ppc64el riscv64 s390x sparc sparc64 x32
-Depends: libc++1 (>= ${binary:Version}), ${misc:Depends},
+Depends: libc++1-19, ${misc:Depends},
libc++abi-22-dev (= ${binary:Version})
Provides: libc++-x.y-dev
Conflicts: libc++-x.y-dev
@@ -762,6 +725,8 @@
Description: LLVM C++ Standard library (development files)
libc++ is another implementation of the C++ standard library
.
+ NOTE: dynamic linking is not supported in this backport.
+ .
Features and Goals
.
* Correctness as defined by the C++ standards.
@@ -798,31 +763,11 @@
# ------------- libcxxabi -------------
-Package: libc++abi1
-Build-Profiles: <!pkg.llvm.noclang>
-Section: libs
-Architecture: amd64 arm64 armel armhf hurd-amd64 hurd-i386 i386 loong64 m68k mips64el mipsel powerpc ppc64 ppc64el riscv64 s390x sparc sparc64 x32
-Multi-Arch: same
-Pre-Depends: ${misc:Pre-Depends}
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Provides: libc++abi-x.y
-Conflicts: libc++abi-x.y
-Replaces: libc++abi1-21, libc++abi-x.y
-Breaks: libc++abi1-21, libc++abi1-19, libc++abi1-14
-Description: LLVM low level support for a standard C++ library
- libc++abi is another implementation of low level support for a standard C++
- library.
- .
- Features and Goals
- .
- * Correctness as defined by the C++ standards.
- * Provide a portable sublayer to ease the porting of libc++
-
Package: libc++abi-22-dev
Build-Profiles: <!pkg.llvm.noclang>
Section: libdevel
Architecture: amd64 arm64 armel armhf hurd-amd64 hurd-i386 i386 loong64 m68k mips64el mipsel powerpc ppc64 ppc64el riscv64 s390x sparc sparc64 x32
-Depends: libc++abi1 (>= ${binary:Version}), ${misc:Depends}
+Depends: libc++abi1-19, ${misc:Depends}
Breaks: libc++abi-dev (<= 44), libc++abi1 (<< 1:22~++20251023025710+3f47a7be1ae6-1~exp4)
Provides: libc++abi-x.y-dev
Conflicts: libc++abi-x.y-dev
@@ -831,6 +776,8 @@
libc++abi is another implementation of low level support for a standard C++
library.
.
+ NOTE: dynamic linking is not supported in this backport.
+ .
Features and Goals
.
* Correctness as defined by the C++ standards.
@@ -897,33 +844,13 @@
# ------------- libunwind -------------
-Package: llvm-libunwind1
-Build-Profiles: <!pkg.llvm.noclang>
-Section: libs
-Architecture: amd64 arm64 armhf i386 loong64 ppc64 ppc64el riscv64 s390x
-Multi-Arch: same
-Depends: ${shlibs:Depends},
- ${misc:Depends}
-Provides: libunwind-x.y
-Breaks: libunwind-21
-Conflicts: libunwind-x.y
-Replaces: libunwind-x.y, libunwind-21
-Description: LLVM unwinder, not compatible with glibc
- llvm-libunwind is the LLVM unwinder, with platform support for DWARF
- unwind info, SjLj, and ARM EHABI. Using it for packaging work inside
- Debian is not recommended, incompatible with glibc.
- .
- The low level libunwind API was designed to work either in-process (aka local)
- or to operate on another process (aka remote), but only the local path has
- been implemented. Remote unwinding remains as future work.
-
Package: libunwind-22-dev
Build-Profiles: <!pkg.llvm.noclang>
Section: libdevel
Architecture: amd64 arm64 armhf i386 loong64 ppc64 ppc64el riscv64 s390x
Depends:
${misc:Depends},
- llvm-libunwind1 (>= ${binary:Version})
+ libunwind-19
Provides: libunwind-x.y-dev
Conflicts: libunwind-dev, libunwind-x.y-dev
Breaks: llvm-libunwind1 (<< 1:22~++20251023025710+3f47a7be1ae6-1~exp4)
@@ -933,6 +860,8 @@
unwind info, SjLj, and ARM EHABI. Using it for packaging work inside
Debian is not recommended, incompatible with glibc.
.
+ NOTE: dynamic linking is not supported in this backport.
+ .
The low level libunwind API was designed to work either in-process (aka local)
or to operate on another process (aka remote), but only the local path has
been implemented. Remote unwinding remains as future work.
diff -urN a/debian/control.in b/debian/control.in
--- a/debian/control.in 2026-05-06 07:14:26.000000000 +0000
+++ b/debian/control.in 2026-07-20 08:11:06.753750104 +0000
@@ -23,7 +23,7 @@
# "| hello" is for older buster/bionic distros without spirv support
# We need to keep the constraints coherent between the two alternatives, otherwise
# hello would get installed unexpectedly and prevent e.g. wasi-libc from getting pulled
- llvm-spirv-22 [@LLVM_SPIRV_ARCHS@] <!stage1>@BEGIN_OPTIONAL_HELLO@ | hello [@LLVM_SPIRV_ARCHS@] <!stage1>@END_OPTIONAL_HELLO@,
+ llvm-spirv-19 [@LLVM_SPIRV_ARCHS@] <!stage1>@BEGIN_OPTIONAL_HELLO@ | hello [@LLVM_SPIRV_ARCHS@] <!stage1>@END_OPTIONAL_HELLO@,
spirv-tools [@LLVM_SPIRV_ARCHS@] <!stage1>@BEGIN_OPTIONAL_HELLO@ | hello [@LLVM_SPIRV_ARCHS@] <!stage1>@END_OPTIONAL_HELLO@,
wasi-libc@BEGIN_OPTIONAL_HELLO@ | hello@END_OPTIONAL_HELLO@,
mingw-w64-common,
@@ -650,7 +650,7 @@
Build-Profiles: <!pkg.llvm.noclang>
Section: libdevel
Architecture: @OMP_ARCHS@
-Depends: libomp5 (>= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Depends: libomp5-19, ${shlibs:Depends}, ${misc:Depends}
Suggests: libomp-@LLVM_VERSION@-doc
Breaks: libomp-dev (<< 3.7-1), libomp5 (<< @LIBCXX_MOVE_VERSION@)
Provides: libomp-x.y-dev
@@ -660,20 +660,8 @@
The runtime is the part of the OpenMP implementation that your code is
linked against, and that manages the multiple threads in an OpenMP program
while it is executing.
-
-Package: libomp5
-Build-Profiles: <!pkg.llvm.noclang>
-Architecture: @OMP_ARCHS@
-Multi-Arch: same
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Provides: libomp-x.y
-Conflicts: libomp-x.y
-Breaks: libomp5-22
-Replaces: libomp5-22, libomp-x.y
-Description: LLVM OpenMP runtime
- The runtime is the part of the OpenMP implementation that your code is
- linked against, and that manages the multiple threads in an OpenMP program
- while it is executing.
+ .
+ NOTE: dynamic linking is not supported in this backport.
Package: libomp-@LLVM_VERSION@-doc
Build-Profiles: <!pkg.llvm.noclang>
@@ -724,36 +712,11 @@
# ------------- libcxx -------------
-Package: libc++1
-Build-Profiles: <!pkg.llvm.noclang>
-Section: libs
-Architecture: @ANY_ARCHS@
-Multi-Arch: same
-Pre-Depends: ${misc:Pre-Depends}
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Suggests: clang
-Provides: libc++-x.y
-Conflicts: libc++-x.y
-Replaces: libc++1-21, libc++-x.y
-Breaks: libc++1-21, libc++1-19, libc++abi1-19, libc++1-14, libc++abi1-14
-Description: LLVM C++ Standard library
- libc++ is another implementation of the C++ standard library.
- .
- Features and Goals
- .
- * Correctness as defined by the C++ standards.
- * Fast execution.
- * Minimal memory use.
- * Fast compile times.
- * ABI compatibility with gcc's libstdc++ for some low-level features such
- as exception objects, rtti and memory allocation.
- * Extensive unit tests.
-
Package: libc++-@LLVM_VERSION@-dev
Build-Profiles: <!pkg.llvm.noclang>
Section: libdevel
Architecture: @ANY_ARCHS@
-Depends: libc++1 (>= ${binary:Version}), ${misc:Depends},
+Depends: libc++1-19, ${misc:Depends},
libc++abi-@LLVM_VERSION@-dev (= ${binary:Version})
Provides: libc++-x.y-dev
Conflicts: libc++-x.y-dev
@@ -762,6 +725,8 @@
Description: LLVM C++ Standard library (development files)
libc++ is another implementation of the C++ standard library
.
+ NOTE: dynamic linking is not supported in this backport.
+ .
Features and Goals
.
* Correctness as defined by the C++ standards.
@@ -798,31 +763,11 @@
# ------------- libcxxabi -------------
-Package: libc++abi1
-Build-Profiles: <!pkg.llvm.noclang>
-Section: libs
-Architecture: @ANY_ARCHS@
-Multi-Arch: same
-Pre-Depends: ${misc:Pre-Depends}
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Provides: libc++abi-x.y
-Conflicts: libc++abi-x.y
-Replaces: libc++abi1-21, libc++abi-x.y
-Breaks: libc++abi1-21, libc++abi1-19, libc++abi1-14
-Description: LLVM low level support for a standard C++ library
- libc++abi is another implementation of low level support for a standard C++
- library.
- .
- Features and Goals
- .
- * Correctness as defined by the C++ standards.
- * Provide a portable sublayer to ease the porting of libc++
-
Package: libc++abi-@LLVM_VERSION@-dev
Build-Profiles: <!pkg.llvm.noclang>
Section: libdevel
Architecture: @ANY_ARCHS@
-Depends: libc++abi1 (>= ${binary:Version}), ${misc:Depends}
+Depends: libc++abi1-19, ${misc:Depends}
Breaks: libc++abi-dev (<= 44), libc++abi1 (<< @LIBCXX_MOVE_VERSION@)
Provides: libc++abi-x.y-dev
Conflicts: libc++abi-x.y-dev
@@ -831,6 +776,8 @@
libc++abi is another implementation of low level support for a standard C++
library.
.
+ NOTE: dynamic linking is not supported in this backport.
+ .
Features and Goals
.
* Correctness as defined by the C++ standards.
@@ -897,33 +844,13 @@
# ------------- libunwind -------------
-Package: llvm-libunwind1
-Build-Profiles: <!pkg.llvm.noclang>
-Section: libs
-Architecture: @LIBUNWIND_ARCHS@
-Multi-Arch: same
-Depends: ${shlibs:Depends},
- ${misc:Depends}
-Provides: libunwind-x.y
-Breaks: libunwind-21
-Conflicts: libunwind-x.y
-Replaces: libunwind-x.y, libunwind-21
-Description: LLVM unwinder, not compatible with glibc
- llvm-libunwind is the LLVM unwinder, with platform support for DWARF
- unwind info, SjLj, and ARM EHABI. Using it for packaging work inside
- Debian is not recommended, incompatible with glibc.
- .
- The low level libunwind API was designed to work either in-process (aka local)
- or to operate on another process (aka remote), but only the local path has
- been implemented. Remote unwinding remains as future work.
-
Package: libunwind-@LLVM_VERSION@-dev
Build-Profiles: <!pkg.llvm.noclang>
Section: libdevel
Architecture: @LIBUNWIND_ARCHS@
Depends:
${misc:Depends},
- llvm-libunwind1 (>= ${binary:Version})
+ libunwind-19
Provides: libunwind-x.y-dev
Conflicts: libunwind-dev, libunwind-x.y-dev
Breaks: llvm-libunwind1 (<< @LIBCXX_MOVE_VERSION@)
@@ -933,6 +860,8 @@
unwind info, SjLj, and ARM EHABI. Using it for packaging work inside
Debian is not recommended, incompatible with glibc.
.
+ NOTE: dynamic linking is not supported in this backport.
+ .
The low level libunwind API was designed to work either in-process (aka local)
or to operate on another process (aka remote), but only the local path has
been implemented. Remote unwinding remains as future work.
diff -urN a/debian/patches/series b/debian/patches/series
--- a/debian/patches/series 2026-06-02 19:36:44.000000000 +0000
+++ b/debian/patches/series 2026-07-25 18:49:41.086622047 +0000
@@ -144,3 +144,5 @@
# only apply this patch for Ubuntu 25.10 or newer
#ubuntu-clang-use-RVA23U64-profile.patch
+
+x86-fix-incorrect-load-combining-causing-oob-reads.patch
diff -urN a/debian/patches/x86-fix-incorrect-load-combining-causing-oob-reads.patch b/debian/patches/x86-fix-incorrect-load-combining-causing-oob-reads.patch
--- a/debian/patches/x86-fix-incorrect-load-combining-causing-oob-reads.patch 1970-01-01 00:00:00.000000000 +0000
+++ b/debian/patches/x86-fix-incorrect-load-combining-causing-oob-reads.patch 2026-07-25 18:49:17.066604837 +0000
@@ -0,0 +1,68 @@
+From 6458195e49ecce07f10c185a82ed0a2bb6ca753b Mon Sep 17 00:00:00 2001
+From: Nikita Popov <[email protected]>
+Date: Fri, 10 Jul 2026 16:08:02 +0200
+Subject: [PATCH] [SDAG] Freeze condition in select of load fold (#208683)
+
+When converting `select cond, (load p1), (load p2)` to `load (select
+cond, p1, p2)`, if `cond` is poison, originally this would result in a
+`poison` result, while after the transform it would result in a load of
+poison, which is immediate UB. Fix this by freezing the condition.
+
+Fixes https://github.com/llvm/llvm-project/issues/208611.
+
+(cherry picked from commit f2dfbf06f7db1a3cace4beb9f65d5a7f6a8b6235)
+(all tests dropped from patch)
+---
+ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 16 +-
+ llvm/test/CodeGen/AArch64/icmp.ll | 30 +-
+ llvm/test/CodeGen/ARM/fp16-promote.ll | 2 +-
+ llvm/test/CodeGen/Mips/cconv/vector.ll | 10 +-
+ llvm/test/CodeGen/Mips/cmov.ll | 2 +-
+ llvm/test/CodeGen/NVPTX/i1-select.ll | 14 +-
+ .../CodeGen/X86/fp-strict-scalar-cmp-fp16.ll | 108 +-
+ llvm/test/CodeGen/X86/fp-strict-scalar-cmp.ll | 936 +++++++++++++-----
+ .../test/CodeGen/X86/fp128-libcalls-strict.ll | 2 +
+ .../CodeGen/X86/fp80-strict-scalar-cmp.ll | 144 ++-
+ llvm/test/CodeGen/X86/isel-select-cmov.ll | 16 +-
+ llvm/test/CodeGen/X86/select-constant-xor.ll | 12 +-
+ llvm/test/CodeGen/X86/select-mmx.ll | 4 +-
+ .../test/CodeGen/X86/select-of-load-poison.ll | 20 +
+ 14 files changed, 956 insertions(+), 360 deletions(-)
+ create mode 100644 llvm/test/CodeGen/X86/select-of-load-poison.ll
+
+diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+index ee9238753735..dec92eff5bc1 100644
+--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
++++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+@@ -29318,10 +29318,12 @@ bool DAGCombiner::SimplifySelectOps(SDNode *TheSelect, SDValue LHS,
+ SDNode::hasPredecessorHelper(RLD, Visited, Worklist)))
+ return false;
+
+- Addr = DAG.getSelect(SDLoc(TheSelect),
+- LLD->getBasePtr().getValueType(),
+- TheSelect->getOperand(0), LLD->getBasePtr(),
+- RLD->getBasePtr());
++ // If the condition is poison, originally this would result in a poison
++ // result. After the transform, this would result in a load of poison,
++ // which is UB. Freeze the condition to prevent this.
++ Addr = DAG.getSelect(SDLoc(TheSelect), LLD->getBasePtr().getValueType(),
++ DAG.getFreeze(TheSelect->getOperand(0)),
++ LLD->getBasePtr(), RLD->getBasePtr());
+ } else { // Otherwise SELECT_CC
+ // We cannot do this optimization if any pair of {RLD, LLD} is a
+ // predecessor to {RLD, LLD, CondLHS, CondRHS}. As we've already compared
+@@ -29340,10 +29342,10 @@ bool DAGCombiner::SimplifySelectOps(SDNode *TheSelect, SDValue LHS,
+ SDNode::hasPredecessorHelper(RLD, Visited, Worklist)))
+ return false;
+
++ SDValue FrozenOp0 = DAG.getFreeze(TheSelect->getOperand(0));
++ SDValue FrozenOp1 = DAG.getFreeze(TheSelect->getOperand(1));
+ Addr = DAG.getNode(ISD::SELECT_CC, SDLoc(TheSelect),
+- LLD->getBasePtr().getValueType(),
+- TheSelect->getOperand(0),
+- TheSelect->getOperand(1),
++ LLD->getBasePtr().getValueType(), FrozenOp0, FrozenOp1,
+ LLD->getBasePtr(), RLD->getBasePtr(),
+ TheSelect->getOperand(4));
+ }
+
diff -urN a/debian/rules b/debian/rules
--- a/debian/rules 2026-06-18 15:23:32.000000000 +0000
+++ b/debian/rules 2026-07-20 08:11:06.753750104 +0000
@@ -186,12 +186,12 @@
endif
endif
# set these two when building without the common packages
-#SKIP_COMMON_PACKAGES = yes
-#NEW_LLVM_VERSION = 23
+SKIP_COMMON_PACKAGES = yes
+NEW_LLVM_VERSION = 19
ifeq ($(SKIP_COMMON_PACKAGES),yes)
COMMON_PKGS := $(shell cat debian/packages.common)
- COMMON_BUILD_DEPS = $(foreach p,$(COMMON_PKGS),$(p)$(COMMA))
+ COMMON_BUILD_DEPS = $(subst llvm-libunwind1,libunwind,$(foreach p,$(COMMON_PKGS),$(p)-$(NEW_LLVM_VERSION)$(COMMA)))
# make sure the common packages exist for the new LLVM version
NEXT_LIBLLVM_PKG = libllvm$(NEW_LLVM_VERSION),
endif
@@ -717,7 +717,7 @@
STAGE_ALL_CMAKE_EXTRA += -DLIBOMP_LIBFLAGS="-lm"
endif
ifeq ($(SKIP_COMMON_PACKAGES),yes)
- COMMON_BUILD_DEPS := $(subst libomp5,libomp5 [$(OMP_ARCHS)],$(COMMON_BUILD_DEPS))
+ COMMON_BUILD_DEPS := $(subst libomp5-19,libomp5-19 [$(OMP_ARCHS)],$(COMMON_BUILD_DEPS))
endif
# Enable offloading (or not)
@@ -1833,7 +1833,7 @@
echo 'libc++ 1 libc++1 (>= 1:$(LLVM_VERSION).1)' > debian/shlibs.common
echo 'libc++abi 1 libc++abi1 (>= 1:$(LLVM_VERSION).1)' >> debian/shlibs.common
ifneq (,$(filter $(DEB_HOST_ARCH), $(OMP_ARCHS)))
- echo 'libomp $(SONAME_OPENMP) libomp5 (>= 1:$(LLVM_VERSION).1)' >> debian/shlibs.common
+ echo 'libomp $(SONAME_OPENMP) libomp5-19' >> debian/shlibs.common
endif
ifneq (,$(filter $(DEB_HOST_ARCH), $(LIBUNWIND_ARCHS)))
echo 'libunwind 1 llvm-libunwind1 (>= 1:$(LLVM_VERSION).1)' >> debian/shlibs.common