public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/35357] Loop peeling not happening
       [not found] <bug-35357-4@http.gcc.gnu.org/bugzilla/>
@ 2012-10-26 16:56 ` xinliangli at gmail dot com
  2022-12-19 21:06 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: xinliangli at gmail dot com @ 2012-10-26 16:56 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35357

--- Comment #2 from davidxl <xinliangli at gmail dot com> 2012-10-26 16:55:48 UTC ---
(In reply to comment #1)
> What is the expected optimization and what is its benefit?

Should be transformed into the following the simplified loop body.
void foo(int n)
{
      int i;

      if (n > 0) {
       for ( i = 0; i < n; i++)
        {
           b[i*2] = a[3*i+1];
           b[i*2] +=1; 
        }
        b[i*2] = a[3*i + 1];
      }
}

Icc at O2 distributes the loop body:

     for ( i = 0; i <= n; i++)
      {
           b[i*2] = a[3*i+1]; 
      }
    for ( i = 0; i < n; i++)
      {
           b[i*2] += 1; 
      }


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

* [Bug tree-optimization/35357] Loop peeling not happening
       [not found] <bug-35357-4@http.gcc.gnu.org/bugzilla/>
  2012-10-26 16:56 ` [Bug tree-optimization/35357] Loop peeling not happening xinliangli at gmail dot com
@ 2022-12-19 21:06 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-19 21:06 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |8.0
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Yes this was fixed for GCC 8.

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

* [Bug tree-optimization/35357] Loop peeling not happening
  2008-02-25  5:02 [Bug middle-end/35357] New: " xinliangli at gmail dot com
@ 2008-02-25 11:49 ` rguenth at gcc dot gnu dot org
  0 siblings, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-02-25 11:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2008-02-25 11:48 -------
What is the expected optimization and what is its benefit?


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rakdver at gcc dot gnu dot
                   |                            |org
           Severity|normal                      |enhancement
          Component|middle-end                  |tree-optimization
           Keywords|                            |missed-optimization
            Version|unknown                     |4.3.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35357


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

end of thread, other threads:[~2022-12-19 21:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-35357-4@http.gcc.gnu.org/bugzilla/>
2012-10-26 16:56 ` [Bug tree-optimization/35357] Loop peeling not happening xinliangli at gmail dot com
2022-12-19 21:06 ` pinskia at gcc dot gnu.org
2008-02-25  5:02 [Bug middle-end/35357] New: " xinliangli at gmail dot com
2008-02-25 11:49 ` [Bug tree-optimization/35357] " rguenth 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).