This is an archive of the discontinued LLVM Phabricator instance.

[SVE] Make VectorType::getNumElements() complain for scalable vectors
ClosedPublic

Authored by ctetreau on Apr 21 2020, 10:41 AM.

Details

Summary

Piggy-back off of TypeSize's STRICT_FIXED_SIZE_VECTORS flag and:

  • if it is defined, assert that the vector is not scalable
  • if it is not defined, complain if the vector is scalable

Diff Detail

Event Timeline

ctetreau created this revision.Apr 21 2020, 10:41 AM
Herald added a project: Restricted Project. · View Herald Transcript
This revision is now accepted and ready to land.Apr 21 2020, 12:46 PM
ctetreau updated this revision to Diff 259615.Apr 23 2020, 9:46 AM

fix broken tests

This revision was automatically updated to reflect the committed changes.
nikic added a subscriber: nikic.Apr 23 2020, 1:47 PM
nikic added inline comments.
llvm/include/llvm/IR/DerivedTypes.h
421

Tiny style nit: This line seems unnecessary, as EC is already a member of VectorType.