[llvm] r295587 - Fix unused variable warning when assertions are disabled.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 18 16:33:38 PST 2017
Author: rksimon
Date: Sat Feb 18 18:33:37 2017
New Revision: 295587
URL: http://llvm.org/viewvc/llvm-project?rev=295587&view=rev
Log:
Fix unused variable warning when assertions are disabled.
Modified:
llvm/trunk/lib/Transforms/Utils/PredicateInfo.cpp
Modified: llvm/trunk/lib/Transforms/Utils/PredicateInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/PredicateInfo.cpp?rev=295587&r1=295586&r2=295587&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/PredicateInfo.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/PredicateInfo.cpp Sat Feb 18 18:33:37 2017
@@ -317,9 +317,9 @@ void PredicateInfo::processAssume(Intrin
} 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(Branch
"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");
}
More information about the llvm-commits
mailing list