[llvm-commits] [llvm] r85639 - /llvm/trunk/lib/CodeGen/ScheduleDAGEmit.cpp
Dan Gohman
gohman at apple.com
Fri Oct 30 16:59:06 PDT 2009
Author: djg
Date: Fri Oct 30 18:59:06 2009
New Revision: 85639
URL: http://llvm.org/viewvc/llvm-project?rev=85639&view=rev
Log:
Add assertion checks here to turn silent miscompiles into aborts.
Modified:
llvm/trunk/lib/CodeGen/ScheduleDAGEmit.cpp
Modified: llvm/trunk/lib/CodeGen/ScheduleDAGEmit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ScheduleDAGEmit.cpp?rev=85639&r1=85638&r2=85639&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ScheduleDAGEmit.cpp (original)
+++ llvm/trunk/lib/CodeGen/ScheduleDAGEmit.cpp Fri Oct 30 18:59:06 2009
@@ -50,8 +50,10 @@
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 @@
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;
}
More information about the llvm-commits
mailing list