Skip to content

Commit

Permalink
Check whether array element is fully specialized
Browse files Browse the repository at this point in the history
close #5776

When we start specialize a "specialize" IR, we should
make sure all the elements are fully specialized, but
we miss checking the elements of an array. This change
will check the it.
  • Loading branch information
zhangkai authored and kaizhangNV committed Jan 3, 2025
1 parent d48cd13 commit f45cd07
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions source/slang/slang-ir-specialize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ struct SpecializationContext
}
return false;
}
case kIROp_ArrayType:
{
auto array = as<IRArrayType>(inst);
auto elementType = array->getElementType();
return isInstFullySpecialized(elementType);
}
}

// The default case is that a global value is always specialized.
Expand Down

0 comments on commit f45cd07

Please sign in to comment.