mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
Set the insertion point correctly for instructions generated by load folding:
they should go *before* the new instruction not after it. llvm-svn: 123420
This commit is contained in:
parent
3d8deb13ee
commit
a0074ca5fc
@ -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…
Reference in New Issue
Block a user