avanhatt opened issue #12716:
Feature
Currently, Clif terms like
iaddinclude type parameters in their ISLE declarations foropt, but not forlower. This makes it more difficult to provide a single specification for verification across both domains. From our previous discussions, this also seems more a result of the history of changes than a conscious design decision.Midend:
(iadd ty x y)Lower:
(iadd x y)Benefit
More unified implementation, easier to maintain specs, can write specs where the type is necessary, for example, vector lanes.
Implementation
Commit with change, PR to come: https://github.com/avanhatt/wasmtime/commit/650a4cc6d695d1958bfa7a1b4a690959191142af
Alternatives
The current implementation uses a script to automatically add
_for the type parameter to the many, many relevant rules in the backend. We could instead manually audit these to e.g. remove many instances ofhas_tythat could now be simplified, but that would be harder to automate.
bongjunj commented on issue #12716:
I think some mid-end rules are having similar issues. For example,
uremCLIF term in mid-end lacks type parameter, and this conflicts, if I recall correctly, conflicts with the arrival fork.
bongjunj edited a comment on issue #12716:
I think some mid-end rules are having similar issues. For example,
uremCLIF term in mid-end lacks type parameter, and this, if I recall correctly, conflicts with the arrival fork.
Last updated: Mar 23 2026 at 16:19 UTC