aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/ARM')
-rw-r--r--lib/Target/ARM/Thumb2HazardRecognizer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Target/ARM/Thumb2HazardRecognizer.cpp b/lib/Target/ARM/Thumb2HazardRecognizer.cpp
index 1614422..3fe31a2 100644
--- a/lib/Target/ARM/Thumb2HazardRecognizer.cpp
+++ b/lib/Target/ARM/Thumb2HazardRecognizer.cpp
@@ -17,7 +17,7 @@ ScheduleHazardRecognizer::HazardType
Thumb2HazardRecognizer::getHazardType(SUnit *SU) {
if (ITBlockSize) {
MachineInstr *MI = SU->getInstr();
- if (MI != ITBlockMIs[ITBlockSize-1])
+ if (!MI->isDebugValue() && MI != ITBlockMIs[ITBlockSize-1])
return Hazard;
}
@@ -42,6 +42,8 @@ void Thumb2HazardRecognizer::EmitInstruction(SUnit *SU) {
MachineBasicBlock::iterator I = MI;
for (unsigned i = 0; i < ITBlockSize; ++i) {
++I;
+ while (I->isDebugValue())
+ ++I;
ITBlockMIs[ITBlockSize-1-i] = &*I;
}
}