mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-01 07:33:12 +08:00
An integer `+`, `-` or `*` whose operands and result are proven within the uint32 range, and whose operand is a `>>>` result or arithmetic on one, such as `((i + j) * (i + j + 1) >>> 1) + i + 1`, is now 32-bit arithmetic without wrap, and its double converts from the 32 bits (`uitofp i32`). Vectorized, that conversion takes three instructions on x86-64 without AVX-512, where the 64-bit sum's unsigned conversion took six. Sums of counters and literals, such as `i + 1`, keep the 64-bit form, whose conversion LLVM folds with their uses as indexes.