[PATCH] D91675: [PowerPC][FP128] Fix the incorrect signature for math library call
Qing Shan Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 26 18:04:37 PST 2020
steven.zhang added inline comments.
================
Comment at: llvm/lib/CodeGen/TargetLoweringBase.cpp:150
setLibcallName(RTLIB::FPTOSINT_F128_I64, "__fixkfdi");
+ setLibcallName(RTLIB::FPTOSINT_F128_I128, "__fixkfti");
setLibcallName(RTLIB::FPTOUINT_F128_I32, "__fixunskfsi");
----------------
qiucf wrote:
> I see in `llvm/include/llvm/IR/RuntimeLibcalls.def`:
>
> ```
> HANDLE_LIBCALL(FPTOSINT_F128_I128, "__fixtfti")
> HANDLE_LIBCALL(FPTOSINT_PPCF128_I128, "__fixtfti")
> ```
>
> So only PPC uses KF instead of TF for IEEE f128?
>
> And it seems compiler-rt doesn't have impl for `__fixkfti` now.
Yes. See the comments in this code.
> // For IEEE quad-precision libcall names, PPC uses "kf" instead of "tf".
Though the compiler-rt didn't have the implementation now, we still need to fix it.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1308
setLibcallName(RTLIB::REM_F128, "fmodf128");
+ setLibcallName(RTLIB::SQRT_F128, "__sqrtieee128");
+ setLibcallName(RTLIB::CEIL_F128, "__ceilieee128");
----------------
qiucf wrote:
> Do we need to unify those names - `*f128` or `__*ieee128`?
Good suggestion. Though the ieee128 version works, we should use f128 to align with old name convention.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1314
+ setLibcallName(RTLIB::LROUND_F128, "__lroundieee128");
+ setLibcallName(RTLIB::LLROUND_F128, "__lroundieee128");
+ setLibcallName(RTLIB::RINT_F128, "__rintieee128");
----------------
qiucf wrote:
> Should be `__llroundieee128`
oops, typo.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91675/new/
https://reviews.llvm.org/D91675
More information about the llvm-commits
mailing list