[llvm] [X86][NVPTX][LegalizeDAG] If i16 legal, legalize FABS/FNEG/FCOPYSIGN (f16) with Expand (PR #106153)

via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 28 10:48:49 PDT 2024


v01dXYZ wrote:

@arsenm If all targets with f16 have a valid i16, it would mean that the natural way to lower those ops is with a bitcast (unless there are native instructions for that of course). In this case, removing Promote is sound.

Concerning the case of an arch with f16 and without i16, we should instead use the smallest fitting integer type instead of promotion.

So yes, promote seems to be overkill for operations that could be implemented as bitwise ops after move back and forth to a GPR.

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


More information about the llvm-commits mailing list