diff options
author | Dan Gohman <dan433584@gmail.com> | 2015-12-14 21:53:54 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2015-12-14 21:53:54 +0000 |
commit | 87b4aa8914833a22eba10e618f946fd22dda0cc8 (patch) | |
tree | aef7a9475cc854a4d9ab7fc825b335a9af0d1b34 | |
parent | 52abc5f9717c5dc20abc11754e5f8d496b094a4b (diff) | |
download | bcm5719-llvm-87b4aa8914833a22eba10e618f946fd22dda0cc8.tar.gz bcm5719-llvm-87b4aa8914833a22eba10e618f946fd22dda0cc8.zip |
[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
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp index 650143a9409..4e08b2b079e 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp @@ -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"); } } } |