[PATCH] D113543: [RISCV] Add inline expansion for vector ftrunc/fceil/ffloor.

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 11 09:48:47 PST 2021


jrtc27 added a comment.

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

> In D113543#3124895 <https://reviews.llvm.org/D113543#3124895>, @jrtc27 wrote:
>
>> In D113543#3124872 <https://reviews.llvm.org/D113543#3124872>, @craig.topper wrote:
>>
>>> I just tried to use alive2 with nsz to avoid caring about the sign of -0.0, but I'm getting a poison value where I don't think I should. https://alive2.llvm.org/ce/z/mtnitt
>>
>> Playing with https://alive2.llvm.org/ce/z/j8SJkv is giving really strange results. It thinks fptosi of -1.25 and -1.0 both give -1, and that -0.0 gives 0, but thinks -0.25 gives poison. That's surely wrong per the definition of fptosi? I could vaguely understand it if it also viewed -0.0 as giving poison, but it doesn't...
>
> @aqjune or @nlopes can you help with the alive2 behavior here?

It's also mishandling fptoui; (-1.0, -0.0] are all legal inputs despite being negative as the result is only poison if the truncated value can't be represented, but 0 can be (see footnote 50 of the C99 spec in 6.3.1.4 which explicitly calls this out), but it views even fptoui -0.0 as being poison, not 0.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113543



More information about the llvm-commits mailing list