[Bug rtl-optimization/46279] cmov not hoisted out of the loop

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Nov 2 21:33:00 GMT 2010


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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 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.



More information about the Gcc-bugs mailing list