[PATCH] D134975: [SCCP] try to convert sitofp to uitofp
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 30 12:58:01 PDT 2022
spatel abandoned this revision.
spatel added a comment.
In D134975#3828062 <https://reviews.llvm.org/D134975#3828062>, @efriedma wrote:
> uitofp is significantly more expensive than sitofp on many targets. I'm not sure we want to do this if we're not confident we can reverse the transform.
Yes, this has potential to find transforms that SDAG can't recover since it's looking across blocks.
I don't have a real example where this comes into play; just noticed that we'd need an extra condition for signed cast with an fmul fold as in the example.
SDAG already tries to convert these in both directions after testing legality, so that's probably good enough. I'll put a code comment in SCCP and abandon this patch.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134975/new/
https://reviews.llvm.org/D134975
More information about the llvm-commits
mailing list