[llvm-commits] [llvm] r147529 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineShifts.cpp

Nick Lewycky nicholas at mxc.ca
Wed Jan 4 01:42:30 PST 2012


Author: nicholas
Date: Wed Jan  4 03:42:30 2012
New Revision: 147529

URL: http://llvm.org/viewvc/llvm-project?rev=147529&view=rev
Log:
Remove pointless asserts.

Modified:
    llvm/trunk/lib/Transforms/InstCombine/InstCombineShifts.cpp

Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineShifts.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineShifts.cpp?rev=147529&r1=147528&r2=147529&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineShifts.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineShifts.cpp Wed Jan  4 03:42:30 2012
@@ -595,7 +595,6 @@
       // (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 @@
       // 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);





More information about the llvm-commits mailing list