From patchwork Fri Jan 22 17:07:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 571751 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 7270D1402C0 for ; Sat, 23 Jan 2016 04:08:02 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Q1ecvS/C; 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:to:cc :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=hqVsF6uQttHFa9L3zC+rNcD/JbpiX9WY4oWlfLIrESeGQoMrli /cOc+s9HspW4zeYfcm9+j2IC5Ey/4xGN/4fARKn/VeiZhTLsSqeJqgwHl2dOZVH+ FUsyvF0BLjex+3djgwKBONzJBf54/v8ASczTvt6DHuOlBJUHuAOXZBnjs= 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:to:cc :from:subject:message-id:date:mime-version:content-type; s= default; bh=baunWrWMFNzp1YQBfYlzI8VrNys=; b=Q1ecvS/CkQ+LHeUf8vdJ 8YSnqPD+CVyfMdBD0O/tRVfjrw/jBHfcvO2DmNzBqugwj4sYQJ3qFTWRcyXAHPew hAY9NoWa1VoKfRy3KXarzi1uKMGK6hiGJurwAg05msIIMq7gebnEcjJwQgG8OQG4 ar+RW/VWthPnrAArE/T7btw= Received: (qmail 29698 invoked by alias); 22 Jan 2016 17:07:52 -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 29675 invoked by uid 89); 22 Jan 2016 17:07:52 -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, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1648, TARGET_FLOAT, target_float, sk:2f543aa X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 22 Jan 2016 17:07:51 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id ED549552E7; Fri, 22 Jan 2016 17:07:49 +0000 (UTC) Received: from bigtime.twiddle.net (ovpn-113-117.phx2.redhat.com [10.3.113.117]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0MH7mLc029942; Fri, 22 Jan 2016 12:07:49 -0500 To: gcc-patches@gcc.gnu.org Cc: Marcus Shawcroft , Richard Earnshaw , Segher Boessenkool From: Richard Henderson Subject: [PATCH] Fix aarch64 bootstrap (pr69416) Message-ID: <56A261E3.5020901@redhat.com> Date: Fri, 22 Jan 2016 09:07:47 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 X-IsSubscribed: yes The bare CONST_INT inside the CCmode IF_THEN_ELSE is causing combine to make incorrect simplifications. At this stage it feels safer to wrap the CONST_INT inside of an UNSPEC than make more generic changes to combine. But we should definitely investigate combine's CCmode issues for gcc7. Ok? r~ * config/aarch64/aarch64.md (UNSPEC_NZCV): New. (ccmp, fccmp, fccmpe): Use it. diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index 2f543aa..71fc514 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -129,6 +129,7 @@ UNSPEC_RSQRT UNSPEC_RSQRTE UNSPEC_RSQRTS + UNSPEC_NZCV ]) (define_c_enum "unspecv" [ @@ -280,7 +281,7 @@ (compare:CC (match_operand:GPI 2 "register_operand" "r,r,r") (match_operand:GPI 3 "aarch64_ccmp_operand" "r,Uss,Usn")) - (match_operand 5 "immediate_operand")))] + (unspec:CC [(match_operand 5 "immediate_operand")] UNSPEC_NZCV)))] "" "@ ccmp\\t%2, %3, %k5, %m4 @@ -298,7 +299,7 @@ (compare:CCFP (match_operand:GPF 2 "register_operand" "w") (match_operand:GPF 3 "register_operand" "w")) - (match_operand 5 "immediate_operand")))] + (unspec:CCFP [(match_operand 5 "immediate_operand")] UNSPEC_NZCV)))] "TARGET_FLOAT" "fccmp\\t%2, %3, %k5, %m4" [(set_attr "type" "fcmp")] @@ -313,7 +314,7 @@ (compare:CCFPE (match_operand:GPF 2 "register_operand" "w") (match_operand:GPF 3 "register_operand" "w")) - (match_operand 5 "immediate_operand")))] + (unspec:CCFPE [(match_operand 5 "immediate_operand")] UNSPEC_NZCV)))] "TARGET_FLOAT" "fccmpe\\t%2, %3, %k5, %m4" [(set_attr "type" "fcmp")]