builtins.def (BUILT_IN_ICEIL{,F,L}, [...]): New builtin definitions.
authorUros Bizjak <ubizjak@gmail.com>
Fri, 12 Aug 2011 12:32:41 +0000 (14:32 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Fri, 12 Aug 2011 12:32:41 +0000 (14:32 +0200)
commit6c32ee74491f947dafdce3656c6ec9e48a185fdb
treecd499a40f57a9bb51448aec4aefe1d8a6decc748
parentd9fbc86e446fd574db0d79c3af8d0bd2b1cdc820
builtins.def (BUILT_IN_ICEIL{,F,L}, [...]): New builtin definitions.

* builtins.def (BUILT_IN_ICEIL{,F,L}, BUILT_IN_IFLOOR{,F,L}
BUILT_IN_IRINT{,F,L}, BUILT_IN_IROUND{,F,L}: New builtin definitions.
* convert.c (convert_to_integer): Convert to BUILT_IN_ICEIL,
BUILT_IN_IFLOOR, BUILT_IN_IRINT or BUILT_INT_IROUND when converting
to integer_type_node.
* fold-const.c (tree_call_nonnegative_warnv_p): Handle BUILT_IN_ICEIL,
BUILT_IN_IFLOOR, BUILT_IN_IRINT and BUILT_INT_IROUND.
* builtins.c (expand_builtin_in): Ditto.
(mathfn_built_in_1): Ditto.
(expand_builtin_int_roundingfn): Handle BUILT_IN_ICEIL and
BUILT_IN_IFLOOR.
(expand_builtin_int_roundingfn_2): Handle BUILT_IN_IRINT and
BUILT_IN_IROUND.
(fold_fixed_mathfn): Canonicalize BUILT_IN_ICEIL, BUILTIN_IN_IFLOOR
BUILT_IN_IRINT and BUILT_IN_IROUND to BUILT_IN_LCEIL,
BUILTIN_IN_LFLOOR, BUILT_IN_LRINT and BUILT_IN_LROUND on ILP32 targets.

testsuite/ChangeLog:

* gcc.dg/builtins-67.c: New test.
* gcc.target/i386/conversion.c: Ditto.

From-SVN: r177694
gcc/ChangeLog
gcc/builtins.c
gcc/builtins.def
gcc/convert.c
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/builtins-67.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/conversion.c [new file with mode: 0644]