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 geöffnet am 16. Okt. 2024

Auf GitHub ansehen
 (8 Kommentare) (0 Reaktionen) (2 zugewiesene Personen)C++ (10.782 Forks)batch import
floating-pointgood first issuellvm:optimizationsmissed-optimization

Repository-Metriken

Stars
 (26.378 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 1T 2h) (1.000 gemergte PRs in 30 T)

Beschreibung

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

Contributor Guide