diff options
author | Dan Gohman <dan433584@gmail.com> | 2016-05-12 04:19:09 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2016-05-12 04:19:09 +0000 |
commit | 33e694a8077809dc414145d65a31f73068c85589 (patch) | |
tree | 04d59b2c5d3e682996e18b9221170c9348f23400 /llvm/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp | |
parent | 1fb10e846a22f0569372f71c1ad2d68997d70779 (diff) | |
download | bcm5719-llvm-33e694a8077809dc414145d65a31f73068c85589.tar.gz bcm5719-llvm-33e694a8077809dc414145d65a31f73068c85589.zip |
[WebAssembly] Fast-isel support for calls, arguments, and selects.
llvm-svn: 269273
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp index b3da7861f29..1e9a773ae62 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp @@ -115,9 +115,11 @@ static bool ReplaceDominatedUses(MachineBasicBlock &MBB, MachineInstr &MI, O.setReg(ToReg); // If the store's def was previously dead, it is no longer. - MI.getOperand(0).setIsDead(false); + if (!O.isUndef()) { + MI.getOperand(0).setIsDead(false); - Indices.push_back(WhereIdx.getRegSlot()); + Indices.push_back(WhereIdx.getRegSlot()); + } } if (Changed) { |