brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.2 KiB · 94049c2 Raw
68 lines · plain
1;RUN: opt -mtriple='arm64-' %s -S -passes='module(coro-early),cgscc(coro-split,simplifycfg)' -o - | FileCheck %s2 3; CHECK:  %.debug = alloca double, align 84; CHECK-NEXT:    #dbg_declare(ptr %{{.*}}, !{{[0-9]+}}, !DIExpression(DW_OP_deref), !{{[0-9]+}})5; CHECK-NEXT:  store double %{{[0-9]+}}, ptr %{{.*}}, align 86; CHECK-NEXT:    #dbg_declare(ptr %arg, !{{[0-9]+}}, !DIExpression(DW_OP_plus_uconst, 24), !{{[0-9]+}})7 8; ModuleID = '/Users/srastogi/Development/llvm-project-2/llvm/test/Transforms/Coroutines/declare-value.ll'9source_filename = "/Users/srastogi/Development/llvm-project-2/llvm/test/Transforms/Coroutines/declare-value.ll"10target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32"11target triple = "arm64-unknown"12 13@coroutineATu = global <{ i32, i32 }> <{ i32 trunc (i64 sub (i64 ptrtoint (ptr @coroutineA to i64), i64 ptrtoint (ptr @coroutineATu to i64)) to i32), i32 16 }>, align 814 15; Function Attrs: presplitcoroutine16define swifttailcc void @coroutineA(ptr swiftasync %arg, double %0) #0 !dbg !1 {17  %var_with_dbg_value = alloca ptr, align 818  %var_with_dbg_declare = alloca ptr, align 819    #dbg_declare(ptr %var_with_dbg_declare, !5, !DIExpression(), !7)20    #dbg_declare_value(double %0, !5, !DIExpression(), !7)21  %i2 = call token @llvm.coro.id.async(i32 16, i32 16, i32 0, ptr nonnull @coroutineATu)22  %i3 = call ptr @llvm.coro.begin(token %i2, ptr null)23  %i7 = call ptr @llvm.coro.async.resume(), !dbg !724  %i10 = call { ptr } (i32, ptr, ptr, ...) @llvm.coro.suspend.async.sl_p0s(i32 0, ptr %i7, ptr nonnull @__swift_async_resume_get_context, ptr nonnull @coroutineA.1, ptr %i7, i64 0, i64 0, ptr %arg), !dbg !725  call void @dont_optimize(ptr %var_with_dbg_value, ptr %var_with_dbg_declare), !dbg !726  unreachable, !dbg !727}28 29define weak_odr hidden ptr @__swift_async_resume_get_context(ptr %arg) !dbg !8 {30  ret ptr %arg, !dbg !931}32 33define hidden swifttailcc void @coroutineA.1(ptr %arg, i64 %arg1, i64 %arg2, ptr %arg3) !dbg !10 {34  ret void, !dbg !1135}36 37declare void @dont_optimize(ptr, ptr)38 39; Function Attrs: nomerge nounwind40declare ptr @llvm.coro.async.resume() #141 42; Function Attrs: nounwind43declare ptr @llvm.coro.begin(token, ptr writeonly) #244 45; Function Attrs: nounwind46declare token @llvm.coro.id.async(i32, i32, i32, ptr) #247 48; Function Attrs: nomerge nounwind49declare { ptr } @llvm.coro.suspend.async.sl_p0s(i32, ptr, ptr, ...) #150 51attributes #0 = { presplitcoroutine }52attributes #1 = { nomerge nounwind }53attributes #2 = { nounwind }54 55!llvm.module.flags = !{!0}56 57!0 = !{i32 2, !"Debug Info Version", i32 3}58!1 = distinct !DISubprogram(scope: null, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !4)59!2 = distinct !DICompileUnit(language: DW_LANG_Swift, file: !3, isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)60!3 = !DIFile(filename: "blah", directory: "")61!4 = !{}62!5 = !DILocalVariable(scope: !1, type: !6)63!6 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Klass")64!7 = !DILocation(line: 0, scope: !1)65!8 = distinct !DISubprogram(scope: null, spFlags: DISPFlagDefinition, unit: !2)66!9 = !DILocation(line: 0, scope: !8)67!10 = distinct !DISubprogram(scope: null, spFlags: DISPFlagDefinition, unit: !2)68!11 = !DILocation(line: 0, scope: !10)