[WebAssembly] Add an assert to sanity-check dead flags.

The WebAssemblyStoreResults pass runs before LiveVariables, so it doesn't
expect to have to keep dead flags up to date; check this with an assert.

llvm-svn: 255551
This commit is contained in:
Dan Gohman 2015-12-14 21:53:54 +00:00
parent 52abc5f971
commit 87b4aa8914
1 changed files with 3 additions and 0 deletions

View File

@ -113,6 +113,9 @@ bool WebAssemblyStoreResults::runOnMachineFunction(MachineFunction &MF) {
DEBUG(dbgs() << "Setting operand " << O << " in " << *Where
<< " from " << MI << "\n");
O.setReg(ToReg);
// If the store's def was previously dead, it is no longer. But the
// dead flag shouldn't be set yet.
assert(!MI.getOperand(0).isDead() && "Dead flag set on store result");
}
}
}