From 5b200d8a133a07af1f7802025bd5a58a1cdd544d Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 19 Dec 2008 00:45:13 +0000 Subject: [PATCH] Fix RegScavenger::forward() to work on basic blocks containing exactly one instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61236 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/RegisterScavenging.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/llvm/CodeGen/RegisterScavenging.h b/include/llvm/CodeGen/RegisterScavenging.h index 40dd66c06a7..05e9e55e234 100644 --- a/include/llvm/CodeGen/RegisterScavenging.h +++ b/include/llvm/CodeGen/RegisterScavenging.h @@ -98,6 +98,7 @@ public: /// forward / backward - Move the internal MBB iterator and update register /// states until it has processed the specific iterator. void forward(MachineBasicBlock::iterator I) { + if (!Tracking && MBB->begin() != I) forward(); while (MBBI != I) forward(); } void backward(MachineBasicBlock::iterator I) {