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/49959] ABS pattern is not recognized


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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-21 08:03:40 UTC ---
If we had a pass which was able to convert:
<bb 3>:
  iftmp.0_6 = (long unsigned int) D.1708_4;
  goto <bb 5>;

<bb 4>:
  D.1712_8 = -D.1708_4;
  iftmp.0_9 = (long unsigned int) D.1712_8;

<bb 5>:
  # iftmp.0_1 = PHI <iftmp.0_6(3), iftmp.0_9(4)>

Into:

<bb 3>:
  goto <bb 5>;

<bb 4>:
  D.1712_8 = -D.1708_4;

<bb 5>:
  # t_N = PHI<D.1708_4(3), D.1712_8(4)>
  iftmp.0_1 = (long unsigned int)t_n;

And then PHIOPT would recognize it.  So this is really the code commoning.


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