[llvm] [ConstantFold] Fold `logb` and `logbf` when the input parameter is a constant value. (PR #111232)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 7 00:08:54 PDT 2024


================
@@ -1676,9 +1676,9 @@ bool llvm::canConstantFoldCallTo(const CallBase *Call, const Function *F) {
            Name == "floor" || Name == "floorf" ||
            Name == "fmod" || Name == "fmodf";
   case 'l':
-    return Name == "log" || Name == "logf" || Name == "log2" ||
-           Name == "log2f" || Name == "log10" || Name == "log10f" ||
-           Name == "logl";
+    return Name == "log" || Name == "logf" || Name == "logl" ||
+           Name == "log2" || Name == "log2f" || Name == "log10" ||
+           Name == "log10f" || Name == "logb" || Name == "logbf";
----------------
arsenm wrote:

What about logbl? 

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


More information about the llvm-commits mailing list