Optimize CountOnes in Dfg

This commit is contained in:
Geza Lore
2026-03-27 07:50:05 +00:00
parent 382f5003ca
commit e0fc69a2f0
7 changed files with 139 additions and 1 deletions
+8
View File
@@ -722,6 +722,14 @@ void DfgVertex::typeCheck(const DfgGraph& dfg) const {
return;
}
case VDfgType::CountOnes: {
const DfgCountOnes& v = *as<DfgCountOnes>();
CHECK(v.isPacked(), "Should be Packed type");
CHECK(v.srcp()->isPacked(), "Source should be Packed type");
CHECK(v.size() == 32U, "Should yield a 32-bit result");
return;
}
case VDfgType::Pow:
case VDfgType::PowSS:
case VDfgType::PowSU: