[PATCH] D79116: [InstCombine] fold fpext into Xitofp
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 8 12:53:01 PDT 2020
spatel added a comment.
In D79116#2025707 <https://reviews.llvm.org/D79116#2025707>, @efriedma wrote:
> So the general idea here is centered around an "exact" cast: an sitofp that, for whatever reason, we know never rounds the result. This is sort of the same idea as InstCombiner::FoldItoFPtoI, except that it's using a different method to prove the exact-ness.
>
> Would it make sense to factor out the "IsExactIToFP" predicate into a separate method?
Sure, and that makes it possible to split this patch up. In the simplest case, we don't need the leading fptoi instruction (if the integer type is narrow enough, then the itofp may be known exact).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79116/new/
https://reviews.llvm.org/D79116
More information about the llvm-commits
mailing list