Remove pointless asserts.
authorNick Lewycky <nicholas@mxc.ca>
Wed, 4 Jan 2012 09:42:30 +0000 (09:42 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Wed, 4 Jan 2012 09:42:30 +0000 (09:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147529 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/InstCombine/InstCombineShifts.cpp

index cb8d6069d9ed7a7201d4f7030d23c936d14e7d47..a66e650895250d361d6c1cc2367596b4f0289f95 100644 (file)
@@ -595,7 +595,6 @@ Instruction *InstCombiner::FoldShiftByConstant(Value *Op0, ConstantInt *Op1,
       // (X << C1) >>u C2  --> X >>u (C2-C1) & (-1 >> C2)
       if (I.getOpcode() == Instruction::LShr &&
           ShiftOp->getOpcode() == Instruction::Shl) {
-        assert(ShiftOp->getOpcode() == Instruction::Shl);
         ConstantInt *ShiftDiffCst = ConstantInt::get(Ty, ShiftDiff);
         // (X <<nuw C1) >>u C2 --> X >>u (C2-C1)
         if (ShiftOp->hasNoUnsignedWrap()) {
@@ -615,7 +614,6 @@ Instruction *InstCombiner::FoldShiftByConstant(Value *Op0, ConstantInt *Op1,
       // we can handle (X <<nsw C1) >>s C2 since it only shifts in sign bits.
       if (I.getOpcode() == Instruction::AShr &&
           ShiftOp->getOpcode() == Instruction::Shl) {
-        assert(ShiftOp->getOpcode() == Instruction::Shl);
         if (ShiftOp->hasNoSignedWrap()) {
           // (X <<nsw C1) >>s C2 --> X >>s (C2-C1)
           ConstantInt *ShiftDiffCst = ConstantInt::get(Ty, ShiftDiff);