summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-01-11 18:21:29 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-01-11 18:21:29 +0000
commit542964f55b2dce5703c9dd88496fde4f7ebf89b6 (patch)
tree07d5e88789ee8f5f61159e1ec2def506545fe52a /llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
parentbd23db9968ac7583431836ffcf9957f8e38c1aea (diff)
downloadbcm5719-llvm-542964f55b2dce5703c9dd88496fde4f7ebf89b6.tar.gz
bcm5719-llvm-542964f55b2dce5703c9dd88496fde4f7ebf89b6.zip
Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
llvm-svn: 33076
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopUnswitch.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopUnswitch.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
index 2f79f607fe5..c97c9b5518c 100644
--- a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud