OLD | NEW |
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 <limits> | 5 #include <limits> |
6 | 6 |
7 #include "src/compiler/access-builder.h" | 7 #include "src/compiler/access-builder.h" |
8 #include "src/compiler/change-lowering.h" | 8 #include "src/compiler/change-lowering.h" |
9 #include "src/compiler/control-builders.h" | 9 #include "src/compiler/control-builders.h" |
10 #include "src/compiler/graph-reducer.h" | 10 #include "src/compiler/graph-reducer.h" |
(...skipping 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1212 CheckChangeInsertion(IrOpcode::kChangeUint32ToFloat64, kTypeUint32, | 1212 CheckChangeInsertion(IrOpcode::kChangeUint32ToFloat64, kTypeUint32, |
1213 kRepFloat64); | 1213 kRepFloat64); |
1214 CheckChangeInsertion(IrOpcode::kChangeUint32ToTagged, kTypeUint32, | 1214 CheckChangeInsertion(IrOpcode::kChangeUint32ToTagged, kTypeUint32, |
1215 kRepTagged); | 1215 kRepTagged); |
1216 } | 1216 } |
1217 | 1217 |
1218 | 1218 |
1219 static void CheckChangesAroundBinop(TestingGraph* t, const Operator* op, | 1219 static void CheckChangesAroundBinop(TestingGraph* t, const Operator* op, |
1220 IrOpcode::Value input_change, | 1220 IrOpcode::Value input_change, |
1221 IrOpcode::Value output_change) { | 1221 IrOpcode::Value output_change) { |
1222 Node* binop = t->graph()->NewNode(op, t->p0, t->p1); | 1222 Node* binop = |
| 1223 op->ControlInputCount() == 0 |
| 1224 ? t->graph()->NewNode(op, t->p0, t->p1) |
| 1225 : t->graph()->NewNode(op, t->p0, t->p1, t->graph()->start()); |
1223 t->Return(binop); | 1226 t->Return(binop); |
1224 t->Lower(); | 1227 t->Lower(); |
1225 CHECK_EQ(input_change, binop->InputAt(0)->opcode()); | 1228 CHECK_EQ(input_change, binop->InputAt(0)->opcode()); |
1226 CHECK_EQ(input_change, binop->InputAt(1)->opcode()); | 1229 CHECK_EQ(input_change, binop->InputAt(1)->opcode()); |
1227 CHECK_EQ(t->p0, binop->InputAt(0)->InputAt(0)); | 1230 CHECK_EQ(t->p0, binop->InputAt(0)->InputAt(0)); |
1228 CHECK_EQ(t->p1, binop->InputAt(1)->InputAt(0)); | 1231 CHECK_EQ(t->p1, binop->InputAt(1)->InputAt(0)); |
1229 CHECK_EQ(output_change, t->ret->InputAt(0)->opcode()); | 1232 CHECK_EQ(output_change, t->ret->InputAt(0)->opcode()); |
1230 CHECK_EQ(binop, t->ret->InputAt(0)->InputAt(0)); | 1233 CHECK_EQ(binop, t->ret->InputAt(0)->InputAt(0)); |
1231 } | 1234 } |
1232 | 1235 |
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1984 Type* phi_type = Type::Union(d.arg1, d.arg2, z); | 1987 Type* phi_type = Type::Union(d.arg1, d.arg2, z); |
1985 NodeProperties::SetType(phi, phi_type); | 1988 NodeProperties::SetType(phi, phi_type); |
1986 | 1989 |
1987 Node* use = t.Use(phi, d.use); | 1990 Node* use = t.Use(phi, d.use); |
1988 t.Return(use); | 1991 t.Return(use); |
1989 t.Lower(); | 1992 t.Lower(); |
1990 | 1993 |
1991 CHECK_EQ(d.expected, OpParameter<MachineType>(phi)); | 1994 CHECK_EQ(d.expected, OpParameter<MachineType>(phi)); |
1992 } | 1995 } |
1993 } | 1996 } |
OLD | NEW |