Add support for floats and doubles.
- Follows Quick conventions.
- Currently only works with baseline register allocator.
Change-Id: Ie4b8e298f4f5e1cd82364da83e4344d4fc3621a3
diff --git a/compiler/optimizing/constant_propagation_test.cc b/compiler/optimizing/constant_propagation_test.cc
index 5c8c709..d08d14d 100644
--- a/compiler/optimizing/constant_propagation_test.cc
+++ b/compiler/optimizing/constant_propagation_test.cc
@@ -27,10 +27,11 @@
static void TestCode(const uint16_t* data,
const std::string& expected_before,
const std::string& expected_after_cp,
- const std::string& expected_after_dce) {
+ const std::string& expected_after_dce,
+ Primitive::Type return_type = Primitive::kPrimInt) {
ArenaPool pool;
ArenaAllocator allocator(&pool);
- HGraph* graph = CreateCFG(&allocator, data);
+ HGraph* graph = CreateCFG(&allocator, data, return_type);
ASSERT_NE(graph, nullptr);
graph->BuildDominatorTree();
@@ -279,7 +280,7 @@
};
std::string expected_after_dce = Patch(expected_after_cp, expected_dce_diff);
- TestCode(data, expected_before, expected_after_cp, expected_after_dce);
+ TestCode(data, expected_before, expected_after_cp, expected_after_dce, Primitive::kPrimLong);
}
/**
@@ -330,7 +331,7 @@
};
std::string expected_after_dce = Patch(expected_after_cp, expected_dce_diff);
- TestCode(data, expected_before, expected_after_cp, expected_after_dce);
+ TestCode(data, expected_before, expected_after_cp, expected_after_dce, Primitive::kPrimLong);
}
/**