Skip to content

Add 128-bit integer support in tritonToLLVM #1410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: dev-v1.0
Choose a base branch
from

Conversation

raax7
Copy link

@raax7 raax7 commented Jul 1, 2025

Extended tritonToLLVM.cpp to support 128-bit integers.

  • Expanded BV_NODE to handle 128-bit bit-vectors
  • Added switch cases to argument type generation and BSWAP_NODE to select 128-bit integer types

@raax7
Copy link
Author

raax7 commented Jul 1, 2025

During testing, I discovered a bug caused by certain ASTs that Triton can emit, such as:
((_ extract 127 0) (concat ((_ extract 511 128) (_ bv0 512)) xmm0))
This caused an exception to be thrown since the code only handled BV_NODEs with bit-widths less than 64-bits, or exactly 128-bits.
The fix for this issue I implemented is simply to extend BV_NODEs to handle bit-widths up to 512-bits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants