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

Side by Side Diff: test/cctest/compiler/test-js-typed-lowering.cc

Issue 2194383004: [turbofan] Remove eager frame state from bitwise ops. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « src/compiler/pipeline.cc ('k') | test/unittests/compiler/js-typed-lowering-unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compilation-dependencies.h" 5 #include "src/compilation-dependencies.h"
6 #include "src/compiler/js-graph.h" 6 #include "src/compiler/js-graph.h"
7 #include "src/compiler/js-typed-lowering.h" 7 #include "src/compiler/js-typed-lowering.h"
8 #include "src/compiler/machine-operator.h" 8 #include "src/compiler/machine-operator.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 #include "src/compiler/opcodes.h" 10 #include "src/compiler/opcodes.h"
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after
1037 // Effects should be ordered start -> i0 -> effect_use 1037 // Effects should be ordered start -> i0 -> effect_use
1038 B.CheckEffectOrdering(i1); 1038 B.CheckEffectOrdering(i1);
1039 } 1039 }
1040 } 1040 }
1041 1041
1042 1042
1043 TEST(Int32BinopEffects) { 1043 TEST(Int32BinopEffects) {
1044 JSBitwiseTypedLoweringTester R; 1044 JSBitwiseTypedLoweringTester R;
1045 for (int j = 0; j < R.kNumberOps; j += 2) { 1045 for (int j = 0; j < R.kNumberOps; j += 2) {
1046 bool signed_left = R.signedness[j], signed_right = R.signedness[j + 1]; 1046 bool signed_left = R.signedness[j], signed_right = R.signedness[j + 1];
1047 BinopEffectsTester B(R.ops[j], I32Type(signed_left), I32Type(signed_right)); 1047 BinopEffectsTester B(R.ops[j], I32Type(signed_left), I32Type(signed_right),
1048 JSTypedLowering::kNoFlags);
1048 CHECK_EQ(R.ops[j + 1]->opcode(), B.result->op()->opcode()); 1049 CHECK_EQ(R.ops[j + 1]->opcode(), B.result->op()->opcode());
1049 1050
1050 B.R.CheckBinop(B.result->opcode(), B.result); 1051 B.R.CheckBinop(B.result->opcode(), B.result);
1051 1052
1052 B.CheckNoOp(0); 1053 B.CheckNoOp(0);
1053 B.CheckNoOp(1); 1054 B.CheckNoOp(1);
1054 1055
1055 B.CheckEffectsRemoved(); 1056 B.CheckEffectsRemoved();
1056 } 1057 }
1057 1058
1058 for (int j = 0; j < R.kNumberOps; j += 2) { 1059 for (int j = 0; j < R.kNumberOps; j += 2) {
1059 bool signed_left = R.signedness[j], signed_right = R.signedness[j + 1]; 1060 bool signed_left = R.signedness[j], signed_right = R.signedness[j + 1];
1060 BinopEffectsTester B(R.ops[j], Type::Number(), Type::Number()); 1061 BinopEffectsTester B(R.ops[j], Type::Number(), Type::Number(),
1062 JSTypedLowering::kNoFlags);
1061 CHECK_EQ(R.ops[j + 1]->opcode(), B.result->op()->opcode()); 1063 CHECK_EQ(R.ops[j + 1]->opcode(), B.result->op()->opcode());
1062 1064
1063 B.R.CheckBinop(B.result->opcode(), B.result); 1065 B.R.CheckBinop(B.result->opcode(), B.result);
1064 1066
1065 B.CheckConvertedInput(NumberToI32(signed_left), 0, false); 1067 B.CheckConvertedInput(NumberToI32(signed_left), 0, false);
1066 B.CheckConvertedInput(NumberToI32(signed_right), 1, false); 1068 B.CheckConvertedInput(NumberToI32(signed_right), 1, false);
1067 1069
1068 B.CheckEffectsRemoved(); 1070 B.CheckEffectsRemoved();
1069 } 1071 }
1070 1072
1071 for (int j = 0; j < R.kNumberOps; j += 2) { 1073 for (int j = 0; j < R.kNumberOps; j += 2) {
1072 bool signed_left = R.signedness[j], signed_right = R.signedness[j + 1]; 1074 bool signed_left = R.signedness[j], signed_right = R.signedness[j + 1];
1073 BinopEffectsTester B(R.ops[j], Type::Number(), Type::Primitive()); 1075 BinopEffectsTester B(R.ops[j], Type::Number(), Type::Primitive(),
1076 JSTypedLowering::kNoFlags);
1074 1077
1075 B.R.CheckBinop(B.result->opcode(), B.result); 1078 B.R.CheckBinop(B.result->opcode(), B.result);
1076 1079
1077 Node* i0 = B.CheckConvertedInput(NumberToI32(signed_left), 0, false); 1080 Node* i0 = B.CheckConvertedInput(NumberToI32(signed_left), 0, false);
1078 Node* i1 = B.CheckConvertedInput(NumberToI32(signed_right), 1, false); 1081 Node* i1 = B.CheckConvertedInput(NumberToI32(signed_right), 1, false);
1079 1082
1080 CHECK_EQ(B.p0, i0->InputAt(0)); 1083 CHECK_EQ(B.p0, i0->InputAt(0));
1081 Node* ii1 = B.CheckConverted(IrOpcode::kJSToNumber, i1->InputAt(0), true); 1084 Node* ii1 = B.CheckConverted(IrOpcode::kJSToNumber, i1->InputAt(0), true);
1082 1085
1083 CHECK_EQ(B.p1, ii1->InputAt(0)); 1086 CHECK_EQ(B.p1, ii1->InputAt(0));
1084 1087
1085 B.CheckEffectOrdering(ii1); 1088 B.CheckEffectOrdering(ii1);
1086 } 1089 }
1087 1090
1088 for (int j = 0; j < R.kNumberOps; j += 2) { 1091 for (int j = 0; j < R.kNumberOps; j += 2) {
1089 bool signed_left = R.signedness[j], signed_right = R.signedness[j + 1]; 1092 bool signed_left = R.signedness[j], signed_right = R.signedness[j + 1];
1090 BinopEffectsTester B(R.ops[j], Type::Primitive(), Type::Number()); 1093 BinopEffectsTester B(R.ops[j], Type::Primitive(), Type::Number(),
1094 JSTypedLowering::kNoFlags);
1091 1095
1092 B.R.CheckBinop(B.result->opcode(), B.result); 1096 B.R.CheckBinop(B.result->opcode(), B.result);
1093 1097
1094 Node* i0 = B.CheckConvertedInput(NumberToI32(signed_left), 0, false); 1098 Node* i0 = B.CheckConvertedInput(NumberToI32(signed_left), 0, false);
1095 Node* i1 = B.CheckConvertedInput(NumberToI32(signed_right), 1, false); 1099 Node* i1 = B.CheckConvertedInput(NumberToI32(signed_right), 1, false);
1096 1100
1097 Node* ii0 = B.CheckConverted(IrOpcode::kJSToNumber, i0->InputAt(0), true); 1101 Node* ii0 = B.CheckConverted(IrOpcode::kJSToNumber, i0->InputAt(0), true);
1098 CHECK_EQ(B.p1, i1->InputAt(0)); 1102 CHECK_EQ(B.p1, i1->InputAt(0));
1099 1103
1100 CHECK_EQ(B.p0, ii0->InputAt(0)); 1104 CHECK_EQ(B.p0, ii0->InputAt(0));
1101 1105
1102 B.CheckEffectOrdering(ii0); 1106 B.CheckEffectOrdering(ii0);
1103 } 1107 }
1104 1108
1105 for (int j = 0; j < R.kNumberOps; j += 2) { 1109 for (int j = 0; j < R.kNumberOps; j += 2) {
1106 bool signed_left = R.signedness[j], signed_right = R.signedness[j + 1]; 1110 bool signed_left = R.signedness[j], signed_right = R.signedness[j + 1];
1107 BinopEffectsTester B(R.ops[j], Type::Primitive(), Type::Primitive()); 1111 BinopEffectsTester B(R.ops[j], Type::Primitive(), Type::Primitive(),
1112 JSTypedLowering::kNoFlags);
1108 1113
1109 B.R.CheckBinop(B.result->opcode(), B.result); 1114 B.R.CheckBinop(B.result->opcode(), B.result);
1110 1115
1111 Node* i0 = B.CheckConvertedInput(NumberToI32(signed_left), 0, false); 1116 Node* i0 = B.CheckConvertedInput(NumberToI32(signed_left), 0, false);
1112 Node* i1 = B.CheckConvertedInput(NumberToI32(signed_right), 1, false); 1117 Node* i1 = B.CheckConvertedInput(NumberToI32(signed_right), 1, false);
1113 1118
1114 Node* ii0 = B.CheckConverted(IrOpcode::kJSToNumber, i0->InputAt(0), true); 1119 Node* ii0 = B.CheckConverted(IrOpcode::kJSToNumber, i0->InputAt(0), true);
1115 Node* ii1 = B.CheckConverted(IrOpcode::kJSToNumber, i1->InputAt(0), true); 1120 Node* ii1 = B.CheckConverted(IrOpcode::kJSToNumber, i1->InputAt(0), true);
1116 1121
1117 CHECK_EQ(B.p0, ii0->InputAt(0)); 1122 CHECK_EQ(B.p0, ii0->InputAt(0));
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 CHECK_EQ(p1, r->InputAt(1)); 1236 CHECK_EQ(p1, r->InputAt(1));
1232 } 1237 }
1233 } 1238 }
1234 } 1239 }
1235 } 1240 }
1236 } 1241 }
1237 1242
1238 } // namespace compiler 1243 } // namespace compiler
1239 } // namespace internal 1244 } // namespace internal
1240 } // namespace v8 1245 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/pipeline.cc ('k') | test/unittests/compiler/js-typed-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698