From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 75053 invoked by alias); 7 Jan 2019 14:38:28 -0000 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 Received: (qmail 74820 invoked by uid 89); 7 Jan 2019 14:38:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-lj1-f173.google.com Received: from mail-lj1-f173.google.com (HELO mail-lj1-f173.google.com) (209.85.208.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 07 Jan 2019 14:38:26 +0000 Received: by mail-lj1-f173.google.com with SMTP id s5-v6so482025ljd.12 for ; Mon, 07 Jan 2019 06:38:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=0raLWvd8DzrRI5+wATQRvQWjGjfcT1ALb0pxu5+opq0=; b=oOu11VwrVEplhv5rrBiAe1+BSU7QFJtHMYJZe44h41SIdAmU71Yn3TOJerl8UlcrUK uHnOtmO2TfpukdRgEMl2XLQuWpPSr/zAcgL9bbNSBBe5G7n6QC3DoQ6w4IB8rn19h7ce 1MhtIkSOyfaKlNv2kw6SLaSyFW2xOIiuZAd15SY6w13rZpFfdRdKUAM6M8Im/adnIof+ UU3M61ilXc9yIBhscvX7bJG5vxJNXEs3q7ZVyRODB6ONPv7KlonPz/dtlDN/V1ezHn4c FJg3Z6rwUy7E6i6n2ODznbbV0iXcvubzUgZLpSEFOSFEYKxkY2EeNCWM+VaX99JU5BYk XHMg== MIME-Version: 1.0 References: <87d0p8mwfb.fsf@arm.com> In-Reply-To: <87d0p8mwfb.fsf@arm.com> From: Richard Biener Date: Mon, 07 Jan 2019 14:38:00 -0000 Message-ID: Subject: Re: Fix IFN_MASK_STORE handling of IFN_GOMP_SIMD_LANE To: GCC Patches , Richard Sandiford Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00305.txt.bz2 On Mon, Jan 7, 2019 at 2:25 PM Richard Sandiford wrote: > > The IFN_GOMP_SIMD_LANE handling in vectorizable_store tries to use MEM_REF > offsets to maintain pointer disambiguation info. This patch makes sure > that we don't try to do the same optimisation for IFN_MASK_STOREs, which > have no similar offset argument. > > The patch fixes libgomp.c-c++-common/pr66199-*.c for SVE. Previously > we had an ncopies==2 store and stored both halves to the same address. > > Tested on aarch64-linux-gnu (with and without SVE), aarch64_be-elf > and x86_64-linux-gnu. OK to install? OK. Richard. > Richard > > > 2019-01-07 Richard Sandiford > > gcc/ > * tree-vect-stmts.c (vectorizable_store): Don't use the dataref_offset > optimization for masked stores. > > Index: gcc/tree-vect-stmts.c > =================================================================== > --- gcc/tree-vect-stmts.c 2019-01-04 11:39:27.190246648 +0000 > +++ gcc/tree-vect-stmts.c 2019-01-07 13:23:28.048406652 +0000 > @@ -7059,6 +7059,7 @@ vectorizable_store (stmt_vec_info stmt_i > bool simd_lane_access_p > = STMT_VINFO_SIMD_LANE_ACCESS_P (stmt_info); > if (simd_lane_access_p > + && !loop_masks > && TREE_CODE (DR_BASE_ADDRESS (first_dr_info->dr)) == ADDR_EXPR > && VAR_P (TREE_OPERAND (DR_BASE_ADDRESS (first_dr_info->dr), 0)) > && integer_zerop (DR_OFFSET (first_dr_info->dr))