| Index: src/crankshaft/s390/lithium-codegen-s390.cc
|
| diff --git a/src/crankshaft/s390/lithium-codegen-s390.cc b/src/crankshaft/s390/lithium-codegen-s390.cc
|
| index b7c112bb84afc65523e2c5343e26a5b44feb7a82..3711ce9e285a385f537c5d32d5f847a50150e8e4 100644
|
| --- a/src/crankshaft/s390/lithium-codegen-s390.cc
|
| +++ b/src/crankshaft/s390/lithium-codegen-s390.cc
|
| @@ -4386,7 +4386,15 @@ void LCodeGen::DoDeferredMaybeGrowElements(LMaybeGrowElements* instr) {
|
|
|
| LOperand* key = instr->key();
|
| if (key->IsConstantOperand()) {
|
| - __ LoadSmiLiteral(r5, ToSmi(LConstantOperand::cast(key)));
|
| + LConstantOperand* constant_key = LConstantOperand::cast(key);
|
| + int32_t int_key = ToInteger32(constant_key);
|
| + if (Smi::IsValid(int_key)) {
|
| + __ LoadSmiLiteral(r5, Smi::FromInt(int_key));
|
| + } else {
|
| + // We should never get here at runtime because there is a smi check on
|
| + // the key before this point.
|
| + __ stop("expected smi");
|
| + }
|
| } else {
|
| __ SmiTag(r5, ToRegister(key));
|
| }
|
|
|