[PATCH] D155708: [AArch64][NFC] Call the API getVScaleRange directly

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 24 05:52:32 PDT 2023


sdesmalen accepted this revision.
sdesmalen added a comment.
This revision is now accepted and ready to land.

In D155708#4518310 <https://reviews.llvm.org/D155708#4518310>, @Allen wrote:

> In D155708#4517477 <https://reviews.llvm.org/D155708#4517477>, @dmgreen wrote:
>
>> I like the cleanup. getVScaleRange can fail, returning an empty range. Would this handle those cases too?
>
> Use the maximum 64 for BitWidth of getVScaleRange to avoid returning an empty range.

It seems `getSingleElement()` returns `nullptr` when:

- The range is empty
- The range is invalid
- The maximum < minimum (e.g. for a range of `vscale_range(1, 0)`).

So I think the change is fine, regardless of the bitwidth.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155708/new/

https://reviews.llvm.org/D155708



More information about the llvm-commits mailing list