pixel_aot: v_cvt_i32_f64 and v_cvt_u32_f64 on a provable input domain? (scope question) #1492
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#1492
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@JB2WIN on GitHub · 2026-11-24 12:52 UTC · original
tools/pixel_aot.pynow converts into binary64 (#1363, #1446; scope closed in #1325). This asks about the next slice, conversions out of binary64:v_cvt_i32_f64andv_cvt_u32_f64, again restricted to a provable input domain.What the translator would track. It would record where each binary64 pair it lowered came from:
v_cvt_f64_i32v_cvt_i32_f64returns the original word exactlyv_cvt_f64_u32v_cvt_u32_f64returns the original word exactlyv_cvt_f64_f32with known bits (#1446)What would be refused:
v_cvt_f64_u32pair converted to i32 or av_cvt_f64_i32pair converted to u32, because the result depends on saturation;clamp,omod, modifiers other than LLVM 15's printed forms, DPP and SDWA.The test would round-trip the endpoint rows from #1363 (
INT_MIN,INT_MAX,UINT_MAX, around 2^24) bit for bit. Fractional known values would cover truncation (±1.5, ±0.75 and the largest normal below 2^31). The negative controls would be a cross case, an out-of-range known value and a pair overwritten between the two conversions.v_cvt_f32_f64would stay out for now, because it rounds. It could follow later under the same provenance rule. If you'd rather leave out-conversions until the saturation rules are established, tell me.AI-assisted (Claude Code).
@R0Y00 on GitHub · 2026-11-24 13:22 UTC · original
The restricted slice can proceed. Track both words of the binary64 pair through copies and control flow. At a join, keep provenance only when every reachable path establishes the same supported domain. Keep the same-signedness round trips and known finite values whose truncated result fits the destination. Add a one-half clobber or divergent join control. Leave cross-signedness, unsupported modifiers, and special or out-of-range values for separately measured behavior.