[PATCH] D79187: [DAGCombiner] fold (fp_round (int_to_fp X)) -> (int_to_fp X)

Sam Elliott via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 1 17:18:00 PDT 2020


lenary added a comment.

In D79187#2015298 <https://reviews.llvm.org/D79187#2015298>, @efriedma wrote:

> From http://volta.cs.utah.edu:8080/z/d6wpw5:
>
>   ...
>   Source value: #x5d010400 (581034720674971648)
>   Target value: #x5d010401 (581034789394448384)
>


I *thought* something like this might pop up last time.

I'll defer to you over whether we move this check to `instcombine`. In the meantime, I'll reinstate the previous check (that the intermediate float can precisely represent the source int), and add `!LegalTypes || ` to the `hasOperation` check.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79187





More information about the llvm-commits mailing list