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

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 30 12:53:35 PDT 2020


efriedma added a comment.

(Alive2 is happy with the transform; see http://volta.cs.utah.edu:8080/z/oR3wKj .)

> I did find it hard to get the fold conditions correct to avoid infinite loops in the AArch64 backend (which affected fp16 types),

Can you give an example here?

We probably need some code to avoid creating illegal SINT_TO_FP after legalization; that could lead to an infinite loop.  There are lots of examples in DAGCombine to follow that call isOperationLegal.


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