[llvm] [Coroutines] Fixup broken tests(NFC) (PR #221510)
Weibo He via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 5 20:19:35 PDT 2026
https://github.com/NewSigma created https://github.com/llvm/llvm-project/pull/221510
Several tests are broken after #184466.
`coro-noop.ll`, `coro-noop-pacbti.ll`: The running pass was incorrectly replaced with CoroEarly.
`coro-split-dbg-labels.ll`: The comments are misplaced.
>From 268ccdebbb30f5655d56921c0b646ee37b63205b Mon Sep 17 00:00:00 2001
From: NewSigma <NewSigma at 163.com>
Date: Sun, 6 Sep 2026 11:12:26 +0800
Subject: [PATCH] [Coroutines] Fixup broken tests(NFC)
---
.../Transforms/Coroutines/coro-noop-pacbti.ll | 31 ++-
llvm/test/Transforms/Coroutines/coro-noop.ll | 32 ++-
.../Coroutines/coro-split-dbg-labels.ll | 224 ++----------------
3 files changed, 62 insertions(+), 225 deletions(-)
diff --git a/llvm/test/Transforms/Coroutines/coro-noop-pacbti.ll b/llvm/test/Transforms/Coroutines/coro-noop-pacbti.ll
index 032cec8eaf928..65553bcc3d478 100644
--- a/llvm/test/Transforms/Coroutines/coro-noop-pacbti.ll
+++ b/llvm/test/Transforms/Coroutines/coro-noop-pacbti.ll
@@ -1,15 +1,7 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals all --version 6
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals all --include-generated-funcs --version 6
+; RUN: opt < %s -S -passes=coro-cleanup -enable-profcheck | FileCheck %s
-; RUN: opt < %s -S -passes=coro-early | FileCheck %s
-
-
-define ptr @noop() !prof !3 {
-; CHECK-LABEL: define ptr @noop(
-; CHECK-SAME: ) !prof [[PROF3:![0-9]+]] {
-; CHECK-NEXT: [[ENTRY:.*:]]
-; CHECK-NEXT: [[N:%.*]] = call ptr @llvm.coro.noop()
-; CHECK-NEXT: ret ptr [[N]]
-;
+define ptr @noop() {
entry:
%n = call ptr @llvm.coro.noop()
ret ptr %n
@@ -22,12 +14,27 @@ declare ptr @llvm.coro.noop()
!0 = !{i32 8, !"branch-target-enforcement", i32 1}
!1 = !{i32 8, !"sign-return-address", i32 1}
!2 = !{i32 8, !"sign-return-address-all", i32 1}
-!3 = !{!"function_entry_count", i64 1000}
+;.
+; CHECK: @NoopCoro.Frame.Const = private constant %NoopCoro.Frame { ptr @__NoopCoro_ResumeDestroy, ptr @__NoopCoro_ResumeDestroy }, no_sanitize_address, no_sanitize_hwaddress
+;.
+; CHECK-LABEL: define ptr @noop(
+; CHECK-SAME: ) !prof [[PROF3:![0-9]+]] {
+; CHECK-NEXT: [[ENTRY:.*:]]
+; CHECK-NEXT: ret ptr @NoopCoro.Frame.Const
+;
+;
+; CHECK-LABEL: define internal void @__NoopCoro_ResumeDestroy(
+; CHECK-SAME: ptr [[TMP0:%.*]]) #[[ATTR1:[0-9]+]] !prof [[PROF4:![0-9]+]] {
+; CHECK-NEXT: [[ENTRY:.*:]]
+; CHECK-NEXT: ret void
+;
;.
; CHECK: attributes #[[ATTR0:[0-9]+]] = { nounwind memory(none) }
+; CHECK: attributes #[[ATTR1]] = { "branch-target-enforcement" "sign-return-address"="all" "sign-return-address-key"="a_key" }
;.
; CHECK: [[META0:![0-9]+]] = !{i32 8, !"branch-target-enforcement", i32 1}
; CHECK: [[META1:![0-9]+]] = !{i32 8, !"sign-return-address", i32 1}
; CHECK: [[META2:![0-9]+]] = !{i32 8, !"sign-return-address-all", i32 1}
; CHECK: [[PROF3]] = !{!"function_entry_count", i64 1000}
+; CHECK: [[PROF4]] = !{!"unknown", !"coro-cleanup"}
;.
diff --git a/llvm/test/Transforms/Coroutines/coro-noop.ll b/llvm/test/Transforms/Coroutines/coro-noop.ll
index a96d91f883693..fa529b85233f0 100644
--- a/llvm/test/Transforms/Coroutines/coro-noop.ll
+++ b/llvm/test/Transforms/Coroutines/coro-noop.ll
@@ -1,14 +1,8 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals all --version 6
-; Tests that CoroEarly pass correctly lowers coro.noop
-; RUN: opt < %s -S -passes=coro-early | FileCheck %s
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals all --include-generated-funcs --version 6
+; Tests that CoroCleanup pass correctly lowers coro.noop
+; RUN: opt < %s -S -passes=coro-cleanup -enable-profcheck | FileCheck %s
define ptr @noop() {
-; CHECK-LABEL: define ptr @noop(
-; CHECK-SAME: ) {
-; CHECK-NEXT: [[ENTRY:.*:]]
-; CHECK-NEXT: [[N:%.*]] = call ptr @llvm.coro.noop()
-; CHECK-NEXT: ret ptr [[N]]
-;
entry:
%n = call ptr @llvm.coro.noop()
ret ptr %n
@@ -24,7 +18,20 @@ declare ptr @llvm.coro.noop()
!2 = !{}
!3 = !{i32 2, !"Dwarf Version", i32 4}
!4 = !{i32 2, !"Debug Info Version", i32 3}
-
+;.
+; CHECK: @NoopCoro.Frame.Const = private constant %NoopCoro.Frame { ptr @__NoopCoro_ResumeDestroy, ptr @__NoopCoro_ResumeDestroy }, no_sanitize_address, no_sanitize_hwaddress
+;.
+; CHECK-LABEL: define ptr @noop(
+; CHECK-SAME: ) !prof [[PROF5:![0-9]+]] {
+; CHECK-NEXT: [[ENTRY:.*:]]
+; CHECK-NEXT: ret ptr @NoopCoro.Frame.Const
+;
+;
+; CHECK-LABEL: define internal void @__NoopCoro_ResumeDestroy(
+; CHECK-SAME: ptr [[TMP0:%.*]]) !dbg [[DBG6:![0-9]+]] !prof [[PROF9:![0-9]+]] {
+; CHECK-NEXT: [[ENTRY:.*:]]
+; CHECK-NEXT: ret void
+;
;.
; CHECK: attributes #[[ATTR0:[0-9]+]] = { nounwind memory(none) }
;.
@@ -33,4 +40,9 @@ declare ptr @llvm.coro.noop()
; CHECK: [[META2]] = !{}
; CHECK: [[META3:![0-9]+]] = !{i32 2, !"Dwarf Version", i32 4}
; CHECK: [[META4:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
+; CHECK: [[PROF5]] = !{!"function_entry_count", i64 1000}
+; CHECK: [[DBG6]] = distinct !DISubprogram(name: "__NoopCoro_ResumeDestroy", linkageName: "__NoopCoro_ResumeDestroy", scope: null, file: [[META1]], type: [[META7:![0-9]+]], flags: DIFlagArtificial, spFlags: DISPFlagDefinition, unit: [[META0]])
+; CHECK: [[META7]] = !DISubroutineType(types: [[META8:![0-9]+]])
+; CHECK: [[META8]] = !{null, null}
+; CHECK: [[PROF9]] = !{!"unknown", !"coro-cleanup"}
;.
diff --git a/llvm/test/Transforms/Coroutines/coro-split-dbg-labels.ll b/llvm/test/Transforms/Coroutines/coro-split-dbg-labels.ll
index 2c82b0a99e01d..b235acc8c70e3 100644
--- a/llvm/test/Transforms/Coroutines/coro-split-dbg-labels.ll
+++ b/llvm/test/Transforms/Coroutines/coro-split-dbg-labels.ll
@@ -1,19 +1,18 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals all --version 6
; Tests that we add DILabels for the suspend points.
;
; Check the generated LLVM:
-; RUN: opt < %s -passes='cgscc(coro-split)' -S | FileCheck %s
+; RUN: opt < %s -passes='cgscc(coro-split)' -enable-profcheck -S | FileCheck %s
;
; Check the generated DWARF debug info:
; REQUIRES: object-emission
-; RUN: opt < %s -passes='cgscc(coro-split),coro-cleanup' \
+; RUN: opt < %s -passes='cgscc(coro-split),coro-cleanup' -enable-profcheck \
; RUN: | %llc_dwarf -O0 -filetype=obj -o - \
; RUN: | llvm-dwarfdump - \
; RUN: | FileCheck %s -check-prefix=DWARF
;
; Check that we don't emit any DILabel if in `LineTablesOnly` mode
; RUN: sed -e 's/emissionKind: FullDebug/emissionKind: LineTablesOnly/' %s \
-; RUN: | opt -passes='cgscc(coro-split)' -S \
+; RUN: | opt -passes='cgscc(coro-split)' -enable-profcheck -S \
; RUN: | FileCheck %s -check-prefix=LINE-TABLE
source_filename = "coro.c"
@@ -33,126 +32,7 @@ declare void @baz(...) local_unnamed_addr #0
; }
; Function Attrs: nounwind uwtable
-;.
-; CHECK: @f.resumers = private constant [3 x ptr] [ptr @f.resume, ptr @f.destroy, ptr @f.cleanup]
-;.
-; LINE-TABLE: @f.resumers = private constant [3 x ptr] [ptr @f.resume, ptr @f.destroy, ptr @f.cleanup]
-;.
define ptr @f() #2 !dbg !16 {
-; CHECK-LABEL: define ptr @f(
-; CHECK-SAME: ) #[[ATTR1:[0-9]+]] !dbg [[DBG6:![0-9]+]]{{.*}} {
-; CHECK-NEXT: [[ENTRY:.*:]]
-; CHECK-NEXT: [[TMP0:%.*]] = tail call token @llvm.coro.id(i32 0, ptr null, ptr @f, ptr @f.resumers), !dbg [[DBG17:![0-9]+]]
-; CHECK-NEXT: [[FRAME:%.*]] = tail call ptr @malloc(i64 24), !dbg [[DBG17]]
-; CHECK-NEXT: [[TMP1:%.*]] = tail call noalias nonnull ptr @llvm.coro.begin(token [[TMP0]], ptr [[FRAME]]), !dbg [[DBG17]]
-; CHECK-NEXT: store ptr @f.resume, ptr [[TMP1]], align 8, !dbg [[DBG18:![0-9]+]]
-; CHECK-NEXT: [[DESTROY_ADDR:%.*]] = getelementptr inbounds i8, ptr [[TMP1]], i64 8, !dbg [[DBG18]]
-; CHECK-NEXT: store ptr @f.destroy, ptr [[DESTROY_ADDR]], align 8, !dbg [[DBG18]]
-; CHECK-NEXT: br label %[[ALLOCASPILLBB:.*]], !dbg [[DBG18]]
-; CHECK: [[ALLOCASPILLBB]]:
-; CHECK-NEXT: br label %[[POSTSPILL:.*]], !dbg [[DBG18]]
-; CHECK: [[POSTSPILL]]:
-; CHECK-NEXT: br label %[[LOOP1:.*]], !dbg [[DBG18]]
-; CHECK: [[LOOP1]]:
-; CHECK-NEXT: tail call void (...) @bar() #[[ATTR0:[0-9]+]], !dbg [[DBG19:![0-9]+]]
-; CHECK-NEXT: br label %[[COROSAVE:.*]], !dbg [[DBG20:![0-9]+]]
-; CHECK: [[COROSAVE]]:
-; CHECK-NEXT: [[INDEX_ADDR4:%.*]] = getelementptr inbounds i8, ptr [[TMP1]], i64 16, !dbg [[DBG20]]
-; CHECK-NEXT: store i1 false, ptr [[INDEX_ADDR4]], align 1, !dbg [[DBG20]]
-; CHECK-NEXT: br label %[[COROSUSPEND:.*]], !dbg [[DBG20]]
-; CHECK: [[COROSUSPEND]]:
-; CHECK-NEXT: br label %[[RESUME_0_LANDING:.*]], !dbg [[DBG20]]
-; CHECK: [[RESUME_0_LANDING]]:
-; CHECK-NEXT: br label %[[AFTERCOROSUSPEND:.*]], !dbg [[DBG20]]
-; CHECK: [[AFTERCOROSUSPEND]]:
-; CHECK-NEXT: switch i8 -1, label %[[CORO_SUSPEND:.*]] [
-; CHECK-NEXT: i8 0, label %[[LOOP2:.*]]
-; CHECK-NEXT: i8 1, label %[[CORO_CLEANUP:.*]]
-; CHECK-NEXT: ], !dbg [[DBG20]]
-; CHECK: [[LOOP2]]:
-; CHECK-NEXT: tail call void (...) @baz() #[[ATTR0]], !dbg [[DBG22:![0-9]+]]
-; CHECK-NEXT: br label %[[COROSAVE1:.*]], !dbg [[DBG23:![0-9]+]]
-; CHECK: [[COROSAVE1]]:
-; CHECK-NEXT: [[INDEX_ADDR5:%.*]] = getelementptr inbounds i8, ptr [[TMP1]], i64 16, !dbg [[DBG23]]
-; CHECK-NEXT: store i1 true, ptr [[INDEX_ADDR5]], align 1, !dbg [[DBG23]]
-; CHECK-NEXT: br label %[[COROSUSPEND2:.*]], !dbg [[DBG23]]
-; CHECK: [[COROSUSPEND2]]:
-; CHECK-NEXT: br label %[[RESUME_1_LANDING:.*]], !dbg [[DBG23]]
-; CHECK: [[RESUME_1_LANDING]]:
-; CHECK-NEXT: br label %[[AFTERCOROSUSPEND3:.*]], !dbg [[DBG23]]
-; CHECK: [[AFTERCOROSUSPEND3]]:
-; CHECK-NEXT: switch i8 -1, label %[[CORO_SUSPEND]] [
-; CHECK-NEXT: i8 0, label %[[LOOP1]]
-; CHECK-NEXT: i8 1, label %[[CORO_CLEANUP]]
-; CHECK-NEXT: ], !dbg [[DBG23]]
-; CHECK: [[CORO_CLEANUP]]:
-; CHECK-NEXT: [[TMP2:%.*]] = tail call ptr @llvm.coro.free(token [[TMP0]], ptr [[TMP1]]), !dbg [[DBG24:![0-9]+]]
-; CHECK-NEXT: tail call void @free(ptr nonnull [[TMP2]]), !dbg [[DBG24]]
-; CHECK-NEXT: br label %[[CORO_SUSPEND]], !dbg [[DBG24]]
-; CHECK: [[CORO_SUSPEND]]:
-; CHECK-NEXT: br label %[[COROEND:.*]], !dbg [[DBG24]]
-; CHECK: [[COROEND]]:
-; CHECK-NEXT: br label %[[AFTERCOROEND:.*]], !dbg [[DBG25:![0-9]+]]
-; CHECK: [[AFTERCOROEND]]:
-; CHECK-NEXT: ret ptr [[TMP1]], !dbg [[DBG25]]
-;
-; LINE-TABLE-LABEL: define ptr @f(
-; LINE-TABLE-SAME: ) #[[ATTR1:[0-9]+]] !dbg [[DBG6:![0-9]+]]{{.*}} {
-; LINE-TABLE-NEXT: [[ENTRY:.*:]]
-; LINE-TABLE-NEXT: [[TMP0:%.*]] = tail call token @llvm.coro.id(i32 0, ptr null, ptr @f, ptr @f.resumers), !dbg [[DBG17:![0-9]+]]
-; LINE-TABLE-NEXT: [[FRAME:%.*]] = tail call ptr @malloc(i64 24), !dbg [[DBG17]]
-; LINE-TABLE-NEXT: [[TMP1:%.*]] = tail call noalias nonnull ptr @llvm.coro.begin(token [[TMP0]], ptr [[FRAME]]), !dbg [[DBG17]]
-; LINE-TABLE-NEXT: store ptr @f.resume, ptr [[TMP1]], align 8, !dbg [[DBG18:![0-9]+]]
-; LINE-TABLE-NEXT: [[DESTROY_ADDR:%.*]] = getelementptr inbounds i8, ptr [[TMP1]], i64 8, !dbg [[DBG18]]
-; LINE-TABLE-NEXT: store ptr @f.destroy, ptr [[DESTROY_ADDR]], align 8, !dbg [[DBG18]]
-; LINE-TABLE-NEXT: br label %[[ALLOCASPILLBB:.*]], !dbg [[DBG18]]
-; LINE-TABLE: [[ALLOCASPILLBB]]:
-; LINE-TABLE-NEXT: br label %[[POSTSPILL:.*]], !dbg [[DBG18]]
-; LINE-TABLE: [[POSTSPILL]]:
-; LINE-TABLE-NEXT: br label %[[LOOP1:.*]], !dbg [[DBG18]]
-; LINE-TABLE: [[LOOP1]]:
-; LINE-TABLE-NEXT: tail call void (...) @bar() #[[ATTR0:[0-9]+]], !dbg [[DBG19:![0-9]+]]
-; LINE-TABLE-NEXT: br label %[[COROSAVE:.*]], !dbg [[DBG20:![0-9]+]]
-; LINE-TABLE: [[COROSAVE]]:
-; LINE-TABLE-NEXT: [[INDEX_ADDR4:%.*]] = getelementptr inbounds i8, ptr [[TMP1]], i64 16, !dbg [[DBG20]]
-; LINE-TABLE-NEXT: store i1 false, ptr [[INDEX_ADDR4]], align 1, !dbg [[DBG20]]
-; LINE-TABLE-NEXT: br label %[[COROSUSPEND:.*]], !dbg [[DBG20]]
-; LINE-TABLE: [[COROSUSPEND]]:
-; LINE-TABLE-NEXT: br label %[[RESUME_0_LANDING:.*]], !dbg [[DBG20]]
-; LINE-TABLE: [[RESUME_0_LANDING]]:
-; LINE-TABLE-NEXT: br label %[[AFTERCOROSUSPEND:.*]], !dbg [[DBG20]]
-; LINE-TABLE: [[AFTERCOROSUSPEND]]:
-; LINE-TABLE-NEXT: switch i8 -1, label %[[CORO_SUSPEND:.*]] [
-; LINE-TABLE-NEXT: i8 0, label %[[LOOP2:.*]]
-; LINE-TABLE-NEXT: i8 1, label %[[CORO_CLEANUP:.*]]
-; LINE-TABLE-NEXT: ], !dbg [[DBG20]]
-; LINE-TABLE: [[LOOP2]]:
-; LINE-TABLE-NEXT: tail call void (...) @baz() #[[ATTR0]], !dbg [[DBG22:![0-9]+]]
-; LINE-TABLE-NEXT: br label %[[COROSAVE1:.*]], !dbg [[DBG23:![0-9]+]]
-; LINE-TABLE: [[COROSAVE1]]:
-; LINE-TABLE-NEXT: [[INDEX_ADDR5:%.*]] = getelementptr inbounds i8, ptr [[TMP1]], i64 16, !dbg [[DBG23]]
-; LINE-TABLE-NEXT: store i1 true, ptr [[INDEX_ADDR5]], align 1, !dbg [[DBG23]]
-; LINE-TABLE-NEXT: br label %[[COROSUSPEND2:.*]], !dbg [[DBG23]]
-; LINE-TABLE: [[COROSUSPEND2]]:
-; LINE-TABLE-NEXT: br label %[[RESUME_1_LANDING:.*]], !dbg [[DBG23]]
-; LINE-TABLE: [[RESUME_1_LANDING]]:
-; LINE-TABLE-NEXT: br label %[[AFTERCOROSUSPEND3:.*]], !dbg [[DBG23]]
-; LINE-TABLE: [[AFTERCOROSUSPEND3]]:
-; LINE-TABLE-NEXT: switch i8 -1, label %[[CORO_SUSPEND]] [
-; LINE-TABLE-NEXT: i8 0, label %[[LOOP1]]
-; LINE-TABLE-NEXT: i8 1, label %[[CORO_CLEANUP]]
-; LINE-TABLE-NEXT: ], !dbg [[DBG23]]
-; LINE-TABLE: [[CORO_CLEANUP]]:
-; LINE-TABLE-NEXT: [[TMP2:%.*]] = tail call ptr @llvm.coro.free(token [[TMP0]], ptr [[TMP1]]), !dbg [[DBG24:![0-9]+]]
-; LINE-TABLE-NEXT: tail call void @free(ptr nonnull [[TMP2]]), !dbg [[DBG24]]
-; LINE-TABLE-NEXT: br label %[[CORO_SUSPEND]], !dbg [[DBG24]]
-; LINE-TABLE: [[CORO_SUSPEND]]:
-; LINE-TABLE-NEXT: br label %[[COROEND:.*]], !dbg [[DBG24]]
-; LINE-TABLE: [[COROEND]]:
-; LINE-TABLE-NEXT: br label %[[AFTERCOROEND:.*]], !dbg [[DBG25:![0-9]+]]
-; LINE-TABLE: [[AFTERCOROEND]]:
-; LINE-TABLE-NEXT: ret ptr [[TMP1]], !dbg [[DBG25]]
-;
entry:
%0 = tail call token @llvm.coro.id(i32 0, ptr null, ptr @f, ptr null), !dbg !26
%1 = tail call i64 @llvm.coro.size.i64(), !dbg !26
@@ -165,8 +45,8 @@ loop1: ; preds = %for.cond, %entry
%3 = tail call token @llvm.coro.save(ptr null), !dbg !34
%4 = tail call i8 @llvm.coro.suspend(token %3, i1 false), !dbg !34
switch i8 %4, label %coro_Suspend [
- i8 0, label %loop2
- i8 1, label %coro_Cleanup
+ i8 0, label %loop2
+ i8 1, label %coro_Cleanup
], !dbg !34
loop2: ; preds = %for.cond, %entry
@@ -174,8 +54,8 @@ loop2: ; preds = %for.cond, %entry
%5 = tail call token @llvm.coro.save(ptr null), !dbg !36
%6 = tail call i8 @llvm.coro.suspend(token %5, i1 false), !dbg !36
switch i8 %6, label %coro_Suspend [
- i8 0, label %loop1
- i8 1, label %coro_Cleanup
+ i8 0, label %loop1
+ i8 1, label %coro_Cleanup
], !dbg !36
coro_Cleanup: ; preds = %for.cond
@@ -189,10 +69,24 @@ coro_Suspend: ; preds = %for.cond, %if.then,
}
; Check that the resume function contains the `#dbg_label` instructions.
+; CHECK-LABEL: define ptr @f() #1 !dbg !{{[0-9]+}} !prof !{{[0-9]+}} {
+; CHECK: resume.0: ; preds = %resume.entry
+; CHECK-NEXT: #dbg_label(![[RESUME_0:[0-9]+]], !{{[0-9]+}})
+; CHECK: resume.1: ; preds = %resume.entry
+; CHECK-NEXT: #dbg_label(![[RESUME_1:[0-9]+]], !{{[0-9]+}})
; Check that the destroy function contains the `#dbg_label` instructions.
+; CHECK-LABEL: define internal void @f.destroy({{.*}}) #1 !dbg !{{[0-9]+}} !prof !{{[0-9]+}} {
+; CHECK: resume.0: ; preds = %resume.entry
+; CHECK-NEXT: #dbg_label(![[DESTROY_0:[0-9]+]], !{{[0-9]+}})
+; CHECK: resume.1: ; preds = %resume.entry
+; CHECK-NEXT: #dbg_label(![[DESTROY_1:[0-9]+]], !{{[0-9]+}})
; Check that the DILabels are correct.
+; CHECK: ![[RESUME_0]] = !DILabel(scope: !{{[0-9]+}}, name: "__coro_resume_0", file: !{{[0-9]*}}, line: 12, column: 6, isArtificial: true, coroSuspendIdx: 0)
+; CHECK: ![[RESUME_1]] = !DILabel(scope: !{{[0-9]+}}, name: "__coro_resume_1", file: !{{[0-9]*}}, line: 14, column: 6, isArtificial: true, coroSuspendIdx: 1)
+; CHECK: ![[DESTROY_0]] = !DILabel(scope: !{{[0-9]+}}, name: "__coro_resume_0", file: !{{[0-9]*}}, line: 12, column: 6, isArtificial: true, coroSuspendIdx: 0)
+; CHECK: ![[DESTROY_1]] = !DILabel(scope: !{{[0-9]+}}, name: "__coro_resume_1", file: !{{[0-9]*}}, line: 14, column: 6, isArtificial: true, coroSuspendIdx: 1)
; Check the we do not emit any DILabels in LineTablesOnly mode.
; The DWARF emitter cannot handle this and would run into an assertion.
@@ -258,79 +152,3 @@ attributes #4 = { argmemonly nounwind readonly }
!37 = !DILocation(line: 16, column: 3, scope: !16)
!40 = !DILocation(line: 16, column: 3, scope: !16)
!41 = !DILocation(line: 17, column: 1, scope: !16)
-!42 = !{!"function_entry_count", i64 1000}
-;.
-; CHECK: attributes #[[ATTR0]] = { nounwind }
-; CHECK: attributes #[[ATTR1]] = { nounwind uwtable }
-; CHECK: attributes #[[ATTR2:[0-9]+]] = { nocallback nofree nosync nounwind willreturn memory(argmem: read) }
-; CHECK: attributes #[[ATTR3:[0-9]+]] = { nounwind memory(none) }
-; CHECK: attributes #[[ATTR4:[0-9]+]] = { nomerge nounwind }
-; CHECK: attributes #[[ATTR5:[0-9]+]] = { nounwind memory(argmem: read) }
-;.
-; CHECK: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C99, file: [[META1:![0-9]+]], producer: "{{.*}}clang version {{.*}} - manually edited", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: [[META2:![0-9]+]])
-; CHECK: [[META1]] = !DIFile(filename: "{{.*}}coro.c", directory: {{.*}})
-; CHECK: [[META2]] = !{}
-; CHECK: [[META3:![0-9]+]] = !{i32 2, !"Dwarf Version", i32 4}
-; CHECK: [[META4:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
-; CHECK: [[META5:![0-9]+]] = !{!"{{.*}}clang version {{.*}} - manually edited"}
-; CHECK: [[DBG6]] = distinct !DISubprogram(name: "f", scope: [[META1]], file: [[META1]], line: 8, type: [[META7:![0-9]+]], scopeLine: 8, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: [[META0]], retainedNodes: [[META10:![0-9]+]])
-; CHECK: [[META7]] = !DISubroutineType(types: [[META8:![0-9]+]])
-; CHECK: [[META8]] = !{[[META9:![0-9]+]]}
-; CHECK: [[META9]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64, align: 64)
-; CHECK: [[META10]] = !{[[META11:![0-9]+]], [[META12:![0-9]+]], [[META15:![0-9]+]]}
-; CHECK: [[META11]] = !DILocalVariable(name: "coro_hdl", scope: [[DBG6]], file: [[META1]], line: 9, type: [[META9]])
-; CHECK: [[META12]] = !DILocalVariable(name: "i", scope: [[META13:![0-9]+]], file: [[META1]], line: 11, type: [[META14:![0-9]+]])
-; CHECK: [[META13]] = distinct !DILexicalBlock(scope: [[DBG6]], file: [[META1]], line: 11, column: 3)
-; CHECK: [[META14]] = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-; CHECK: [[META15]] = !DILocalVariable(name: "coro_mem", scope: [[DBG6]], file: [[META1]], line: 16, type: [[META9]])
-; CHECK: [[DBG17]] = !DILocation(line: 9, column: 3, scope: [[DBG6]])
-; CHECK: [[DBG18]] = !DILocation(line: 10, column: 8, scope: [[META13]])
-; CHECK: [[DBG19]] = !DILocation(line: 11, column: 6, scope: [[META13]])
-; CHECK: [[DBG20]] = !DILocation(line: 12, column: 6, scope: [[META13]])
-; CHECK: [[DBG22]] = !DILocation(line: 13, column: 6, scope: [[META13]])
-; CHECK: [[DBG23]] = !DILocation(line: 14, column: 6, scope: [[META13]])
-; CHECK: [[DBG24]] = !DILocation(line: 16, column: 3, scope: [[DBG6]])
-; CHECK: [[DBG25]] = !DILocation(line: 17, column: 1, scope: [[DBG6]])
-; CHECK: [[META26:![0-9]+]] = distinct !DISubprogram(name: "f", linkageName: "f.resume", scope: [[META1]], file: [[META1]], line: 8, type: [[META7]], scopeLine: 8, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: [[META0]], retainedNodes: [[META27:![0-9]+]])
-; CHECK: [[META27]] = !{[[META28:![0-9]+]], [[META29:![0-9]+]], [[META31:![0-9]+]]}
-; CHECK: [[META28]] = !DILocalVariable(name: "coro_hdl", scope: [[META26]], file: [[META1]], line: 9, type: [[META9]])
-; CHECK: [[META29]] = !DILocalVariable(name: "i", scope: [[META30:![0-9]+]], file: [[META1]], line: 11, type: [[META14]])
-; CHECK: [[META30]] = distinct !DILexicalBlock(scope: [[META26]], file: [[META1]], line: 11, column: 3)
-; CHECK: [[META31]] = !DILocalVariable(name: "coro_mem", scope: [[META26]], file: [[META1]], line: 16, type: [[META9]])
-; CHECK: [[META33:![0-9]+]] = !DILocation(line: 10, column: 8, scope: [[META30]])
-; CHECK: [[META34:![0-9]+]] = !{!"branch_weights", i32 0, i32 -2147483648, i32 2017333124}
-; CHECK: [[META35:![0-9]+]] = !DILocation(line: 11, column: 6, scope: [[META30]])
-; CHECK: [[META36:![0-9]+]] = !DILocation(line: 12, column: 6, scope: [[META30]])
-; CHECK: [[META37:![0-9]+]] = !DILabel(scope: [[META26]], name: "__coro_resume_0", file: [[META1]], line: 12, column: 6, isArtificial: true, coroSuspendIdx: 0)
-; CHECK: [[META38:![0-9]+]] = !DILocation(line: 13, column: 6, scope: [[META30]])
-; CHECK: [[META39:![0-9]+]] = !DILocation(line: 14, column: 6, scope: [[META30]])
-; CHECK: [[META40:![0-9]+]] = !DILabel(scope: [[META26]], name: "__coro_resume_1", file: [[META1]], line: 14, column: 6, isArtificial: true, coroSuspendIdx: 1)
-; CHECK: [[META41:![0-9]+]] = !DILocation(line: 16, column: 3, scope: [[META26]])
-; CHECK: [[META42:![0-9]+]] = distinct !DISubprogram(name: "f", linkageName: "f.destroy", scope: [[META1]], file: [[META1]], line: 8, type: [[META7]], scopeLine: 8, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: [[META0]], retainedNodes: [[META43:![0-9]+]])
-; CHECK: [[META43]] = !{[[META44:![0-9]+]], [[META45:![0-9]+]], [[META47:![0-9]+]]}
-; CHECK: [[META44]] = !DILocalVariable(name: "coro_hdl", scope: [[META42]], file: [[META1]], line: 9, type: [[META9]])
-; CHECK: [[META45]] = !DILocalVariable(name: "i", scope: [[META46:![0-9]+]], file: [[META1]], line: 11, type: [[META14]])
-; CHECK: [[META46]] = distinct !DILexicalBlock(scope: [[META42]], file: [[META1]], line: 11, column: 3)
-; CHECK: [[META47]] = !DILocalVariable(name: "coro_mem", scope: [[META42]], file: [[META1]], line: 16, type: [[META9]])
-; CHECK: [[META48:![0-9]+]] = !DILocation(line: 10, column: 8, scope: [[META46]])
-; CHECK: [[META49:![0-9]+]] = !DILocation(line: 11, column: 6, scope: [[META46]])
-; CHECK: [[META50:![0-9]+]] = !DILocation(line: 12, column: 6, scope: [[META46]])
-; CHECK: [[META51:![0-9]+]] = !DILabel(scope: [[META42]], name: "__coro_resume_0", file: [[META1]], line: 12, column: 6, isArtificial: true, coroSuspendIdx: 0)
-; CHECK: [[META52:![0-9]+]] = !DILocation(line: 13, column: 6, scope: [[META46]])
-; CHECK: [[META53:![0-9]+]] = !DILocation(line: 14, column: 6, scope: [[META46]])
-; CHECK: [[META54:![0-9]+]] = !DILabel(scope: [[META42]], name: "__coro_resume_1", file: [[META1]], line: 14, column: 6, isArtificial: true, coroSuspendIdx: 1)
-; CHECK: [[META55:![0-9]+]] = !DILocation(line: 16, column: 3, scope: [[META42]])
-; CHECK: [[META56:![0-9]+]] = distinct !DISubprogram(name: "f", linkageName: "f.cleanup", scope: [[META1]], file: [[META1]], line: 8, type: [[META7]], scopeLine: 8, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: [[META0]], retainedNodes: [[META57:![0-9]+]])
-; CHECK: [[META57]] = !{[[META58:![0-9]+]], [[META59:![0-9]+]], [[META61:![0-9]+]]}
-; CHECK: [[META58]] = !DILocalVariable(name: "coro_hdl", scope: [[META56]], file: [[META1]], line: 9, type: [[META9]])
-; CHECK: [[META59]] = !DILocalVariable(name: "i", scope: [[META60:![0-9]+]], file: [[META1]], line: 11, type: [[META14]])
-; CHECK: [[META60]] = distinct !DILexicalBlock(scope: [[META56]], file: [[META1]], line: 11, column: 3)
-; CHECK: [[META61]] = !DILocalVariable(name: "coro_mem", scope: [[META56]], file: [[META1]], line: 16, type: [[META9]])
-; CHECK: [[META62:![0-9]+]] = !DILocation(line: 10, column: 8, scope: [[META60]])
-; CHECK: [[META63:![0-9]+]] = !DILocation(line: 11, column: 6, scope: [[META60]])
-; CHECK: [[META64:![0-9]+]] = !DILocation(line: 12, column: 6, scope: [[META60]])
-; CHECK: [[META65:![0-9]+]] = !DILabel(scope: [[META56]], name: "__coro_resume_0", file: [[META1]], line: 12, column: 6, isArtificial: true, coroSuspendIdx: 0)
-; CHECK: [[META66:![0-9]+]] = !DILocation(line: 13, column: 6, scope: [[META60]])
-; CHECK: [[META67:![0-9]+]] = !DILocation(line: 14, column: 6, scope: [[META60]])
-; CHECK: [[META68:![0-9]+]] = !DILabel(scope: [[META56]], name: "__coro_resume_1", file: [[META1]], line: 14, column: 6, isArtificial: true, coroSuspendIdx: 1)
-;
More information about the llvm-commits
mailing list