public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/96336] New: Multiple multiplications fails to optimize
@ 2020-07-27 15:14 fazedo at gmail dot com
  2020-07-27 15:20 ` [Bug tree-optimization/96336] " fazedo at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: fazedo at gmail dot com @ 2020-07-27 15:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96336

            Bug ID: 96336
           Summary: Multiple multiplications fails to optimize
           Product: gcc
           Version: 9.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fazedo at gmail dot com
  Target Milestone: ---

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

* [Bug tree-optimization/96336] Multiple multiplications fails to optimize
  2020-07-27 15:14 [Bug tree-optimization/96336] New: Multiple multiplications fails to optimize fazedo at gmail dot com
@ 2020-07-27 15:20 ` fazedo at gmail dot com
  2020-07-28  5:59 ` [Bug tree-optimization/96336] Multiple multiplications fail " rguenth at gcc dot gnu.org
  2021-08-03 23:30 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: fazedo at gmail dot com @ 2020-07-27 15:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96336

--- Comment #1 from Fabio Azevedo <fazedo at gmail dot com> ---
int f(int x) {
  return x*x*x*x*x*x*x*x*x*x*x*x*x*x*x*x; //x**16 
} 

int g(int x) {
  return x*x*x*x*x*x*x*x*x*x*x*x*x*x*x*x + x*x; //x**16 + x**2
}


Using gcc -O3, the first function simplifies to 4 integer multiplications while
the second function requires 13.

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

* [Bug tree-optimization/96336] Multiple multiplications fail to optimize
  2020-07-27 15:14 [Bug tree-optimization/96336] New: Multiple multiplications fails to optimize fazedo at gmail dot com
  2020-07-27 15:20 ` [Bug tree-optimization/96336] " fazedo at gmail dot com
@ 2020-07-28  5:59 ` rguenth at gcc dot gnu.org
  2021-08-03 23:30 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-07-28  5:59 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96336

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
      Known to fail|                            |11.0
           Keywords|                            |missed-optimization
   Last reconfirmed|                            |2020-07-28
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
This only gets optimized on RTL, confirmed.  It doesn't get optimized on GIMPLE
because reassoc doesn't like signed integers.

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

* [Bug tree-optimization/96336] Multiple multiplications fail to optimize
  2020-07-27 15:14 [Bug tree-optimization/96336] New: Multiple multiplications fails to optimize fazedo at gmail dot com
  2020-07-27 15:20 ` [Bug tree-optimization/96336] " fazedo at gmail dot com
  2020-07-28  5:59 ` [Bug tree-optimization/96336] Multiple multiplications fail " rguenth at gcc dot gnu.org
@ 2021-08-03 23:30 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-03 23:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96336

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

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

end of thread, other threads:[~2021-08-03 23:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 15:14 [Bug tree-optimization/96336] New: Multiple multiplications fails to optimize fazedo at gmail dot com
2020-07-27 15:20 ` [Bug tree-optimization/96336] " fazedo at gmail dot com
2020-07-28  5:59 ` [Bug tree-optimization/96336] Multiple multiplications fail " rguenth at gcc dot gnu.org
2021-08-03 23:30 ` pinskia at gcc dot gnu.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).