Fold assert-only-used variable into the assert.
authorNick Lewycky <nicholas@mxc.ca>
Sat, 4 Jun 2011 02:07:10 +0000 (02:07 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Sat, 4 Jun 2011 02:07:10 +0000 (02:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132620 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/BranchProbabilityInfo.cpp

index d7fc2c39875f5e9bd5e754514a489f1a3657c532..d69c0120bb4b69f853fbd85efa6bfca1b22c3863 100644 (file)
@@ -171,12 +171,11 @@ void BranchProbabilityAnalysis::calcPointerHeuristics(BasicBlock *BB) {
     return;
 
   Value *LHS = CI->getOperand(0);
-  Value *RHS = CI->getOperand(1);
 
   if (!LHS->getType()->isPointerTy())
     return;
 
-  assert(RHS->getType()->isPointerTy());
+  assert(CI->getOperand(1)->getType()->isPointerTy());
 
   BasicBlock *Taken = BI->getSuccessor(0);
   BasicBlock *NonTaken = BI->getSuccessor(1);