[Bug c++/59845] New: loop optimization problem when profiling

2014-01-16 Thread arshamidi at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: arshamidi at gmail dot com I'm using g++ with GCC 4.8.1; when I use fprofile-generate too optimize my code, it actually slows down the process time: (constant folding problem within loop?) int main(){ int n;

[Bug c++/59845] loop optimization problem when profiling

2014-01-16 Thread arshamidi at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59845 --- Comment #1 from ArshaGCC --- I found that only when I use very high vales for input the problem persists. for example when using 123456 as input for profiling it generates incorrect code but when using 12345 as input the correct code will be g

[Bug c++/59845] loop optimization problem when profiling

2014-01-17 Thread arshamidi at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59845 --- Comment #3 from ArshaGCC --- I further analyzed and found an interesting issue: The optimizer bug (profile optimizer) occurs when input > 32768. When input is less than or equal to 32768 (2^15) it always generate the correct optimized code.

[Bug c++/59845] loop optimization problem when profiling

2015-02-15 Thread arshamidi at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59845 ArshaGCC changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---