llvm/llvm-project

scalbln(x, n), scalbn(x, n), ldexp(x, n) are not folded at the compilation time when (x, n) is constant

Open

#112,631 创建于 2024年10月16日

在 GitHub 查看
 (8 评论) (0 反应) (2 负责人)C++ (10,782 fork)batch import
floating-pointgood first issuellvm:optimizationsmissed-optimization

仓库指标

Star
 (26,378 star)
PR 合并指标
 (平均合并 1天 2小时) (30 天内合并 1,000 个 PR)

描述

Consider the following example. https://godbolt.org/z/54xsG8WTr

#include <cmath>

double f1() {
  return std::scalbln(3.0, 4);
}

double f2() {
  return std::scalbn(3.0, 4);
}

double f3() {
  return std::ldexp(3.0, 4);
}

贡献者指南