diff --git a/enzyme/Enzyme/TypeAnalysis/TypeTree.h b/enzyme/Enzyme/TypeAnalysis/TypeTree.h index 250929104d656..87fd36b28c853 100644 --- a/enzyme/Enzyme/TypeAnalysis/TypeTree.h +++ b/enzyme/Enzyme/TypeAnalysis/TypeTree.h @@ -152,7 +152,7 @@ class TypeTree : public std::enable_shared_from_this { auto found = mapping.find(tmp); if (found != mapping.end()) { // Already exists as is - if (found->second == CT) + if (found->second == CT || found->second == BaseType::Anything) return changed; if (intsAreLegalSubPointer && @@ -178,7 +178,7 @@ class TypeTree : public std::enable_shared_from_this { auto found = mapping.find(tmp); if (found != mapping.end()) { // Already exists as is - if (found->second == CT) + if (found->second == CT || found->second == BaseType::Anything) return changed; if (intsAreLegalSubPointer &&