[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 12:25:36 PDT 2021


efriedma added a comment.

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

> In D105994#2890694 <https://reviews.llvm.org/D105994#2890694>, @efriedma wrote:
>
>>> 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.
>
> What problem would that solve?

It would allow folding "trunc vscale".  And it might be a little simpler to understand.  Either way, not a big deal. :)


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