Modified scalable vector types weren't correctly returned at link-time.
The previous behaviour was a FixedVectorType was constructed
when expecting a ScalableVectorType. This commit has added a regression
test which re-creates the failure as well as a fix.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Hi @nasherm thanks for working on this fix.
llvm/lib/Linker/IRMover.cpp | ||
---|---|---|
300–303 | These can both use the same interface to VectorType, e.g.: case Type::ScalableVectorTyID: case Type::FixedVectorTyID: return *Entry = VectorType::get(ElementTypes[0], cast<VectorType>(Ty)->getElementCount()); | |
llvm/test/Linker/fixed-vector-type-construction.ll | ||
1 ↗ | (On Diff #324607) | I don't think this one needs a RUN line if you move this file to llvm/test/Linker/Inputs/ |
llvm/test/Linker/sve-type-construction.ll | ||
1 ↗ | (On Diff #324607) | Can you replace sve with scalable-vector (also in the filenames)? The test isn't necessarily specific to SVE. |
1 ↗ | (On Diff #324607) | This can use %s directly. |
Comment Actions
In response to Sander's comments.
- changed indentation of *.ll files to be in line with 2 space rule
- use %s interpolation in scalable-vector-type-construction.ll
These can both use the same interface to VectorType, e.g.: