diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-09 21:56:35 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-09 21:56:35 +0000 |
commit | 198d9bbee87d11cad4547476146f84d5495c0260 (patch) | |
tree | b165cf0028ec1a832fc59f34df44d639c9c318a2 /libjava/java/math | |
parent | d1001cc93ca3fc8a93e1048911c52dab4a56d6da (diff) | |
download | ppe42-gcc-198d9bbee87d11cad4547476146f84d5495c0260.tar.gz ppe42-gcc-198d9bbee87d11cad4547476146f84d5495c0260.zip |
* fold-const.c (fold_strip_sign_ops): New function to simplify a
floating point expression ignoring the sign of the result.
(fold) <ABS_EXPR>: Use it to simplify fabs(x).
(fold) <MULT_EXPR>: Use it to simplify x*x.
* tree.h (fold_strip_sign_ops): Prototype here.
* builtins.c (fold_builtin_copysign): Take an additional FNDECL
argument. Use fold_strip_sign_ops to simplify the first argument.
(fold_builtin_pow): Use fold_strip_sign_ops to simplify the
first argument when the second argument is an even integer
constant, but only with -funsafe_math_optimizations.
(fold_builtin_1): Update call to fold_builtin_copysign.
* gcc.dg/builtins-48.c: New test case.
* gcc.dg/builtins-49.c: New test case.
* gcc.dg/builtins-50.c: New test case.
* gcc.dg/builtins-51.c: New test case.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94779 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/math')
0 files changed, 0 insertions, 0 deletions