From patchwork Wed Feb 24 16:23:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jambor X-Patchwork-Id: 587529 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4686314030C for ; Thu, 25 Feb 2016 03:23:54 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Kx4li+pa; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; q=dns; s=default; b=sSVD6gaxA7JdgQWbLBMTHrvDcV8LBE c/DPgx5ybjiaUpM7/DLSkgL9XFFT+6/QkcvIt6SaJSnhTPVR/n+jrTgHPAZlK5QK GLzpfZEqiymxmxaBZfoqCnL8KOGWudHD8jEanJ5MVp9lYrbOOF1/0x4Jh5ZYY19O 9Cg9GOTV+GRv0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; s=default; bh=TfDSZmMzxyVz2REhC6taQ26HX3Y=; b=Kx4l i+paAGi2Gm4m1w5bGVhmHtmdXkxuevMGAHesJ7va0RZV79QcuPEkPFOODmc/Yb/G PngT0iZaHwAosG2Mscujm+JgrCyykk/B9XE2l++EZctJHYM3/e2o4ugWuLfm28Ml CzV9dbKTZGRv/GhgIyZ8TPm4QrKsQLfc8b5cIoo= Received: (qmail 87562 invoked by alias); 24 Feb 2016 16:23:45 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 87532 invoked by uid 89); 24 Feb 2016 16:23:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=*stmt, formally, Hx-languages-length:1560, reverted X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Wed, 24 Feb 2016 16:23:43 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 3CD82AC18 for ; Wed, 24 Feb 2016 16:23:40 +0000 (UTC) Date: Wed, 24 Feb 2016 17:23:40 +0100 From: Martin Jambor To: gcc-patches@gcc.gnu.org Subject: Re: [pr 69666] No SRA default_def replacements for unscalarizable Message-ID: <20160224162340.GC29273@virgil.suse.cz> Mail-Followup-To: gcc-patches@gcc.gnu.org References: <20160219162156.GA16767@virgil.suse.cz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes On Tue, Feb 23, 2016 at 06:45:08AM -0800, H.J. Lu wrote: > On Fri, Feb 19, 2016 at 8:21 AM, Martin Jambor wrote: > > Hi, > > > > in PR 69666, SRA attempts to turn a load from an aggregate that is > > uninitialized into a load from a default definition SSA name (which > > something it does to generate an appropriate warning later) but > > unfortunately it does so using an access structure which is > > representable with __int128 when the load in question is smaller. It > > then attempts to fix it up only to create an invalid V_C_E. In this > > case, the correct thing to do is not to attempt the transformation, > > when there are smaller accesses, which can be figured out by looking > > at the unscalarizable_region flag of the access. > > > > Bootstrapped and tested on x86_64, OK for trunk and later for the 5 > > branch? > > > > This may have caused: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69920 > I have reverted the patch on the gcc-5 branch as Jakub asked me to. I do have a fix for the issue but I'd like to investigate one aspect of this problem a bit more tomorrow (see below) before testing it and formally proposing it here. Sorry for the breakage, Martin --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -3504,7 +3504,8 @@ sra_modify_assign (gimple *stmt, gimple_stmt_iterator *gsi) else { if (access_has_children_p (racc) - && !racc->grp_unscalarized_data) + && !racc->grp_unscalarized_data + && TREE_CODE (lhs) != SSA_NAME) { if (dump_file) {