User account creation filtered due to spam.

Bug 37240 - missed if-conversion opportunity
Summary: missed if-conversion opportunity
Status: RESOLVED DUPLICATE of bug 30521
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: missed-optimization
Depends on: 37239
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-26 11:37 UTC by Paolo Bonzini
Modified: 2008-10-04 20:09 UTC (History)
3 users (show)

See Also:
Host:
Target: x86_64-pc-linux-gnu
Build:
Known to work:
Known to fail: 4.4.0 4.2.3
Last reconfirmed:


Attachments
benchmark (3.85 KB, text/plain)
2008-08-26 11:39 UTC, Paolo Bonzini
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paolo Bonzini 2008-08-26 11:37:54 UTC
In the attached code, changing

        if (numbers[maxIdx] < numbers[maxIdx + 1]) maxIdx++; 

to

        maxIdx += numbers[maxIdx] < numbers[maxIdx + 1];

gives a 10% performance speedup at -O3.
Comment 1 Paolo Bonzini 2008-08-26 11:39:38 UTC
Created attachment 16149 [details]
benchmark

this is a modified version of the PR37239 testcase, with the optimization requested there performed manually.
Comment 2 Andrew Pinski 2008-08-26 20:46:52 UTC
I think this is a dup of bug 30521.
Comment 3 Paolo Bonzini 2008-08-27 04:40:03 UTC

*** This bug has been marked as a duplicate of 30521 ***