From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32668 invoked by alias); 25 Sep 2014 10:12:42 -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 32659 invoked by uid 89); 25 Sep 2014 10:12:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS 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; Thu, 25 Sep 2014 10:12:40 +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 s8PACZoh016730; Thu, 25 Sep 2014 05:12:36 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id s8PACYPS016729; Thu, 25 Sep 2014 05:12:34 -0500 Date: Thu, 25 Sep 2014 10:12:00 -0000 From: Segher Boessenkool To: Andrew Pinski Cc: Michael Collison , GCC Patches Subject: Re: [AArch64] Fix predicate and constraint mismatch in logical atomic operations Message-ID: <20140925101234.GA14286@gate.crashing.org> References: <54238FEF.6030006@linaro.org> <54239551.6090400@linaro.org> <54239657.4090208@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2014-09/txt/msg02238.txt.bz2 On Wed, Sep 24, 2014 at 09:17:23PM -0700, Andrew Pinski wrote: > On Wed, Sep 24, 2014 at 9:13 PM, Michael Collison > wrote: > > > > I have that attached to the bug report at the URL provided. I will work on a > > testcase if you think it is warranted. > > Yes it is almost always warranted. > > https://gcc.gnu.org/contribute.html#patches > > Testcases If you cannot follow the recommendations of the GCC coding > conventions about testcases, you should include a justification for > why adequate testcases cannot be added. > > See the last part of that sentence. You don't have any justification > on why you are not including testcases. It is very hard to make a reliable testcase for such problems, because they only happen when register allocation is under pressure. The problem is not that "n" allows more than your predicate does. The predicate allows registers too, so the compiler happily made a register contain some big const. Now RA comes along, is out of registers but hey, there is this "n", let's just put the big constant there! Carnage. So this is hard to test for; you can add some (big) code that exposed the problem, but in a few months time that won't trigger the problem anymore because earlier stages in the compiler will have generated slightly different code. It also does nothing to catch similar problems in other patterns. Segher