1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

[InstCombine] Remove an if that should have been guaranteed by the caller. Replace with an assert. NFC

llvm-svn: 306997
This commit is contained in:
Craig Topper 2017-07-03 05:54:11 +00:00
parent 8101679254
commit 6ccf4facf7

View File

@ -80,16 +80,14 @@ static Value *getFCmpValue(unsigned Code, Value *LHS, Value *RHS,
/// \return Pointer to node that must replace the original binary operator, or
/// null pointer if no transformation was made.
Value *InstCombiner::SimplifyBSwap(BinaryOperator &I) {
assert(I.isBitwiseLogicOp() && "Unexpected opcode for bswap simplifying");
IntegerType *ITy = dyn_cast<IntegerType>(I.getType());
// Can't do vectors.
if (I.getType()->isVectorTy())
return nullptr;
// Can only do bitwise ops.
if (!I.isBitwiseLogicOp())
return nullptr;
Value *OldLHS = I.getOperand(0);
Value *OldRHS = I.getOperand(1);
ConstantInt *ConstLHS = dyn_cast<ConstantInt>(OldLHS);