I'm wondering what do vector types like i64x2 lower to, and whether they'd be useful to represent fat pointer types. The way I've been thinking about vector types is that they're meant to be used for SIMD operations? So I'm not sure if that'd be a good idea.
I wouldn't recommend using them for fat pointers. Extracting and inserting lanes of a vector type requires moving between integer and vector registers, which is relatively slowly. Also doing operations on only a single part requires extracting a lane, doing the operation and inserting it into the vector again.
Right, that's what I was thinking. If they are always lowered to use vector registers (when they're available) then they're not a good fit :sweat_smile:
They are always lowered to vector registers. If no vector registers are available, backends will crash when you try to use them. (should probably return an error instead. we already have the Unsupported variant in CodegenError for this purpose anyway)
Last updated: Dec 23 2024 at 13:07 UTC