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.