[Bug tree-optimization/24333] missed div optimizations
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24333 Gabriel Ravier changed: What|Removed |Added CC||gabravier at gmail dot com --- Comment #8 from Gabriel Ravier --- Seems to be fixed since GCC 7
[Bug tree-optimization/24333] missed div optimizations
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24333 --- Comment #7 from Pawel Sikora 2011-06-22 21:56:27 UTC --- 4.6 still affected: f: movl%edi, %edx movl%edi, %eax sarl$31, %edx idivl %edi ret
[Bug tree-optimization/24333] missed div optimizations
--- Comment #6 from pluto at agmk dot net 2007-03-19 09:15 --- `int f( int x ) { return x / x; }' still not optimized on 4.2/4.3 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24333
[Bug tree-optimization/24333] missed div optimizations
--- Comment #5 from pinskia at gcc dot gnu dot org 2006-04-08 01:41 --- x/x is done for fp now. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24333
[Bug tree-optimization/24333] missed div optimizations
--- Comment #4 from pinskia at gcc dot gnu dot org 2005-12-30 18:33 --- Confirmed. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords||missed-optimization Last reconfirmed|-00-00 00:00:00 |2005-12-30 18:33:47 date|| Summary|missed div optimizations? |missed div optimizations http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24333
[Bug tree-optimization/24333] missed div optimizations?
--- Comment #3 from pinskia at gcc dot gnu dot org 2005-10-12 16:04 --- (In reply to comment #2) > basing on the http://en.wikipedia.org/wiki/L'hospital we get: > > lim (x / x) = lim (x' / x') = lim (1 / 1) = 1 > x->0 x->0x->0 for float/float, we should get NANs with -ffast-math which assumes -ffinite-math, for long/long and unsigned/unsigned, we have this thing called undefinedness. BUT for java, 0/0 is defined to throw IIRC so we can only do that for signed/signed and with -fno-wrapv. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24333
[Bug tree-optimization/24333] missed div optimizations?
--- Comment #2 from pluto at agmk dot net 2005-10-12 15:57 --- basing on the http://en.wikipedia.org/wiki/L'hospital we get: lim (x / x) = lim (x' / x') = lim (1 / 1) = 1 x->0 x->0x->0 should we trap/check anything? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24333
[Bug tree-optimization/24333] missed div optimizations?
--- Comment #1 from pinskia at gcc dot gnu dot org 2005-10-12 15:42 --- (In reply to comment #0) This one, we have to deal with x = 0, what should we do, trap or not to trap. > unsigned foo(const unsigned x) { return (x / x); } For the following one: > double bar(const double x) { return (x / x); } Only with -ffast-math. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Severity|normal |enhancement http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24333