Prefer checking for non-zero operator before non-zero via
dominating conditions. This is to make sure we don't have
compile-time regressions when special cases that are currently
part of isKnownNonZero() get moved into isKnownNonZeroFromOperator().
}
}
+ if (const auto *I = dyn_cast<Operator>(V))
+ if (isKnownNonZeroFromOperator(I, DemandedElts, Depth, Q))
+ return true;
+
if (!isa<Constant>(V) &&
isKnownNonNullFromDominatingCondition(V, Q.CxtI, Q.DT))
return true;
- if (const auto *I = dyn_cast<Operator>(V))
- return isKnownNonZeroFromOperator(I, DemandedElts, Depth, Q);
-
return false;
}