| Index: test/cctest/compiler/test-gap-resolver.cc
|
| diff --git a/test/cctest/compiler/test-gap-resolver.cc b/test/cctest/compiler/test-gap-resolver.cc
|
| index 09a7154089a1c9582d50758c418df810e75378f7..a081ddb8fe9d79410692e8fb43413b693e1ec2a0 100644
|
| --- a/test/cctest/compiler/test-gap-resolver.cc
|
| +++ b/test/cctest/compiler/test-gap-resolver.cc
|
| @@ -89,7 +89,8 @@ class InterpreterState {
|
| if (key.is_constant) {
|
| return ConstantOperand(key.index);
|
| }
|
| - return AllocatedOperand(key.kind, key.index);
|
| + return AllocatedOperand(
|
| + key.kind, InstructionSequence::DefaultRepresentation(), key.index);
|
| }
|
|
|
| friend std::ostream& operator<<(std::ostream& os,
|
| @@ -148,7 +149,7 @@ class ParallelMoveCreator : public HandleAndZoneScope {
|
|
|
| ParallelMove* Create(int size) {
|
| ParallelMove* parallel_move = new (main_zone()) ParallelMove(main_zone());
|
| - std::set<InstructionOperand> seen;
|
| + std::set<InstructionOperand, CompareOperandModuloType> seen;
|
| for (int i = 0; i < size; ++i) {
|
| MoveOperands mo(CreateRandomOperand(true), CreateRandomOperand(false));
|
| if (!mo.IsRedundant() && seen.find(mo.destination()) == seen.end()) {
|
| @@ -160,18 +161,38 @@ class ParallelMoveCreator : public HandleAndZoneScope {
|
| }
|
|
|
| private:
|
| + MachineType RandomType() {
|
| + int index = rng_->NextInt(3);
|
| + switch (index) {
|
| + case 0:
|
| + return kRepWord32;
|
| + case 1:
|
| + return kRepWord64;
|
| + case 2:
|
| + return kRepTagged;
|
| + }
|
| + UNREACHABLE();
|
| + return kMachNone;
|
| + }
|
| +
|
| + MachineType RandomDoubleType() {
|
| + int index = rng_->NextInt(2);
|
| + if (index == 0) return kRepFloat64;
|
| + return kRepFloat32;
|
| + }
|
| +
|
| InstructionOperand CreateRandomOperand(bool is_source) {
|
| int index = rng_->NextInt(6);
|
| // destination can't be Constant.
|
| switch (rng_->NextInt(is_source ? 5 : 4)) {
|
| case 0:
|
| - return StackSlotOperand(index);
|
| + return StackSlotOperand(RandomType(), index);
|
| case 1:
|
| - return DoubleStackSlotOperand(index);
|
| + return DoubleStackSlotOperand(RandomDoubleType(), index);
|
| case 2:
|
| - return RegisterOperand(index);
|
| + return RegisterOperand(RandomType(), index);
|
| case 3:
|
| - return DoubleRegisterOperand(index);
|
| + return DoubleRegisterOperand(RandomDoubleType(), index);
|
| case 4:
|
| return ConstantOperand(index);
|
| }
|
|
|