[clang] [llvm] [DirectX] Add 32- and 64-bit 3-element vectors to DataLayout (PR #160955)

Nathan Gauër via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 28 05:39:22 PDT 2025


Keenuts wrote:

Looks like this changes caused any struct with 3-elements vectors to now contain padding, even if the struct has the `PackingAttr` attribute.

Example:
```hlsl
struct S1 {
    uint a : A;
    uint3 b : B;
    uint c : C;
} __attribute__((packed));

[numthread(1, 1, 1)]
void main(S1 s) {}
```

-> `%S1 = type { i32, <3 x i32>, [4 x i8], i32 }`



https://github.com/llvm/llvm-project/pull/160955


More information about the llvm-commits mailing list