mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-10 04:33:40 +00:00
Set the insertion point correctly for instructions generated by load folding:
they should go *before* the new instruction not after it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123420 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
09befe9036
commit
67d9891690
@ -890,10 +890,10 @@ void SelectionDAGISel::SelectAllBasicBlocks(const Function &Fn) {
|
||||
if (Inst != Begin)
|
||||
BeforeInst = llvm::prior(llvm::prior(BI));
|
||||
if (BeforeInst && isa<LoadInst>(BeforeInst) &&
|
||||
BeforeInst->hasOneUse() && *BeforeInst->use_begin() == Inst &&
|
||||
TryToFoldFastISelLoad(cast<LoadInst>(BeforeInst), FastIS)) {
|
||||
// If we succeeded, don't re-select the load.
|
||||
--BI;
|
||||
BeforeInst->hasOneUse() && *BeforeInst->use_begin() == Inst) {
|
||||
FastIS->recomputeInsertPt();
|
||||
if (TryToFoldFastISelLoad(cast<LoadInst>(BeforeInst), FastIS))
|
||||
--BI; // If we succeeded, don't re-select the load.
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user