diff options
author | Dan Gohman <gohman@apple.com> | 2010-07-19 22:48:56 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-07-19 22:48:56 +0000 |
commit | c6e59b71f50c7c77bc448a936dba8e84d90911e8 (patch) | |
tree | 91d6867c5e9b1bc36fc3911e50843adad38a63ea /lib/CodeGen/SelectionDAG/FastISel.cpp | |
parent | d70f57b254114841892425a40944268d38ae0bcd (diff) |
After a custom inserter, in a block which has constant instructions,
update the current basic block in addition to the current insert
position, so that they remain consistent. This fixes rdar://8204072.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108765 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/FastISel.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp index cff7ace536..1fb20f1dc0 100644 --- a/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -276,6 +276,7 @@ std::pair<unsigned, bool> FastISel::getRegForGEPIndex(const Value *Idx) { void FastISel::recomputeInsertPt() { if (getLastLocalValue()) { FuncInfo.InsertPt = getLastLocalValue(); + FuncInfo.MBB = FuncInfo.InsertPt->getParent(); ++FuncInfo.InsertPt; } else FuncInfo.InsertPt = FuncInfo.MBB->getFirstNonPHI(); |