Replace inferred getCast(V,Ty) calls with more strict variants.

Rename getZeroExtend and getSignExtend to getZExt and getSExt to match
the the casting mnemonics in the rest of LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32514 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer
2006-12-12 23:36:14 +00:00
parent ebc0922eeb
commit d977d8651a
10 changed files with 103 additions and 84 deletions
+4 -4
View File
@@ -459,11 +459,11 @@ static bool IndexOperandsEqual(Value *V1, Value *V2) {
if (Constant *C2 = dyn_cast<Constant>(V2)) {
// Sign extend the constants to long types, if necessary
if (C1->getType()->getPrimitiveSizeInBits() < 64)
C1 = ConstantExpr::getSignExtend(C1, Type::LongTy);
C1 = ConstantExpr::getSExt(C1, Type::LongTy);
else if (C1->getType() == Type::ULongTy)
C1 = ConstantExpr::getBitCast(C1, Type::LongTy);
if (C2->getType()->getPrimitiveSizeInBits() < 64)
C2 = ConstantExpr::getSignExtend(C2, Type::LongTy);
C2 = ConstantExpr::getSExt(C2, Type::LongTy);
else if (C2->getType() == Type::ULongTy)
C2 = ConstantExpr::getBitCast(C2, Type::LongTy);
return C1 == C2;
@@ -555,11 +555,11 @@ BasicAliasAnalysis::CheckGEPInstructions(
if (G1OC->getType() != G2OC->getType()) {
// Sign extend both operands to long.
if (G1OC->getType()->getPrimitiveSizeInBits() < 64)
G1OC = ConstantExpr::getSignExtend(G1OC, Type::LongTy);
G1OC = ConstantExpr::getSExt(G1OC, Type::LongTy);
else if (G1OC->getType() == Type::ULongTy)
G1OC = ConstantExpr::getBitCast(G1OC, Type::LongTy);
if (G2OC->getType()->getPrimitiveSizeInBits() < 64)
G2OC = ConstantExpr::getSignExtend(G2OC, Type::LongTy);
G2OC = ConstantExpr::getSExt(G2OC, Type::LongTy);
else if (G2OC->getType() == Type::ULongTy)
G2OC = ConstantExpr::getBitCast(G2OC, Type::LongTy);
GEP1Ops[FirstConstantOper] = G1OC;