Revert "[vm, compiler] Let SIMD values become constants."
This reverts commit bdacbb8decbab527a43ff1fbe289c8e55b0f6ba6.
Reason for revert: asFloat64x2List_A01_t01
Original change's description:
> [vm, compiler] Let SIMD values become constants.
>
> TEST=ci
> Change-Id: I86cfd5b7f93670fa2d049a11b4197becbdbfef23
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244181
> Reviewed-by: Alexander Aprelev <aam@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
TBR=aam@google.com,rmacnak@google.com
Change-Id: I9fd0049e71ded75585e2b2c95332bc3f2cddd7e5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244762
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
diff --git a/runtime/vm/app_snapshot.cc b/runtime/vm/app_snapshot.cc
index c5b8120..19054a2 100644
--- a/runtime/vm/app_snapshot.cc
+++ b/runtime/vm/app_snapshot.cc
@@ -4753,80 +4753,6 @@
};
#if !defined(DART_PRECOMPILED_RUNTIME)
-class Simd128SerializationCluster : public SerializationCluster {
- public:
- explicit Simd128SerializationCluster(intptr_t cid, bool is_canonical)
- : SerializationCluster("Simd128",
- cid,
- compiler::target::Int32x4::InstanceSize(),
- is_canonical) {
- ASSERT_EQUAL(compiler::target::Int32x4::InstanceSize(),
- compiler::target::Float32x4::InstanceSize());
- ASSERT_EQUAL(compiler::target::Int32x4::InstanceSize(),
- compiler::target::Float64x2::InstanceSize());
- }
- ~Simd128SerializationCluster() {}
-
- void Trace(Serializer* s, ObjectPtr object) { objects_.Add(object); }
-
- void WriteAlloc(Serializer* s) {
- const intptr_t count = objects_.length();
- s->WriteUnsigned(count);
- for (intptr_t i = 0; i < count; i++) {
- ObjectPtr vector = objects_[i];
- s->AssignRef(vector);
- }
- }
-
- void WriteFill(Serializer* s) {
- const intptr_t count = objects_.length();
- for (intptr_t i = 0; i < count; i++) {
- ObjectPtr vector = objects_[i];
- AutoTraceObject(vector);
- ASSERT_EQUAL(Int32x4::value_offset(), Float32x4::value_offset());
- ASSERT_EQUAL(Int32x4::value_offset(), Float64x2::value_offset());
- s->WriteBytes(&(static_cast<Int32x4Ptr>(vector)->untag()->value_),
- sizeof(simd128_value_t));
- }
- }
-
- private:
- GrowableArray<ObjectPtr> objects_;
-};
-#endif // !DART_PRECOMPILED_RUNTIME
-
-class Simd128DeserializationCluster
- : public AbstractInstanceDeserializationCluster {
- public:
- explicit Simd128DeserializationCluster(intptr_t cid, bool is_canonical)
- : AbstractInstanceDeserializationCluster("Simd128", is_canonical),
- cid_(cid) {}
- ~Simd128DeserializationCluster() {}
-
- void ReadAlloc(Deserializer* d) {
- ASSERT_EQUAL(Int32x4::InstanceSize(), Float32x4::InstanceSize());
- ASSERT_EQUAL(Int32x4::InstanceSize(), Float64x2::InstanceSize());
- ReadAllocFixedSize(d, Int32x4::InstanceSize());
- }
-
- void ReadFill(Deserializer* d_, bool primary) {
- Deserializer::Local d(d_);
- const intptr_t cid = cid_;
- const bool mark_canonical = primary && is_canonical();
- for (intptr_t id = start_index_, n = stop_index_; id < n; id++) {
- ObjectPtr vector = d.Ref(id);
- Deserializer::InitializeHeader(vector, cid, Int32x4::InstanceSize(),
- mark_canonical);
- d.ReadBytes(&(static_cast<Int32x4Ptr>(vector)->untag()->value_),
- sizeof(simd128_value_t));
- }
- }
-
- private:
- intptr_t cid_;
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
class GrowableObjectArraySerializationCluster : public SerializationCluster {
public:
GrowableObjectArraySerializationCluster()
@@ -6880,10 +6806,6 @@
return new (Z) MintSerializationCluster(is_canonical);
case kDoubleCid:
return new (Z) DoubleSerializationCluster(is_canonical);
- case kInt32x4Cid:
- case kFloat32x4Cid:
- case kFloat64x2Cid:
- return new (Z) Simd128SerializationCluster(cid, is_canonical);
case kGrowableObjectArrayCid:
return new (Z) GrowableObjectArraySerializationCluster();
case kStackTraceCid:
@@ -8038,10 +7960,6 @@
return new (Z) MintDeserializationCluster(is_canonical);
case kDoubleCid:
return new (Z) DoubleDeserializationCluster(is_canonical);
- case kInt32x4Cid:
- case kFloat32x4Cid:
- case kFloat64x2Cid:
- return new (Z) Simd128DeserializationCluster(cid, is_canonical);
case kGrowableObjectArrayCid:
ASSERT(!is_canonical);
return new (Z) GrowableObjectArrayDeserializationCluster();
diff --git a/runtime/vm/app_snapshot.h b/runtime/vm/app_snapshot.h
index 8d16572..0356e09 100644
--- a/runtime/vm/app_snapshot.h
+++ b/runtime/vm/app_snapshot.h
@@ -334,7 +334,7 @@
stream_->WriteWordWith32BitWrites(value);
}
- void WriteBytes(const void* addr, intptr_t len) {
+ void WriteBytes(const uint8_t* addr, intptr_t len) {
stream_->WriteBytes(addr, len);
}
void Align(intptr_t alignment) { stream_->Align(alignment); }
diff --git a/runtime/vm/compiler/assembler/assembler_arm64.h b/runtime/vm/compiler/assembler/assembler_arm64.h
index 9c31f77..e11ed94 100644
--- a/runtime/vm/compiler/assembler/assembler_arm64.h
+++ b/runtime/vm/compiler/assembler/assembler_arm64.h
@@ -1415,11 +1415,11 @@
void fcvtds(VRegister vd, VRegister vn) { EmitFPOneSourceOp(FCVTDS, vd, vn); }
void fldrq(VRegister vt, Address a) {
ASSERT(a.type() != Address::PCOffset);
- EmitLoadStoreReg(FLDRQ, static_cast<Register>(vt), a, kQWord);
+ EmitLoadStoreReg(FLDRQ, static_cast<Register>(vt), a, kByte);
}
void fstrq(VRegister vt, Address a) {
ASSERT(a.type() != Address::PCOffset);
- EmitLoadStoreReg(FSTRQ, static_cast<Register>(vt), a, kQWord);
+ EmitLoadStoreReg(FSTRQ, static_cast<Register>(vt), a, kByte);
}
void fldrd(VRegister vt, Address a) {
ASSERT(a.type() != Address::PCOffset);
diff --git a/runtime/vm/compiler/assembler/assembler_ia32.cc b/runtime/vm/compiler/assembler/assembler_ia32.cc
index 3be2b7c..2ead117 100644
--- a/runtime/vm/compiler/assembler/assembler_ia32.cc
+++ b/runtime/vm/compiler/assembler/assembler_ia32.cc
@@ -2207,16 +2207,6 @@
addl(ESP, Immediate(2 * target::kWordSize));
}
-void Assembler::LoadQImmediate(XmmRegister dst, simd128_value_t value) {
- // TODO(5410843): Need to have a code constants table.
- pushl(Immediate(value.int_storage[3]));
- pushl(Immediate(value.int_storage[2]));
- pushl(Immediate(value.int_storage[1]));
- pushl(Immediate(value.int_storage[0]));
- movups(dst, Address(ESP, 0));
- addl(ESP, Immediate(4 * target::kWordSize));
-}
-
void Assembler::FloatNegate(XmmRegister f) {
static const struct ALIGN16 {
uint32_t a;
diff --git a/runtime/vm/compiler/assembler/assembler_ia32.h b/runtime/vm/compiler/assembler/assembler_ia32.h
index d15f736..48f6a49 100644
--- a/runtime/vm/compiler/assembler/assembler_ia32.h
+++ b/runtime/vm/compiler/assembler/assembler_ia32.h
@@ -748,7 +748,6 @@
}
void LoadDImmediate(XmmRegister dst, double value);
- void LoadQImmediate(XmmRegister dst, simd128_value_t value);
void Drop(intptr_t stack_elements);
diff --git a/runtime/vm/compiler/backend/il.cc b/runtime/vm/compiler/backend/il.cc
index 93cf612..a6b8720 100644
--- a/runtime/vm/compiler/backend/il.cc
+++ b/runtime/vm/compiler/backend/il.cc
@@ -2988,22 +2988,6 @@
return unbox_defn->value()->definition();
}
- if (value()->BindsToConstant()) {
- switch (representation()) {
- case kUnboxedFloat64x2:
- ASSERT(value()->BoundConstant().IsFloat64x2());
- return flow_graph->GetConstant(value()->BoundConstant(), kTagged);
- case kUnboxedFloat32x4:
- ASSERT(value()->BoundConstant().IsFloat32x4());
- return flow_graph->GetConstant(value()->BoundConstant(), kTagged);
- case kUnboxedInt32x4:
- ASSERT(value()->BoundConstant().IsInt32x4());
- return flow_graph->GetConstant(value()->BoundConstant(), kTagged);
- default:
- return this;
- }
- }
-
return this;
}
@@ -7274,53 +7258,6 @@
return simd_op_information[kind()].has_mask;
}
-Definition* SimdOpInstr::Canonicalize(FlowGraph* flow_graph) {
- if ((kind() == SimdOpInstr::kFloat64x2FromDoubles) &&
- InputAt(0)->BindsToConstant() && InputAt(1)->BindsToConstant()) {
- const Object& x = InputAt(0)->BoundConstant();
- const Object& y = InputAt(1)->BoundConstant();
- if (x.IsDouble() && y.IsDouble()) {
- Float64x2& result = Float64x2::ZoneHandle(Float64x2::New(
- Double::Cast(x).value(), Double::Cast(y).value(), Heap::kOld));
- result ^= result.Canonicalize(Thread::Current());
- return flow_graph->GetConstant(result, kUnboxedFloat64x2);
- }
- }
- if ((kind() == SimdOpInstr::kFloat32x4FromDoubles) &&
- InputAt(0)->BindsToConstant() && InputAt(1)->BindsToConstant() &&
- InputAt(2)->BindsToConstant() && InputAt(3)->BindsToConstant()) {
- const Object& x = InputAt(0)->BoundConstant();
- const Object& y = InputAt(1)->BoundConstant();
- const Object& z = InputAt(2)->BoundConstant();
- const Object& w = InputAt(3)->BoundConstant();
- if (x.IsDouble() && y.IsDouble() && z.IsDouble() && w.IsDouble()) {
- Float32x4& result = Float32x4::Handle(Float32x4::New(
- Double::Cast(x).value(), Double::Cast(y).value(),
- Double::Cast(z).value(), Double::Cast(w).value(), Heap::kOld));
- result ^= result.Canonicalize(Thread::Current());
- return flow_graph->GetConstant(result, kUnboxedFloat32x4);
- }
- }
- if ((kind() == SimdOpInstr::kInt32x4FromInts) &&
- InputAt(0)->BindsToConstant() && InputAt(1)->BindsToConstant() &&
- InputAt(2)->BindsToConstant() && InputAt(3)->BindsToConstant()) {
- const Object& x = InputAt(0)->BoundConstant();
- const Object& y = InputAt(1)->BoundConstant();
- const Object& z = InputAt(2)->BoundConstant();
- const Object& w = InputAt(3)->BoundConstant();
- if (x.IsInteger() && y.IsInteger() && z.IsInteger() && w.IsInteger()) {
- Int32x4& result = Int32x4::Handle(Int32x4::New(
- Integer::Cast(x).AsInt64Value(), Integer::Cast(y).AsInt64Value(),
- Integer::Cast(z).AsInt64Value(), Integer::Cast(w).AsInt64Value(),
- Heap::kOld));
- result ^= result.Canonicalize(Thread::Current());
- return flow_graph->GetConstant(result, kUnboxedInt32x4);
- }
- }
-
- return this;
-}
-
LocationSummary* Call1ArgStubInstr::MakeLocationSummary(Zone* zone,
bool opt) const {
const intptr_t kNumInputs = 1;
diff --git a/runtime/vm/compiler/backend/il.h b/runtime/vm/compiler/backend/il.h
index 5369c46..55899ac 100644
--- a/runtime/vm/compiler/backend/il.h
+++ b/runtime/vm/compiler/backend/il.h
@@ -9531,8 +9531,6 @@
(!HasMask() || mask() == other_op->mask());
}
- virtual Definition* Canonicalize(FlowGraph* flow_graph);
-
DECLARE_INSTRUCTION(SimdOp)
PRINT_OPERANDS_TO_SUPPORT
diff --git a/runtime/vm/compiler/backend/il_arm.cc b/runtime/vm/compiler/backend/il_arm.cc
index 12d26f5..0f1784c 100644
--- a/runtime/vm/compiler/backend/il_arm.cc
+++ b/runtime/vm/compiler/backend/il_arm.cc
@@ -696,48 +696,25 @@
__ LoadObject(destination.reg(), value_);
}
} else if (destination.IsFpuRegister()) {
- switch (representation()) {
- case kUnboxedDouble:
- ASSERT(tmp != kNoRegister);
- __ LoadDImmediate(EvenDRegisterOf(destination.fpu_reg()),
- Double::Cast(value_).value(), tmp);
- break;
- case kUnboxedFloat64x2:
- __ LoadQImmediate(destination.fpu_reg(),
- Float64x2::Cast(value_).value());
- break;
- case kUnboxedFloat32x4:
- __ LoadQImmediate(destination.fpu_reg(),
- Float32x4::Cast(value_).value());
- break;
- case kUnboxedInt32x4:
- __ LoadQImmediate(destination.fpu_reg(), Int32x4::Cast(value_).value());
- break;
- default:
- UNREACHABLE();
+ const DRegister dst = EvenDRegisterOf(destination.fpu_reg());
+ if (Utils::DoublesBitEqual(Double::Cast(value_).value(), 0.0) &&
+ TargetCPUFeatures::neon_supported()) {
+ QRegister qdst = destination.fpu_reg();
+ __ veorq(qdst, qdst, qdst);
+ } else {
+ ASSERT(tmp != kNoRegister);
+ __ LoadDImmediate(dst, Double::Cast(value_).value(), tmp);
}
} else if (destination.IsDoubleStackSlot()) {
- ASSERT(tmp != kNoRegister);
- __ LoadDImmediate(DTMP, Double::Cast(value_).value(), tmp);
- const intptr_t dest_offset = destination.ToStackSlotOffset();
- __ StoreDToOffset(DTMP, destination.base_reg(), dest_offset);
- } else if (destination.IsQuadStackSlot()) {
- switch (representation()) {
- case kUnboxedFloat64x2:
- __ LoadQImmediate(QTMP, Float64x2::Cast(value_).value());
- break;
- case kUnboxedFloat32x4:
- __ LoadQImmediate(QTMP, Float32x4::Cast(value_).value());
- break;
- case kUnboxedInt32x4:
- __ LoadQImmediate(QTMP, Int32x4::Cast(value_).value());
- break;
- default:
- UNREACHABLE();
+ if (Utils::DoublesBitEqual(Double::Cast(value_).value(), 0.0) &&
+ TargetCPUFeatures::neon_supported()) {
+ __ veorq(QTMP, QTMP, QTMP);
+ } else {
+ ASSERT(tmp != kNoRegister);
+ __ LoadDImmediate(DTMP, Double::Cast(value_).value(), tmp);
}
const intptr_t dest_offset = destination.ToStackSlotOffset();
- __ StoreMultipleDToOffset(EvenDRegisterOf(QTMP), 2, destination.base_reg(),
- dest_offset);
+ __ StoreDToOffset(DTMP, destination.base_reg(), dest_offset);
} else {
ASSERT(destination.IsStackSlot());
ASSERT(tmp != kNoRegister);
diff --git a/runtime/vm/compiler/backend/il_arm64.cc b/runtime/vm/compiler/backend/il_arm64.cc
index a49d693..ac442ee 100644
--- a/runtime/vm/compiler/backend/il_arm64.cc
+++ b/runtime/vm/compiler/backend/il_arm64.cc
@@ -612,42 +612,17 @@
__ LoadObject(destination.reg(), value_);
}
} else if (destination.IsFpuRegister()) {
- switch (representation()) {
- case kUnboxedDouble:
- __ LoadDImmediate(destination.fpu_reg(), Double::Cast(value_).value());
- break;
- case kUnboxedFloat64x2:
- __ LoadQImmediate(destination.fpu_reg(),
- Float64x2::Cast(value_).value());
- break;
- case kUnboxedFloat32x4:
- __ LoadQImmediate(destination.fpu_reg(),
- Float32x4::Cast(value_).value());
- break;
- case kUnboxedInt32x4:
- __ LoadQImmediate(destination.fpu_reg(), Int32x4::Cast(value_).value());
- break;
- default:
- UNREACHABLE();
+ const VRegister dst = destination.fpu_reg();
+ if (Utils::DoublesBitEqual(Double::Cast(value_).value(), 0.0)) {
+ __ veor(dst, dst, dst);
+ } else {
+ __ LoadDImmediate(dst, Double::Cast(value_).value());
}
} else if (destination.IsDoubleStackSlot()) {
- ASSERT(representation() == kUnboxedDouble);
- __ LoadDImmediate(VTMP, Double::Cast(value_).value());
- const intptr_t dest_offset = destination.ToStackSlotOffset();
- __ StoreDToOffset(VTMP, destination.base_reg(), dest_offset);
- } else if (destination.IsQuadStackSlot()) {
- switch (representation()) {
- case kUnboxedFloat64x2:
- __ LoadQImmediate(VTMP, Float64x2::Cast(value_).value());
- break;
- case kUnboxedFloat32x4:
- __ LoadQImmediate(VTMP, Float32x4::Cast(value_).value());
- break;
- case kUnboxedInt32x4:
- __ LoadQImmediate(VTMP, Int32x4::Cast(value_).value());
- break;
- default:
- UNREACHABLE();
+ if (Utils::DoublesBitEqual(Double::Cast(value_).value(), 0.0)) {
+ __ veor(VTMP, VTMP, VTMP);
+ } else {
+ __ LoadDImmediate(VTMP, Double::Cast(value_).value());
}
const intptr_t dest_offset = destination.ToStackSlotOffset();
__ StoreDToOffset(VTMP, destination.base_reg(), dest_offset);
diff --git a/runtime/vm/compiler/backend/il_ia32.cc b/runtime/vm/compiler/backend/il_ia32.cc
index 5b044a0..1915491 100644
--- a/runtime/vm/compiler/backend/il_ia32.cc
+++ b/runtime/vm/compiler/backend/il_ia32.cc
@@ -420,36 +420,18 @@
__ LoadObjectSafely(destination.reg(), value_);
}
} else if (destination.IsFpuRegister()) {
- switch (representation()) {
- case kUnboxedDouble: {
- const double value_as_double = Double::Cast(value_).value();
- uword addr = FindDoubleConstant(value_as_double);
- if (addr == 0) {
- __ pushl(EAX);
- __ LoadObject(EAX, value_);
- __ movsd(destination.fpu_reg(),
- compiler::FieldAddress(EAX, Double::value_offset()));
- __ popl(EAX);
- } else if (Utils::DoublesBitEqual(value_as_double, 0.0)) {
- __ xorps(destination.fpu_reg(), destination.fpu_reg());
- } else {
- __ movsd(destination.fpu_reg(), compiler::Address::Absolute(addr));
- }
- break;
- }
- case kUnboxedFloat64x2:
- __ LoadQImmediate(destination.fpu_reg(),
- Float64x2::Cast(value_).value());
- break;
- case kUnboxedFloat32x4:
- __ LoadQImmediate(destination.fpu_reg(),
- Float32x4::Cast(value_).value());
- break;
- case kUnboxedInt32x4:
- __ LoadQImmediate(destination.fpu_reg(), Int32x4::Cast(value_).value());
- break;
- default:
- UNREACHABLE();
+ const double value_as_double = Double::Cast(value_).value();
+ uword addr = FindDoubleConstant(value_as_double);
+ if (addr == 0) {
+ __ pushl(EAX);
+ __ LoadObject(EAX, value_);
+ __ movsd(destination.fpu_reg(),
+ compiler::FieldAddress(EAX, Double::value_offset()));
+ __ popl(EAX);
+ } else if (Utils::DoublesBitEqual(value_as_double, 0.0)) {
+ __ xorps(destination.fpu_reg(), destination.fpu_reg());
+ } else {
+ __ movsd(destination.fpu_reg(), compiler::Address::Absolute(addr));
}
} else if (destination.IsDoubleStackSlot()) {
const double value_as_double = Double::Cast(value_).value();
@@ -465,21 +447,6 @@
__ movsd(FpuTMP, compiler::Address::Absolute(addr));
}
__ movsd(LocationToStackSlotAddress(destination), FpuTMP);
- } else if (destination.IsQuadStackSlot()) {
- switch (representation()) {
- case kUnboxedFloat64x2:
- __ LoadQImmediate(FpuTMP, Float64x2::Cast(value_).value());
- break;
- case kUnboxedFloat32x4:
- __ LoadQImmediate(FpuTMP, Float32x4::Cast(value_).value());
- break;
- case kUnboxedInt32x4:
- __ LoadQImmediate(FpuTMP, Int32x4::Cast(value_).value());
- break;
- default:
- UNREACHABLE();
- }
- __ movups(LocationToStackSlotAddress(destination), FpuTMP);
} else {
ASSERT(destination.IsStackSlot());
if (RepresentationUtils::IsUnboxedInteger(representation())) {
diff --git a/runtime/vm/compiler/backend/il_x64.cc b/runtime/vm/compiler/backend/il_x64.cc
index e086250..b6b58ce 100644
--- a/runtime/vm/compiler/backend/il_x64.cc
+++ b/runtime/vm/compiler/backend/il_x64.cc
@@ -566,43 +566,10 @@
__ LoadObject(destination.reg(), value_);
}
} else if (destination.IsFpuRegister()) {
- switch (representation()) {
- case kUnboxedDouble:
- __ LoadDImmediate(destination.fpu_reg(), Double::Cast(value_).value());
- break;
- case kUnboxedFloat64x2:
- __ LoadQImmediate(destination.fpu_reg(),
- Float64x2::Cast(value_).value());
- break;
- case kUnboxedFloat32x4:
- __ LoadQImmediate(destination.fpu_reg(),
- Float32x4::Cast(value_).value());
- break;
- case kUnboxedInt32x4:
- __ LoadQImmediate(destination.fpu_reg(), Int32x4::Cast(value_).value());
- break;
- default:
- UNREACHABLE();
- }
+ __ LoadDImmediate(destination.fpu_reg(), Double::Cast(value_).value());
} else if (destination.IsDoubleStackSlot()) {
- ASSERT(representation() == kUnboxedDouble);
__ LoadDImmediate(FpuTMP, Double::Cast(value_).value());
__ movsd(LocationToStackSlotAddress(destination), FpuTMP);
- } else if (destination.IsQuadStackSlot()) {
- switch (representation()) {
- case kUnboxedFloat64x2:
- __ LoadQImmediate(FpuTMP, Float64x2::Cast(value_).value());
- break;
- case kUnboxedFloat32x4:
- __ LoadQImmediate(FpuTMP, Float32x4::Cast(value_).value());
- break;
- case kUnboxedInt32x4:
- __ LoadQImmediate(FpuTMP, Int32x4::Cast(value_).value());
- break;
- default:
- UNREACHABLE();
- }
- __ movups(LocationToStackSlotAddress(destination), FpuTMP);
} else {
ASSERT(destination.IsStackSlot());
if (RepresentationUtils::IsUnboxedInteger(representation())) {
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 5b11a2b..deae310 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -24954,16 +24954,6 @@
return untag()->value_[3];
}
-bool Float32x4::CanonicalizeEquals(const Instance& other) const {
- return memcmp(&untag()->value_, Float32x4::Cast(other).untag()->value_,
- sizeof(simd128_value_t)) == 0;
-}
-
-uint32_t Float32x4::CanonicalizeHash() const {
- return HashBytes(reinterpret_cast<const uint8_t*>(&untag()->value_),
- sizeof(simd128_value_t));
-}
-
const char* Float32x4::ToCString() const {
float _x = x();
float _y = y();
@@ -25052,16 +25042,6 @@
value);
}
-bool Int32x4::CanonicalizeEquals(const Instance& other) const {
- return memcmp(&untag()->value_, Int32x4::Cast(other).untag()->value_,
- sizeof(simd128_value_t)) == 0;
-}
-
-uint32_t Int32x4::CanonicalizeHash() const {
- return HashBytes(reinterpret_cast<const uint8_t*>(&untag()->value_),
- sizeof(simd128_value_t));
-}
-
const char* Int32x4::ToCString() const {
int32_t _x = x();
int32_t _y = y();
@@ -25126,16 +25106,6 @@
StoreSimd128(&untag()->value_[0], value);
}
-bool Float64x2::CanonicalizeEquals(const Instance& other) const {
- return memcmp(&untag()->value_, Float64x2::Cast(other).untag()->value_,
- sizeof(simd128_value_t)) == 0;
-}
-
-uint32_t Float64x2::CanonicalizeHash() const {
- return HashBytes(reinterpret_cast<const uint8_t*>(&untag()->value_),
- sizeof(simd128_value_t));
-}
-
const char* Float64x2::ToCString() const {
double _x = x();
double _y = y();
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index d42fba8..6f226c3 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -10669,9 +10669,6 @@
return OFFSET_OF(UntaggedFloat32x4, value_);
}
- virtual bool CanonicalizeEquals(const Instance& other) const;
- virtual uint32_t CanonicalizeHash() const;
-
private:
FINAL_HEAP_OBJECT_IMPLEMENTATION(Float32x4, Instance);
friend class Class;
@@ -10705,9 +10702,6 @@
static intptr_t value_offset() { return OFFSET_OF(UntaggedInt32x4, value_); }
- virtual bool CanonicalizeEquals(const Instance& other) const;
- virtual uint32_t CanonicalizeHash() const;
-
private:
FINAL_HEAP_OBJECT_IMPLEMENTATION(Int32x4, Instance);
friend class Class;
@@ -10738,9 +10732,6 @@
return OFFSET_OF(UntaggedFloat64x2, value_);
}
- virtual bool CanonicalizeEquals(const Instance& other) const;
- virtual uint32_t CanonicalizeHash() const;
-
private:
FINAL_HEAP_OBJECT_IMPLEMENTATION(Float64x2, Instance);
friend class Class;
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index d7913cf..f490865 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -3157,10 +3157,8 @@
ALIGN8 int32_t value_[4];
- friend class Simd128DeserializationCluster;
- friend class Simd128MessageDeserializationCluster;
friend class Simd128MessageSerializationCluster;
- friend class Simd128SerializationCluster;
+ friend class Simd128MessageDeserializationCluster;
public:
int32_t x() const { return value_[0]; }