diff options
Diffstat (limited to 'compiler/optimizing/nodes.cc')
| -rw-r--r-- | compiler/optimizing/nodes.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index 7c6e9318fb..fe75451ad2 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -1022,8 +1022,11 @@ void HInstruction::ReplaceWith(HInstruction* other) { void HInstruction::ReplaceInput(HInstruction* replacement, size_t index) { HUserRecord<HInstruction*> input_use = InputRecordAt(index); + if (input_use.GetInstruction() == replacement) { + // Nothing to do. + return; + } HUseList<HInstruction*>::iterator before_use_node = input_use.GetBeforeUseNode(); - DCHECK(input_use.GetInstruction() != replacement); // Note: fixup_end remains valid across splice_after(). auto fixup_end = replacement->uses_.empty() ? replacement->uses_.begin() : ++replacement->uses_.begin(); |