[clang] [llvm] [CoroEarly] Infer presplitcoroutine attribute for Switch-Resumed ABI (PR #169866)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 30 19:21:51 PST 2025
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 166452 tests passed
* 2876 tests skipped
* 2 tests failed
## Failed Tests
(click on a test name to see its output)
### Clang
<details>
<summary>Clang.CodeGenCoroutines/coro-always-inline.cpp</summary>
```
Exit Code: 2
Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/22/include -nostdsysteminc -triple x86_64-unknown-linux-gnu -emit-llvm -std=c++20 -O0 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGenCoroutines/coro-always-inline.cpp -o - | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGenCoroutines/coro-always-inline.cpp
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/22/include -nostdsysteminc -triple x86_64-unknown-linux-gnu -emit-llvm -std=c++20 -O0 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGenCoroutines/coro-always-inline.cpp -o -
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGenCoroutines/coro-always-inline.cpp:44:41: warning: this coroutine may be split into pieces; not every piece is guaranteed to be inlined [-Walways-inline-coroutine]
# | 44 | __attribute__((__always_inline__)) void bar() {
# | | ^
# | fatal error: error in backend: coroutine should have exactly one defining @llvm.coro.begin
# `-----------------------------
# error: command failed with exit status: 70
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGenCoroutines/coro-always-inline.cpp
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGenCoroutines/coro-always-inline.cpp
# `-----------------------------
# error: command failed with exit status: 2
--
```
</details>
<details>
<summary>Clang.CodeGenCoroutines/coro-attributes.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/22/include -nostdsysteminc -triple x86_64-unknown-linux-gnu -std=c++20 -disable-llvm-passes -emit-llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGenCoroutines/coro-attributes.cpp -o - | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGenCoroutines/coro-attributes.cpp
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/22/include -nostdsysteminc -triple x86_64-unknown-linux-gnu -std=c++20 -disable-llvm-passes -emit-llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGenCoroutines/coro-attributes.cpp -o -
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGenCoroutines/coro-attributes.cpp
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGenCoroutines/coro-attributes.cpp:18:11: error: CHECK: expected string not found in input
# | // CHECK: attributes #[[FOO_ATTR_NUM]] = { {{.*}} presplitcoroutine
# | ^
# | <stdin>:211:38: note: scanning from here
# | declare token @llvm.coro.save(ptr) #7
# | ^
# | <stdin>:211:38: note: with "FOO_ATTR_NUM" equal to "0"
# | declare token @llvm.coro.save(ptr) #7
# | ^
# | <stdin>:225:28: note: possible intended match here
# | %coerce.dive = getelementptr inbounds nuw %"struct.std::coroutine_handle.0", ptr %ref.tmp, i32 0, i32 0
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGenCoroutines/coro-attributes.cpp
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 206: %this1 = load ptr, ptr %this.addr, align 8
# | 207: ret i1 true
# | 208: }
# | 209:
# | 210: ; Function Attrs: nomerge nounwind
# | 211: declare token @llvm.coro.save(ptr) #7
# | check:18'0 X error: no match found
# | check:18'1 with "FOO_ATTR_NUM" equal to "0"
# | 212:
# | check:18'0 ~
# | 213: ; Function Attrs: alwaysinline mustprogress
# | check:18'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 214: define internal void @_Z3foov.__await_suspend_wrapper__init(ptr noundef nonnull %0, ptr noundef %1) #8 {
# | check:18'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 215: entry:
# | check:18'0 ~~~~~~~
# | 216: %.addr = alloca ptr, align 8
# | check:18'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 220: store ptr %0, ptr %.addr, align 8
# | check:18'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 221: store ptr %1, ptr %.addr1, align 8
# | check:18'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 222: %2 = load ptr, ptr %.addr, align 8
# | check:18'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 223: %3 = load ptr, ptr %.addr1, align 8
# | check:18'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 224: %call = call ptr @_ZNSt16coroutine_handleIN4coro12promise_typeEE12from_addressEPv(ptr noundef %3) #2
# | check:18'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 225: %coerce.dive = getelementptr inbounds nuw %"struct.std::coroutine_handle.0", ptr %ref.tmp, i32 0, i32 0
# | check:18'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:18'2 ? possible intended match
# | 226: %coerce.dive2 = getelementptr inbounds nuw %"struct.std::coroutine_handle", ptr %coerce.dive, i32 0, i32 0
# | check:18'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 227: store ptr %call, ptr %coerce.dive2, align 8
# | check:18'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 228: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %agg.tmp, ptr align 8 %ref.tmp, i64 8, i1 false)
# | check:18'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 229: %coerce.dive3 = getelementptr inbounds nuw %"struct.std::coroutine_handle", ptr %agg.tmp, i32 0, i32 0
# | check:18'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 230: %4 = load ptr, ptr %coerce.dive3, align 8
# | check:18'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/169866
More information about the cfe-commits
mailing list