[Instcombine] Code refactors for foldSelectOpOp; NFC
authorchenglin.bi <chenglin.bi@linaro.org>
Fri, 2 Dec 2022 14:26:20 +0000 (22:26 +0800)
committerchenglin.bi <chenglin.bi@linaro.org>
Fri, 2 Dec 2022 14:27:10 +0000 (22:27 +0800)
commit683b9fc7bd23bc4fb16ccffdf9d1c6fb95c10ed7
treec8a3b62eb4edc2600481119d8119e298d5b4c9b0
parentd0650d108929985760d536d59e9927838dccc9b8
[Instcombine] Code refactors for foldSelectOpOp; NFC

Reuse the code about find common operator.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D139075
llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp