[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
Thu Apr 10 13:20:22 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.
Do you mean the instruction fptrunc can has "fast" flag now?
%res = fptrunc **fast** <2 x double> %src to <2 x half>
How to check the instruction has the "fast" flag?
Flags.hasApproximateFuncs() is not working when we have the "fast" Thanks
https://github.com/llvm/llvm-project/pull/134738
More information about the llvm-commits
mailing list