Skip to content

x64: Optimize some lowerings using ptest#13462

Merged
alexcrichton merged 2 commits into
bytecodealliance:mainfrom
alexcrichton:x64-more-vptest
May 26, 2026
Merged

x64: Optimize some lowerings using ptest#13462
alexcrichton merged 2 commits into
bytecodealliance:mainfrom
alexcrichton:x64-more-vptest

Conversation

@alexcrichton
Copy link
Copy Markdown
Member

This commit handles a few more patterns that the ptest instruction can be used for on x64, notably when testing v128 values for equality. This additionally handles cases where v128.and'd values are used for a branch which is naturally handled by the ptest instruction, too.

Closes #13405

This commit handles a few more patterns that the `ptest` instruction can
be used for on x64, notably when testing `v128` values for equality.
This additionally handles cases where `v128.and`'d values are used for a
branch which is naturally handled by the `ptest` instruction, too.

Closes bytecodealliance#13405
@alexcrichton alexcrichton requested review from a team as code owners May 23, 2026 11:33
@alexcrichton alexcrichton requested review from fitzgen and removed request for a team May 23, 2026 11:33
@github-actions github-actions Bot added cranelift Issues related to the Cranelift code generator cranelift:area:x64 Issues related to x64 codegen labels May 23, 2026
Copy link
Copy Markdown
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@fitzgen fitzgen added this pull request to the merge queue May 26, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 26, 2026
@alexcrichton alexcrichton enabled auto-merge May 26, 2026 21:49
@alexcrichton alexcrichton added this pull request to the merge queue May 26, 2026
Merged via the queue into bytecodealliance:main with commit 1b9e6b3 May 26, 2026
54 checks passed
@alexcrichton alexcrichton deleted the x64-more-vptest branch May 26, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cranelift:area:x64 Issues related to x64 codegen cranelift Issues related to the Cranelift code generator

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compiler should detect equality/inequality comparisons for v128 in wasm and generate one VTEST instruction only

2 participants