| Index: src/hydrogen.cc
|
| diff --git a/src/hydrogen.cc b/src/hydrogen.cc
|
| index c405312f1a1ede4bbdd30033d64c9d4d642dd71e..227dfe21b6de552c6e2f6fdf8daf1f3137f85459 100644
|
| --- a/src/hydrogen.cc
|
| +++ b/src/hydrogen.cc
|
| @@ -1813,17 +1813,15 @@ void HGraph::InsertRepresentationChangeForUse(HValue* value,
|
| bool is_truncating) {
|
| // Insert the representation change right before its use. For phi-uses we
|
| // insert at the end of the corresponding predecessor.
|
| - HBasicBlock* insert_block = use->block();
|
| + HInstruction* next = NULL;
|
| if (use->IsPhi()) {
|
| int index = 0;
|
| while (use->OperandAt(index) != value) ++index;
|
| - insert_block = insert_block->predecessors()->at(index);
|
| + next = use->block()->predecessors()->at(index)->end();
|
| + } else {
|
| + next = HInstruction::cast(use);
|
| }
|
|
|
| - HInstruction* next = (insert_block == use->block())
|
| - ? HInstruction::cast(use)
|
| - : insert_block->end();
|
| -
|
| // For constants we try to make the representation change at compile
|
| // time. When a representation change is not possible without loss of
|
| // information we treat constants like normal instructions and insert the
|
|
|