[llvm] [SimplifyLibCalls] Constant fold scalbxx (PR #114417)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 5 11:27:08 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);
----------------
arsenm wrote:
There should be no conversion, this code is dead
https://github.com/llvm/llvm-project/pull/114417
More information about the llvm-commits
mailing list