HomePhabricator

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

Authored by ctetreau on Apr 23 2020, 9:52 AM.

Description

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

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

Reviewers: efriedma, sdesmalen, c-rhodes

Reviewed By: sdesmalen

Subscribers: hiraditya, mgorny, tschuett, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D78576