From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23921 invoked by alias); 29 Mar 2012 13:36:57 -0000 Received: (qmail 23852 invoked by uid 22791); 29 Mar 2012 13:36:55 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 29 Mar 2012 13:36:43 +0000 From: "rth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/52607] v4df __builtin_shuffle with {0,2,1,3} or {1,3,0,2} Date: Thu, 29 Mar 2012 13:41:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: rth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status Last reconfirmed Ever Confirmed Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-03/txt/msg02558.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52607 Richard Henderson 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 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.