[llvm] AMDGPU: Make v2f64 -> v2f16 conversion Legal only when unsafe fast math is set (PR #134738)

Changpeng Fang via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 11 00:04:09 PDT 2025


changpeng wrote:

> > I understand your proposal to avoid use of global options. But here we need to be consistent. Options.UnsafeFPMath has been used in all other places to expand/lower f64->f16. We should not use a different approach only here.
> 
> This is because traditionally the FP casts did not have fast math flags. They do now, and we should migrate to only using them.

On SelectDAG path, FP_ROUND still does not have fast math flags. I still think adding fast math flags for FP_ROUND is beyond the work of this patch. (We also need to propagate the flags when we do transformation like splitting the vector).

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


More information about the llvm-commits mailing list