brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · 4d8b9ec Raw
76 lines · plain
1; RUN: opt -S -dxil-translate-metadata < %s | FileCheck %s2 3; Ensures that only metadata explictly specified on the allow list, or debug4; related, metadata is emitted5 6target triple = "dxil-unknown-shadermodel6.0-compute"7 8; CHECK-NOT: !dx.rootsignatures9; CHECK-NOT: !llvm.errno.tbaa10 11; CHECK-DAG: !llvm.dbg.cu12 13; CHECK-DAG: !llvm.module.flags = !{![[#DWARF_VER:]], ![[#DEBUG_VER:]]}14; CHECK-DAG: !llvm.ident = !{![[#IDENT:]]}15 16; CHECK-DAG: !dx.shaderModel17; CHECK-DAG: !dx.version18; CHECK-DAG: !dx.entryPoints19; CHECK-DAG: !dx.valver20; CHECK-DAG: !dx.resources21 22; CHECK-NOT: !dx.rootsignatures23; CHECK-NOT: !llvm.errno.tbaa24 25; Check allowed llvm metadata structure to ensure it is still DXIL compatible26; If this fails, please ensure that the updated form is DXIL compatible before27; updating the test.28 29; CHECK-DAG: ![[#IDENT]] = !{!"clang 22.0.0"}30; CHECK-DAG: ![[#DWARF_VER]] = !{i32 2, !"Dwarf Version", i32 2}31; CHECK-DAG: ![[#DEBUG_VER]] = !{i32 2, !"Debug Info Version", i32 3}32 33; CHECK-NOT: !dx.rootsignatures34; CHECK-NOT: !llvm.errno.tbaa35 36@BufA.str = private unnamed_addr constant [5 x i8] c"BufA\00", align 137 38define void @main () #0 {39entry:40  %typed0 = call target("dx.TypedBuffer", <4 x float>, 1, 0, 0)41              @llvm.dx.resource.handlefrombinding.tdx.TypedBuffer_v4f32_1_0_0(42                  i32 3, i32 5, i32 1, i32 0, ptr @BufA.str)43  ret void44}45 46attributes #0 = { noinline nounwind "hlsl.numthreads"="1,1,1" "hlsl.shader"="compute" }47 48; Incompatible49!dx.rootsignatures = !{!2}50!llvm.errno.tbaa = !{!5}51 52; Compatible53!llvm.dbg.cu = !{!8}54!llvm.module.flags = !{!11, !12}55!llvm.ident = !{!13}56!dx.valver = !{!14}57 58!2 = !{ ptr @main, !3, i32 2 }59!3 = !{ !4 }60!4 = !{ !"RootFlags", i32 1 }61 62!5 = !{!6, !6, i64 0}63!6 = !{!"omnipotent char", !7}64!7 = !{!"Simple C/C++ TBAA"}65 66!8 = distinct !DICompileUnit(language: DW_LANG_C99, file: !9, producer: "Some Compiler", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !10, splitDebugInlining: false, nameTableKind: None)67!9 = !DIFile(filename: "hlsl.hlsl", directory: "/some-path")68!10 = !{}69 70!11 = !{i32 2, !"Dwarf Version", i32 2}71!12 = !{i32 2, !"Debug Info Version", i32 3}72 73!13 = !{!"clang 22.0.0"}74 75!14 = !{i32 1, i32 1}76