forked from OSchip/llvm-project
[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:
parent
52abc5f971
commit
87b4aa8914
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue