================
@@ -108,9 +108,9 @@ void cbmix() {
   use(m3.y);
   // CHECK: load <2 x float>, ptr addrspace(2) getelementptr (<{ <2 x float>, 
target("dx.Padding", 8) }>, ptr addrspace(2) getelementptr (<{ <{ [3 x <{ <2 x 
float>, target("dx.Padding", 8) }>], <2 x float> }>, target("dx.Padding", 8) 
}>, ptr addrspace(2) @m4, i32 2, i32 0), i32 3, i32 0), align 16
   use(m4[2][3]);
-  // CHECK: load <4 x i32>, ptr addrspace(2) getelementptr inbounds nuw 
([[ANON_1]], ptr addrspace(2) @m5, i32 0, i32 1), align 16
+  // CHECK: load <4 x i32>, ptr addrspace(2) getelementptr inbounds nuw 
([[ANON_1]], ptr addrspace(2) @m5, i32 0, i32 2), align 16
----------------
bogner wrote:

We have (essentially):
```c++
cbuffer CBMix {
  struct { float c; uint4 d; } m5;
};
```

Here, there's 12 bytes of padding after `c`. So we need to access member `2` of 
the layout struct to get at `m5.d`

https://github.com/llvm/llvm-project/pull/179768
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to