This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/52607] v4df __builtin_shuffle with {0,2,1,3} or {1,3,0,2}
- From: "rth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 29 Mar 2012 13:36:23 +0000
- Subject: [Bug target/52607] v4df __builtin_shuffle with {0,2,1,3} or {1,3,0,2}
- Auto-submitted: auto-generated
- References: <bug-52607-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52607
Richard Henderson <rth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed|2012-03-20 00:00:00 |2012-03-29
Ever Confirmed|0 |1
--- Comment #23 from Richard Henderson <rth at gcc dot gnu.org> 2012-03-29 13:36:23 UTC ---
(In reply to comment #18)
+ if (!d->testing_p)
+ dsecond.target = gen_reg_rtx (dsecond.vmode);
+ dfirst.op1 = dsecond.target;
This bit has a problem with testing_p in that we'll have op0==op1
while testing and not when expanding. Which means that testing_p
will be checking something else.
I've been meaning to convert i386 from op0==op1 to one_operand_p,
like I used in targets I converted later, like ia64. I'll see about
making this change this afternoon, and then you can update your
patch to match.
+ ok = expand_vec_perm_1 (&dsecond);
+ ok &= ix86_expand_vec_perm_const_1 (&dfirst);
+
+ if (!ok)
+ return false;
+
+ return true;
Better with a short-circuit to avoid extra work:
return (expand_vec_perm_1 (&dsecond)
&& ix86_expand_vec_perm_const_1 (&dfirst));
Otherwise the patch looks pretty good.