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:24:08 +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 #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.