[llvm] [SimplifyLibCalls] Constant fold scalbxx (PR #114417)

via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 8 08:27:46 PST 2024


================
@@ -2621,6 +2623,21 @@ static Constant *ConstantFoldLibCall2(StringRef Name, Type *Ty,
   switch (Func) {
   default:
     break;
+  case LibFunc_ldexp:
+  case LibFunc_ldexpf:
+  case LibFunc_ldexpl:
+  case LibFunc_scalbn:
+  case LibFunc_scalbnf:
+  case LibFunc_scalbnl:
+  case LibFunc_scalbln:
+  case LibFunc_scalblnf:
+  case LibFunc_scalblnl:
+    if (TLI->has(Func)) {
+      APFloat ret =
+          llvm::scalbn(Op1V, Op2V.convertToDouble(), RoundingMode::TowardZero);
----------------
fawdlstty wrote:

Sorry, please excuse my rudeness. Can you take any time to give me some guidance?

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


More information about the llvm-commits mailing list