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: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 30 Nov 2012 01:31:25 +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
--- Comment #7 from Marc Glisse <glisse at gcc dot gnu.org> 2012-11-30 01:31:25 UTC ---
Created attachment 28832
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28832
simplify-rtx patch
With the patch, this code takes a single instruction. However, if I replace 'a'
with 1., it doesn't work (paradoxical subreg of mem...). I also see in the
combine dump some weird things like:
Failed to match this instruction:
(set (reg:V2DF 66 [ D.2211 ])
(zero_extend:V2DF (mem/u/c:DF (symbol_ref/u:DI ("*.LC0") [flags 0x2]) [2 S8
A64])))
typedef double vec __attribute__((vector_size(16)));
vec f(vec x,double a)
{
x[0] -= a;
return x;
}