I would like to propose adding a bitcast operation to the Vector dialect. The semantic would match LLVM bitcast operation. This allows casting vectors like in this example:
bitcast … vector<4xi8> to vector<1xi32>
This would be useful for cases where we don’t want to bitcast the memref (for instance SPIR-V doesn’t allow pointer cast) but we want to be able to load/store data with a larger type and break it up.
This op could go either in Vector dialect or in Standard dialect if we want to also allow bitcast between scalars of same sizes.