Don't get RegionKindInterface if we won't use it. Noticed by inspection.
/// Return true if the region with the given index inside the operation
/// has SSA dominance.
static bool hasSSADominance(Operation *op, unsigned index) {
+ if (!op->isRegistered()) return false;
+
auto kindInterface = dyn_cast<RegionKindInterface>(op);
- return op->isRegistered() &&
- (!kindInterface || kindInterface.hasSSADominance(index));
+ return !kindInterface || kindInterface.hasSSADominance(index);
}
//===----------------------------------------------------------------------===//