121 lines · plain
1; RUN: llc -mtriple=aarch64 < %s | FileCheck %s2; RUN: llc -mtriple=arm64-apple-darwin < %s | FileCheck %s --check-prefix=MACHO3 4; MACHO: bl ___xray_CustomEvent5; MACHO: bl ___xray_CustomEvent6; MACHO: bl ___xray_TypedEvent7; MACHO: bl ___xray_TypedEvent8 9; CHECK-LABEL: customevent:10; CHECK: Lxray_sled_1:11; CHECK-NEXT: b #24 // Begin XRay custom event12; CHECK-NEXT: stp x0, x1, [sp, #-16]!13; CHECK-NEXT: mov x0, x014; CHECK-NEXT: mov x1, x115; CHECK-NEXT: bl __xray_CustomEvent16; CHECK-NEXT: ldp x0, x1, [sp], #16 // End XRay custom event17; CHECK-NEXT: Ltmp[[#]]:18; CHECK-NEXT: .loc 0 3 3 // a.c:3:319; CHECK-NEXT: Lxray_sled_2:20; CHECK-NEXT: b #24 // Begin XRay custom event21; CHECK-NEXT: stp x0, x1, [sp, #-16]!22; CHECK-NEXT: mov x0, x223; CHECK-NEXT: mov x1, x324; CHECK-NEXT: bl __xray_CustomEvent25; CHECK-NEXT: ldp x0, x1, [sp], #16 // End XRay custom event26; CHECK-NEXT: .Ltmp[[#]]:27; CHECK-NEXT: .loc 0 4 1 // a.c:4:128define void @customevent(ptr nocapture noundef readonly %e1, i64 noundef %s1, ptr nocapture noundef readonly %e2, i64 noundef %s2) "function-instrument"="xray-always" !dbg !11 {29entry:30 tail call void @llvm.xray.customevent(ptr %e1, i64 %s1), !dbg !2231 tail call void @llvm.xray.customevent(ptr %e2, i64 %s2), !dbg !2332 ret void, !dbg !2433}34 35; CHECK: .xword .Lxray_sled_1-.Ltmp[[#]]36; CHECK-NEXT: .xword .Lfunc_begin0-(.Ltmp[[#]]+8)37; CHECK-NEXT: .byte 0x0438; CHECK-NEXT: .byte 0x0139; CHECK-NEXT: .byte 0x0240; CHECK-NEXT: .zero 1341; CHECK: .xword .Lxray_sled_2-.Ltmp[[#]]42; CHECK-NEXT: .xword .Lfunc_begin0-(.Ltmp[[#]]+8)43; CHECK-NEXT: .byte 0x0444; CHECK-NEXT: .byte 0x0145; CHECK-NEXT: .byte 0x0246; CHECK-NEXT: .zero 1347 48; CHECK-LABEL: typedevent:49; CHECK: .Lxray_sled_5:50; CHECK-NEXT: b #36 // Begin XRay typed event51; CHECK-NEXT: stp x0, x1, [sp, #-32]!52; CHECK-NEXT: str x2, [sp, #16]53; CHECK-NEXT: mov x0, x054; CHECK-NEXT: mov x1, x155; CHECK-NEXT: mov x2, x256; CHECK-NEXT: bl __xray_TypedEvent57; CHECK-NEXT: ldr x2, [sp, #16]58; CHECK-NEXT: ldp x0, x1, [sp], #32 // End XRay typed event59; CHECK-NEXT: .Ltmp[[#]]:60; CHECK-NEXT: .loc 0 8 3 // a.c:8:361; CHECK-NEXT: .Lxray_sled_6:62; CHECK-NEXT: b #36 // Begin XRay typed event63; CHECK-NEXT: stp x0, x1, [sp, #-32]!64; CHECK-NEXT: str x2, [sp, #16]65; CHECK-NEXT: mov x0, x266; CHECK-NEXT: mov x1, x167; CHECK-NEXT: mov x2, x068; CHECK-NEXT: bl __xray_TypedEvent69; CHECK-NEXT: ldr x2, [sp, #16]70; CHECK-NEXT: ldp x0, x1, [sp], #32 // End XRay typed event71; CHECK-NEXT: .Ltmp[[#]]:72; CHECK-NEXT: .loc 0 9 1 // a.c:9:173define void @typedevent(i64 noundef %type, ptr nocapture noundef readonly %event, i64 noundef %size) "function-instrument"="xray-always" !dbg !25 {74entry:75 tail call void @llvm.xray.typedevent(i64 %type, ptr %event, i64 %size), !dbg !3376 tail call void @llvm.xray.typedevent(i64 %size, ptr %event, i64 %type), !dbg !3477 ret void, !dbg !3578}79 80; CHECK: .xword .Lxray_sled_5-.Ltmp[[#]]81; CHECK-NEXT: .xword .Lfunc_begin1-(.Ltmp[[#]]+8)82; CHECK-NEXT: .byte 0x0583; CHECK-NEXT: .byte 0x0184; CHECK-NEXT: .byte 0x0285; CHECK-NEXT: .zero 1386; CHECK: .xword .Lxray_sled_6-.Ltmp[[#]]87; CHECK-NEXT: .xword .Lfunc_begin1-(.Ltmp[[#]]+8)88; CHECK-NEXT: .byte 0x0589; CHECK-NEXT: .byte 0x0190; CHECK-NEXT: .byte 0x0291; CHECK-NEXT: .zero 1392 93declare void @llvm.xray.customevent(ptr, i64)94declare void @llvm.xray.typedevent(i64, ptr, i64)95 96!llvm.dbg.cu = !{!0}97!llvm.module.flags = !{!2, !3}98!llvm.ident = !{!10}99 100!0 = distinct !DICompileUnit(language: DW_LANG_C11, file: !1, producer: "clang version 17.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)101!1 = !DIFile(filename: "a.c", directory: "/tmp")102!2 = !{i32 7, !"Dwarf Version", i32 5}103!3 = !{i32 2, !"Debug Info Version", i32 3}104!10 = !{!"clang version 17.0.0"}105!11 = distinct !DISubprogram(name: "customevent", scope: !1, file: !1, line: 1, type: !12, scopeLine: 1, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0)106!12 = !DISubroutineType(types: !13)107!13 = !{null, !14, !15, !14, !15}108!14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)109!15 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned)110!21 = !DILocation(line: 0, scope: !11)111!22 = !DILocation(line: 2, column: 3, scope: !11)112!23 = !DILocation(line: 3, column: 3, scope: !11)113!24 = !DILocation(line: 4, column: 1, scope: !11)114!25 = distinct !DISubprogram(name: "typedevent", scope: !1, file: !1, line: 6, type: !26, scopeLine: 6, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0)115!26 = !DISubroutineType(types: !27)116!27 = !{null, !15, !14, !15}117!32 = !DILocation(line: 0, scope: !25)118!33 = !DILocation(line: 7, column: 3, scope: !25)119!34 = !DILocation(line: 8, column: 3, scope: !25)120!35 = !DILocation(line: 9, column: 1, scope: !25)121