[llvm] [InstCombine] Remove redundant fptrunc of select fold (NFCI) (PR #117182)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 25 23:21:19 PST 2024


dtcxzyw wrote:

> @dtcxzyw But do we really want to merge this despite the regression?

This pattern looks weird and should be caused by an unexpected upcasting. I believe it is easy to be fixed in the source code with the help of linters.

BTW, before fixing the regression, we should fold `fptrunc max/min(fpext(X), fpext(Y))` first: https://alive2.llvm.org/ce/z/WtxWAM. It is enough for some applications pursuing the floating point performance.

So I agree that we just leave it alone.




https://github.com/llvm/llvm-project/pull/117182


More information about the llvm-commits mailing list