]> granicus.if.org Git - llvm/commitdiff
Fix unused variable warning when assertions are disabled.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 19 Feb 2017 00:33:37 +0000 (00:33 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 19 Feb 2017 00:33:37 +0000 (00:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295587 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/PredicateInfo.cpp

index cd3974db8c743d2d4e2b7f4aadd71c297139192a..b97a1bc766cef165712d4f515b18bf8aa4020afa 100644 (file)
@@ -317,9 +317,9 @@ void PredicateInfo::processAssume(IntrinsicInst *II, BasicBlock *AssumeBB,
     } else if (auto *BinOp = dyn_cast<BinaryOperator>(Cond)) {
       // Otherwise, it should be an AND.
       assert(BinOp->getOpcode() == Instruction::And &&
-             "Should have been an and");
-      auto *PA = new PredicateAssume(Cond, II, Cond);
-      addInfoFor(OpsToRename, Cond, PA);
+             "Should have been an AND");
+      auto *PA = new PredicateAssume(BinOp, II, BinOp);
+      addInfoFor(OpsToRename, BinOp, PA);
     } else {
       llvm_unreachable("Unknown type of condition");
     }
@@ -389,7 +389,7 @@ void PredicateInfo::processBranch(BranchInst *BI, BasicBlock *BranchBB,
              "Should have been an AND or an OR");
       // The actual value of the binop is not subject to the same restrictions
       // as the comparison. It's either true or false on the true/false branch.
-      InsertHelper(Cond, false, false, Cond);
+      InsertHelper(BinOp, false, false, BinOp);
     } else {
       llvm_unreachable("Unknown type of condition");
     }