[llvm] Constant Fold Logf128 calls (PR #84501)
Matthew Devereau via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 28 10:23:56 PDT 2024
================
@@ -2209,6 +2209,11 @@ static Constant *ConstantFoldScalarCall1(StringRef Name,
switch (IntrinsicID) {
default: break;
case Intrinsic::log:
+#if defined(__FLOAT128__) && defined(HAS_LOGF128)
+ if (Ty->isFP128Ty()) {
+ return ConstantFP::get(Ty, logf128(APF.convertToQuad()));
+ }
+#endif
return ConstantFoldFP(log, APF, Ty);
----------------
MDevereau wrote:
Ah I see what you mean now, thanks for clarifying. I've rearranged this to stop any fall-through happening
https://github.com/llvm/llvm-project/pull/84501
More information about the llvm-commits
mailing list