blob: 4979bd5c4dd573d688cb0bac2215c48f6725c354 [file] [log] [blame]
Emily Bernierd0a1eb72015-03-24 16:35:39 -04001// 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
3// found in the LICENSE file.
4
5#ifndef V8_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_
6#define V8_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_
7
8#include "src/compiler/machine-operator.h"
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00009#include "src/machine-type.h"
Emily Bernierd0a1eb72015-03-24 16:35:39 -040010#include "testing/gmock/include/gmock/gmock.h"
11
12namespace v8 {
13namespace internal {
14
15// Forward declarations.
16class ExternalReference;
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000017template <typename T>
18class Handle;
Emily Bernierd0a1eb72015-03-24 16:35:39 -040019class HeapObject;
Ben Murdoch097c5b22016-05-18 11:27:45 +010020class Type;
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000021enum TypeofMode : int;
Emily Bernierd0a1eb72015-03-24 16:35:39 -040022
23namespace compiler {
24
25// Forward declarations.
26class BufferAccess;
27class CallDescriptor;
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000028class ContextAccess;
Emily Bernierd0a1eb72015-03-24 16:35:39 -040029struct ElementAccess;
30struct FieldAccess;
31class Node;
32
33
34using ::testing::Matcher;
35
36
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000037Matcher<Node*> IsDead();
38Matcher<Node*> IsEnd(const Matcher<Node*>& control0_matcher);
39Matcher<Node*> IsEnd(const Matcher<Node*>& control0_matcher,
40 const Matcher<Node*>& control1_matcher);
41Matcher<Node*> IsEnd(const Matcher<Node*>& control0_matcher,
42 const Matcher<Node*>& control1_matcher,
43 const Matcher<Node*>& control2_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -040044Matcher<Node*> IsBranch(const Matcher<Node*>& value_matcher,
45 const Matcher<Node*>& control_matcher);
46Matcher<Node*> IsMerge(const Matcher<Node*>& control0_matcher,
47 const Matcher<Node*>& control1_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000048Matcher<Node*> IsMerge(const Matcher<Node*>& control0_matcher,
49 const Matcher<Node*>& control1_matcher,
50 const Matcher<Node*>& control2_matcher);
51Matcher<Node*> IsLoop(const Matcher<Node*>& control0_matcher,
52 const Matcher<Node*>& control1_matcher);
53Matcher<Node*> IsLoop(const Matcher<Node*>& control0_matcher,
54 const Matcher<Node*>& control1_matcher,
55 const Matcher<Node*>& control2_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -040056Matcher<Node*> IsIfTrue(const Matcher<Node*>& control_matcher);
57Matcher<Node*> IsIfFalse(const Matcher<Node*>& control_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000058Matcher<Node*> IsIfSuccess(const Matcher<Node*>& control_matcher);
59Matcher<Node*> IsSwitch(const Matcher<Node*>& value_matcher,
60 const Matcher<Node*>& control_matcher);
61Matcher<Node*> IsIfValue(const Matcher<int32_t>& value_matcher,
62 const Matcher<Node*>& control_matcher);
63Matcher<Node*> IsIfDefault(const Matcher<Node*>& control_matcher);
64Matcher<Node*> IsBeginRegion(const Matcher<Node*>& effect_matcher);
65Matcher<Node*> IsFinishRegion(const Matcher<Node*>& value_matcher,
66 const Matcher<Node*>& effect_matcher);
67Matcher<Node*> IsReturn(const Matcher<Node*>& value_matcher,
68 const Matcher<Node*>& effect_matcher,
69 const Matcher<Node*>& control_matcher);
Ben Murdoch097c5b22016-05-18 11:27:45 +010070Matcher<Node*> IsReturn2(const Matcher<Node*>& value_matcher,
71 const Matcher<Node*>& value2_matcher,
72 const Matcher<Node*>& effect_matcher,
73 const Matcher<Node*>& control_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000074Matcher<Node*> IsTerminate(const Matcher<Node*>& effect_matcher,
75 const Matcher<Node*>& control_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -040076Matcher<Node*> IsExternalConstant(
77 const Matcher<ExternalReference>& value_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000078Matcher<Node*> IsHeapConstant(Handle<HeapObject> value);
Emily Bernierd0a1eb72015-03-24 16:35:39 -040079Matcher<Node*> IsFloat32Constant(const Matcher<float>& value_matcher);
80Matcher<Node*> IsFloat64Constant(const Matcher<double>& value_matcher);
81Matcher<Node*> IsInt32Constant(const Matcher<int32_t>& value_matcher);
82Matcher<Node*> IsInt64Constant(const Matcher<int64_t>& value_matcher);
83Matcher<Node*> IsNumberConstant(const Matcher<double>& value_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000084Matcher<Node*> IsSelect(const Matcher<MachineRepresentation>& type_matcher,
Emily Bernierd0a1eb72015-03-24 16:35:39 -040085 const Matcher<Node*>& value0_matcher,
86 const Matcher<Node*>& value1_matcher,
87 const Matcher<Node*>& value2_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000088Matcher<Node*> IsPhi(const Matcher<MachineRepresentation>& type_matcher,
Emily Bernierd0a1eb72015-03-24 16:35:39 -040089 const Matcher<Node*>& value0_matcher,
90 const Matcher<Node*>& value1_matcher,
91 const Matcher<Node*>& merge_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000092Matcher<Node*> IsPhi(const Matcher<MachineRepresentation>& type_matcher,
93 const Matcher<Node*>& value0_matcher,
94 const Matcher<Node*>& value1_matcher,
95 const Matcher<Node*>& value2_matcher,
96 const Matcher<Node*>& merge_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -040097Matcher<Node*> IsEffectPhi(const Matcher<Node*>& effect0_matcher,
98 const Matcher<Node*>& effect1_matcher,
99 const Matcher<Node*>& merge_matcher);
100Matcher<Node*> IsProjection(const Matcher<size_t>& index_matcher,
101 const Matcher<Node*>& base_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000102Matcher<Node*> IsCall(const Matcher<const CallDescriptor*>& descriptor_matcher,
103 const Matcher<Node*>& value0_matcher,
104 const Matcher<Node*>& effect_matcher,
105 const Matcher<Node*>& control_matcher);
106Matcher<Node*> IsCall(const Matcher<const CallDescriptor*>& descriptor_matcher,
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400107 const Matcher<Node*>& value0_matcher,
108 const Matcher<Node*>& value1_matcher,
109 const Matcher<Node*>& effect_matcher,
110 const Matcher<Node*>& control_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000111Matcher<Node*> IsCall(const Matcher<const CallDescriptor*>& descriptor_matcher,
112 const Matcher<Node*>& value0_matcher,
113 const Matcher<Node*>& value1_matcher,
114 const Matcher<Node*>& value2_matcher,
115 const Matcher<Node*>& effect_matcher,
116 const Matcher<Node*>& control_matcher);
117Matcher<Node*> IsCall(const Matcher<const CallDescriptor*>& descriptor_matcher,
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400118 const Matcher<Node*>& value0_matcher,
119 const Matcher<Node*>& value1_matcher,
120 const Matcher<Node*>& value2_matcher,
121 const Matcher<Node*>& value3_matcher,
122 const Matcher<Node*>& effect_matcher,
123 const Matcher<Node*>& control_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000124Matcher<Node*> IsCall(const Matcher<const CallDescriptor*>& descriptor_matcher,
125 const Matcher<Node*>& value0_matcher,
126 const Matcher<Node*>& value1_matcher,
127 const Matcher<Node*>& value2_matcher,
128 const Matcher<Node*>& value3_matcher,
129 const Matcher<Node*>& value4_matcher,
130 const Matcher<Node*>& effect_matcher,
131 const Matcher<Node*>& control_matcher);
132Matcher<Node*> IsCall(const Matcher<const CallDescriptor*>& descriptor_matcher,
133 const Matcher<Node*>& value0_matcher,
134 const Matcher<Node*>& value1_matcher,
135 const Matcher<Node*>& value2_matcher,
136 const Matcher<Node*>& value3_matcher,
137 const Matcher<Node*>& value4_matcher,
138 const Matcher<Node*>& value5_matcher,
139 const Matcher<Node*>& effect_matcher,
140 const Matcher<Node*>& control_matcher);
141Matcher<Node*> IsCall(
142 const Matcher<const CallDescriptor*>& descriptor_matcher,
143 const Matcher<Node*>& value0_matcher, const Matcher<Node*>& value1_matcher,
144 const Matcher<Node*>& value2_matcher, const Matcher<Node*>& value3_matcher,
145 const Matcher<Node*>& value4_matcher, const Matcher<Node*>& value5_matcher,
146 const Matcher<Node*>& value6_matcher, const Matcher<Node*>& effect_matcher,
147 const Matcher<Node*>& control_matcher);
148Matcher<Node*> IsTailCall(
149 const Matcher<CallDescriptor const*>& descriptor_matcher,
150 const Matcher<Node*>& value0_matcher, const Matcher<Node*>& value1_matcher,
151 const Matcher<Node*>& effect_matcher,
152 const Matcher<Node*>& control_matcher);
153Matcher<Node*> IsTailCall(
154 const Matcher<CallDescriptor const*>& descriptor_matcher,
155 const Matcher<Node*>& value0_matcher, const Matcher<Node*>& value1_matcher,
156 const Matcher<Node*>& value2_matcher, const Matcher<Node*>& effect_matcher,
157 const Matcher<Node*>& control_matcher);
158Matcher<Node*> IsTailCall(
159 const Matcher<CallDescriptor const*>& descriptor_matcher,
160 const Matcher<Node*>& value0_matcher, const Matcher<Node*>& value1_matcher,
161 const Matcher<Node*>& value2_matcher, const Matcher<Node*>& value3_matcher,
162 const Matcher<Node*>& effect_matcher,
163 const Matcher<Node*>& control_matcher);
164Matcher<Node*> IsTailCall(
165 const Matcher<CallDescriptor const*>& descriptor_matcher,
166 const Matcher<Node*>& value0_matcher, const Matcher<Node*>& value1_matcher,
167 const Matcher<Node*>& value2_matcher, const Matcher<Node*>& value3_matcher,
168 const Matcher<Node*>& value4_matcher, const Matcher<Node*>& effect_matcher,
169 const Matcher<Node*>& control_matcher);
170Matcher<Node*> IsTailCall(
171 const Matcher<CallDescriptor const*>& descriptor_matcher,
172 const Matcher<Node*>& value0_matcher, const Matcher<Node*>& value1_matcher,
173 const Matcher<Node*>& value2_matcher, const Matcher<Node*>& value3_matcher,
174 const Matcher<Node*>& value4_matcher, const Matcher<Node*>& value5_matcher,
175 const Matcher<Node*>& effect_matcher,
176 const Matcher<Node*>& control_matcher);
177Matcher<Node*> IsTailCall(
178 const Matcher<CallDescriptor const*>& descriptor_matcher,
179 const Matcher<Node*>& value0_matcher, const Matcher<Node*>& value1_matcher,
180 const Matcher<Node*>& value2_matcher, const Matcher<Node*>& value3_matcher,
181 const Matcher<Node*>& value4_matcher, const Matcher<Node*>& value5_matcher,
182 const Matcher<Node*>& value6_matcher, const Matcher<Node*>& effect_matcher,
183 const Matcher<Node*>& control_matcher);
184Matcher<Node*> IsTailCall(
185 const Matcher<CallDescriptor const*>& descriptor_matcher,
186 const Matcher<Node*>& value0_matcher, const Matcher<Node*>& value1_matcher,
187 const Matcher<Node*>& value2_matcher, const Matcher<Node*>& value3_matcher,
188 const Matcher<Node*>& value4_matcher, const Matcher<Node*>& value5_matcher,
189 const Matcher<Node*>& value6_matcher, const Matcher<Node*>& value7_matcher,
190 const Matcher<Node*>& effect_matcher,
191 const Matcher<Node*>& control_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400192
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000193
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400194Matcher<Node*> IsBooleanNot(const Matcher<Node*>& value_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000195Matcher<Node*> IsReferenceEqual(const Matcher<Type*>& type_matcher,
196 const Matcher<Node*>& lhs_matcher,
197 const Matcher<Node*>& rhs_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400198Matcher<Node*> IsNumberEqual(const Matcher<Node*>& lhs_matcher,
199 const Matcher<Node*>& rhs_matcher);
200Matcher<Node*> IsNumberLessThan(const Matcher<Node*>& lhs_matcher,
201 const Matcher<Node*>& rhs_matcher);
202Matcher<Node*> IsNumberSubtract(const Matcher<Node*>& lhs_matcher,
203 const Matcher<Node*>& rhs_matcher);
204Matcher<Node*> IsNumberMultiply(const Matcher<Node*>& lhs_matcher,
205 const Matcher<Node*>& rhs_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000206Matcher<Node*> IsNumberShiftLeft(const Matcher<Node*>& lhs_matcher,
207 const Matcher<Node*>& rhs_matcher);
208Matcher<Node*> IsNumberShiftRight(const Matcher<Node*>& lhs_matcher,
209 const Matcher<Node*>& rhs_matcher);
210Matcher<Node*> IsNumberShiftRightLogical(const Matcher<Node*>& lhs_matcher,
211 const Matcher<Node*>& rhs_matcher);
Ben Murdochda12d292016-06-02 14:46:10 +0100212Matcher<Node*> IsNumberImul(const Matcher<Node*>& lhs_matcher,
213 const Matcher<Node*>& rhs_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000214Matcher<Node*> IsAllocate(const Matcher<Node*>& size_matcher,
215 const Matcher<Node*>& effect_matcher,
216 const Matcher<Node*>& control_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400217Matcher<Node*> IsLoadField(const Matcher<FieldAccess>& access_matcher,
218 const Matcher<Node*>& base_matcher,
219 const Matcher<Node*>& effect_matcher,
220 const Matcher<Node*>& control_matcher);
221Matcher<Node*> IsStoreField(const Matcher<FieldAccess>& access_matcher,
222 const Matcher<Node*>& base_matcher,
223 const Matcher<Node*>& value_matcher,
224 const Matcher<Node*>& effect_matcher,
225 const Matcher<Node*>& control_matcher);
226Matcher<Node*> IsLoadBuffer(const Matcher<BufferAccess>& access_matcher,
227 const Matcher<Node*>& buffer_matcher,
228 const Matcher<Node*>& offset_matcher,
229 const Matcher<Node*>& length_matcher,
230 const Matcher<Node*>& effect_matcher,
231 const Matcher<Node*>& control_matcher);
232Matcher<Node*> IsStoreBuffer(const Matcher<BufferAccess>& access_matcher,
233 const Matcher<Node*>& buffer_matcher,
234 const Matcher<Node*>& offset_matcher,
235 const Matcher<Node*>& length_matcher,
236 const Matcher<Node*>& value_matcher,
237 const Matcher<Node*>& effect_matcher,
238 const Matcher<Node*>& control_matcher);
239Matcher<Node*> IsLoadElement(const Matcher<ElementAccess>& access_matcher,
240 const Matcher<Node*>& base_matcher,
241 const Matcher<Node*>& index_matcher,
242 const Matcher<Node*>& control_matcher,
243 const Matcher<Node*>& effect_matcher);
244Matcher<Node*> IsStoreElement(const Matcher<ElementAccess>& access_matcher,
245 const Matcher<Node*>& base_matcher,
246 const Matcher<Node*>& index_matcher,
247 const Matcher<Node*>& value_matcher,
248 const Matcher<Node*>& effect_matcher,
249 const Matcher<Node*>& control_matcher);
Ben Murdoch097c5b22016-05-18 11:27:45 +0100250Matcher<Node*> IsObjectIsReceiver(const Matcher<Node*>& value_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000251Matcher<Node*> IsObjectIsSmi(const Matcher<Node*>& value_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400252
253Matcher<Node*> IsLoad(const Matcher<LoadRepresentation>& rep_matcher,
254 const Matcher<Node*>& base_matcher,
255 const Matcher<Node*>& index_matcher,
256 const Matcher<Node*>& effect_matcher,
257 const Matcher<Node*>& control_matcher);
258Matcher<Node*> IsStore(const Matcher<StoreRepresentation>& rep_matcher,
259 const Matcher<Node*>& base_matcher,
260 const Matcher<Node*>& index_matcher,
261 const Matcher<Node*>& value_matcher,
262 const Matcher<Node*>& effect_matcher,
263 const Matcher<Node*>& control_matcher);
Ben Murdochda12d292016-06-02 14:46:10 +0100264Matcher<Node*> IsStackSlot(const Matcher<MachineRepresentation>& rep_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400265Matcher<Node*> IsWord32And(const Matcher<Node*>& lhs_matcher,
266 const Matcher<Node*>& rhs_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000267Matcher<Node*> IsWord32Or(const Matcher<Node*>& lhs_matcher,
268 const Matcher<Node*>& rhs_matcher);
Ben Murdochda12d292016-06-02 14:46:10 +0100269Matcher<Node*> IsWord32Xor(const Matcher<Node*>& lhs_matcher,
270 const Matcher<Node*>& rhs_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400271Matcher<Node*> IsWord32Sar(const Matcher<Node*>& lhs_matcher,
272 const Matcher<Node*>& rhs_matcher);
273Matcher<Node*> IsWord32Shl(const Matcher<Node*>& lhs_matcher,
274 const Matcher<Node*>& rhs_matcher);
275Matcher<Node*> IsWord32Shr(const Matcher<Node*>& lhs_matcher,
276 const Matcher<Node*>& rhs_matcher);
277Matcher<Node*> IsWord32Ror(const Matcher<Node*>& lhs_matcher,
278 const Matcher<Node*>& rhs_matcher);
279Matcher<Node*> IsWord32Equal(const Matcher<Node*>& lhs_matcher,
280 const Matcher<Node*>& rhs_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000281Matcher<Node*> IsWord32Clz(const Matcher<Node*>& value_matcher);
Ben Murdochda12d292016-06-02 14:46:10 +0100282Matcher<Node*> IsWord32Ctz(const Matcher<Node*>& value_matcher);
283Matcher<Node*> IsWord32Popcnt(const Matcher<Node*>& value_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400284Matcher<Node*> IsWord64And(const Matcher<Node*>& lhs_matcher,
285 const Matcher<Node*>& rhs_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000286Matcher<Node*> IsWord64Or(const Matcher<Node*>& lhs_matcher,
287 const Matcher<Node*>& rhs_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400288Matcher<Node*> IsWord64Shl(const Matcher<Node*>& lhs_matcher,
289 const Matcher<Node*>& rhs_matcher);
290Matcher<Node*> IsWord64Sar(const Matcher<Node*>& lhs_matcher,
291 const Matcher<Node*>& rhs_matcher);
292Matcher<Node*> IsWord64Equal(const Matcher<Node*>& lhs_matcher,
293 const Matcher<Node*>& rhs_matcher);
294Matcher<Node*> IsInt32AddWithOverflow(const Matcher<Node*>& lhs_matcher,
295 const Matcher<Node*>& rhs_matcher);
296Matcher<Node*> IsInt32Add(const Matcher<Node*>& lhs_matcher,
297 const Matcher<Node*>& rhs_matcher);
298Matcher<Node*> IsInt32Sub(const Matcher<Node*>& lhs_matcher,
299 const Matcher<Node*>& rhs_matcher);
300Matcher<Node*> IsInt32Mul(const Matcher<Node*>& lhs_matcher,
301 const Matcher<Node*>& rhs_matcher);
302Matcher<Node*> IsInt32MulHigh(const Matcher<Node*>& lhs_matcher,
303 const Matcher<Node*>& rhs_matcher);
304Matcher<Node*> IsInt32LessThan(const Matcher<Node*>& lhs_matcher,
305 const Matcher<Node*>& rhs_matcher);
306Matcher<Node*> IsUint32LessThan(const Matcher<Node*>& lhs_matcher,
307 const Matcher<Node*>& rhs_matcher);
308Matcher<Node*> IsUint32LessThanOrEqual(const Matcher<Node*>& lhs_matcher,
309 const Matcher<Node*>& rhs_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000310Matcher<Node*> IsInt64Add(const Matcher<Node*>& lhs_matcher,
311 const Matcher<Node*>& rhs_matcher);
312Matcher<Node*> IsInt64Sub(const Matcher<Node*>& lhs_matcher,
313 const Matcher<Node*>& rhs_matcher);
314Matcher<Node*> IsJSAdd(const Matcher<Node*>& lhs_matcher,
315 const Matcher<Node*>& rhs_matcher);
Ben Murdochc5610432016-08-08 18:44:38 +0100316Matcher<Node*> IsTruncateFloat64ToWord32(const Matcher<Node*>& input_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400317Matcher<Node*> IsChangeFloat64ToInt32(const Matcher<Node*>& input_matcher);
318Matcher<Node*> IsChangeFloat64ToUint32(const Matcher<Node*>& input_matcher);
319Matcher<Node*> IsChangeInt32ToFloat64(const Matcher<Node*>& input_matcher);
320Matcher<Node*> IsChangeInt32ToInt64(const Matcher<Node*>& input_matcher);
321Matcher<Node*> IsChangeUint32ToFloat64(const Matcher<Node*>& input_matcher);
322Matcher<Node*> IsChangeUint32ToUint64(const Matcher<Node*>& input_matcher);
323Matcher<Node*> IsTruncateFloat64ToFloat32(const Matcher<Node*>& input_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400324Matcher<Node*> IsTruncateInt64ToInt32(const Matcher<Node*>& input_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000325Matcher<Node*> IsFloat32Max(const Matcher<Node*>& lhs_matcher,
326 const Matcher<Node*>& rhs_matcher);
327Matcher<Node*> IsFloat32Min(const Matcher<Node*>& lhs_matcher,
328 const Matcher<Node*>& rhs_matcher);
329Matcher<Node*> IsFloat32Abs(const Matcher<Node*>& input_matcher);
330Matcher<Node*> IsFloat32Equal(const Matcher<Node*>& lhs_matcher,
331 const Matcher<Node*>& rhs_matcher);
332Matcher<Node*> IsFloat32LessThan(const Matcher<Node*>& lhs_matcher,
333 const Matcher<Node*>& rhs_matcher);
334Matcher<Node*> IsFloat32LessThanOrEqual(const Matcher<Node*>& lhs_matcher,
335 const Matcher<Node*>& rhs_matcher);
336Matcher<Node*> IsFloat64Max(const Matcher<Node*>& lhs_matcher,
337 const Matcher<Node*>& rhs_matcher);
338Matcher<Node*> IsFloat64Min(const Matcher<Node*>& lhs_matcher,
339 const Matcher<Node*>& rhs_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400340Matcher<Node*> IsFloat64Sub(const Matcher<Node*>& lhs_matcher,
341 const Matcher<Node*>& rhs_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000342Matcher<Node*> IsFloat64Abs(const Matcher<Node*>& input_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400343Matcher<Node*> IsFloat64Sqrt(const Matcher<Node*>& input_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000344Matcher<Node*> IsFloat64RoundDown(const Matcher<Node*>& input_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400345Matcher<Node*> IsFloat64RoundTruncate(const Matcher<Node*>& input_matcher);
346Matcher<Node*> IsFloat64RoundTiesAway(const Matcher<Node*>& input_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000347Matcher<Node*> IsFloat64ExtractLowWord32(const Matcher<Node*>& input_matcher);
348Matcher<Node*> IsFloat64ExtractHighWord32(const Matcher<Node*>& input_matcher);
349Matcher<Node*> IsFloat64InsertLowWord32(const Matcher<Node*>& lhs_matcher,
350 const Matcher<Node*>& rhs_matcher);
351Matcher<Node*> IsFloat64InsertHighWord32(const Matcher<Node*>& lhs_matcher,
352 const Matcher<Node*>& rhs_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400353Matcher<Node*> IsToNumber(const Matcher<Node*>& base_matcher,
354 const Matcher<Node*>& context_matcher,
355 const Matcher<Node*>& effect_matcher,
356 const Matcher<Node*>& control_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000357Matcher<Node*> IsLoadContext(const Matcher<ContextAccess>& access_matcher,
358 const Matcher<Node*>& context_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400359Matcher<Node*> IsNumberToInt32(const Matcher<Node*>& input_matcher);
360Matcher<Node*> IsNumberToUint32(const Matcher<Node*>& input_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000361Matcher<Node*> IsParameter(const Matcher<int> index_matcher);
362Matcher<Node*> IsLoadFramePointer();
Ben Murdochc5610432016-08-08 18:44:38 +0100363Matcher<Node*> IsLoadParentFramePointer();
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400364
Ben Murdochda12d292016-06-02 14:46:10 +0100365Matcher<Node*> IsInt32PairAdd(const Matcher<Node*>& a_matcher,
366 const Matcher<Node*>& b_matcher,
367 const Matcher<Node*>& c_matcher,
368 const Matcher<Node*>& d_matcher);
369Matcher<Node*> IsInt32PairSub(const Matcher<Node*>& a_matcher,
370 const Matcher<Node*>& b_matcher,
371 const Matcher<Node*>& c_matcher,
372 const Matcher<Node*>& d_matcher);
373Matcher<Node*> IsInt32PairMul(const Matcher<Node*>& a_matcher,
374 const Matcher<Node*>& b_matcher,
375 const Matcher<Node*>& c_matcher,
376 const Matcher<Node*>& d_matcher);
377
378Matcher<Node*> IsWord32PairShl(const Matcher<Node*>& lhs_matcher,
379 const Matcher<Node*>& mid_matcher,
380 const Matcher<Node*>& rhs_matcher);
381Matcher<Node*> IsWord32PairShr(const Matcher<Node*>& lhs_matcher,
382 const Matcher<Node*>& mid_matcher,
383 const Matcher<Node*>& rhs_matcher);
384
385Matcher<Node*> IsWord32PairSar(const Matcher<Node*>& lhs_matcher,
386 const Matcher<Node*>& mid_matcher,
387 const Matcher<Node*>& rhs_matcher);
388
389Matcher<Node*> IsStackSlot();
Ben Murdochc5610432016-08-08 18:44:38 +0100390Matcher<Node*> IsTypeGuard(const Matcher<Type*>& type_matcher,
391 const Matcher<Node*>& value_matcher,
392 const Matcher<Node*>& control_matcher);
Ben Murdochda12d292016-06-02 14:46:10 +0100393
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400394} // namespace compiler
395} // namespace internal
396} // namespace v8
397
398#endif // V8_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_