Commit 480f155e authored by mvstanton's avatar mvstanton Committed by Commit bot

[Turbofan] IsUseLessGeneral shouldn't consider machine representation.

BUG=chromium:630952

Review-Url: https://codereview.chromium.org/2177193002
Cr-Commit-Position: refs/heads/master@{#38014}
parent 536b4935
......@@ -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<UseInfo> 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());
}
};
......
// 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) {}
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