Open neivv opened 1 week ago
Reproducing this issue on the full brotli-decompressor
crate seems finicky. I was able to do it while trying to get the minified example, and it still hangs while being compiled as a dependency, but at the moment just cloning source and building it with opt-level 1 started to work fine 🤷
Doesn't reproduce on i686-linux-unknown-gnu, but does on i686-pc-windows-msvc. From a quick look, it seems like the time is spent in the store merging DAGCombine. I think there's a PR somewhere to improve that, I'll try to find it again...
The PR I had in mind is https://github.com/llvm/llvm-project/pull/106949. Without that PR the test case takes ~1 min, with it about ~1 second. I'll request a backport.
Trying to compile
brotli-decompressor
crate no longer finishes (in any reasonable time) since Rust 1.79 when trying to compile with the following parameters:-C opt-level
is 1 or greaterFor reference, rustc 1.78 reports
LLVM version: 18.1.2
while rustc 1.79 reportsLLVM version: 18.1.7
.Stack trace from the only thread doing work
The function which is taking forever to run is
llvm::SelectionDAG::Combine
. This specific backtrace is from 1.82 compiler built from commit 9649706, ~two weeks ago, with LLVM 19.1.0 from Rust CI.Minimized reproducer
This one finishes within 5~10 minutes due to being simpler but still has the behaviour of taking massively longer when targeting i686.