Closed my4ng closed 1 month ago
It appears that a separate ScalableVectorType
is required to ensure type safety, rather than reusing VectorType
, to ensure fixed and scalable values do not mix in operations.
It has been tested against the workflow.
The ScalableVectorType/Value
are available across all versions; however, the scalable_vec_type
functions are gated by #[llvm_versions(12..)]
, therefore it is not possible to construct a type or value in version less than 12. The doctests in them are ignored since it fails without the aforementioned functions. The alternative approach of hiding the type and value in versions less than 12 is a lot more involved and thus not taken.
@TheDan64 sorry I have been away and forgot to fix a replace in the fixed vector type doc comments: https://github.com/TheDan64/inkwell/blob/8bd9f087c7fedd3897016568184aa8516d6a0abf/src/types/float_type.rs#L67-L80
Do you mind fixing it in master? Thanks!
@my4ng fix what exactly?
@TheDan64 It should be vector type rather than scalar vector type for the doc comment linked as it is the normal vec_type function.
Description
This adds scalable vector support through the new
ScalableVectorType
andScalableVectorValue
.Related Issue
541
How This Has Been Tested
Tests mirroring the fixed vector kind have been added for type, value and builder.
Checklist