mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-31 09:11:13 +00:00
Fix test/Regression/Analysis/BasicAA/2004-07-28-MustAliasbug.llx
This also fixes the miscompilation of MallocBench/gs with dead store elimination enabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15324 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
246b40ae7a
commit
730b1ad2c4
@ -322,11 +322,15 @@ BasicAliasAnalysis::alias(const Value *V1, unsigned V1Size,
|
|||||||
BasePtr1 = GetGEPOperands(V1, GEP1Ops);
|
BasePtr1 = GetGEPOperands(V1, GEP1Ops);
|
||||||
BasePtr2 = GetGEPOperands(V2, GEP2Ops);
|
BasePtr2 = GetGEPOperands(V2, GEP2Ops);
|
||||||
|
|
||||||
AliasResult GAlias =
|
// If GetGEPOperands were able to fold to the same must-aliased pointer,
|
||||||
CheckGEPInstructions(BasePtr1->getType(), GEP1Ops, V1Size,
|
// do the comparison.
|
||||||
BasePtr2->getType(), GEP2Ops, V2Size);
|
if (BasePtr1 == BasePtr2) {
|
||||||
if (GAlias != MayAlias)
|
AliasResult GAlias =
|
||||||
return GAlias;
|
CheckGEPInstructions(BasePtr1->getType(), GEP1Ops, V1Size,
|
||||||
|
BasePtr2->getType(), GEP2Ops, V2Size);
|
||||||
|
if (GAlias != MayAlias)
|
||||||
|
return GAlias;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user