[ConstraintElim] Handle single And/Or as exit condition in loop. (#221228)
In some cases, exits conditions in the loop are And/Or of and IV-based
condition and another condition. If the loop continues only if all
conditions are true (AND + true successor is the header, OR + false
successor is the header), we can still use the IV based condition to
bound the IV.
For now, just peels a single AND/OR.
This enables folds in a few additional cases:
https://github.com/dtcxzyw/llvm-opt-benchmark-nightly/pull/1193.
PR: https://github.com/llvm/llvm-project/pull/221228