Lines Matching refs:ushr

54   bool ReplaceRotateWithRor(HBinaryOperation* op, HUShr* ushr, HShl* shl);
56 bool TryReplaceWithRotateConstantPattern(HBinaryOperation* op, HUShr* ushr, HShl* shl);
57 bool TryReplaceWithRotateRegisterNegPattern(HBinaryOperation* op, HUShr* ushr, HShl* shl);
58 bool TryReplaceWithRotateRegisterSubPattern(HBinaryOperation* op, HUShr* ushr, HShl* shl);
413 HUShr* ushr, in ReplaceRotateWithRor() argument
417 new (GetGraph()->GetAllocator()) HRor(ushr->GetType(), ushr->GetLeft(), ushr->GetRight()); in ReplaceRotateWithRor()
419 if (!ushr->HasUses()) { in ReplaceRotateWithRor()
420 ushr->GetBlock()->RemoveInstruction(ushr); in ReplaceRotateWithRor()
422 if (!ushr->GetRight()->HasUses()) { in ReplaceRotateWithRor()
423 ushr->GetRight()->GetBlock()->RemoveInstruction(ushr->GetRight()); in ReplaceRotateWithRor()
442 HUShr* ushr = left->IsUShr() ? left->AsUShr() : right->AsUShr(); in TryReplaceWithRotate() local
444 DCHECK(DataType::IsIntOrLongType(ushr->GetType())); in TryReplaceWithRotate()
445 if (ushr->GetType() == shl->GetType() && in TryReplaceWithRotate()
446 ushr->GetLeft() == shl->GetLeft()) { in TryReplaceWithRotate()
447 if (ushr->GetRight()->IsConstant() && shl->GetRight()->IsConstant()) { in TryReplaceWithRotate()
450 return TryReplaceWithRotateConstantPattern(op, ushr, shl); in TryReplaceWithRotate()
451 } else if (ushr->GetRight()->IsSub() || shl->GetRight()->IsSub()) { in TryReplaceWithRotate()
453 return TryReplaceWithRotateRegisterSubPattern(op, ushr, shl); in TryReplaceWithRotate()
454 } else if (ushr->GetRight()->IsNeg() || shl->GetRight()->IsNeg()) { in TryReplaceWithRotate()
456 return TryReplaceWithRotateRegisterNegPattern(op, ushr, shl); in TryReplaceWithRotate()
474 HUShr* ushr, in TryReplaceWithRotateConstantPattern() argument
477 size_t reg_bits = DataType::Size(ushr->GetType()) * kBitsPerByte; in TryReplaceWithRotateConstantPattern()
478 size_t rdist = Int64FromConstant(ushr->GetRight()->AsConstant()); in TryReplaceWithRotateConstantPattern()
481 ReplaceRotateWithRor(op, ushr, shl); in TryReplaceWithRotateConstantPattern()
504 HUShr* ushr, in TryReplaceWithRotateRegisterNegPattern() argument
507 DCHECK(ushr->GetRight()->IsNeg() || shl->GetRight()->IsNeg()); in TryReplaceWithRotateRegisterNegPattern()
509 HNeg* neg = neg_is_left ? shl->GetRight()->AsNeg() : ushr->GetRight()->AsNeg(); in TryReplaceWithRotateRegisterNegPattern()
511 if (neg->InputAt(0) == (neg_is_left ? ushr->GetRight() : shl->GetRight())) { in TryReplaceWithRotateRegisterNegPattern()
512 ReplaceRotateWithRor(op, ushr, shl); in TryReplaceWithRotateRegisterNegPattern()
534 HUShr* ushr, in TryReplaceWithRotateRegisterSubPattern() argument
537 DCHECK(ushr->GetRight()->IsSub() || shl->GetRight()->IsSub()); in TryReplaceWithRotateRegisterSubPattern()
538 size_t reg_bits = DataType::Size(ushr->GetType()) * kBitsPerByte; in TryReplaceWithRotateRegisterSubPattern()
540 HInstruction* ushr_shift = ushr->GetRight(); in TryReplaceWithRotateRegisterSubPattern()
543 return ReplaceRotateWithRor(op, ushr, shl); in TryReplaceWithRotateRegisterSubPattern()
1419 HUShr* ushr = new (GetGraph()->GetAllocator()) HUShr(instruction->GetType(), in VisitAnd() local
1423 instruction->GetBlock()->ReplaceAndRemoveInstructionWith(instruction, ushr); in VisitAnd()