[PATCH] D148599: ValueTrackng: Handle sign bit for fptrunc

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 18 03:42:45 PDT 2023


arsenm added a comment.

In D148599#4277139 <https://reviews.llvm.org/D148599#4277139>, @foad wrote:

> I feel like there are undocumented assumptions here.
>
> Does fptrunc +/- 0.0 preserve sign?

Yes

> Is Known.SignBit supposed to be accurate even for Nans? That seems unfortunate, since for a lot of operations you won't be able to propagate it unless you can prove something isn't Nan.

That’s the only reason you need it. Otherwise you can infer from the mask. I only expect it to be useful for the few signbit operations


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

https://reviews.llvm.org/D148599



More information about the llvm-commits mailing list