[llvm-commits] [llvm] r160531 - /llvm/trunk/lib/CodeGen/MachineVerifier.cpp
Pete Cooper
peter_cooper at apple.com
Thu Jul 19 16:40:38 PDT 2012
Author: pete
Date: Thu Jul 19 18:40:38 2012
New Revision: 160531
URL: http://llvm.org/viewvc/llvm-project?rev=160531&view=rev
Log:
Fix crash in machine verifier when trying to print the def of a register which has no def
Modified:
llvm/trunk/lib/CodeGen/MachineVerifier.cpp
Modified: llvm/trunk/lib/CodeGen/MachineVerifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineVerifier.cpp?rev=160531&r1=160530&r2=160531&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineVerifier.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineVerifier.cpp Thu Jul 19 18:40:38 2012
@@ -837,6 +837,8 @@
// Reserved registers may be used even when 'dead'.
if (!isReserved(Reg))
report("Using an undefined physical register", MO, MONum);
+ } else if (MRI->def_empty(Reg)) {
+ report("Reading virtual register without a def", MO, MONum);
} else {
BBInfo &MInfo = MBBInfoMap[MI->getParent()];
// We don't know which virtual registers are live in, so only complain
More information about the llvm-commits
mailing list