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

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 20 07:42:46 PDT 2021


sdesmalen added a comment.

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`?


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