[Bug rtl-optimization/46279] cmov not hoisted out of the loop
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46279 --- Comment #1 from Andrew Pinski 2010-11-02 21:31:03 UTC --- Try -O3. -O3 enables -funswitch-loops which does this.
[Bug rtl-optimization/46279] cmov not hoisted out of the loop
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46279 --- Comment #2 from Andrew Pinski 2010-11-02 21:33:18 UTC --- Though -O3 generates much larger code. What needs to be done is that one thing really: if (j < k) a[i] = 1; else a[i] = j; Needs to be transformed into: if (j < k) tmp = 1; else tmp = j; a[i] = tmp; And then it should work correctly. I think there is already a bug about that.
[Bug rtl-optimization/46279] cmov not hoisted out of the loop
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46279 --- Comment #3 from davidxl 2010-11-02 21:33:37 UTC --- Hoisting cmov out of the loop is more efficient ( I tried O3 before filing the bug). David On Tue, Nov 2, 2010 at 2:31 PM, pinskia at gcc dot gnu.org < gcc-bugzi...@gcc.gnu.org> wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46279 > > --- Comment #1 from Andrew Pinski 2010-11-02 > 21:31:03 UTC --- > Try -O3. -O3 enables -funswitch-loops which does this. > > -- > Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email > --- You are receiving this mail because: --- > You are on the CC list for the bug. >
[Bug rtl-optimization/46279] cmov not hoisted out of the loop
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46279 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #4 from Jakub Jelinek 2010-11-02 21:44:57 UTC --- PR46009 ?
[Bug rtl-optimization/46279] cmov not hoisted out of the loop
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46279 --- Comment #5 from Andrew Pinski 2010-11-02 21:46:18 UTC --- (In reply to comment #4) > PR46009 ? That one and I thought there was one more but of course I cannot find it.
[Bug rtl-optimization/46279] cmov not hoisted out of the loop
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46279 Richard Guenther changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2010.11.03 10:58:33 Ever Confirmed|0 |1 --- Comment #6 from Richard Guenther 2010-11-03 10:58:33 UTC --- Store sinking.
[Bug rtl-optimization/46279] cmov not hoisted out of the loop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46279 Bug 46279 depends on bug 89430, which changed state. Bug 89430 Summary: A missing ifcvt optimization to generate csel https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89430 What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED
[Bug rtl-optimization/46279] cmov not hoisted out of the loop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46279 Andrew Pinski changed: What|Removed |Added Resolution|--- |FIXED Depends on||89430 Target Milestone|--- |8.0 Status|NEW |RESOLVED --- Comment #8 from Andrew Pinski --- Fixed for GCC 8, by one of the patches to tree-ssa-phiopt.c (cond_store_replacement). Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89430 [Bug 89430] A missing ifcvt optimization to generate csel
[Bug rtl-optimization/46279] cmov not hoisted out of the loop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46279 Andrew Pinski changed: What|Removed |Added Last reconfirmed|2010-11-03 10:58:33 |2018-4-22 --- Comment #7 from Andrew Pinski --- -O3 works correctly though.