diff options
author | Craig Topper <craig.topper@intel.com> | 2017-07-06 16:24:23 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2017-07-06 16:24:23 +0000 |
commit | 95e4142f94df39fc87504c11278139fc698570f2 (patch) | |
tree | 993a8699d0a4b0c06bb11cae92e77f391ba4d076 /llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp | |
parent | fc42acef92be0ef95cd72a3db3e345c8ae23b381 (diff) | |
download | bcm5719-llvm-95e4142f94df39fc87504c11278139fc698570f2.tar.gz bcm5719-llvm-95e4142f94df39fc87504c11278139fc698570f2.zip |
[InstCombine] Change helper method to a file local static method. NFC
llvm-svn: 307275
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp index 7e8c2e1b4c1..99d5e3f7d02 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp @@ -80,7 +80,8 @@ static Value *getFCmpValue(unsigned Code, Value *LHS, Value *RHS, /// \param I Binary operator to transform. /// \return Pointer to node that must replace the original binary operator, or /// null pointer if no transformation was made. -Value *InstCombiner::SimplifyBSwap(BinaryOperator &I) { +static Value *SimplifyBSwap(BinaryOperator &I, + InstCombiner::BuilderTy *Builder) { assert(I.isBitwiseLogicOp() && "Unexpected opcode for bswap simplifying"); Value *OldLHS = I.getOperand(0); @@ -1281,7 +1282,7 @@ Instruction *InstCombiner::visitAnd(BinaryOperator &I) { if (Value *V = SimplifyUsingDistributiveLaws(I)) return replaceInstUsesWith(I, V); - if (Value *V = SimplifyBSwap(I)) + if (Value *V = SimplifyBSwap(I, Builder)) return replaceInstUsesWith(I, V); if (ConstantInt *AndRHS = dyn_cast<ConstantInt>(Op1)) { @@ -1985,7 +1986,7 @@ Instruction *InstCombiner::visitOr(BinaryOperator &I) { if (Value *V = SimplifyUsingDistributiveLaws(I)) return replaceInstUsesWith(I, V); - if (Value *V = SimplifyBSwap(I)) + if (Value *V = SimplifyBSwap(I, Builder)) return replaceInstUsesWith(I, V); if (isa<Constant>(Op1)) @@ -2400,7 +2401,7 @@ Instruction *InstCombiner::visitXor(BinaryOperator &I) { if (SimplifyDemandedInstructionBits(I)) return &I; - if (Value *V = SimplifyBSwap(I)) + if (Value *V = SimplifyBSwap(I, Builder)) return replaceInstUsesWith(I, V); // Apply DeMorgan's Law for 'nand' / 'nor' logic with an inverted operand. |