This is an archive of the discontinued LLVM Phabricator instance.

[SVE] Fix incorrect assert in getDoubleElementsVectorType()
AbandonedPublic

Authored by david-arm on Apr 29 2020, 7:25 AM.

Details

Summary

In VectorType::getDoubleElementsVectorType we were asserting that
we could fit double the number of elements in an integer, however
the code was incorrectly using getVectorNumElements() for scalable
vectors. I've changed the code to use the element count instead.

Diff Detail

Event Timeline

david-arm created this revision.Apr 29 2020, 7:25 AM

Do we have test coverage here?

david-arm added a comment.EditedApr 30 2020, 1:34 AM

Hi @efriedma, I discovered this assert was generating warnings (due to getVectorNumElements call) whilst running some SVE intrinsics tests, i.e.

llvm-lit -a ../llvm/test/CodeGen/AArch64/sve-intrinsics-*.ll

so we do have existing test coverage. I found it difficult to know how to test this because I haven't really modified the code path.

I fixed this already in D78831

david-arm abandoned this revision.Apr 30 2020, 8:35 AM

This fix has been committed already by https://reviews.llvm.org/D78831