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

Unified Diff: test/cctest/compiler/test-changes-lowering.cc

Issue 1916763003: [turbofan] Move ChangeTaggedToFoo lowerings to EffectControlLinearizer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 | « src/compiler/effect-control-linearizer.cc ('k') | test/cctest/compiler/test-simplified-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-changes-lowering.cc
diff --git a/test/cctest/compiler/test-changes-lowering.cc b/test/cctest/compiler/test-changes-lowering.cc
index ddeabe479b8a001a057245bd29131082ebd98def..6a39cb03d6e4864777d8d3a138d62eb3de2eb403 100644
--- a/test/cctest/compiler/test-changes-lowering.cc
+++ b/test/cctest/compiler/test-changes-lowering.cc
@@ -143,113 +143,6 @@ class ChangesLoweringTester : public GraphBuilderTester<ReturnType> {
};
-TEST(RunChangeTaggedToInt32) {
- // Build and lower a graph by hand.
- ChangesLoweringTester<int32_t> t(MachineType::AnyTagged());
- t.BuildAndLower(t.simplified()->ChangeTaggedToInt32());
-
- FOR_INT32_INPUTS(i) {
- int32_t input = *i;
-
- if (Smi::IsValid(input)) {
- int32_t result = t.Call(Smi::FromInt(input));
- CHECK_EQ(input, result);
- }
-
- {
- Handle<Object> number = t.factory()->NewNumber(input);
- int32_t result = t.Call(*number);
- CHECK_EQ(input, result);
- }
-
- {
- Handle<HeapNumber> number = t.factory()->NewHeapNumber(input);
- int32_t result = t.Call(*number);
- CHECK_EQ(input, result);
- }
- }
-}
-
-
-TEST(RunChangeTaggedToUint32) {
- // Build and lower a graph by hand.
- ChangesLoweringTester<uint32_t> t(MachineType::AnyTagged());
- t.BuildAndLower(t.simplified()->ChangeTaggedToUint32());
-
- FOR_UINT32_INPUTS(i) {
- uint32_t input = *i;
-
- if (Smi::IsValid(input)) {
- uint32_t result = t.Call(Smi::FromInt(input));
- CHECK_EQ(static_cast<int32_t>(input), static_cast<int32_t>(result));
- }
-
- {
- Handle<Object> number = t.factory()->NewNumber(input);
- uint32_t result = t.Call(*number);
- CHECK_EQ(static_cast<int32_t>(input), static_cast<int32_t>(result));
- }
-
- {
- Handle<HeapNumber> number = t.factory()->NewHeapNumber(input);
- uint32_t result = t.Call(*number);
- CHECK_EQ(static_cast<int32_t>(input), static_cast<int32_t>(result));
- }
- }
-}
-
-
-TEST(RunChangeTaggedToFloat64) {
- ChangesLoweringTester<int32_t> t(MachineType::AnyTagged());
- double result;
-
- t.BuildStoreAndLower(t.simplified()->ChangeTaggedToFloat64(),
- t.machine()->Store(StoreRepresentation(
- MachineRepresentation::kFloat64, kNoWriteBarrier)),
- &result);
-
- {
- FOR_INT32_INPUTS(i) {
- int32_t input = *i;
-
- if (Smi::IsValid(input)) {
- t.Call(Smi::FromInt(input));
- CHECK_EQ(input, static_cast<int32_t>(result));
- }
-
- {
- Handle<Object> number = t.factory()->NewNumber(input);
- t.Call(*number);
- CHECK_EQ(input, static_cast<int32_t>(result));
- }
-
- {
- Handle<HeapNumber> number = t.factory()->NewHeapNumber(input);
- t.Call(*number);
- CHECK_EQ(input, static_cast<int32_t>(result));
- }
- }
- }
-
- {
- FOR_FLOAT64_INPUTS(i) {
- double input = *i;
- {
- Handle<Object> number = t.factory()->NewNumber(input);
- t.Call(*number);
- CHECK_DOUBLE_EQ(input, result);
- }
-
- {
- Handle<HeapNumber> number = t.factory()->NewHeapNumber(input);
- t.Call(*number);
- CHECK_DOUBLE_EQ(input, result);
- }
- }
- }
-}
-
-
TEST(RunChangeBoolToBit) {
ChangesLoweringTester<int32_t> t(MachineType::AnyTagged());
t.BuildAndLower(t.simplified()->ChangeBoolToBit());
« no previous file with comments | « src/compiler/effect-control-linearizer.cc ('k') | test/cctest/compiler/test-simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698