chromium/v8/test/cctest/compiler/test-machine-operator-reducer.cc

// Copyright 2014 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.

#include "src/base/overflowing-math.h"
#include "src/base/utils/random-number-generator.h"
#include "src/codegen/tick-counter.h"
#include "src/compiler/js-graph.h"
#include "src/compiler/machine-operator-reducer.h"
#include "src/compiler/operator-properties.h"
#include "src/compiler/typer.h"
#include "src/objects/objects-inl.h"
#include "test/cctest/cctest.h"
#include "test/common/value-helper.h"

namespace v8 {
namespace internal {
namespace compiler {

template <typename T>
const Operator* NewConstantOperator(CommonOperatorBuilder* common,
                                    T value);

template <>
const Operator* NewConstantOperator<int32_t>(CommonOperatorBuilder* common,
                                             int32_t value) {}

template <>
const Operator* NewConstantOperator<int64_t>(CommonOperatorBuilder* common,
                                             int64_t value) {}

template <>
const Operator* NewConstantOperator<double>(CommonOperatorBuilder* common,
                                            double value) {}

template <>
const Operator* NewConstantOperator<float>(CommonOperatorBuilder* common,
                                           float value) {}

template <typename T>
T ValueOfOperator(const Operator* op);

template <>
int32_t ValueOfOperator<int32_t>(const Operator* op) {}

template <>
int64_t ValueOfOperator<int64_t>(const Operator* op) {}

template <>
float ValueOfOperator<float>(const Operator* op) {}

template <>
double ValueOfOperator<double>(const Operator* op) {}


class ReducerTester : public HandleAndZoneScope {};


TEST(ReduceWord32And) {}


TEST(ReduceWord32Or) {}


TEST(ReduceWord32Xor) {}


TEST(ReduceWord32Shl) {}

TEST(ReduceWord64Shl) {}

TEST(ReduceWord32Shr) {}

TEST(ReduceWord64Shr) {}

TEST(ReduceWord32Sar) {}

TEST(ReduceWord64Sar) {}

static void CheckJsShift(ReducerTester* R) {}


TEST(ReduceJsShifts) {}


TEST(Word32Equal) {}


TEST(ReduceInt32Add) {}

TEST(ReduceInt64Add) {}

TEST(ReduceInt32Sub) {}

TEST(ReduceInt64Sub) {}

TEST(ReduceInt32Mul) {}


TEST(ReduceInt32Div) {}


TEST(ReduceUint32Div) {}


TEST(ReduceInt32Mod) {}


TEST(ReduceUint32Mod) {}


TEST(ReduceInt32LessThan) {}


TEST(ReduceInt32LessThanOrEqual) {}


TEST(ReduceUint32LessThan) {}


TEST(ReduceUint32LessThanOrEqual) {}


TEST(ReduceLoadStore) {}

TEST(ReduceFloat32Sub) {}

TEST(ReduceFloat64Sub) {}

// TODO(titzer): test MachineOperatorReducer for Word64And
// TODO(titzer): test MachineOperatorReducer for Word64Or
// TODO(titzer): test MachineOperatorReducer for Word64Xor
// TODO(titzer): test MachineOperatorReducer for Word64Equal
// TODO(titzer): test MachineOperatorReducer for Word64Not
// TODO(titzer): test MachineOperatorReducer for Int64Mul
// TODO(titzer): test MachineOperatorReducer for Int64UMul
// TODO(titzer): test MachineOperatorReducer for Int64Div
// TODO(titzer): test MachineOperatorReducer for Uint64Div
// TODO(titzer): test MachineOperatorReducer for Int64Mod
// TODO(titzer): test MachineOperatorReducer for Uint64Mod
// TODO(titzer): test MachineOperatorReducer for Int64Neg
// TODO(titzer): test MachineOperatorReducer for ChangeInt32ToFloat64
// TODO(titzer): test MachineOperatorReducer for ChangeFloat64ToInt32
// TODO(titzer): test MachineOperatorReducer for Float64Compare
// TODO(titzer): test MachineOperatorReducer for Float64Add
// TODO(titzer): test MachineOperatorReducer for Float64Sub
// TODO(titzer): test MachineOperatorReducer for Float64Mul
// TODO(titzer): test MachineOperatorReducer for Float64Div
// TODO(titzer): test MachineOperatorReducer for Float64Mod

}  // namespace compiler
}  // namespace internal
}  // namespace v8