summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineVerifier.cpp
diff options
context:
space:
mode:
authorCameron Zwarich <zwarich@apple.com>2010-12-27 05:17:23 +0000
committerCameron Zwarich <zwarich@apple.com>2010-12-27 05:17:23 +0000
commitb95bfe1667966987eb04b3fc7b4ba6ef0a23208a (patch)
tree492e0b1222d6ccd00266d0720aad9ed36e0ac3ee /llvm/lib/CodeGen/MachineVerifier.cpp
parent9e590024f61e68df2bc494513bf6b893ce5b6f30 (diff)
downloadbcm5719-llvm-b95bfe1667966987eb04b3fc7b4ba6ef0a23208a.tar.gz
bcm5719-llvm-b95bfe1667966987eb04b3fc7b4ba6ef0a23208a.zip
Add knowledge of phi-def and phi-kill valnos to MachineVerifier's predecessor
valno verification. The "Different value live out of predecessor" check is incorrect in the case of phi-def valnos, so just skip that check for phi-def valnos and instead check that all of the valnos for predecessors have phi-kill. Fixes PR8863. llvm-svn: 122581
Diffstat (limited to 'llvm/lib/CodeGen/MachineVerifier.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineVerifier.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp
index d5dda48cebd..0c299690039 100644
--- a/llvm/lib/CodeGen/MachineVerifier.cpp
+++ b/llvm/lib/CodeGen/MachineVerifier.cpp
@@ -1146,7 +1146,23 @@ void MachineVerifier::verifyLiveIntervals() {
*OS << "Valno #" << VNI->id << " live into BB#" << MFI->getNumber()
<< '@' << LiveInts->getMBBStartIdx(MFI) << ", not live at "
<< PEnd << " in " << LI << '\n';
- } else if (PVNI != VNI) {
+ continue;
+ }
+
+ if (VNI->isPHIDef() && VNI->def == LiveInts->getMBBStartIdx(MFI)) {
+ if (!PVNI->hasPHIKill()) {
+ report("Value live out of predecessor doesn't have PHIKill", MF);
+ *OS << "Valno #" << PVNI->id << " live out of BB#"
+ << (*PI)->getNumber() << '@' << PEnd
+ << " doesn't have PHIKill, but Valno #" << VNI->id
+ << " is PHIDef and defined at the beginning of BB#"
+ << MFI->getNumber() << '@' << LiveInts->getMBBStartIdx(MFI)
+ << " in " << LI << '\n';
+ }
+ continue;
+ }
+
+ if (PVNI != VNI) {
report("Different value live out of predecessor", *PI);
*OS << "Valno #" << PVNI->id << " live out of BB#"
<< (*PI)->getNumber() << '@' << PEnd
OpenPOWER on IntegriCloud