Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Unified Diff: test/unittests/compiler/int64-lowering-unittest.cc

Issue 1801013002: [wasm] Int64Lowering of F64ReinterpretI64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@wasm-bit-cast
Patch Set: Rebase. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/wasm/test-run-wasm-64.cc ('k') | test/unittests/compiler/node-test-utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/int64-lowering-unittest.cc
diff --git a/test/unittests/compiler/int64-lowering-unittest.cc b/test/unittests/compiler/int64-lowering-unittest.cc
index d5a1b2f7c80e9254cb5b0021e3c21b101e5f09f9..874488b476ab0b1409d4b8f72f83cdb92b54e668 100644
--- a/test/unittests/compiler/int64-lowering-unittest.cc
+++ b/test/unittests/compiler/int64-lowering-unittest.cc
@@ -491,6 +491,36 @@ TEST_F(Int64LoweringTest, I64UConvertI32_2) {
start(), start()));
}
// kExprF64ReinterpretI64:
+TEST_F(Int64LoweringTest, F64ReinterpretI64) {
+ LowerGraph(graph()->NewNode(machine()->BitcastInt64ToFloat64(),
+ Int64Constant(value(0))),
+ MachineRepresentation::kFloat64);
+
+ Capture<Node*> stack_slot_capture;
+ Matcher<Node*> stack_slot_matcher =
+ IsStackSlot(MachineRepresentation::kWord64);
+
+ Capture<Node*> store_capture;
+ Matcher<Node*> store_matcher =
+ IsStore(StoreRepresentation(MachineRepresentation::kWord32,
+ WriteBarrierKind::kNoWriteBarrier),
+ AllOf(CaptureEq(&stack_slot_capture), stack_slot_matcher),
+ IsInt32Constant(0), IsInt32Constant(low_word_value(0)),
+ IsStore(StoreRepresentation(MachineRepresentation::kWord32,
+ WriteBarrierKind::kNoWriteBarrier),
+ AllOf(CaptureEq(&stack_slot_capture), stack_slot_matcher),
+ IsInt32Constant(4), IsInt32Constant(high_word_value(0)),
+ start(), start()),
+ start());
+
+ EXPECT_THAT(
+ graph()->end()->InputAt(1),
+ IsReturn(IsLoad(MachineType::Float64(),
+ AllOf(CaptureEq(&stack_slot_capture), stack_slot_matcher),
+ IsInt32Constant(0),
+ AllOf(CaptureEq(&store_capture), store_matcher), start()),
+ start(), start()));
+}
// kExprI64ReinterpretF64:
TEST_F(Int64LoweringTest, I64ReinterpretF64) {
LowerGraph(graph()->NewNode(machine()->BitcastFloat64ToInt64(),
« no previous file with comments | « test/cctest/wasm/test-run-wasm-64.cc ('k') | test/unittests/compiler/node-test-utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698