[InstSimplify] use isImpliedCondition() instead of semi-duplicated code

We get a couple of improvements from recognizing swapped
operand patterns that were not handled by the replicated
code.

This should also enable simplifying larger patterns as
seen in issue #56653 and issue #56654, but that requires
enhancements to isImpliedCondition() itself.

GitOrigin-RevId: 019d76196f79fcff3c148d0163786f9cce70a023
3 files changed