This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/54855] Unnecessary duplication when performing scalar operation on vector element
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 08 Oct 2012 14:19:27 +0000
- Subject: [Bug tree-optimization/54855] Unnecessary duplication when performing scalar operation on vector element
- Auto-submitted: auto-generated
- References: <bug-54855-4@http.gcc.gnu.org/bugzilla/>
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.