Open
Description
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.