Skip to content

Commit 4bff70a

Browse files
committed
fixup: Improve test comments
1 parent 8c83d03 commit 4bff70a

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

llvm/test/CodeGen/DirectX/CBufferAccess/arrays.ll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,23 @@ entry:
2424
%CB.cb_h.i.i = tail call target("dx.CBuffer", %__cblayout_CB) @llvm.dx.resource.handlefrombinding(i32 0, i32 0, i32 1, i32 0, ptr null)
2525
store target("dx.CBuffer", %__cblayout_CB) %CB.cb_h.i.i, ptr @CB.cb, align 4
2626

27+
; a1[1]
28+
;
2729
; CHECK: [[PTR:%.*]] = call ptr addrspace(2) @llvm.dx.resource.getpointer.{{.*}}(target("dx.CBuffer", %__cblayout_CB) {{%.*}}, i32 0)
2830
; CHECK: getelementptr inbounds nuw i8, ptr addrspace(2) [[PTR]], i32 16
2931
%a1 = load float, ptr addrspace(2) getelementptr inbounds nuw (i8, ptr addrspace(2) @a1, i32 16), align 4
3032
store float %a1, ptr %dst, align 32
3133

34+
; a2[1]
35+
;
3236
; CHECK: [[PTR:%.*]] = call ptr addrspace(2) @llvm.dx.resource.getpointer.{{.*}}(target("dx.CBuffer", %__cblayout_CB) {{%.*}}, i32 48)
3337
; CHECK: getelementptr inbounds nuw i8, ptr addrspace(2) [[PTR]], i32 32
3438
%a2 = load <3 x double>, ptr addrspace(2) getelementptr inbounds nuw (i8, ptr addrspace(2) @a2, i32 32), align 8
3539
%a2.i = getelementptr inbounds nuw i8, ptr %dst, i32 8
3640
store <3 x double> %a2, ptr %a2.i, align 32
3741

42+
; a3[0][1]
43+
;
3844
; CHECK: [[PTR:%.*]] = call ptr addrspace(2) @llvm.dx.resource.getpointer.{{.*}}(target("dx.CBuffer", %__cblayout_CB) {{%.*}}, i32 112)
3945
; CHECK: getelementptr inbounds nuw i8, ptr addrspace(2) [[PTR]], i32 16
4046
%a3 = load half, ptr addrspace(2) getelementptr inbounds nuw (i8, ptr addrspace(2) @a3, i32 16), align 2

llvm/test/CodeGen/DirectX/CBufferAccess/gep-ce-two-uses.ll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
; RUN: opt -S -dxil-cbuffer-access -mtriple=dxil--shadermodel6.3-library %s | FileCheck %s
2+
;
3+
; Check that two uses of an identical GEP constant expression generates two
4+
; separate getpointer/gep pairs in the output.
25

36
; cbuffer CB : register(b0) {
47
; float a1[3];

0 commit comments

Comments
 (0)