This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/56766] Fails to combine (vec_select (vec_concat ...)) to (vec_merge ...)
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 12 Jun 2015 06:40:55 +0000
- Subject: [Bug rtl-optimization/56766] Fails to combine (vec_select (vec_concat ...)) to (vec_merge ...)
- Auto-submitted: auto-generated
- References: <bug-56766-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56766
--- Comment #24 from UroÅ Bizjak <ubizjak at gmail dot com> ---
(In reply to UroÅ Bizjak from comment #23)
> Testcases, compile with "-O2 -ftree-vectorize -mavx".
Richi, please note that tree-vectorizer doesn't vectorize bar_v2df, at least
there is no VEC_PERM_EXPR in the .optimized dump:
void bar_v2df (double * __restrict__ p, double * __restrict q)
{
p[0] = p[0] - q[0];
p[1] = p[1] + q[1];
}
Another question w.r.t. to foo_* testcases that use __builtin_shuffle:
v4sf foo_v4sf (v4sf x, v4sf y)
{
v4sf tem0 = x - y;
v4sf tem1 = x + y;
return __builtin_shuffle (tem0, tem1, (v4si) { 0, 5, 2, 7 });
}
is functionaly equivalent to:
v4sf foo_v4sf (v4sf x, v4sf y)
{
v4sf tem0 = x + y;
v4sf tem1 = x - y;
return __builtin_shuffle (tem0, tem1, (v4si) { 4, 1, 6, 3 });
}
But the later construct isn't simplified. Should we declare canonical form as
the one with "element 0 from the first operand"?