[PATCH] D105994: [SVE] Add folds for sign and zero extends of vscale

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 20 08:58:17 PDT 2021


efriedma added a comment.

In D105994#2890403 <https://reviews.llvm.org/D105994#2890403>, @sdesmalen wrote:

> In D105994#2881236 <https://reviews.llvm.org/D105994#2881236>, @efriedma wrote:
>
>> I assume the max-vscale attribute will usually be present?  In that case, checking it seems best.
>>
>> (We might actually want to consider relaxing the LangRef rule; if we can easily determine whether the result fits into a given bitwidth, there isn't really any reason to make llvm.vscale return poison.)
>
> Just to make sure that I understand the suggestion, do you mean changing the wording in the LangRef that the result is `undefined` instead of `poison`? If so, does that mean we could replace `llvm.vscale.i8()` with `undef` if `max(vscale_range)` doesn't fit the `i8`?

My suggestion is that, for example, @llvm.vscale.i8() returns "vscale & 0xFF".  Not really sure if it's worthwhile, but it seems like an unnecessary source of poison.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105994



More information about the llvm-commits mailing list