[Bug rtl-optimization/53916] [mips16] divide operation compiled result incorrect with GCC-4.6.3 '-O2' option
anmin_deng at yahoo dot com.tw
gcc-bugzilla@gcc.gnu.org
Fri Jul 13 11:41:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53916
--- Comment #1 from anmin_deng at yahoo dot com.tw 2012-07-13 11:41:37 UTC ---
I recently tried the very same configurations and codes and tests with
GCC-4.7.1. It seems that the generated disassemble by GCC-4.7.1 is OK (I have
not yet checked very closely to confirm).
However, the generated results by GCC-4.7.1 with '-O2' and '-Os' are not very
optimal compared to the results by GCC-4.6.3 with '-Os'. The generated code by
GCC-4.6.3 with '-Os' runs 'divu' instruction once (per loop) and using HI and
LO registers resulted from the same 'divu' as remainder and quotient. The
generated code by GCC-4.7.1 runs 'divu' instruction twice, one 'divu' for HI
(remainder) and the other 'divu' for LO (quotient).
More information about the Gcc-bugs
mailing list