[PATCH] D122678: [RISCV] Add support for vp.fptosi where the result is a mask type.

Roger Ferrer Ibanez via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 30 23:46:43 PDT 2022


rogfer01 added a comment.

In D122678#3416853 <https://reviews.llvm.org/D122678#3416853>, @craig.topper wrote:

> In D122678#3416821 <https://reviews.llvm.org/D122678#3416821>, @rogfer01 wrote:
>
>> I must be missing something very obvious: wouldn't `2.0` round to `2` and then give us `i1 0` because its LSB is 0?
>
> 2.0 is out of range for the integer so it is UB and produces poison.

Ah right! Thanks. I'd say to remove the extra masking, checking other targets don't seem to bother.

Just curious why you chose a narrowing conversion rather than a regular one, perhaps you want to reduce the register pressure for the result or the expectation is that it'll be faster?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122678



More information about the llvm-commits mailing list