| Index: src/compiler/js-typed-lowering.cc
|
| diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc
|
| index 2fa4eb4fae72c7e54a9769b4f0451980ba1a708b..d8ddd93d3bb13538dafe6fafb3099ba1e3e81aab 100644
|
| --- a/src/compiler/js-typed-lowering.cc
|
| +++ b/src/compiler/js-typed-lowering.cc
|
| @@ -587,6 +587,27 @@ Reduction JSTypedLowering::ReduceInt32Binop(Node* node, const Operator* intOp) {
|
| return r.ChangeToPureOperator(intOp, Type::Integral32());
|
| }
|
|
|
| +Reduction JSTypedLowering::ReduceShiftLeft(Node* node) {
|
| + if (flags() & kDisableIntegerBinaryOpReduction) return NoChange();
|
| +
|
| + JSBinopReduction r(this, node);
|
| + BinaryOperationHints::Hint feedback = r.GetNumberBinaryOperationFeedback();
|
| + if (feedback == BinaryOperationHints::kSigned32 ||
|
| + feedback == BinaryOperationHints::kSignedSmall) {
|
| + return r.ChangeToSpeculativeOperator(
|
| + simplified()->SpeculativeNumberShiftLeft(feedback), Type::Signed32());
|
| + }
|
| +
|
| + // If deoptimization is enabled we rely on type feedback.
|
| + if (r.BothInputsAre(Type::PlainPrimitive()) ||
|
| + !(flags() & kDeoptimizationEnabled)) {
|
| + r.ConvertInputsToNumber();
|
| + r.ConvertInputsToUI32(kSigned, kUnsigned);
|
| + return r.ChangeToPureOperator(simplified()->NumberShiftLeft(),
|
| + Type::Number());
|
| + }
|
| + return NoChange();
|
| +}
|
|
|
| Reduction JSTypedLowering::ReduceUI32Shift(Node* node,
|
| Signedness left_signedness,
|
| @@ -1943,7 +1964,7 @@ Reduction JSTypedLowering::Reduce(Node* node) {
|
| case IrOpcode::kJSBitwiseAnd:
|
| return ReduceInt32Binop(node, simplified()->NumberBitwiseAnd());
|
| case IrOpcode::kJSShiftLeft:
|
| - return ReduceUI32Shift(node, kSigned, simplified()->NumberShiftLeft());
|
| + return ReduceShiftLeft(node);
|
| case IrOpcode::kJSShiftRight:
|
| return ReduceUI32Shift(node, kSigned, simplified()->NumberShiftRight());
|
| case IrOpcode::kJSShiftRightLogical:
|
|
|