This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, middle-end]: Implement scalb optab.
- From: "Uros Bizjak" <ubizjak at gmail dot com>
- To: "GCC Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 19 Feb 2007 15:33:53 +0100
- Subject: [PATCH, middle-end]: Implement scalb optab.
Hello!
The patch itself is at
http://gcc.gnu.org/ml/gcc-patches/2007-02/msg01527.html (but has wrong
Subject: line).
2007-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
Uros Bizjak <ubizjak@gmail.com>
* optabs.h (enum optab_index): Add new OTI_scalb.
(scalb_optab): Define corresponding macro.
* optabs.c (init_optabs): Initialize scalb_optab.
* genopinit.c (optabs): Implement scalb_optab using scalb?f3
patterns.
* builtins.c (expand_builtin_mathfn_2, expand_builtin): Handle
BUILT_IN_SCALB{,F,L}, BUILT_IN_SCALBN{,F,L} and BUILT_IN_SCALBLN{,F,L}.
(expand_builtin): Expand BUILT_IN_SCALB{,F,L}, BUILT_IN_SCALBN{,F,L}
and BUILT_IN_SCALBLN{,F,L} using expand_builtin_mathfn_2 if
flag_unsafe_math_optimizations is set.
* config/i386/i386.md (scalbxf3, scalb<mode>3): New expanders
to implement scalbf, scalb and scalbl built-ins as inline x87
intrinsics.
testsuite/ChangeLog:
2007-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.dg/builtins-34.c: Add scalb/scalbn/scalbln cases.
Patch was regression tested on x86_64-pc-linux-gnu.
OK for mainline (patch needs approval from the middle-end maintainer)?
Uros.