From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from srv-08.MPA-Garching.MPG.DE (srv-08.MPA-Garching.MPG.DE [130.183.82.27]) by sourceware.org (Postfix) with ESMTPS id 89E97385701F for ; Tue, 23 Mar 2021 13:48:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 89E97385701F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=MPA-Garching.MPG.DE Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=martin@MPA-Garching.MPG.DE Received: from [192.168.178.60] (aftr-62-216-202-20.dynamic.mnet-online.de [62.216.202.20]) (authenticated bits=0) by srv-08.MPA-Garching.MPG.DE (8.15.2/8.15.2) with ESMTPSA id 12NDml4c045367 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 23 Mar 2021 14:48:48 +0100 Subject: Re: g++: Suboptimal code generation for simple wrapper class around vector data type To: Alexander Monakov Cc: gcc-help References: From: Martin Reinecke Message-ID: <0673ddd7-4d96-393b-4370-66c43ca2872e@mpa-garching.mpg.de> Date: Tue, 23 Mar 2021 14:48:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (srv-08.MPA-Garching.MPG.DE [130.183.82.27]); Tue, 23 Mar 2021 14:48:48 +0100 (CET) X-Spam-Status: No, score=1.6 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Mar 2021 13:48:50 -0000 Dear Alexander, thanks a lot for the reply! > Yes. Note that _m256d is declared with 'may_alias' attribute, so in general > it should weaken optimizations by disabling type-based alias analysis, > but in this case replacing _m256d with __v4df does not help. > > The following version should be easier to optimize, but still is not handled > well (at -O2 -mfma). I'd suggest to present it in the PR in addition to your > reduced version. I have opened PR c++/99728 for this in the meantime and will add your test case! Thanks again, Martin