[llvm] [AMDGPU] Look through bitcast when skipping musttail returns in UnifyDivergentExitNodes (PR #201021)

Arseniy Obolenskiy via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 1 23:20:53 PDT 2026


================
@@ -102,3 +103,29 @@ bb.0:
 bb.1:
   ret i32 %load
 }
+
+define ptr @musttail_call_with_bitcast(ptr %p) {
----------------
aobolensk wrote:

Yes, it is, without the patch there is a crash:
```
# .---command stderr------------
# | musttail call must precede a ret with an optional bitcast
# |   %ret = musttail call ptr @bar_ptr(ptr %p)
# | LLVM ERROR: Broken module found, compilation aborted!
# | 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:
...
```
so pre-commiting here will not just work

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


More information about the llvm-commits mailing list