Home | History | Annotate | Download | only in compiler

Lines Matching refs:Is

2 // Use of this source code is governed by a BSD-style license that can be
51 if (m.right().Is(0)) return Replace(m.right().node()); // x & 0 => 0
52 if (m.right().Is(-1)) return Replace(m.left().node()); // x & -1 => x
61 if (m.right().Is(0)) return Replace(m.left().node()); // x | 0 => x
62 if (m.right().Is(-1)) return Replace(m.right().node()); // x | -1 => -1
74 if (mrightright.left().Is(32) &&
84 mright.right().Is(32 - mleft.right().Value())) {
99 if (mleftright.left().Is(32) &&
109 mleft.right().Is(32 - mright.right().Value())) {
121 if (m.right().Is(0)) return Replace(m.left().node()); // x ^ 0 => x
130 if (m.right().Is(0)) return Replace(m.left().node()); // x << 0 => x
138 if (m.right().Is(0)) return Replace(m.left().node()); // x >>> 0 => x
146 if (m.right().Is(0)) return Replace(m.left().node()); // x >> 0 => x
154 if (m.right().Is(0)) return Replace(m.left().node()); // x ror 0 => x
166 if (m.left().IsInt32Sub() && m.right().Is(0)) { // x - y == 0 => x == y
178 if (m.right().Is(0)) return Replace(m.left().node()); // x + 0 => x
187 if (m.right().Is(0)) return Replace(m.left().node()); // x - 0 => x
197 if (m.right().Is(0)) return Replace(m.right().node()); // x * 0 => 0
198 if (m.right().Is(1)) return Replace(m.left().node()); // x * 1 => x
202 if (m.right().Is(-1)) { // x * -1 => 0 - x
217 if (m.right().Is(1)) return Replace(m.left().node()); // x / 1 => x
218 // TODO(turbofan): if (m.left().Is(0))
220 // TODO(turbofan): if (m.right().Is(0))
222 if (m.IsFoldable() && !m.right().Is(0)) { // K / K => K
223 if (m.right().Is(-1)) return ReplaceInt32(-m.left().Value());
226 if (m.right().Is(-1)) { // x / -1 => 0 - x
236 if (m.right().Is(1)) return Replace(m.left().node()); // x / 1 => x
237 // TODO(turbofan): if (m.left().Is(0))
238 // TODO(turbofan): if (m.right().Is(0))
240 if (m.IsFoldable() && !m.right().Is(0)) { // K / K => K
252 if (m.right().Is(1)) return ReplaceInt32(0); // x % 1 => 0
253 if (m.right().Is(-1)) return ReplaceInt32(0); // x % -1 => 0
254 // TODO(turbofan): if (m.left().Is(0))
256 // TODO(turbofan): if (m.right().Is(0))
258 if (m.IsFoldable() && !m.right().Is(0)) { // K % K => K
265 if (m.right().Is(1)) return ReplaceInt32(0); // x % 1 => 0
266 // TODO(turbofan): if (m.left().Is(0))
267 // TODO(turbofan): if (m.right().Is(0))
269 if (m.IsFoldable() && !m.right().Is(0)) { // K % K => K
284 if (m.left().IsInt32Sub() && m.right().Is(0)) { // x - y < 0 => x < y
290 if (m.left().Is(0) && m.right().IsInt32Sub()) { // 0 < x - y => y < x
304 if (m.left().IsInt32Sub() && m.right().Is(0)) { // x - y <= 0 => x <= y
310 if (m.left().Is(0) && m.right().IsInt32Sub()) { // 0 <= x - y => y <= x
321 if (m.left().Is(kMaxUInt32)) return ReplaceBool(false); // M < x => false
322 if (m.right().Is(0)) return ReplaceBool(false); // x < 0 => false
331 if (m.left().Is(0)) return ReplaceBool(true); // 0 <= x => true
332 if (m.right().Is(kMaxUInt32)) return ReplaceBool(true); // x <= M => true
355 if (m.right().Is(1)) return Replace(m.left().node()); // x * 1.0 => x
366 if (m.right().Is(1)) return Replace(m.left().node()); // x / 1.0 => x
464 if (m.right().Is(0)) {
478 if (m.right().Is(0)) {