Skip to content

Implementation of easy intrinsics#1083

Open
mariaKt wants to merge 10 commits into
masterfrom
mk/easy-intrinsics
Open

Implementation of easy intrinsics#1083
mariaKt wants to merge 10 commits into
masterfrom
mk/easy-intrinsics

Conversation

@mariaKt
Copy link
Copy Markdown
Collaborator

@mariaKt mariaKt commented May 8, 2026

This PR implements a few intrinsics that we identified missing from running the ui test suite.

Skip lists

  • Sorted the skip list for consistent ordering
  • Separated skip lists per backend (renamed skip.txt -> skip-prove.txt, added skip-exec.txt), since the two backends can have different pass/fail sets.
  • Updated skip lists based on full runs of all 2,888 stable-mir-ui tests:
    • Haskell backend (skip-prove.txt): 1,159 pass, 1,729 fail
    • LLVM backend (skip-exec.txt): 1,164 pass, 1,724 fail
  • Added test-stable-mir-ui-exec Makefile target for LLVM UI tests (renamed existing target to test-stable-mir-ui-prove)
  • Enabled --update-skip for the LLVM test suite (test_stable_mir_ui_exec.py)
  • Removed 2 tests that now pass on both backends after the intrinsic fixes below

New intrinsics

  • assert_zero_valid — no-op, same as assert_inhabited (2 previously failing tests)
  • rotate_left — bitwise left rotation using #rotateLeftInt helper (2 previously failing tests)
  • bswap — byte swap using Int2Bytes/Bytes2Int endianness conversion (1 previously failing test)
  • ctpop — population count using recursive #popcount helper (1 previously failing test)
  • ctlz_nonzero — count leading zeros using #log2floor helper (1 previously failing test)

Of the 7 tests previously stuck on these intrinsics, 2 now pass end-to-end on both backends:

  • rfcs/rfc-2294-if-let-guard/run-pass.rs (was stuck on rotate_left)
  • consts/const-endianess.rs (was stuck on bswap)

The other 5 progress past the intrinsic but hit further issues.

@mariaKt mariaKt force-pushed the mk/easy-intrinsics branch from 8910fb5 to 1958f72 Compare May 22, 2026 03:13
@mariaKt mariaKt requested a review from dkcumming May 22, 2026 14:12
@mariaKt mariaKt marked this pull request as ready for review May 22, 2026 14:12
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.

1 participant