matchBinOpReduction currently matches against a single opcode, but we already have a case where we try to match against AND/OR and I'll be shortly adding another case for SMAX/SMIN/UMAX/UMIN.
This NFCI patch alters matchBinOpReduction to try and pattern match against any of the provided list of candidate bin ops at once to save time.
If you want, you can move this check outside of the loop. The value of CandidateBinOp is only set by the first iteration of the loop, based on node Op.
If you decide to move the check before the loop, then the check for Op.getOpcode() != CandidateBinOp can be moved at around line 30140 (i.e. after the block of code that sets the Op for the next stage).