[PATCH] D91675: [PowerPC][FP128] Fix the incorrect signature for math library call

Qiu Chaofan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 19 23:28:28 PST 2020


qiucf 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");
----------------
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.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1308
   setLibcallName(RTLIB::REM_F128, "fmodf128");
+  setLibcallName(RTLIB::SQRT_F128, "__sqrtieee128");
+  setLibcallName(RTLIB::CEIL_F128, "__ceilieee128");
----------------
Do we need to unify those names - `*f128` or `__*ieee128`?


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1314
+  setLibcallName(RTLIB::LROUND_F128, "__lroundieee128");
+  setLibcallName(RTLIB::LLROUND_F128, "__lroundieee128");
+  setLibcallName(RTLIB::RINT_F128, "__rintieee128");
----------------
Should be `__llroundieee128`


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1317
+  setLibcallName(RTLIB::LRINT_F128, "__lrintieee128");
+  setLibcallName(RTLIB::LLRINT_F128, "__lrintieee128");
+  setLibcallName(RTLIB::NEARBYINT_F128, "__nearbyintieee128");
----------------
Also, `__llrintieee128`.


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