From 47811b76ca92ddfebdd73c633d04ba8a4f5b7b59 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 28 Sep 2006 23:35:22 +0000 Subject: Eliminate ConstantBool::True and ConstantBool::False. Instead, provide ConstantBool::getTrue() and ConstantBool::getFalse(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30665 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/CorrelatedExprs.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/Transforms/Scalar/CorrelatedExprs.cpp') diff --git a/lib/Transforms/Scalar/CorrelatedExprs.cpp b/lib/Transforms/Scalar/CorrelatedExprs.cpp index 722a224639..4c5025659c 100644 --- a/lib/Transforms/Scalar/CorrelatedExprs.cpp +++ b/lib/Transforms/Scalar/CorrelatedExprs.cpp @@ -788,12 +788,12 @@ void CEE::PropagateBranchInfo(BranchInst *BI) { // Propagate information into the true block... // - PropagateEquality(BI->getCondition(), ConstantBool::True, + PropagateEquality(BI->getCondition(), ConstantBool::getTrue(), getRegionInfo(BI->getSuccessor(0))); // Propagate information into the false block... // - PropagateEquality(BI->getCondition(), ConstantBool::False, + PropagateEquality(BI->getCondition(), ConstantBool::getFalse(), getRegionInfo(BI->getSuccessor(1))); } @@ -971,8 +971,7 @@ void CEE::IncorporateInstruction(Instruction *Inst, RegionInfo &RI) { // See if we can figure out a result for this instruction... Relation::KnownResult Result = getSetCCResult(SCI, RI); if (Result != Relation::Unknown) { - PropagateEquality(SCI, Result ? ConstantBool::True : ConstantBool::False, - RI); + PropagateEquality(SCI, ConstantBool::get(Result != 0), RI); } } } -- cgit v1.2.3