Skip to content

floating-point operations have side effects #6422

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

Open
sunfishcode opened this issue Jan 15, 2010 · 6 comments
Open

floating-point operations have side effects #6422

sunfishcode opened this issue Jan 15, 2010 · 6 comments
Labels
bugzilla Issues migrated from bugzilla enhancement Improving things as opposed to bug fixing, e.g. new or missing feature

Comments

@sunfishcode
Copy link
Member

Bugzilla Link 6050
Version unspecified
OS All
CC @andykaylor,@chfast,@lattner,@DimitryAndric,@emaste,@thielema,@nlewycky,@rotateright,@vinc17fr,@yuanfang-chen,@ZviRackover

Extended Description

Floating-point instructions, such as add, sub, mul, and div, as well as math library functions in -fno-math-errno mode, are considered to have no side effects in LLVM. This is incorrect; they may set floating-point exception flags, and they may trap if the processor is configured to trap on floating-point exceptions.

As a consequence of this, these side effects may be reordered or eliminated by the optimizer and codegen.

@sunfishcode
Copy link
Member Author

*** Bug llvm/llvm-bugzilla-archive#6393 has been marked as a duplicate of this bug. ***

@efriedma-quic
Copy link
Collaborator

*** Bug llvm/llvm-bugzilla-archive#11904 has been marked as a duplicate of this bug. ***

@llvmbot
Copy link
Member

llvmbot commented May 14, 2015

*** Bug llvm/llvm-bugzilla-archive#23522 has been marked as a duplicate of this bug. ***

@majnemer
Copy link
Mannequin

majnemer mannequin commented Aug 3, 2015

*** Bug llvm/llvm-bugzilla-archive#23707 has been marked as a duplicate of this bug. ***

@DimitryAndric
Copy link
Collaborator

*** Bug llvm/llvm-bugzilla-archive#24343 has been marked as a duplicate of this bug. ***

@sunfishcode
Copy link
Member Author

mentioned in issue llvm/llvm-bugzilla-archive#6393

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
Michael137 pushed a commit to Michael137/llvm-project that referenced this issue Mar 10, 2023
Pass argument by reference to a void a use-after-free.
@Endilll Endilll added enhancement Improving things as opposed to bug fixing, e.g. new or missing feature and removed missing-feature labels Aug 15, 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 enhancement Improving things as opposed to bug fixing, e.g. new or missing feature
Projects
None yet
Development

No branches or pull requests

5 participants