1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

[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 9826aaba7a
commit 519f31480b

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");
}
}
}