From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24207 invoked by alias); 14 Jan 2015 00:03:25 -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 24189 invoked by uid 89); 14 Jan 2015 00:03:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 14 Jan 2015 00:03:23 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id t0E03G49005648; Tue, 13 Jan 2015 18:03:16 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id t0E03Fdj005645; Tue, 13 Jan 2015 18:03:15 -0600 Date: Wed, 14 Jan 2015 03:44:00 -0000 From: Segher Boessenkool To: Jeff Law Cc: Jakub Jelinek , Richard Biener , Eric Botcazou , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Reenable CSE of non-volatile inline asm (PR rtl-optimization/63637) Message-ID: <20150114000315.GA32710@gate.crashing.org> References: <20150113161819.GD1405@tucnak.redhat.com> <20150113163840.GA4183@gate.crashing.org> <54B575D7.8030107@redhat.com> <20150113201322.GJ1405@tucnak.redhat.com> <54B59964.7070707@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54B59964.7070707@redhat.com> User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2015-01/txt/msg00961.txt.bz2 On Tue, Jan 13, 2015 at 03:17:08PM -0700, Jeff Law wrote: > >And finally there is the case of non-volatile asm with "memory" clobber > >with > >no memory stores in between the two - the posted (safer) patch will not > >allow to CSE the two, while in theory we could CSE them into just one asm. > I think we have to assume that CSEing them is wrong. The first may set > something in memory that is read by the second. > > Thoughts? I agree with pretty much everything you say in the thread, except for this idea that a memory clobber reads memory. No clobber reads anything. The commit that introduced the memory clobber concept, 426b38c9 (svn 1207), by rms, has as only comment /* `memory', don't cache memory across asm */ Segher