Skip to content

Fuzzer: Emit SIMD lane load and store instructions - #9206

Open
tlively wants to merge 1 commit into
fuzzer-table-size-growfrom
fuzzer-simd-load-store-lane
Open

tlively wants to merge 1 commit into
fuzzer-table-size-growfrom
fuzzer-simd-load-store-lane

Conversation

@tlively

@tlively tlively commented Oct 3, 2026

Copy link
Copy Markdown
Member

Add makeSIMDLoadStoreLane and call it from _makenone, makeSIMD,
makeNonAtomicLoad, and makeNonAtomicStore. Also guard makeSIMDLoad with
allowMemory.

Add makeSIMDLoadStoreLane and call it from _makenone, makeSIMD,
makeNonAtomicLoad, and makeNonAtomicStore. Also guard makeSIMDLoad with
allowMemory.
@tlively
tlively requested a review from a team as a code owner October 3, 2026 18:43
@tlively
tlively requested review from kripken and removed request for a team October 3, 2026 18:43
if (type == Type::v128) {
assert(wasm.features.hasSIMD());
if (oneIn(2)) {
return makeSIMDLoadStoreLane(type);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is the main code path to that function not enough?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This function can already emit normal SIMD loads when type == Type::v128, so it seems reasonable to let it emit other kinds of SIMD loads as well.

I'm not tied to this, though. Putting SIMDLoadStoreLane only behind makeSIMD also seems reasonable. It will just make it much less likely to be generated, but I guess that's no different from any other SIMD instruction.

I'll make this change.

&Self::makeNop,
&Self::makeGlobalSet)
.add(FeatureSet::BulkMemory, &Self::makeBulkMemory)
.add(FeatureSet::SIMD, &Self::makeSIMDLoadStoreLane)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It looks like in general we put all SIMD instructions behind makeSIMD()?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants