[webkit-reviews] review granted: [Bug 228675] Add new patterns to instruction selector to utilize AND/EOR/ORR-with-shift supported by ARM64 : [Attachment 434806] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Aug 2 18:55:22 PDT 2021
Saam Barati <sbarati at apple.com> has granted Yijia Huang
<yijia_huang at apple.com>'s request for review:
Bug 228675: Add new patterns to instruction selector to utilize
AND/EOR/ORR-with-shift supported by ARM64
https://bugs.webkit.org/show_bug.cgi?id=228675
Attachment 434806: Patch
https://bugs.webkit.org/attachment.cgi?id=434806&action=review
--- Comment #8 from Saam Barati <sbarati at apple.com> ---
Comment on attachment 434806
--> https://bugs.webkit.org/attachment.cgi?id=434806
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=434806&action=review
Nice. r=me
> Source/JavaScriptCore/b3/B3LowerToAir.cpp:2550
> + auto tryAppendBitOpWithShift = [&] (Value* left, Value* right,
Air::Opcode opcode) -> bool {
> + if (!isValidForm(opcode, Arg::Tmp, Arg::Tmp, Arg::Imm,
Arg::Tmp))
> + return false;
> + if (!canBeInternal(right) || !imm(right->child(1)) ||
right->child(1)->asInt() < 0)
> + return false;
> +
> + uint64_t amount = right->child(1)->asInt();
> + uint64_t datasize = m_value->type() == Int32 ? 32 : 64;
> + if (amount >= datasize)
> + return false;
> +
> + append(opcode, tmp(left), tmp(right->child(0)),
imm(right->child(1)), tmp(m_value));
> + commitInternal(right);
> + return true;
> + };
I think the way we normally do this is just by making it a member function.
More information about the webkit-reviews
mailing list