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 #21 from UroÅ Bizjak <ubizjak at gmail dot com> ---
(In reply to Richard Biener from comment #0)

> typedef double v2df __attribute__((vector_size(16)));
> typedef long long v2di __attribute__((vector_size(16)));
> v2df foo (v2df x, v2df y)
> {
>   v2df tem1 = x + y;
>   v2df tem2 = x - y;
>   return __builtin_shuffle (tem1, tem2, (v2di) { 0, 3 });
> }

This testcase is wrong, it doesn't describe addsubpd insn. Since the element 0
is at the left, the above describes

__builtin_shuffle ({ x0 + y0, x1 + y1 }, { x0 - y0, x1 - y1 }, { 0, 3 })

==>

{ x0 + y0, x1 - y1 }

addsubpd insn however does:

{ x0 - y0, x1 + y1 }

I will attach the testcase I'm using here, and updated patch.

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