public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/57994] New: Constant folding of infinity
@ 2013-07-26 15:13 glisse at gcc dot gnu.org
  2013-07-26 15:16 ` [Bug tree-optimization/57994] " paolo.carlini at oracle dot com
                   ` (27 more replies)
  0 siblings, 28 replies; 29+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-07-26 15:13 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57994

            Bug ID: 57994
           Summary: Constant folding of infinity
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: glisse at gcc dot gnu.org

double f(){
  return __builtin_exp(-__builtin_huge_val());
}

As noticed in PR57974, we fail to fold this to a constant. Indeed, in
do_mpfr_arg1, the relevant code is protected by if (real_isfinite (ra) ...

mpfr handles infinite values, so it should be doable, at least with -ffast-math
(there might be some errno issues with default options).


^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2015-06-26 21:20 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-26 15:13 [Bug tree-optimization/57994] New: Constant folding of infinity glisse at gcc dot gnu.org
2013-07-26 15:16 ` [Bug tree-optimization/57994] " paolo.carlini at oracle dot com
2013-07-26 21:53 ` joseph at codesourcery dot com
2013-07-27  0:15 ` paolo.carlini at oracle dot com
2013-07-27 19:53 ` paolo.carlini at oracle dot com
2013-07-27 20:10 ` joseph at codesourcery dot com
2013-07-27 20:10 ` glisse at gcc dot gnu.org
2013-07-27 20:26 ` paolo.carlini at oracle dot com
2013-07-27 20:31 ` glisse at gcc dot gnu.org
2013-07-27 20:46 ` paolo.carlini at oracle dot com
2013-07-28 16:38 ` joseph at codesourcery dot com
2013-07-28 17:40 ` vincent-gcc at vinc17 dot net
2013-08-01 20:55 ` vincent-gcc at vinc17 dot net
2013-08-02 23:23 ` paolo.carlini at oracle dot com
2013-08-27 17:34 ` vincent-gcc at vinc17 dot net
2013-10-24 12:27 ` paolo.carlini at oracle dot com
2013-10-24 12:35 ` paolo.carlini at oracle dot com
2013-10-24 12:40 ` paolo.carlini at oracle dot com
2013-10-24 13:01 ` paolo.carlini at oracle dot com
2013-10-24 13:08 ` paolo.carlini at oracle dot com
2013-10-24 15:29 ` vincent-gcc at vinc17 dot net
2013-10-24 15:42 ` vincent-gcc at vinc17 dot net
2013-10-24 15:51 ` paolo.carlini at oracle dot com
2014-04-22 11:36 ` jakub at gcc dot gnu.org
2014-07-16 13:29 ` jakub at gcc dot gnu.org
2014-10-30 10:43 ` jakub at gcc dot gnu.org
2015-06-26 20:07 ` jakub at gcc dot gnu.org
2015-06-26 20:35 ` jakub at gcc dot gnu.org
2015-06-26 21:20 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).