summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-10-30 23:59:06 +0000
committerDan Gohman <gohman@apple.com>2009-10-30 23:59:06 +0000
commit060ee82dab8f2be7ba212eadb0929fd5b0a4bec1 (patch)
tree36e8ced532b4412fdc7db0ee97313768e92addf0 /llvm/lib/CodeGen
parentd814e32e57c52f554caa125bac2be1e90a083947 (diff)
downloadbcm5719-llvm-060ee82dab8f2be7ba212eadb0929fd5b0a4bec1.tar.gz
bcm5719-llvm-060ee82dab8f2be7ba212eadb0929fd5b0a4bec1.zip
Add assertion checks here to turn silent miscompiles into aborts.
llvm-svn: 85639
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/ScheduleDAGEmit.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/ScheduleDAGEmit.cpp b/llvm/lib/CodeGen/ScheduleDAGEmit.cpp
index 0d15c021412..8e034203f4d 100644
--- a/llvm/lib/CodeGen/ScheduleDAGEmit.cpp
+++ b/llvm/lib/CodeGen/ScheduleDAGEmit.cpp
@@ -50,8 +50,10 @@ void ScheduleDAG::EmitPhysRegCopy(SUnit *SU,
break;
}
}
- TII->copyRegToReg(*BB, InsertPos, Reg, VRI->second,
- SU->CopyDstRC, SU->CopySrcRC);
+ bool Success = TII->copyRegToReg(*BB, InsertPos, Reg, VRI->second,
+ SU->CopyDstRC, SU->CopySrcRC);
+ (void)Success;
+ assert(Success && "copyRegToReg failed!");
} else {
// Copy from physical register.
assert(I->getReg() && "Unknown physical register!");
@@ -59,8 +61,10 @@ void ScheduleDAG::EmitPhysRegCopy(SUnit *SU,
bool isNew = VRBaseMap.insert(std::make_pair(SU, VRBase)).second;
isNew = isNew; // Silence compiler warning.
assert(isNew && "Node emitted out of order - early");
- TII->copyRegToReg(*BB, InsertPos, VRBase, I->getReg(),
- SU->CopyDstRC, SU->CopySrcRC);
+ bool Success = TII->copyRegToReg(*BB, InsertPos, VRBase, I->getReg(),
+ SU->CopyDstRC, SU->CopySrcRC);
+ (void)Success;
+ assert(Success && "copyRegToReg failed!");
}
break;
}
OpenPOWER on IntegriCloud