From 3da1c311ba936af48af30e9cd415af2ad71672c0 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Sun, 19 Feb 2017 00:33:37 +0000 Subject: [PATCH] Fix unused variable warning when assertions are disabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295587 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/PredicateInfo.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Transforms/Utils/PredicateInfo.cpp b/lib/Transforms/Utils/PredicateInfo.cpp index cd3974db8c7..b97a1bc766c 100644 --- a/lib/Transforms/Utils/PredicateInfo.cpp +++ b/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"); } -- 2.50.1