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
Keywords: missed-optimization
Depends on: 37239
  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:
Target: x86_64-pc-linux-gnu
Known to work:
Known to fail: 4.4.0 4.2.3
Last reconfirmed:

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

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++; 


        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]

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 ***