Initializing an unsigned with ~0UL causes the compiler

to complain on x86-64 (gcc 4.1).  Use ~0U instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46197 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan Sands
2008-01-20 10:49:23 +00:00
parent 713ed3f7c0
commit 02ec6e51ed

View File

@@ -213,7 +213,7 @@ bool DSE::handleFreeWithNonTrivialDependency(FreeInst* F, Instruction* dep,
unsigned depPointerSize = TD.getTypeStoreSize(depType);
// Check for aliasing
AliasAnalysis::AliasResult A = AA.alias(F->getPointerOperand(), ~0UL,
AliasAnalysis::AliasResult A = AA.alias(F->getPointerOperand(), ~0U,
depPointer, depPointerSize);
if (A == AliasAnalysis::MustAlias) {
@@ -326,7 +326,7 @@ bool DSE::handleEndBlock(BasicBlock& BB,
}
// Get size information for the alloca
unsigned pointerSize = ~0UL;
unsigned pointerSize = ~0U;
if (ConstantInt* C = dyn_cast<ConstantInt>((*I)->getArraySize()))
pointerSize = C->getZExtValue() * \
TD.getABITypeSize((*I)->getAllocatedType());
@@ -392,14 +392,14 @@ bool DSE::RemoveUndeadPointers(Value* killPointer,
for (SmallPtrSet<AllocaInst*, 64>::iterator I = deadPointers.begin(),
E = deadPointers.end(); I != E; ++I) {
// Get size information for the alloca
unsigned pointerSize = ~0UL;
unsigned pointerSize = ~0U;
if (ConstantInt* C = dyn_cast<ConstantInt>((*I)->getArraySize()))
pointerSize = C->getZExtValue() * \
TD.getABITypeSize((*I)->getAllocatedType());
// See if this pointer could alias it
AliasAnalysis::AliasResult A = AA.alias(*I, pointerSize,
killPointer, ~0UL);
killPointer, ~0U);
// If it must-alias and a store, we can delete it
if (isa<StoreInst>(BBI) && A == AliasAnalysis::MustAlias) {