Optimize $onehot in Dfg

This commit is contained in:
Geza Lore
2026-06-06 06:11:13 +01:00
parent e53d6d9006
commit ca376d681a
5 changed files with 25 additions and 1 deletions
+3 -1
View File
@@ -774,7 +774,9 @@ void DfgVertex::typeCheck(const DfgGraph& dfg) const {
case VDfgType::LogNot:
case VDfgType::RedAnd:
case VDfgType::RedOr:
case VDfgType::RedXor: {
case VDfgType::RedXor:
case VDfgType::OneHot:
case VDfgType::OneHot0: {
CHECK(dtype() == DfgDataType::packed(1), "Should be 1-bit");
CHECK(inputp(0)->isPacked(), "Operand should be Packed type");
return;