From dba9011942e45331312d0adc392beee03d39961f Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Sun, 19 Feb 2017 00:33:37 +0000 Subject: Fix unused variable warning when assertions are disabled. llvm-svn: 295587 --- llvm/lib/Transforms/Utils/PredicateInfo.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/lib/Transforms') diff --git a/llvm/lib/Transforms/Utils/PredicateInfo.cpp b/llvm/lib/Transforms/Utils/PredicateInfo.cpp index cd3974db8c7..b97a1bc766c 100644 --- a/llvm/lib/Transforms/Utils/PredicateInfo.cpp +++ b/llvm/lib/Transforms/Utils/PredicateInfo.cpp @@ -317,9 +317,9 @@ void PredicateInfo::processAssume(IntrinsicInst *II, BasicBlock *AssumeBB, } else if (auto *BinOp = dyn_cast(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"); } -- cgit v1.2.3