@@ -8,7 +8,7 @@ target triple = "dxil-pc-shadermodel6.6-compute"
88@CB1.cb = global target ("dx.CBuffer" , %__cblayout_CB1 ) poison
99@CB1.str = private unnamed_addr constant [4 x i8 ] c "CB1\00 " , align 1
1010
11- %__cblayout_CB2 = type <{ float , [ 4 x i8 ] , double , float , half , i16 , i64 , i32 }>
11+ %__cblayout_CB2 = type <{ float , target ( "dx.Padding" , 4 ) , double , float , half , i16 , i64 , i32 }>
1212@CB2.cb = global target ("dx.CBuffer" , %__cblayout_CB2 ) poison
1313@CB2.str = private unnamed_addr constant [4 x i8 ] c "CB2\00 " , align 1
1414
@@ -40,6 +40,7 @@ define void @test() #0 {
4040 ; }
4141 %CB1.cb_h = call target ("dx.CBuffer" , %__cblayout_CB1 )
4242 @llvm.dx.resource.handlefrombinding (i32 0 , i32 0 , i32 1 , i32 0 , ptr @CB1.str )
43+
4344 ; cbuffer CB2 : register(b0) {
4445 ; float a;
4546 ; double b;
@@ -49,9 +50,9 @@ define void @test() #0 {
4950 ; int64_t f;
5051 ; int g;
5152 ;}
52-
5353 %CB2.cb_h = call target ("dx.CBuffer" , %__cblayout_CB2 )
5454 @llvm.dx.resource.handlefrombinding (i32 0 , i32 1 , i32 1 , i32 0 , ptr @CB2.str )
55+
5556 ; cbuffer CB3 : register(b5) {
5657 ; double B0;
5758 ; float3 B1;
@@ -71,6 +72,10 @@ define void @test() #0 {
7172
7273attributes #0 = { noinline nounwind "hlsl.shader" ="compute" }
7374
75+ ; CHECK: %CBuffer.CB1 = type { { float, i32, double, <2 x i32> } }
76+ ; CHECK: %CBuffer.CB2 = type { { float, double, float, half, i16, i64, i32 } }
77+ ; CHECK: %CBuffer.MyConstants = type { { double, <3 x float>, float, <3 x double>, half, <2 x double>, float, <3 x half>, <3 x half> } }
78+
7479; CHECK: @CB1 = external constant %CBuffer.CB1
7580; CHECK: @CB2 = external constant %CBuffer.CB2
7681; CHECK: @MyConstants = external constant %CBuffer.MyConstants
0 commit comments