diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-01-11 18:21:29 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-01-11 18:21:29 +0000 |
commit | 4fe16d607d11e29d742208894909733f5ad01f8f (patch) | |
tree | a669ba57373e87d31c3af6f301fe4a61f773f4b3 /lib/Transforms/Scalar/LoopUnswitch.cpp | |
parent | 34dceb47573b0aedd188b5e72bb848ba29a4960f (diff) |
Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33076 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopUnswitch.cpp')
-rw-r--r-- | lib/Transforms/Scalar/LoopUnswitch.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Transforms/Scalar/LoopUnswitch.cpp b/lib/Transforms/Scalar/LoopUnswitch.cpp index 2f79f607fe..c97c9b5518 100644 --- a/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -486,7 +486,7 @@ static void EmitPreheaderBranchOnCondition(Value *LIC, Constant *Val, // Insert a conditional branch on LIC to the two preheaders. The original // code is the true version and the new code is the false version. Value *BranchVal = LIC; - if (Val->getType() != Type::BoolTy) + if (Val->getType() != Type::Int1Ty) BranchVal = new ICmpInst(ICmpInst::ICMP_EQ, LIC, Val, "tmp", InsertPt); else if (Val != ConstantInt::getTrue()) // We want to enter the new loop when the condition is true. @@ -919,7 +919,7 @@ void LoopUnswitch::RewriteLoopBodyWithConditionConstant(Loop *L, Value *LIC, // If we know that LIC == Val, or that LIC == NotVal, just replace uses of LIC // in the loop with the appropriate one directly. - if (IsEqual || (isa<ConstantInt>(Val) && Val->getType() == Type::BoolTy)) { + if (IsEqual || (isa<ConstantInt>(Val) && Val->getType() == Type::Int1Ty)) { Value *Replacement; if (IsEqual) Replacement = Val; @@ -1032,10 +1032,10 @@ void LoopUnswitch::SimplifyCode(std::vector<Instruction*> &Worklist) { break; case Instruction::And: if (isa<ConstantInt>(I->getOperand(0)) && - I->getOperand(0)->getType() == Type::BoolTy) // constant -> RHS + I->getOperand(0)->getType() == Type::Int1Ty) // constant -> RHS cast<BinaryOperator>(I)->swapOperands(); if (ConstantInt *CB = dyn_cast<ConstantInt>(I->getOperand(1))) - if (CB->getType() == Type::BoolTy) { + if (CB->getType() == Type::Int1Ty) { if (CB->getBoolValue()) // X & 1 -> X ReplaceUsesOfWith(I, I->getOperand(0), Worklist); else // X & 0 -> 0 @@ -1045,10 +1045,10 @@ void LoopUnswitch::SimplifyCode(std::vector<Instruction*> &Worklist) { break; case Instruction::Or: if (isa<ConstantInt>(I->getOperand(0)) && - I->getOperand(0)->getType() == Type::BoolTy) // constant -> RHS + I->getOperand(0)->getType() == Type::Int1Ty) // constant -> RHS cast<BinaryOperator>(I)->swapOperands(); if (ConstantInt *CB = dyn_cast<ConstantInt>(I->getOperand(1))) - if (CB->getType() == Type::BoolTy) { + if (CB->getType() == Type::Int1Ty) { if (CB->getBoolValue()) // X | 1 -> 1 ReplaceUsesOfWith(I, I->getOperand(1), Worklist); else // X | 0 -> X |