From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11352 invoked by alias); 18 Sep 2010 15:57:29 -0000 Received: (qmail 11339 invoked by uid 22791); 18 Sep 2010 15:57:27 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-vw0-f47.google.com (HELO mail-vw0-f47.google.com) (209.85.212.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 18 Sep 2010 15:57:23 +0000 Received: by vws9 with SMTP id 9so2359488vws.20 for ; Sat, 18 Sep 2010 08:57:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.63.11 with SMTP id z11mr3528683vch.37.1284825441305; Sat, 18 Sep 2010 08:57:21 -0700 (PDT) Received: by 10.220.202.9 with HTTP; Sat, 18 Sep 2010 08:57:21 -0700 (PDT) In-Reply-To: References: Date: Sat, 18 Sep 2010 16:59:00 -0000 Message-ID: Subject: Re: Fix PR43432, vectorize backwards stepping loads From: "H.J. Lu" To: Michael Matz Cc: gcc-patches@gcc.gnu.org, Ira Rosen Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2010-09/txt/msg01481.txt.bz2 On Fri, Sep 17, 2010 at 9:00 AM, H.J. Lu wrote: > On Thu, Sep 9, 2010 at 7:30 AM, Michael Matz wrote: >> Hi, >> >> On Wed, 8 Sep 2010, Ira Rosen wrote: >> >>> > Regstrapped on x86_64-linux. =A0I've had to add x86_64-*-* to >>> > target-supports.exp/vect_perm recognition which in turn makes >>> > vect/slp-perm-8.c and vect/slp-perm-9.c fail then. =A0That's most pro= bably >>> > because while x86_64 supports permutation for 4 and 8-sized elements = it >>> > doesn't do so for char (slp-perm-8.c) or short (slp-perm-9.c). =A0I'm= going >>> > to investigate this but seek feedback on the patch itself already now. >>> > >>> >>> Looks good to me. >> >> Okay, so here's the complete patch. =A0Functionality is unchanged, but I >> extended the testsuite to have vect_perm_byte and vect_perm_short >> predicates (using them in slp-perm-8.c and slp-perm-9.c), so that I can >> enable vect_perm on x86_64. =A0With this one I get no regressions on >> x86_64-linux (all default languages). =A0Okay for trunk? >> >> >> Ciao, >> Michael. >> -- >> =A0 =A0 =A0 =A0PR tree-optimization/43432 >> =A0 =A0 =A0 =A0* tree-vect-data-refs.c (vect_analyze_data_ref_access): >> =A0 =A0 =A0 =A0Accept backwards consecutive accesses. >> =A0 =A0 =A0 =A0(vect_create_data_ref_ptr): If step is negative generate >> =A0 =A0 =A0 =A0decreasing IVs. >> =A0 =A0 =A0 =A0* tree-vect-stmts.c (vectorizable_store): Reject negative= steps. >> =A0 =A0 =A0 =A0(perm_mask_for_reverse, reverse_vec_elements): New functi= ons. >> =A0 =A0 =A0 =A0(vectorizable_load): Handle loads with negative steps whe= n easily >> =A0 =A0 =A0 =A0possible. >> >> testsuite/ >> =A0 =A0 =A0 =A0PR tree-optimization/43432 >> =A0 =A0 =A0 =A0* lib/target-supports.exp (check_effective_target_vect_pe= rm_byte, >> =A0 =A0 =A0 =A0check_effective_target_vect_perm_short): New predicates. >> =A0 =A0 =A0 =A0(check_effective_target_vect_perm): Include x86_64. >> =A0 =A0 =A0 =A0* gcc.dg/vect/pr43432.c: New test. >> =A0 =A0 =A0 =A0* gcc.dg/vect/vect-114.c: Adjust. >> =A0 =A0 =A0 =A0* gcc.dg/vect/vect-15.c: Ditto. >> =A0 =A0 =A0 =A0* gcc.dg/vect/slp-perm-8.c: Use new predicate. >> =A0 =A0 =A0 =A0* gcc.dg/vect/slp-perm-9.c: Ditto. >> > > This may have caused: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D45706 > This also caused: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D45720 --=20 H.J.