11// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.3-compute \
22// RUN: -fnative-half-type -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
33
4- // CHECK: %"struct. __cblayout_$Globals" = type { float, float, %struct. __cblayout_S }
5- // CHECK: %struct. __cblayout_S = type { float }
4+ // CHECK: %"__cblayout_$Globals" = type < { float, float, target("dx.Layout", % __cblayout_S, 4, 0) }>
5+ // CHECK: %__cblayout_S = type < { float }>
66
7- // CHECK-DAG: @"$Globals.cb" = external constant target("dx.CBuffer", %"struct. __cblayout_$Globals")
7+ // CHECK-DAG: @"$Globals.cb" = external constant target("dx.CBuffer", target("dx.Layout", %" __cblayout_$Globals", 20, 0, 4, 16) )
88// CHECK-DAG: @a = external addrspace(2) global float
99// CHECK-DAG: @g = external addrspace(2) global float
10- // CHECK-DAG: @h = external addrspace(2) global %struct. __cblayout_S
10+ // CHECK-DAG: @h = external addrspace(2) global target("dx.Layout", % __cblayout_S, 4, 0), align 4
1111
1212struct EmptyStruct {
1313};
@@ -35,9 +35,5 @@ void main() {
3535 Buf[0 ] = a;
3636}
3737
38- // CHECK: !hlsl.cblayouts = !{![[S_LAYOUT:.*]], ![[CB_LAYOUT:.*]]}
3938// CHECK: !hlsl.cbs = !{![[CB:.*]]}
40-
41- // CHECK: ![[S_LAYOUT]] = !{!"struct.__cblayout_S", i32 4, i32 0}
42- // CHECK: ![[CB_LAYOUT]] = !{!"struct.__cblayout_$Globals", i32 20, i32 0, i32 4, i32 16}
4339// CHECK: ![[CB]] = !{ptr @"$Globals.cb", ptr addrspace(2) @a, ptr addrspace(2) @g, ptr addrspace(2) @h}
0 commit comments