Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLVM lacks host-independent folding for floating-point library routines #8565

Open
sunfishcode opened this issue Sep 20, 2010 · 2 comments
Open
Labels
bugzilla Issues migrated from bugzilla floating-point Floating-point math

Comments

@sunfishcode
Copy link
Member

Bugzilla Link 8193
Version trunk
OS All
CC @majnemer

Extended Description

LLVM does constant folding for library routines such as sin, cos, etc. using the host libm. This means its results can vary across hosts, and it means that optimization (which could lead to a particular call being folded, or not) can affect program behavior.

@llvmbot
Copy link
Collaborator

llvmbot commented Sep 21, 2010

I think this is what gcc uses MPFR for.

@llvmbot
Copy link
Collaborator

llvmbot commented May 17, 2013

The constant folding is in llvm::ConstantFoldCall in lib/Analysis/ConstantFolding.cpp.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
@arsenm arsenm added the floating-point Floating-point math label Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla floating-point Floating-point math
Projects
None yet
Development

No branches or pull requests

3 participants