[llvm] [ShrinkWrap] Modify shrink wrapping to accommodate functions terminated by no-return blocks (PR #167548)

Alex Bradbury via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 27 10:38:17 PST 2025


asb wrote:

Heads up that this commit is causing failures on the various bootstrapping RISC-V builders (e.g. https://lab.llvm.org/buildbot/#/builders/87/builds/4328). We get test failures with various llvm-ar related tests. Here's an example direct llvm-ar invocation:

```
./build/stage2/bin/llvm-ar p bar
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0.	Program arguments: ./build/stage2/bin/llvm-ar p bar
#0 0x0000555557e9865a llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (./build/stage2/bin/llvm-ar+0x294265a)
#1 0x0000555557e96782 llvm::sys::RunSignalHandlers() (./build/stage2/bin/llvm-ar+0x2940782)
#2 0x0000555557e99160 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#3 0x0000799d904796cc (linux-vdso.so.1+0x799d904796cc)
#4 0x000055555782973a failIfError(std::error_code, llvm::Twine) llvm-ar.cpp:0:0
#5 0x0000555557829736 failIfError(std::error_code, llvm::Twine) llvm-ar.cpp:0:0
```

i.e. this appears to be a miscompile within LLVM itself. Sadly there are no failures in llvm-test-suite that would make this easier to narrow down. I _have_ confirmed that we get this failure with a two-stage bootstrap build including this patch and note with its parent.

In line with our [patch reversion policy](https://llvm.org/docs/DeveloperPolicy.html#patch-reversion-policy) I intend to revert this so that the issue can be properly narrowed down and addressed (and then hopefully the patch can reland). I will work to get something more actionable in terms of a minimised test case.

https://github.com/llvm/llvm-project/pull/167548


More information about the llvm-commits mailing list