diff options
| author | kaizhangNV <149626564+kaizhangNV@users.noreply.github.com> | 2025-03-25 19:20:47 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-25 17:20:47 -0700 |
| commit | 5339e46020c19653df6119b127e90e759bdda6b9 (patch) | |
| tree | 91bab5801b24309a04cc6a1018b1dee1acaba697 /source | |
| parent | b9300bae08a77df6ef2efe2b62de14a13b10b9a4 (diff) | |
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.
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-ir-legalize-types.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
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<IRInst*> fields; for (auto field : structType->getFields()) { - if (as<IRVoidType>(field->getFieldType())) - continue; auto fieldVal = coerceToLegalType( context, LegalType::simple(field->getFieldType()), |
