s390: [turbofan] Make sure binop results do not overwrite deoptimization inputs on arm.
Port e60c4053c7
this fix applies to s390 as well.
R=jarin@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com
BUG=
LOG=N
Review-Url: https://codereview.chromium.org/2101933006
Cr-Commit-Position: refs/heads/master@{#37441}
This commit is contained in:
parent
b83dbf6502
commit
502cb17918
@ -128,7 +128,14 @@ void VisitBinop(InstructionSelector* selector, Node* node,
|
||||
inputs[input_count++] = g.Label(cont->false_block());
|
||||
}
|
||||
|
||||
outputs[output_count++] = g.DefineAsRegister(node);
|
||||
if (cont->IsDeoptimize()) {
|
||||
// If we can deoptimize as a result of the binop, we need to make sure that
|
||||
// the deopt inputs are not overwritten by the binop result. One way
|
||||
// to achieve that is to declare the output register as same-as-first.
|
||||
outputs[output_count++] = g.DefineSameAsFirst(node);
|
||||
} else {
|
||||
outputs[output_count++] = g.DefineAsRegister(node);
|
||||
}
|
||||
if (cont->IsSet()) {
|
||||
outputs[output_count++] = g.DefineAsRegister(cont->result());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user