From patchwork Mon Nov 9 15:45:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrylo Tkachov X-Patchwork-Id: 56228 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp251132lbb; Mon, 9 Nov 2015 07:45:31 -0800 (PST) X-Received: by 10.66.243.3 with SMTP id wu3mr40989847pac.135.1447083931113; Mon, 09 Nov 2015 07:45:31 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id wk3si23110946pab.93.2015.11.09.07.45.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Nov 2015 07:45:31 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-413273-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-return-413273-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-413273-patch=linaro.org@gcc.gnu.org; dkim=pass header.i=@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=PiEKjE4WkH0Mpu47/ EilGxt1j/Q5lN1llcxEBNKKvFJeal38ptIQHv4p0BQfSEk9JxjbjCVBwVcj8MTHE IdHoXWO5BTD9STqgmp1GZpUZfszP8HHuAvEMynBt/qyN7EXrlJklWEBlqTJk9q72 gcWrLiZj+bYvpPrstacT2XsPZc= 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 :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; s=default; bh=tP3sDnmnEBlIDzZ/zMWJHSl Od5w=; b=IGaYSe3c3lgdUbqZZ/D314SS6auIZJWN1PewBhEt4o4QSbNYyD92/ky 7cP28Hh2YA9tf/L0dhQBPuzNf+QQFnRlxHC16YvOr9YocuXcPM6QXuTyGuYRlWvB +popO2rivfebkh46P09b4Y5UWQ+2yp4YK7WW6SXSaDsgayk7SynU= Received: (qmail 127748 invoked by alias); 9 Nov 2015 15:45:19 -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 127729 invoked by uid 89); 9 Nov 2015 15:45:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (146.101.78.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 09 Nov 2015 15:45:17 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-3-H-1qpSnwQD-dmKbdveeZ2A-1; Mon, 09 Nov 2015 15:45:12 +0000 Received: from [10.2.206.200] ([10.1.2.79]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 9 Nov 2015 15:45:12 +0000 Message-ID: <5640BF88.7090107@arm.com> Date: Mon, 09 Nov 2015 15:45:12 +0000 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Marcus Shawcroft CC: GCC Patches , Marcus Shawcroft , Richard Earnshaw , James Greenhalgh Subject: Re: [PATCH][AArch64] PR target/68129: Define TARGET_SUPPORTS_WIDE_INT References: <56408451.6010502@arm.com> In-Reply-To: X-MC-Unique: H-1qpSnwQD-dmKbdveeZ2A-1 X-IsSubscribed: yes On 09/11/15 15:34, Marcus Shawcroft wrote: > On 9 November 2015 at 11:32, Kyrill Tkachov wrote: > >> 2015-11-09 Kyrylo Tkachov >> >> PR target/68129 >> * config/aarch64/aarch64.h (TARGET_SUPPORTS_WIDE_INT): Define to 1. >> * config/aarch64/aarch64.c (aarch64_print_operand, CONST_DOUBLE): >> Delete VOIDmode case. Assert that mode is not VOIDmode. >> * config/aarch64/predicates.md (const0_operand): Remove const_double >> match. >> >> 2015-11-09 Kyrylo Tkachov >> >> PR target/68129 >> * gcc.target/aarch64/pr68129_1.c: New test. > Hi, This test isn't aarch64 specific, does it need to be in gcc.target/aarch64 ? Not really, here is the patch with the test in gcc.dg/ if that's preferred. Thanks, Kyrill 2015-11-09 Kyrylo Tkachov PR target/68129 * config/aarch64/aarch64.h (TARGET_SUPPORTS_WIDE_INT): Define to 1. * config/aarch64/aarch64.c (aarch64_print_operand, CONST_DOUBLE): Delete VOIDmode case. Assert that mode is not VOIDmode. * config/aarch64/predicates.md (const0_operand): Remove const_double match. 2015-11-09 Kyrylo Tkachov PR target/68129 * gcc.dg/pr68129_1.c: New test. > Cheers > /Marcus > commit 623ffaa527b17ad01179c30c1d4a9911243f818a Author: Kyrylo Tkachov Date: Wed Oct 28 10:49:44 2015 +0000 [AArch64] PR target/68129: Define TARGET_SUPPORTS_WIDE_INT diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index ce155dc..927b72a 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -4403,11 +4403,10 @@ aarch64_print_operand (FILE *f, rtx x, char code) break; case CONST_DOUBLE: - /* CONST_DOUBLE can represent a double-width integer. - In this case, the mode of x is VOIDmode. */ - if (GET_MODE (x) == VOIDmode) - ; /* Do Nothing. */ - else if (aarch64_float_const_zero_rtx_p (x)) + /* Since we define TARGET_SUPPORTS_WIDE_INT we shouldn't ever + be getting CONST_DOUBLEs holding integers. */ + gcc_assert (GET_MODE (x) != VOIDmode); + if (aarch64_float_const_zero_rtx_p (x)) { fputc ('0', f); break; diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h index b041a1e..0fac0a7 100644 --- a/gcc/config/aarch64/aarch64.h +++ b/gcc/config/aarch64/aarch64.h @@ -863,6 +863,8 @@ extern enum aarch64_code_model aarch64_cmodel; (aarch64_cmodel == AARCH64_CMODEL_TINY \ || aarch64_cmodel == AARCH64_CMODEL_TINY_PIC) +#define TARGET_SUPPORTS_WIDE_INT 1 + /* Modes valid for AdvSIMD D registers, i.e. that fit in half a Q register. */ #define AARCH64_VALID_SIMD_DREG_MODE(MODE) \ ((MODE) == V2SImode || (MODE) == V4HImode || (MODE) == V8QImode \ diff --git a/gcc/config/aarch64/predicates.md b/gcc/config/aarch64/predicates.md index 1bcbf62..8775460 100644 --- a/gcc/config/aarch64/predicates.md +++ b/gcc/config/aarch64/predicates.md @@ -32,7 +32,7 @@ (define_predicate "aarch64_call_insn_operand" ;; Return true if OP a (const_int 0) operand. (define_predicate "const0_operand" - (and (match_code "const_int, const_double") + (and (match_code "const_int") (match_test "op == CONST0_RTX (mode)"))) (define_predicate "aarch64_ccmp_immediate" diff --git a/gcc/testsuite/gcc.dg/pr68129_1.c b/gcc/testsuite/gcc.dg/pr68129_1.c new file mode 100644 index 0000000..112331e --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr68129_1.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fno-split-wide-types" } */ + +typedef int V __attribute__ ((vector_size (8 * sizeof (int)))); + +void +foo (V *p, V *q) +{ + *p = (*p == *q); +}