public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug middle-end/17958] expand_divmod fails to optimize division of 64-bit quantity by small constant when BITS_PER_WORD is 32 [not found] <bug-17958-4@http.gcc.gnu.org/bugzilla/> @ 2012-06-12 20:52 ` pinskia at gcc dot gnu.org 2021-05-04 12:32 ` rguenth at gcc dot gnu.org 2021-08-15 12:14 ` pinskia at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu.org @ 2012-06-12 20:52 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17958 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|roger at eyesopen dot com |dtemirbulatov at gmail dot | |com --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-06-12 20:52:43 UTC --- http://gcc.gnu.org/ml/gcc-patches/2012-06/msg00450.html ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/17958] expand_divmod fails to optimize division of 64-bit quantity by small constant when BITS_PER_WORD is 32 [not found] <bug-17958-4@http.gcc.gnu.org/bugzilla/> 2012-06-12 20:52 ` [Bug middle-end/17958] expand_divmod fails to optimize division of 64-bit quantity by small constant when BITS_PER_WORD is 32 pinskia at gcc dot gnu.org @ 2021-05-04 12:32 ` rguenth at gcc dot gnu.org 2021-08-15 12:14 ` pinskia at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: rguenth at gcc dot gnu.org @ 2021-05-04 12:32 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=17958 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/17958] expand_divmod fails to optimize division of 64-bit quantity by small constant when BITS_PER_WORD is 32 [not found] <bug-17958-4@http.gcc.gnu.org/bugzilla/> 2012-06-12 20:52 ` [Bug middle-end/17958] expand_divmod fails to optimize division of 64-bit quantity by small constant when BITS_PER_WORD is 32 pinskia at gcc dot gnu.org 2021-05-04 12:32 ` rguenth at gcc dot gnu.org @ 2021-08-15 12:14 ` pinskia at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu.org @ 2021-08-15 12:14 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=17958 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Target Milestone|--- |11.0 Status|ASSIGNED |RESOLVED --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Implemented by r11-5533, r11-5614 (PPC improvement), and r11-5648. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug rtl-optimization/17958] New: expand_divmod fails to optimize division of 64-bit quantity by small constant when BITS_PER_WORD is 32 @ 2004-10-12 22:48 zack at gcc dot gnu dot org 2004-10-12 22:55 ` [Bug middle-end/17958] " pinskia at gcc dot gnu dot org 0 siblings, 1 reply; 4+ messages in thread From: zack at gcc dot gnu dot org @ 2004-10-12 22:48 UTC (permalink / raw) To: gcc-bugs expand_divmod cannot optimize code such as long long div10(long long n) { return n / 10; } when BITS_PER_WORD is 32. A call to __divdi3 gets generated. By contrast, when BITS_PER_WORD is 64, this is optimized to a multiply and a shift. I noticed this problem on powerpc32, but it ought to affect any 32-bit target. -- Summary: expand_divmod fails to optimize division of 64-bit quantity by small constant when BITS_PER_WORD is 32 Product: gcc Version: 4.0.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P2 Component: rtl-optimization AssignedTo: roger at eyesopen dot com ReportedBy: zack at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org GCC target triplet: powerpc-*-* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17958 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/17958] expand_divmod fails to optimize division of 64-bit quantity by small constant when BITS_PER_WORD is 32 2004-10-12 22:48 [Bug rtl-optimization/17958] New: " zack at gcc dot gnu dot org @ 2004-10-12 22:55 ` pinskia at gcc dot gnu dot org 0 siblings, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu dot org @ 2004-10-12 22:55 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-12 22:55 ------- not all constants though (power of 2 are fine) for an example 16: mr r12,r3 srawi r11,r3,31 srawi r9,r11,31 srawi r10,r11,31 srwi r10,r9,28 li r9,0 addc r12,r10,r4 adde r11,r9,r3 srwi r4,r12,4 insrwi r4,r11,4,0 srawi r3,r11,4 Confirmed. -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Component|rtl-optimization |middle-end Ever Confirmed| |1 Last reconfirmed|0000-00-00 00:00:00 |2004-10-12 22:55:35 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17958 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-15 12:14 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <bug-17958-4@http.gcc.gnu.org/bugzilla/> 2012-06-12 20:52 ` [Bug middle-end/17958] expand_divmod fails to optimize division of 64-bit quantity by small constant when BITS_PER_WORD is 32 pinskia at gcc dot gnu.org 2021-05-04 12:32 ` rguenth at gcc dot gnu.org 2021-08-15 12:14 ` pinskia at gcc dot gnu.org 2004-10-12 22:48 [Bug rtl-optimization/17958] New: " zack at gcc dot gnu dot org 2004-10-12 22:55 ` [Bug middle-end/17958] " pinskia at gcc dot gnu dot 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).