[InstCombine] Remove some repeated calls to getOperand. NFCI

We had alread loaded operand 1 and 2 of the select as TV and FV
using the more the readable getTrueValue/getFalseValue.
This commit is contained in:
Craig Topper 2020-06-10 16:54:09 -07:00
parent 4b7aa6c8c1
commit 94b1404587
1 changed files with 1 additions and 2 deletions

View File

@ -922,8 +922,7 @@ Instruction *InstCombiner::FoldOpIntoSelect(Instruction &Op, SelectInst *SI) {
if (auto *CI = dyn_cast<CmpInst>(SI->getCondition())) {
if (CI->hasOneUse()) {
Value *Op0 = CI->getOperand(0), *Op1 = CI->getOperand(1);
if ((SI->getOperand(1) == Op0 && SI->getOperand(2) == Op1) ||
(SI->getOperand(2) == Op0 && SI->getOperand(1) == Op1))
if ((TV == Op0 && FV == Op1) || (FV == Op0 && TV == Op1))
return nullptr;
}
}