Skip to content

Implement builtin bitwise intrinsics in SMT2 incremental decision pro…#8923

Draft
tautschnig wants to merge 1 commit intodiffblue:developfrom
tautschnig:fix-8055-smt2-incr-bitwise
Draft

Implement builtin bitwise intrinsics in SMT2 incremental decision pro…#8923
tautschnig wants to merge 1 commit intodiffblue:developfrom
tautschnig:fix-8055-smt2-incr-bitwise

Conversation

@tautschnig
Copy link
Copy Markdown
Collaborator

…cedure

  • Add support for __builtin_clzl (count leading zeros)
  • Add support for __builtin_ctz (count trailing zeros)
  • Add support for __builtin_ffs (find first set)
  • Add support for __builtin_popcount (population count)
  • Add support for __builtin_rotateleft* and rotate right (ID_rol, ID_ror)
  • Add support for bitreverse_exprt (bit reverse)
  • Add support for ID_bitnand (bitwise nand)

Implements conversion to SMT terms for each intrinsic with proper bit-vector operations.

Fixes: #8055

  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • White-space or formatting changes outside the feature-related changed lines are in commits of their own.

…cedure

- Add support for __builtin_clzl (count leading zeros)
- Add support for __builtin_ctz (count trailing zeros)
- Add support for __builtin_ffs (find first set)
- Add support for __builtin_popcount (population count)
- Add support for __builtin_rotateleft* and rotate right (ID_rol, ID_ror)
- Add support for bitreverse_exprt (bit reverse)
- Add support for ID_bitnand (bitwise nand)

Implements conversion to SMT terms for each intrinsic with proper bit-vector operations.

Fixes: diffblue#8055
@tautschnig tautschnig self-assigned this Mar 28, 2026
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.

There are builtin bit wise intrinsics which are not yet implemented for incremental smt2 decision procedure

1 participant