[Bug tree-optimization/54855] Unnecessary duplication when performing scalar operation on vector element

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Oct 8 14:19:00 GMT 2012


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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-10-08
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-10-08 14:19:27 UTC ---
Confirmed.  Does not work for + though, as -0.0 + 0.0 is 0.0.  At least
if I remember the signed-zero mess correctly ;)

On the tree level we see in-memory v because of the component modification:

  _7 = BIT_FIELD_REF <v, 64, 0>;
  _8 = _7 - 1.0e+0;
  BIT_FIELD_REF <v, 64, 0> = _8;
  v.0_10 = v;
  v.1_11 = v.0_10 * { 2.0e+0, 2.0e+0 };
  v = v.1_11;

so either lowering this differently in the first place or detecting
this kind of pattern would fix it.

Similar trick may be used for multiplication and division.



More information about the Gcc-bugs mailing list