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 rtl-optimization/56766] Fails to combine (vec_select (vec_concat ...)) to (vec_merge ...)


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"?

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