https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24333
Gabriel Ravier changed:
What|Removed |Added
CC||gabravier at gmail dot com
--- Comment
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24333
--- Comment #7 from Pawel Sikora pluto at agmk dot net 2011-06-22 21:56:27
UTC ---
4.6 still affected:
f: movl%edi, %edx
movl%edi, %eax
sarl$31, %edx
idivl %edi
ret
--- 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
--- 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
--- 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
--- 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) {
--- 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?
--
--- 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