| 
4 | 4 | %__cblayout_CB2 = type <{ float }>  | 
5 | 5 | %struct.Scalars = type { float, i32, i32 }  | 
6 | 6 | 
 
  | 
7 |  | -@CB.cb = local_unnamed_addr global target("dx.CBuffer", target("dx.Layout", %__cblayout_CB, 12, 0, 4, 8)) poison  | 
8 |  | -@CB2.cb = local_unnamed_addr global target("dx.CBuffer", target("dx.Layout", %__cblayout_CB2, 4, 0)) poison  | 
 | 7 | +@CB.cb = local_unnamed_addr global target("dx.CBuffer", %__cblayout_CB) poison  | 
 | 8 | +@CB2.cb = local_unnamed_addr global target("dx.CBuffer", %__cblayout_CB2) poison  | 
9 | 9 | 
 
  | 
10 | 10 | define void @main() local_unnamed_addr #1 {  | 
11 | 11 | entry:  | 
12 | 12 |   ; CHECK: [[CB:%.*]] = tail call target({{.*}}) @llvm.dx.resource.handlefrombinding  | 
13 |  | -  %h = tail call target("dx.CBuffer", target("dx.Layout", %__cblayout_CB, 12, 0, 4, 8)) @llvm.dx.resource.handlefrombinding(i32 0, i32 0, i32 1, i32 0, ptr null)  | 
14 |  | -  store target("dx.CBuffer", target("dx.Layout", %__cblayout_CB, 12, 0, 4, 8)) %h, ptr @CB.cb, align 4  | 
 | 13 | +  %h = tail call target("dx.CBuffer", %__cblayout_CB) @llvm.dx.resource.handlefrombinding(i32 0, i32 0, i32 1, i32 0, ptr null)  | 
 | 14 | +  store target("dx.CBuffer", %__cblayout_CB) %h, ptr @CB.cb, align 4  | 
15 | 15 |   %_ZL3Out_h.i.i = tail call target("dx.RawBuffer", %struct.Scalars, 1, 0) @llvm.dx.resource.handlefrombinding(i32 0, i32 0, i32 1, i32 0, ptr null)  | 
16 | 16 |   ; CHECK-NOT: load target({{.*}}), ptr @CB.cb  | 
17 |  | -  %cb = load target("dx.CBuffer", target("dx.Layout", %__cblayout_CB, 12, 0, 4, 8)), ptr @CB.cb, align 4  | 
 | 17 | +  %cb = load target("dx.CBuffer", %__cblayout_CB), ptr @CB.cb, align 4  | 
18 | 18 |   ; CHECK: call { float, float, float, float } @llvm.dx.resource.load.cbufferrow.4.{{.*}}(target({{.*}}) [[CB]], i32 0)  | 
19 |  | -  %0 = call { float, float, float, float } @llvm.dx.resource.load.cbufferrow.4(target("dx.CBuffer", target("dx.Layout", %__cblayout_CB, 12, 0, 4, 8)) %cb, i32 0)  | 
 | 19 | +  %0 = call { float, float, float, float } @llvm.dx.resource.load.cbufferrow.4(target("dx.CBuffer", %__cblayout_CB) %cb, i32 0)  | 
20 | 20 |   %1 = extractvalue { float, float, float, float } %0, 0  | 
21 | 21 |   call void @llvm.dx.resource.store.rawbuffer(target("dx.RawBuffer", %struct.Scalars, 1, 0) %_ZL3Out_h.i.i, i32 0, i32 0, float %1)  | 
22 |  | -    | 
 | 22 | + | 
23 | 23 |   ; CHECK: [[CB2:%.*]] = tail call target({{.*}}) @llvm.dx.resource.handlefromimplicitbinding  | 
24 |  | -  %h2 = tail call target("dx.CBuffer", target("dx.Layout", %__cblayout_CB2, 4, 0)) @llvm.dx.resource.handlefromimplicitbinding(i32 100, i32 0, i32 1, i32 0, ptr null)  | 
25 |  | -  store target("dx.CBuffer", target("dx.Layout", %__cblayout_CB2, 4, 0)) %h2, ptr @CB2.cb, align 4  | 
 | 24 | +  %h2 = tail call target("dx.CBuffer", %__cblayout_CB2) @llvm.dx.resource.handlefromimplicitbinding(i32 100, i32 0, i32 1, i32 0, ptr null)  | 
 | 25 | +  store target("dx.CBuffer", %__cblayout_CB2) %h2, ptr @CB2.cb, align 4  | 
26 | 26 |   ; CHECK-NOT: load target({{.*}}), ptr @CB2.cb  | 
27 |  | -  %cb2 = load target("dx.CBuffer", target("dx.Layout", %__cblayout_CB2, 4, 0)), ptr @CB2.cb, align 4  | 
 | 27 | +  %cb2 = load target("dx.CBuffer", %__cblayout_CB2), ptr @CB2.cb, align 4  | 
28 | 28 | 
 
  | 
29 | 29 |   ret void  | 
30 | 30 | }  | 
 | 
0 commit comments