https://github.com/mshockwave approved this pull request. LGTM. Yeah I also realized the sub-pattern template types in `SDPatternMatch::And` and `SDPatternMatch::Or` are kind of off. Thanks for fixing them. https://github.com/llvm/llvm-project/pull/93806