mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-29 13:32:33 +00:00
fit to 80 cols.
Remove now-extraneous checks for ptr->ptr bitcasts. Fix PR1109 and Analysis/BasicAA/2007-01-13-BasePointerBadNoAlias.ll. We need to consider arbitrary sized objects when checking for nested GEP offsets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33195 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
84efeda7ea
commit
241607d016
@ -274,10 +274,8 @@ BasicAliasAnalysis::alias(const Value *V1, unsigned V1Size,
|
||||
|
||||
// Strip off cast instructions...
|
||||
if (const BitCastInst *I = dyn_cast<BitCastInst>(V1))
|
||||
if (isa<PointerType>(I->getOperand(0)->getType()))
|
||||
return alias(I->getOperand(0), V1Size, V2, V2Size);
|
||||
if (const BitCastInst *I = dyn_cast<BitCastInst>(V2))
|
||||
if (isa<PointerType>(I->getOperand(0)->getType()))
|
||||
return alias(V1, V1Size, I->getOperand(0), V2Size);
|
||||
|
||||
// Figure out what objects these things are pointing to if we can...
|
||||
@ -363,7 +361,7 @@ BasicAliasAnalysis::alias(const Value *V1, unsigned V1Size,
|
||||
Constant::getNullValue(cast<User>(BasePtr2)->getOperand(1)->getType()));
|
||||
|
||||
// Do the base pointers alias?
|
||||
AliasResult BaseAlias = alias(BasePtr1, V1Size, BasePtr2, V2Size);
|
||||
AliasResult BaseAlias = alias(BasePtr1, ~0U, BasePtr2, ~0U);
|
||||
if (BaseAlias == NoAlias) return NoAlias;
|
||||
if (BaseAlias == MustAlias) {
|
||||
// If the base pointers alias each other exactly, check to see if we can
|
||||
|
Loading…
x
Reference in New Issue
Block a user