Commit 794096f0 authored by Paolo Severini's avatar Paolo Severini Committed by Commit Bot

[compiler] Fix typo in IfValueParameters operator==

Change-Id: I2c1dfb7fbcf9a23d9e156dc3918fb88140885195
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2614721Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#72003}
parent 4db78467
...@@ -441,7 +441,7 @@ ZoneVector<MachineType> const* MachineTypesOf(Operator const* op) { ...@@ -441,7 +441,7 @@ ZoneVector<MachineType> const* MachineTypesOf(Operator const* op) {
V8_EXPORT_PRIVATE bool operator==(IfValueParameters const& l, V8_EXPORT_PRIVATE bool operator==(IfValueParameters const& l,
IfValueParameters const& r) { IfValueParameters const& r) {
return l.value() == r.value() && return l.value() == r.value() &&
r.comparison_order() == r.comparison_order() && l.hint() == r.hint(); l.comparison_order() == r.comparison_order() && l.hint() == r.hint();
} }
size_t hash_value(IfValueParameters const& p) { size_t hash_value(IfValueParameters const& p) {
......
...@@ -248,6 +248,12 @@ TEST_F(CommonOperatorTest, IfValue) { ...@@ -248,6 +248,12 @@ TEST_F(CommonOperatorTest, IfValue) {
EXPECT_EQ(1, op->ControlOutputCount()); EXPECT_EQ(1, op->ControlOutputCount());
} }
} }
// Specific test for a regression in the IfValueParameters operator==.
CHECK(!(IfValueParameters(0, 0) == IfValueParameters(1, 0)));
CHECK(!(IfValueParameters(0, 0) == IfValueParameters(0, 1)));
CHECK(!(IfValueParameters(0, 1, BranchHint::kFalse) ==
IfValueParameters(0, 1, BranchHint::kTrue)));
} }
......
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