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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 31 09:05:31 PDT 2024


================
@@ -3157,6 +3157,42 @@ Value *LibCallSimplifier::optimizeFdim(CallInst *CI, IRBuilderBase &B) {
   return ConstantFP::get(CI->getType(), MaxVal);
 }
 
+Value *LibCallSimplifier::optimizeScalbn(CallInst *CI, IRBuilderBase &B) {
+  Value *Base = CI->getArgOperand(0);
+  Value *Expo = CI->getArgOperand(1);
+  // Function *Callee = CI->getCalledFunction();
+  // StringRef Name = Callee->getName();
+  Type *Ty = CI->getType();
+  Module *M = CI->getModule();
+  // bool AllowApprox = CI->hasApproxFunc();
+  // bool Ignored;
----------------
arsenm wrote:

Commented out code

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


More information about the llvm-commits mailing list