26 lines · plain
1; RUN: opt %s -dxil-embed -dxil-globals -S -o - | FileCheck %s2; RUN: llc %s --filetype=obj -o - | obj2yaml | FileCheck %s --check-prefix=DXC3target triple = "dxil-unknown-shadermodel6.5-library"4 5; CHECK: @dx.hash = private constant [20 x i8] c"\01\00\00\00{{.*}}", section "HASH", align 46 7define i32 @add(i32 %a, i32 %b) {8 %sum = add i32 %a, %b9 ret i32 %sum10}11 12!llvm.dbg.cu = !{!0}13!llvm.module.flags = !{!3, !4}14 15!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "Some Compiler", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None)16!1 = !DIFile(filename: "hlsl.hlsl", directory: "/some-path")17!2 = !{}18!3 = !{i32 7, !"Dwarf Version", i32 2}19!4 = !{i32 2, !"Debug Info Version", i32 3}20 21; DXC: - Name: HASH22; DXC: Size: 2023; DXC: Hash:24; DXC: IncludesSource: true25; DXC: Digest: [ 26