From patchwork Tue Apr 14 08:08:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yvan Roux X-Patchwork-Id: 47141 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D3F8420553 for ; Tue, 14 Apr 2015 08:08:47 +0000 (UTC) Received: by lbbrr5 with SMTP id rr5sf653014lbb.3 for ; Tue, 14 Apr 2015 01:08:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mailing-list:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:sender :delivered-to:mime-version:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:x-original-sender :x-original-authentication-results; bh=i78Im2XBR5NM5kST0O1zckDcwtPkvprdHY9eMr8RLCA=; b=T/jZ89F66GQd9nZokKzbzFjACJ57BjZ0uv2us/L6HbDfyhlD71GUqiRQl2L2Ab1w/p 69cY/qQ9n/xBRjOHHDtKr1px1utDOlIfDUsS0RGYAuezJc7fxwyvkycOcBj6L92U3ZdE 1J41e4+Hdhji161XhRAVEAksFr3i0XdwOBa/PQ+57QVIQndbZB4r+nYgUd11vs4ydQ+z f8nMn9pNx249QiimbbsUwQ0H89SKSFUjifhc29e4G2jGsvHpAOlWRdIehpS7chatDiWa lzZv/RtYYycfn5fO7J10fo4QU2QS6cIj7McOg/kEiyO2erFLKr+qNhoF4hANsJecnr4a orQg== X-Gm-Message-State: ALoCoQkRfTWUHNGiPubNLYHudBPxuSSMvmXIvmsluLRZI+zlp0CdQ5gUPh3lbIqci0uykM/s8LeM X-Received: by 10.113.11.3 with SMTP id ee3mr3173721lbd.9.1428998926868; Tue, 14 Apr 2015 01:08:46 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.205.37 with SMTP id ld5ls12990lac.52.gmail; Tue, 14 Apr 2015 01:08:46 -0700 (PDT) X-Received: by 10.152.1.194 with SMTP id 2mr16889153lao.38.1428998926724; Tue, 14 Apr 2015 01:08:46 -0700 (PDT) Received: from mail-lb0-x22e.google.com (mail-lb0-x22e.google.com. [2a00:1450:4010:c04::22e]) by mx.google.com with ESMTPS id u1si208510lau.12.2015.04.14.01.08.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Apr 2015 01:08:46 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22e as permitted sender) client-ip=2a00:1450:4010:c04::22e; Received: by lbbqq2 with SMTP id qq2so1801881lbb.3 for ; Tue, 14 Apr 2015 01:08:46 -0700 (PDT) X-Received: by 10.112.162.232 with SMTP id yd8mr16539434lbb.41.1428998926039; Tue, 14 Apr 2015 01:08:46 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.67.65 with SMTP id l1csp1689797lbt; Tue, 14 Apr 2015 01:08:44 -0700 (PDT) X-Received: by 10.67.4.230 with SMTP id ch6mr33962925pad.137.1428998923816; Tue, 14 Apr 2015 01:08:43 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id ot1si317152pab.207.2015.04.14.01.08.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Apr 2015 01:08:43 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-395092-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 49910 invoked by alias); 14 Apr 2015 08:08:29 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 49900 invoked by uid 89); 14 Apr 2015 08:08:29 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f180.google.com Received: from mail-wi0-f180.google.com (HELO mail-wi0-f180.google.com) (209.85.212.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 14 Apr 2015 08:08:28 +0000 Received: by wiun10 with SMTP id n10so11937789wiu.1 for ; Tue, 14 Apr 2015 01:08:25 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.180.91.77 with SMTP id cc13mr29430287wib.88.1428998905104; Tue, 14 Apr 2015 01:08:25 -0700 (PDT) Received: by 10.28.4.204 with HTTP; Tue, 14 Apr 2015 01:08:24 -0700 (PDT) In-Reply-To: <5527FCAC.3090205@redhat.com> References: <5527FCAC.3090205@redhat.com> Date: Tue, 14 Apr 2015 10:08:24 +0200 Message-ID: Subject: Re: patch for PR65729 From: Yvan Roux To: Vladimir Makarov , Jakub Jelinek Cc: "gcc-patches@gcc.gnu.org" X-IsSubscribed: yes X-Original-Sender: yvan.roux@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22e as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@gcc.gnu.org X-Google-Group-Id: 836684582541 Hi, here is the patch that restore the assertion and swap its arguments as discussed in the PR. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65729 Bootstrapped and regtested on x86_64, cross built and regtested on i686, aarch64, arm and armeb. Is it ok for trunk (maybe after 5.1 is released) ? Thanks, Yvan gcc/ 2015-04-13 Yvan Roux PR target/65729 * lra-constraints.c (prohibited_class_reg_set_mode_p): Restore and fix the assertion. gcc/testsuite/ 2015-04-13 Yvan Roux PR target/65729 * gcc.target/arm/pr65729.c: New test. On 10 April 2015 at 18:39, Vladimir Makarov wrote: > I've committed the following patch for > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65729 > > The assert is definitely wrong. We will work for the right one for > GCC-5.1. > > Committed as rev. 221975. > > 2015-04-10 Vladimir Makarov > > PR target/65729 > * lra-constraints.c (prohibited_class_reg_set_mode_p): Comment the > assert. > > Index: lra-constraints.c > =================================================================== > --- lra-constraints.c (revision 221949) > +++ lra-constraints.c (working copy) > @@ -1656,7 +1656,8 @@ > { > HARD_REG_SET temp; > > - lra_assert (hard_reg_set_subset_p (set, reg_class_contents[rclass])); > + // ??? Is this assert right > + // lra_assert (hard_reg_set_subset_p (set, reg_class_contents[rclass])); > COPY_HARD_REG_SET (temp, set); > AND_COMPL_HARD_REG_SET (temp, lra_no_alloc_regs); > return (hard_reg_set_subset_p > diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index 7353e7c..c51a25b 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -1656,8 +1656,7 @@ prohibited_class_reg_set_mode_p (enum reg_class rclass, { HARD_REG_SET temp; - // ??? Is this assert right - // lra_assert (hard_reg_set_subset_p (set, reg_class_contents[rclass])); + lra_assert (hard_reg_set_subset_p (reg_class_contents[rclass],set)); COPY_HARD_REG_SET (temp, set); AND_COMPL_HARD_REG_SET (temp, lra_no_alloc_regs); return (hard_reg_set_subset_p diff --git a/gcc/testsuite/gcc.target/arm/pr65729.c b/gcc/testsuite/gcc.target/arm/pr65729.c new file mode 100644 index 0000000..0d7e3c1 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr65729.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16" } */ + +int foo (void) +{ + double x = 0.0; + asm volatile ("" : "+gw" (x)); + return x; +}