Skip to content

AArch64: Add MatchRules for bit field operations #1181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 24, 2019
Merged

AArch64: Add MatchRules for bit field operations #1181

merged 1 commit into from
May 24, 2019

Conversation

pfustc
Copy link
Contributor

@pfustc pfustc commented Apr 19, 2019

This patch adds match rules for AArch64 Unsigned Bit Field Extract
(UBFX) and Unsigned Bit Field Insert in Zero (UBFIZ) operations.

After this change, AArch64 instruction sequence like
lsr w0, w1, #5
and w0, w0, #0xff
could be replaced by
ubfx w0, w1, #5, #8

and instruction sequence like
and w0, w1, #0x3
lsl w0, w0, #16
could be replaced by
ubfiz w0, w1, #16, #2

This patch adds match rules for AArch64 Unsigned Bit Field Extract
(UBFX) and Unsigned Bit Field Insert in Zero (UBFIZ) operations.

After this change, AArch64 instruction sequence like
    lsr     w0, w1, #5
    and     w0, w0, #0xff
could be replaced by
    ubfx    w0, w1, #5, #8

and instruction sequence like
    and     w0, w1, #0x3
    lsl     w0, w0, #16
could be replaced by
    ubfiz   w0, w1, #16, #2
@pfustc
Copy link
Contributor Author

pfustc commented May 14, 2019

Hi there, anyone could help looking at this patch?

@adinn
Copy link
Collaborator

adinn commented May 14, 2019

Hi Pengfei,

This looks good to me but you'll need an Oracle reviewer to accept and push it. Perhaps Stefan Anziger (@sanzinger) can comment?

@sanzinger
Copy link
Contributor

Looks good to merge.

@sanzinger
Copy link
Contributor

Update: I am going to merge this PR today.

@graalvmbot graalvmbot merged commit a2bc557 into oracle:master May 24, 2019
@pfustc pfustc deleted the matchrule branch May 27, 2019 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants