From 5339e46020c19653df6119b127e90e759bdda6b9 Mon Sep 17 00:00:00 2001 From: kaizhangNV <149626564+kaizhangNV@users.noreply.github.com> Date: Tue, 25 Mar 2025 19:20:47 -0500 Subject: Fix issue in peepholeOptimize (#6543) Close #6541. Previously in type legalization pass, we skip the VoidType field when call make_struct, however in some optimization pass we keep counting the VoidType field. We have to make this behavior consistently over all our codebase. So in this change, we spot the make_struct call and leave VoidType field as it. --- source/slang/slang-ir-legalize-types.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'source') diff --git a/source/slang/slang-ir-legalize-types.cpp b/source/slang/slang-ir-legalize-types.cpp index 3d6f18569..197cd93c5 100644 --- a/source/slang/slang-ir-legalize-types.cpp +++ b/source/slang/slang-ir-legalize-types.cpp @@ -1962,8 +1962,6 @@ static LegalVal coerceToLegalType(IRTypeLegalizationContext* context, LegalType ShortList fields; for (auto field : structType->getFields()) { - if (as(field->getFieldType())) - continue; auto fieldVal = coerceToLegalType( context, LegalType::simple(field->getFieldType()), -- cgit v1.2.3