mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-04 21:30:49 +00:00
Fix a bug where LICM was not updating AA information properly when sinking
a pointer value out of a loop causing it to be duplicated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20828 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
20da24c4b9
commit
70ac2dcb84
@ -302,7 +302,7 @@ void LICM::SinkRegion(DominatorTree::Node *N) {
|
||||
// outside of the loop. In this case, it doesn't even matter if the
|
||||
// operands of the instruction are loop invariant.
|
||||
//
|
||||
if (canSinkOrHoistInst(I) && isNotUsedInLoop(I)) {
|
||||
if (isNotUsedInLoop(I) && canSinkOrHoistInst(I)) {
|
||||
++II;
|
||||
sink(I);
|
||||
}
|
||||
@ -530,6 +530,7 @@ void LICM::sink(Instruction &I) {
|
||||
New = &I;
|
||||
} else {
|
||||
New = I.clone();
|
||||
CurAST->copyValue(&I, New);
|
||||
if (!I.getName().empty())
|
||||
New->setName(I.getName()+".le");
|
||||
ExitBlock->getInstList().insert(InsertPt, New);
|
||||
|
Loading…
Reference in New Issue
Block a user