[PATCH] D38421: Eliminate ftrunc if source is know to be rounded
    Hal Finkel via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Sep 29 13:59:22 PDT 2017
    
    
  
hfinkel added a comment.
In https://reviews.llvm.org/D38421#884918, @rampitec wrote:
> In https://reviews.llvm.org/D38421#884908, @b-sumner wrote:
>
> > We could potentially update visitCEIL and visitFLOOR as well, and use the same opcode test in each, although I don't think such combinations are very likely.
>
>
> Right, that is possible but unlikely to happen. The current situation we have is due to the fact we have (fptosi (rint x)). I.e. we have rounded value but now we need to get integer from rounded float, and trunc is a part of that fptosi expansion.
Okay. That makes sense. Please add a comment noting that here (i.e. that trunc is part of the fpto[su]i expansions on some targets, so we're likely to generate this combination).
https://reviews.llvm.org/D38421
    
    
More information about the llvm-commits
mailing list