[llvm] [PowerPC] Support conversion between f16 and f128 (PR #97677)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 24 22:23:28 PDT 2024


EsmeYi wrote:

> For truncation, if you convert f128->f64->f16, you'll round twice, and therefore get the wrong result in some cases. You need to ensure you only round once.

Thanks Eli @efriedma-quic ! This is a great find. I just realized that the intermediate rounding during the stepwise conversion (f128->f64->f16) can produce a different result compared to the direct conversion (`f128->f16).

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


More information about the llvm-commits mailing list