1 ; RUN: opt -S -dxil-metadata-emit < %s | FileCheck %s --check-prefix=DXILMD
3 target datalayout = "e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64"
4 target triple = "dxil-unknown-shadermodel6.7-library"
16 ; double B0; ; Offset: 16
17 ; float3 B1; ; Offset: 32
18 ; float B2; ; Offset: 44
19 ; double3 B3; ; Offset: 48
20 ; half B4; ; Offset: 72
21 ; double2 B5; ; Offset: 80
22 ; float B6; ; Offset: 96
23 ; half3 B7; ; Offset: 100
24 ; half3 B8; ; Offset: 106
28 ; half D2; ; Offset: 112
35 ; float A0; ; Offset: 128
36 ; double A1; ; Offset: 136
37 ; float A2; ; Offset: 144
38 ; half A3; ; Offset: 148
39 ; int16_t A4; ; Offset: 150
40 ; int64_t A5; ; Offset: 152
41 ; int A6; ; Offset: 160
45 ; float C1[1]; ; Offset: 176
49 ; double B0; ; Offset: 192
50 ; float3 B1; ; Offset: 208
51 ; float B2; ; Offset: 220
52 ; double3 B3; ; Offset: 224
53 ; half B4; ; Offset: 248
54 ; double2 B5; ; Offset: 256
55 ; float B6; ; Offset: 272
56 ; half3 B7; ; Offset: 276
57 ; half3 B8; ; Offset: 282
59 ; } C2[2];; ; Offset: 192
61 ; half C3; ; Offset: 384
65 ; double D4; ; Offset: 392
67 ; } D; ; Offset: 0 Size: 400
70 ; Make sure the size is 400
71 ; DXILMD:!{i32 0, ptr @D.cb., !"", i32 0, i32 1, i32 1, i32 400}
74 %struct.B = type <{ double, <3 x float>, float, <3 x double>, half, <2 x double>, float, <3 x half>, <3 x half> }>
75 %struct.C = type <{ %struct.A, [1 x float], [2 x %struct.B], half }>
76 %struct.A = type <{ float, double, float, half, i16, i64, i32 }>
78 @D.cb. = external local_unnamed_addr constant { i32, %struct.B, half, %struct.C, double }
81 !0 = !{ptr @D.cb., !"D.cb.ty", i32 13, i1 false, i32 1, i32 0}