Issue 92190
Summary [HLSL] avoid padding for struct type
Labels HLSL
Assignees
Reporter python3kgae
    Compile with 
clang.exe -cc1 -triple dxil-unknown-shadermodel6.3-library -emit-llvm -disable-llvm-passes -fnative-half-type -finclude-default-header -o - -x hlsl

```
struct S0
{
    double2 B5;
    float B6;
    half3 B7;
    half3 B8;
};

S0 s;

float foo() {
  return s.B7.y;
}
```
will get type %struct.S0 = type <{ <2 x double>, float, [4 x i8], <3 x half>, <3 x half>, [8 x i8] }>.

The expected type should be <{ <2 x double>, float, [4 x i8], <3 x half>, <3 x half> }> without the [8 x i8] padding.

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to