Skip to content

x64: Fix a missing lowering rule for select_spectre_guard#11242

Merged
fitzgen merged 1 commit intobytecodealliance:mainfrom
alexcrichton:x64-fix-panic
Jul 15, 2025
Merged

x64: Fix a missing lowering rule for select_spectre_guard#11242
fitzgen merged 1 commit intobytecodealliance:mainfrom
alexcrichton:x64-fix-panic

Conversation

@alexcrichton
Copy link
Member

This commit fixes an accidental regression from #11097 where a select_spectre_guard with a boolean condition that and'd two CCs together would fail to lower and cause a panic during lowering. This was reachable when explicit bounds checks are enabled from wasm, for example. The fix here is to handle the And condition in the same way that lowering select does which is to model that as it flows into the select helper.

This commit fixes an accidental regression from bytecodealliance#11097 where a
`select_spectre_guard` with a boolean condition that and'd two CCs
together would fail to lower and cause a panic during lowering. This was
reachable when explicit bounds checks are enabled from wasm, for
example. The fix here is to handle the `And` condition in the same way
that lowering `select` does which is to model that as it flows into the
select helper.
@alexcrichton alexcrichton requested a review from a team as a code owner July 15, 2025 14:53
@alexcrichton alexcrichton requested review from fitzgen and removed request for a team July 15, 2025 14:53
@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator cranelift:area:x64 Issues related to x64 codegen labels Jul 15, 2025
@fitzgen fitzgen added this pull request to the merge queue Jul 15, 2025
Merged via the queue into bytecodealliance:main with commit 5d6590c Jul 15, 2025
54 checks passed
@alexcrichton alexcrichton deleted the x64-fix-panic branch July 15, 2025 17:52
alexcrichton added a commit to alexcrichton/wasmtime that referenced this pull request Jul 15, 2025
…liance#11242)

This commit fixes an accidental regression from bytecodealliance#11097 where a
`select_spectre_guard` with a boolean condition that and'd two CCs
together would fail to lower and cause a panic during lowering. This was
reachable when explicit bounds checks are enabled from wasm, for
example. The fix here is to handle the `And` condition in the same way
that lowering `select` does which is to model that as it flows into the
select helper.
alexcrichton added a commit that referenced this pull request Jul 22, 2025
…11248)

This commit fixes an accidental regression from #11097 where a
`select_spectre_guard` with a boolean condition that and'd two CCs
together would fail to lower and cause a panic during lowering. This was
reachable when explicit bounds checks are enabled from wasm, for
example. The fix here is to handle the `And` condition in the same way
that lowering `select` does which is to model that as it flows into the
select helper.
bongjunj pushed a commit to prosyslab/wasmtime that referenced this pull request Oct 20, 2025
…liance#11242)

This commit fixes an accidental regression from bytecodealliance#11097 where a
`select_spectre_guard` with a boolean condition that and'd two CCs
together would fail to lower and cause a panic during lowering. This was
reachable when explicit bounds checks are enabled from wasm, for
example. The fix here is to handle the `And` condition in the same way
that lowering `select` does which is to model that as it flows into the
select helper.
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.

2 participants