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 | b5e918dc056dc254d689c1deb6a104c59b855f1f (patch) | |
tree | fa69ed052f8402b7216df4bbb511c8e258a21ac1 /llvm/lib/CodeGen | |
parent | 50c63168edfc81e46476d541848084756367ba99 (diff) | |
download | bcm5719-llvm-b5e918dc056dc254d689c1deb6a104c59b855f1f.tar.gz bcm5719-llvm-b5e918dc056dc254d689c1deb6a104c59b855f1f.zip |
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.
llvm-svn: 108765
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp index cff7ace536a..1fb20f1dc06 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/llvm/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(); |