[ConstraintElim] Extracted HeaderPhi matcher (#248209)
Extracted HeaderPhi matcher from
https://github.com/llvm/llvm-project/pull/223214 for common use.
Note: as the test shows, providing a precise matcher means we don't lose
out on possible commutative match in CmpClass_match::match. Earlier we
get early success with just matching Phi and giving up later on match
vs. if we also check header, we do end up checking the commutative
version that matches.