This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/30105] missed PRE (add)



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-12-07 18:18 -------
Actually this is a PRE opertunity.
if we look into .102t.final_cleanup, we notice we did the load PRE:
<L2>:;
  prephitmp.32 = *data;
  prephitmp.38 = *(data + 12B);
  i = 1;
  goto <bb 5> (<L1>);

<L0>:;
  *((int *) ((unsigned int) *(data + 8B) * 4) + data) = 2;
  prephitmp.32 = *data;
  prephitmp.38 = *(data + 12B);
  i = prephitmp.32 + 1 + prephitmp.38;

<L1>:;
  *(data + 16B) = prephitmp.38 + prephitmp.32;

but did not do the other part of the pre for the add.
I think this is a reassiocation issue:
<L0>:
  ...
  j_15 = D.1620_12 + 1;
  i_16 = j_15 + D.1622_14;

  # prephitmp.32_37 = PHI <pretmp.31_36(5), D.1622_14(3)>;
  # prephitmp.32_35 = PHI <pretmp.31_34(5), D.1620_12(3)>;
  # prephitmp.30_33 = PHI <pretmp.29_32(5), D.1621_13(3)>;
  # i_1 = PHI <1(5), i_16(3)>;
<L1>:;
....
  D.1620_18 = prephitmp.32_35;
  D.1621_19 = prephitmp.30_33;
  D.1622_20 = prephitmp.32_37;
  D.1624_21 = D.1622_20 + D.1620_18;


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|missed code hoisting        |missed PRE (add)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]