Skip to content

I64ToI32Lowering: Document non-trapping float truncation behavior. NFC - #9022

Merged
sbc100 merged 1 commit into
mainfrom
i64-lowering-comments
Aug 19, 2026
Merged

I64ToI32Lowering: Document non-trapping float truncation behavior. NFC#9022
sbc100 merged 1 commit into
mainfrom
i64-lowering-comments

Conversation

@sbc100

@sbc100 sbc100 commented Aug 19, 2026

Copy link
Copy Markdown
Member

Document that I64ToI32Lowering is designed for the wasm2js pipeline and does not preserve strict WebAssembly trapping semantics for float-to-int conversions.

Also add comments in lowerTruncFloatToInt noting that the emitted 32-bit truncations are translated to JavaScript bitwise operations in wasm2js and thus do not trap on out-of-range values, NaN, or infinity.

See: #9017

@sbc100
sbc100 requested a review from a team as a code owner August 19, 2026 22:09
@sbc100
sbc100 requested review from tlively and removed request for a team August 19, 2026 22:09
@sbc100
sbc100 requested review from dschuff and kripken August 19, 2026 22:09
… (NFC)

Document that `I64ToI32Lowering` is designed for the `wasm2js`
pipeline and does not preserve strict WebAssembly trapping semantics
for float-to-int conversions.

Also add comments in `lowerTruncFloatToInt` noting that the emitted
32-bit truncations are translated to JavaScript bitwise operations in
`wasm2js` and thus do not trap on out-of-range values, NaN, or infinity.

See: #9017
@sbc100
sbc100 force-pushed the i64-lowering-comments branch from 343791a to de0d99f Compare August 19, 2026 22:18
@sbc100

sbc100 commented Aug 19, 2026

Copy link
Copy Markdown
Member Author

@kripken / @dschuff can you confirm that these comment updates are correct/accurate?

@sbc100
sbc100 merged commit 89a81ef into main Aug 19, 2026
16 checks passed
@sbc100
sbc100 deleted the i64-lowering-comments branch August 19, 2026 23:02
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.

3 participants