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 aperta il 16 ott 2024

Vedi su GitHub
 (8 commenti) (0 reazioni) (2 assegnatari)C++ (10.782 fork)batch import
floating-pointgood first issuellvm:optimizationsmissed-optimization

Metriche repository

Star
 (26.378 star)
Metriche merge PR
 (Merge medio 1g 2h) (1000 PR mergiate in 30 g)

Descrizione

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);
}

Guida contributor