I want to extend the cprop.isle
rules to cover i128
. But iconst.i128
isn't supported. Is it not possible to have i128
constants in CLIF?
iconst.i128
indeed doesn't exist right now. the way to create constants is to do two iconst.i64
s and then iconcat
, or if the high bits are just sign/zero bits, then iconst.i64
followed by an extend
there was talk in some issue, I forget which and don't have it on hand at the moment, about creating a const
ISLE helper to automatically do this if necessary, or else just use an iconst
when possible
We had an issue a while back about emitting the various constants from a single helper which would be really usefull to have, and would probably allow us to enable most of the integer optimizations again
yes, that one, thanks @Afonso Bordado
To add the reasoning here for completeness: we don't have iconst.i128
because InstructionData
is currently 16 bytes (128 bits) total, and that has to include the enum discriminant and opcode as well as the payload. We could just create a new enum variant with an i128
but the increased size would penalize compile time and memory usage by a measurable amount
There was talk last time this came up about creating a side-table; that's the route I'd suggest if anyone tackles this
or using the existing constant machinery for vconst
Hmm, I could try adding a side-table for i128
constants, but I'm not sure where to start
Last updated: Nov 22 2024 at 16:03 UTC