Commit 224210a5 authored by jyan's avatar jyan Committed by Commit bot

S390: Bugfix: assert in lithium compile for LMaybeGrowElements

Port ce1fe78d

R=mvstanton@chromium.org, joransiu@ca.ibm.com, mbrandy@us.ibm.com, michael_dawson@ca.ibm.com, bjaideep@ca.ibm.com
BUG=chromium:585041
LOG=N

Review URL: https://codereview.chromium.org/1869033002

Cr-Commit-Position: refs/heads/master@{#35340}
parent 460bff5f
......@@ -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));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment