-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Support AP integers in the code generator #1642
Comments
Some additional notes:
|
The code generator already has partial support for i128 as well. Supporting arbitrary width integers should be done the same way we support arbitrary width vectors: As usual with legalize, it can turn the operations into open-coded instructions or into libcalls. We -Chris |
Are you saying you want a new MVT::Integer type that represents an arbitrary |
yes, that is what I'm saying. It gets stored in the operand list, and we use special opcodes, just like |
Dan is working on this, at least for 128-bit integers. Supporting arbitrary strange sizes is probably blocked on LegalizeDAGTypes being finished. |
This is basically done, except for >64 bit constants (which is what Dan |
Support for >64 bit constants in codegen is done. |
This is done now that LegalizeTypes has landed. |
mentioned in issue llvm/llvm-bugzilla-archive#1462 |
Extended Description
Currently, the various targets only handle arbitrary precision integers of
discrete byte sizes (1, 2, 4, 8 bytes). However, the LLVM IR can now handle
integer bit widths from 1 bit to 8 million bits. In cases where the integer bit
size doesn't match the discrete byte size of a "known" integer, the common code
generator will generate an assertion because the integer size doesn't map to
something the machine recognizes.
This problem needs to be fixed because:
a) it prevents codegen for programs with "funny" bit sizes.
b) it prevents bit-size optimizations from working. For example, a bit size
minimization pass might be able to determine that an i32 value really only
needs 14 bits. It would thus fit into an i16 instead of an i32. However the
pass would generate i14 which would cause the common code gen to assert.
The text was updated successfully, but these errors were encountered: