brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · 24ddb97 Raw
43 lines · plain
1; RUN: llc < %s -mcpu=sm_60 | FileCheck %s2; RUN: %if ptxas-sm_60 %{ llc < %s -mcpu=sm_60 | %ptxas-verify -arch=sm_60 %}3target datalayout = "e-i64:64-i128:128-v16:16-v32:32-n16:32:64"4target triple = "nvptx64-nvidia-cuda"5 6; Verify that the symbols with the characters illegal in PTX get appropriately mangled.7@__PRETTY_FUNCTION__._Z3foov = private unnamed_addr constant [11 x i8] c"void foo()\00", align 1, !dbg !08; '.' gets replaced with `_$_`.9; CHECK: .global .align 1 .b8 __PRETTY_FUNCTION___$__Z3foov[11] = {118, 111, 105, 100, 32, 102, 111, 111, 40, 41};10 11; .debug* section names are special and are allowed to have the leading dot.12; CHECK-DAG: .section        .debug_abbrev13; CHECK-DAG: .section        .debug_info14; CHECK-DAG: .b32 .debug_abbrev15; CHECK-DAG: .b32 .debug_line16; CHECK-DAG: .section        .debug_macinfo17 18; .. but the symbol name must be mangled the same way here as it was at the definition point.19; CHECK-DAG: .b64 __PRETTY_FUNCTION___$__Z3foov20;21 22!llvm.dbg.cu = !{!8}23!llvm.module.flags = !{!10, !11, !12}24 25!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())26!1 = distinct !DIGlobalVariable(scope: null, file: !2, line: 1, type: !3, isLocal: true, isDefinition: true)27!2 = !DIFile(filename: "<stdin>", directory: "/usr/local/google/home/tra/work/llvm/build/release+assert+zapcc/dbg-dot")28!3 = !DICompositeType(tag: DW_TAG_array_type, baseType: !4, size: 88, elements: !6)29!4 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !5)30!5 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)31!6 = !{!7}32!7 = !DISubrange(count: 11)33!8 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !2, producer: "clang version 20.0.0git", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, globals: !9, splitDebugInlining: false, nameTableKind: None)34!9 = !{!0}35!10 = !{i32 2, !"Debug Info Version", i32 3}36!11 = !{i32 1, !"wchar_size", i32 4}37!12 = !{i32 4, !"nvvm-reflect-ftz", i32 0}38!13 = !{!"clang version 20.0.0git"}39!14 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", scope: !2, file: !2, line: 1, type: !15, scopeLine: 1, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !8)40!15 = !DISubroutineType(types: !16)41!16 = !{null}42!17 = !DILocation(line: 1, column: 56, scope: !14)43