Fedora Account System
Red Hat Associate
Red Hat Customer
Koschei found a regression on ppc64le for the "libcramjam" Rust crate: https://koschei.fedoraproject.org/package/rust-libcramjam? One of its test binaries failed to build: sext source and destination must both be a vector or neither %1220 = sext <4 x i32> %1218 to i64, !dbg !428653 sext source and destination must both be a vector or neither %1221 = sext <4 x i32> %1219 to i64, !dbg !428654 sext source and destination must both be a vector or neither %1319 = sext <4 x i32> %1317 to i64, !dbg !428743 sext source and destination must both be a vector or neither %1320 = sext <4 x i32> %1318 to i64, !dbg !428744 in function _RNvNtCsb33MiWvTZAZ_13libbz2_rs_sys8compress14compress_block rustc-LLVM ERROR: Broken function found, compilation aborted! I was able to reproduce this with the upstream Rust toolchain, and bisecting nightly builds came to the LLVM 23 upgrade. With extracted and reduced bitcode, I bisected LLVM to this commit: https://github.com/llvm/llvm-project/commit/84f4b1e52df736d4bd0bcf821c7fbe06f3534042 Then I found an LLVM issue which happens to be on the same Rust function, though for x86-64 with AVX-512 instead. https://github.com/llvm/llvm-project/issues/229609 And this is fixed on main in: https://github.com/llvm/llvm-project/pull/229927 I've confirmed that this fixes the issue for my ppc64le bitcode as well. I asked on the PR for a 23.x backport, but if that doesn't happen then perhaps we can patch it in Fedora ourselves.
There's at least one more affected application: https://koschei.fedoraproject.org/package/rust-sequoia-chameleon-gnupg
Status update: I've been working on the backport for this. The PR depends on many other changes for LLVM 24. I'm still working on this and need more time.
Thanks for the update. Would temporarily switching rustc back to use LLVM 22 to avoid this issue be an option?
As a more targeted workaround, you could use this in the affected packages: %global build_rustflags %{build_rustflags} -Cno-vectorize-loops ... perhaps only for the specific arch as well. (It helps that this is a hard error, rather than a silent miscompilation...)
Can confirm that this works as a workaround, thanks! (see https://src.fedoraproject.org/rpms/rust-sequoia-chameleon-gnupg/c/ea00539 )
(In reply to Fabio Valentini from comment #5) > Can confirm that this works as a workaround, thanks! > (see > https://src.fedoraproject.org/rpms/rust-sequoia-chameleon-gnupg/c/ea00539 ) Similarly in python-cramjam[1], rust-libcramjam, and rust-libcramjam0.8. [1] https://src.fedoraproject.org/rpms/python-cramjam/c/9c911bf38f00d01806fe2bbd420e568589da5797?branch=rawhide
A fix for this has been merged upstream and is expected to be included in LLVM 23.1.6. https://github.com/llvm/llvm-project/pull/242057