diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc index d1bea0a119..c2e8e97e23 100644 --- a/src/compiler/simplified-lowering.cc +++ b/src/compiler/simplified-lowering.cc @@ -128,54 +128,6 @@ void ChangeToPureOp(Node* node, const Operator* new_op) { #ifdef DEBUG // Helpers for monotonicity checking. -bool MachineRepresentationIsSubtype(MachineRepresentation r1, - MachineRepresentation r2) { - switch (r1) { - case MachineRepresentation::kNone: - return true; - case MachineRepresentation::kBit: - return r2 == MachineRepresentation::kBit || - r2 == MachineRepresentation::kTagged; - case MachineRepresentation::kWord8: - return r2 == MachineRepresentation::kWord8 || - r2 == MachineRepresentation::kWord16 || - r2 == MachineRepresentation::kWord32 || - r2 == MachineRepresentation::kWord64 || - r2 == MachineRepresentation::kFloat32 || - r2 == MachineRepresentation::kFloat64 || - r2 == MachineRepresentation::kTagged; - case MachineRepresentation::kWord16: - return r2 == MachineRepresentation::kWord16 || - r2 == MachineRepresentation::kWord32 || - r2 == MachineRepresentation::kWord64 || - r2 == MachineRepresentation::kFloat32 || - r2 == MachineRepresentation::kFloat64 || - r2 == MachineRepresentation::kTagged; - case MachineRepresentation::kWord32: - return r2 == MachineRepresentation::kWord32 || - r2 == MachineRepresentation::kWord64 || - r2 == MachineRepresentation::kFloat64 || - r2 == MachineRepresentation::kTagged; - case MachineRepresentation::kWord64: - return r2 == MachineRepresentation::kWord64; - case MachineRepresentation::kFloat32: - return r2 == MachineRepresentation::kFloat32 || - r2 == MachineRepresentation::kFloat64 || - r2 == MachineRepresentation::kTagged; - case MachineRepresentation::kFloat64: - return r2 == MachineRepresentation::kFloat64 || - r2 == MachineRepresentation::kTagged; - case MachineRepresentation::kSimd128: - return r2 == MachineRepresentation::kSimd128 || - r2 == MachineRepresentation::kTagged; - case MachineRepresentation::kTagged: - return r2 == MachineRepresentation::kTagged; - } - UNREACHABLE(); - return false; -} - - class InputUseInfos { public: explicit InputUseInfos(Zone* zone) : input_use_infos_(zone) {} @@ -194,9 +146,7 @@ class InputUseInfos { ZoneVector input_use_infos_; static bool IsUseLessGeneral(UseInfo use1, UseInfo use2) { - return MachineRepresentationIsSubtype(use1.representation(), - use2.representation()) && - use1.truncation().IsLessGeneralThan(use2.truncation()); + return use1.truncation().IsLessGeneralThan(use2.truncation()); } }; diff --git a/test/mjsunit/regress/regress-crbug-630952.js b/test/mjsunit/regress/regress-crbug-630952.js new file mode 100644 index 0000000000..42d30a3ec1 --- /dev/null +++ b/test/mjsunit/regress/regress-crbug-630952.js @@ -0,0 +1,25 @@ +// Copyright 2016 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Flags: --always-opt +try { +function __f_4(sign_bit, + mantissa_29_bits) { +} +__f_4.prototype.returnSpecial = function() { + this.mantissa_29_bits * mantissa_29_shift; +} +__f_4.prototype.toSingle = function() { + if (-65535) return this.toSingleSubnormal(); +} +__f_4.prototype.toSingleSubnormal = function() { + if (__v_15) { + var __v_7 = this.mantissa_29_bits == -1 && + (__v_13 & __v_10 ) == 0; + } + __v_8 >>= __v_7; +} +__v_14 = new __f_4(); +__v_14.toSingle(); +} catch(e) {}