public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/24333]  New: missed div optimizations?
@ 2005-10-12 15:39 pluto at agmk dot net
  2005-12-30 18:33 ` [Bug tree-optimization/24333] missed div optimizations pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: pluto at agmk dot net @ 2005-10-12 15:39 UTC (permalink / raw)
  To: gcc-bugs

unsigned foo(const unsigned x) {  return (x / x); }
double bar(const double x) { return (x / x); }

$ gcc -Wall -O2 -mregparm=3 -fomit-frame-pointer tmp.c -S

foo:    xorl    %edx, %edx
        divl    %eax
        ret

bar:    fldl    4(%esp)
        fdiv    %st(0), %st
        ret

I think optimizer should return 1 for both cases.


-- 
           Summary: missed div optimizations?
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pluto at agmk dot net
 GCC build triplet: i686-pld-linux
  GCC host triplet: i686-pld-linux
GCC target triplet: i686-pld-linux


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


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

end of thread, other threads:[~2021-09-02  0:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-24333-4@http.gcc.gnu.org/bugzilla/>
2011-06-22 21:57 ` [Bug tree-optimization/24333] missed div optimizations pluto at agmk dot net
2021-09-02  0:24 ` gabravier at gmail dot com
2005-10-12 15:39 [Bug tree-optimization/24333] New: missed div optimizations? pluto at agmk dot net
2005-12-30 18:33 ` [Bug tree-optimization/24333] missed div optimizations pinskia at gcc dot gnu dot org
2006-04-08  1:41 ` pinskia at gcc dot gnu dot org
2007-03-19  9:15 ` pluto at agmk dot net

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).