This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
This patch adds folding of builtin logb, ilogb and significand when they are supplied with constant args. I also mark significand as nonnegative when it's argument is nonnegative.
Tested on sparc-sun-solaris2.10, no regressions.
Okay for mainline?
thanks, Richard.
Thanks, --Kaveh
2007-02-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* builtins.c (fold_builtin_logb, fold_builtin_significand): New. (fold_builtin_1): Use them. * fold-const.c (tree_expr_nonnegative_warnv_p): Handle BUILT_IN_SIGNIFICAND.
testsuite: * gcc.dg/torture/builtin-logb-1.c: New test. * gcc.dg/torture/builtin-math-2.c: Test logb/ilogb. * gcc.dg/torture/builtin-nonneg-1.c: Test significand.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |