[clang] [HLSL][Sema] Fix Struct Size Calculation containing 16/32 bit scalars (PR #128086)
Helena Kotas via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 21 09:29:22 PST 2025
================
@@ -0,0 +1,60 @@
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s --check-prefix=CHECK-HALF
+
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s \
+// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s --check-prefix=CHECK-FLOAT
+
+
----------------
hekota wrote:
This seems to be testing the codegen buffer layout calculations rather than the layout validation for `packoffset`s in SemaHLSL. You can skip the codegen by replacing `-emit-llvm -disable-llvm-passes` with `-fsyntax-only`.
The test needs to have `packoffset` annotations and should include structs, arrays and vectors. And it should include the test cases mentioned in the issue this is fixing.
https://github.com/llvm/llvm-project/pull/128086
More information about the cfe-commits
mailing list