diff options
author | Matthias Braun <matze@braunis.de> | 2018-10-09 00:07:34 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2018-10-09 00:07:34 +0000 |
commit | 1c96c9687fcacaf07185b3f2fcbcc91b18385218 (patch) | |
tree | bbe8b012a93d0bbd7029442286e6197753b59fff /llvm/lib/CodeGen/ExpandPostRAPseudos.cpp | |
parent | aa97890d664508b93986942f28357e8540c47673 (diff) | |
download | bcm5719-llvm-1c96c9687fcacaf07185b3f2fcbcc91b18385218.tar.gz bcm5719-llvm-1c96c9687fcacaf07185b3f2fcbcc91b18385218.zip |
ExpandPostRAPseudos: Fix alldefsAreDead() not removing operands
One case left around nonsensical operands for the KILL instruction
which the machine verifier checks for nowadays. While this should not
hurt in release builds we should fix the machine verifier errors anyway.
llvm-svn: 344008
Diffstat (limited to 'llvm/lib/CodeGen/ExpandPostRAPseudos.cpp')
-rw-r--r-- | llvm/lib/CodeGen/ExpandPostRAPseudos.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/ExpandPostRAPseudos.cpp b/llvm/lib/CodeGen/ExpandPostRAPseudos.cpp index bc747fc610f..f2a2bcbb94b 100644 --- a/llvm/lib/CodeGen/ExpandPostRAPseudos.cpp +++ b/llvm/lib/CodeGen/ExpandPostRAPseudos.cpp @@ -97,6 +97,8 @@ bool ExpandPostRA::LowerSubregToReg(MachineInstr *MI) { if (MI->allDefsAreDead()) { MI->setDesc(TII->get(TargetOpcode::KILL)); + MI->RemoveOperand(3); // SubIdx + MI->RemoveOperand(1); // Imm LLVM_DEBUG(dbgs() << "subreg: replaced by: " << *MI); return true; } |