From patchwork Thu Jul 13 09:04:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 107658 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1946215qge; Thu, 13 Jul 2017 02:06:08 -0700 (PDT) X-Received: by 10.84.130.108 with SMTP id 99mr8757571plc.76.1499936768824; Thu, 13 Jul 2017 02:06:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499936768; cv=none; d=google.com; s=arc-20160816; b=hAWaS56U66C6rH7hJYe/MryYTw1ovbIY/latSbNdmxBg0uJ5UAXT+YbgAnPyZp2RPG C2yUQi1zYXOER6jCfhgmd00Vo9D6zSJPBEjzAsvBnJaMnmRPbs8uolu2vRbQjmIYfyVP GNpcXMP2CiUJ7KVBfuUkje3Tbt8mFg4Yysdv4G6TdMTzsu71VD4QY0ROnPnVAuHbf+L+ RWYjSRS7MRWzcT8kEIHmwijiteiRV3sc5GYlOqpFTYeqn/E2sZI3D6t5K5I4QXZcTYWR cpk24yvJibZuBxgDQ4CEQRgGOpQLLslf6fztUAPKx5hUOw0mE7ENgUuhCIZdvJ4lHJeR Ouiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:mail-followup-to:to:from:delivered-to:sender:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mailing-list:dkim-signature:domainkey-signature :arc-authentication-results; bh=nKd9HoriJEq1gTHm/foalKEkdzEwwx/ZeTc83v/vCps=; b=04CV+qUhqmiApIKSFHAjr9kNNaBQ/SdQGsIm0XHldVMVD4bw2GGzTEMoinJG0S6ToU Fa9Ucq0RfwlXb3DqmL3Lw+RdphwJC8O6QwpffkMDiMAf7yK1rrLpQMZ26vHLhTiVMa1P AkM8O0ZnhHyHp6k7rVTMzeqw2NDbjqinGKEhUfuxgBgSwECMdRObJkSr1Y6cLYfeAGy/ OL2oaJWyLFFb5fLkIQgguCZSSwgASQmwT1C3zU2wpjuOV9BFilXpO45+z84KwhBCdu+3 vE4BeX5YNj2X5Q33lcjOVkJ9njs/YB9+axGK/sq2pB0lkislh/T02nanQr2rLrGA4l6v Ueyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.b=D/WWcETA; spf=pass (google.com: domain of gcc-patches-return-458063-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-458063-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id u12si3848930pgq.520.2017.07.13.02.06.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jul 2017 02:06:08 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-458063-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; dkim=pass header.i=@gcc.gnu.org header.b=D/WWcETA; spf=pass (google.com: domain of gcc-patches-return-458063-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-458063-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=default; b=aeGaCoagd+7MMaunzHJyZgAAFMWYT HdJtRitSLOh3RaeqjmX5e/te5q2uORwd92e+ihlimlMrqHeXCQfN8Wgnr9W/WR2a N9TWW7j/mBjlFrcmXVy21GqxFp7WUF9DS1CXDxqK1fgv7faaKfnbLwWb1acdt2Jv 89/onQSTvNCKYU= 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:from :to:subject:references:date:in-reply-to:message-id:mime-version :content-type; s=default; bh=WZpebzm9bCPKLLWIoi9Ss1cXXfQ=; b=D/W WcETAgvsI9MN0axM7kBSu0VX0Py/Q/z+UTNwtJtOBDcewhkinGvhpFcZ/ChXOPqs 8onp4z9UJt5YJJJ/edSC5g5wVcur05S2TaFe/KwZbCk8RHP7ckxUmfTkVNJPr6SQ S2r33SGTg9PhCxmcYu39niKQ6FeAQry/OJV9Bp1s= Received: (qmail 114848 invoked by alias); 13 Jul 2017 09:04:16 -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 113841 invoked by uid 89); 13 Jul 2017 09:04:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-wm0-f45.google.com Received: from mail-wm0-f45.google.com (HELO mail-wm0-f45.google.com) (74.125.82.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 13 Jul 2017 09:04:09 +0000 Received: by mail-wm0-f45.google.com with SMTP id i127so18613299wma.0 for ; Thu, 13 Jul 2017 02:04:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:mail-followup-to:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=nKd9HoriJEq1gTHm/foalKEkdzEwwx/ZeTc83v/vCps=; b=T0dkhOlSg56cUEQNDT+JH5Di1jmjoqVJI9NCwZlBmhNUc/y5z+79ew9pzgRF8SiLmh GwBlLJgr158kaLVSWJ96rtxRUnWBipvEofpQv9HXBvR+xME7BKwKCN71ED90Pjo73SN0 2lJ9yyAbyytaFHjvFKsyrnhKtmqo44mfv6xr54uVSUCTjCkhTxCkRyNLR1NFOcz6aN3n 0xUZjCSa3IxYao7TgJnMAnL+Pf+0WZyTmBi+b1JuNfuoomMGI01/fsOsCkvvO4d8KetJ RDYkGkU4ePj5JkPsP08/yDrB8PN4ON8m24s1qFDho4GchpTtCTmJyzJQO1ia+ztcetar aLeg== X-Gm-Message-State: AIVw1134P/tJvCUwwq0JfUkbARHrA7t13UuM3b4+mSlfg8SYj2MK4oyO QHL3UvdsaaoAXc+kMPoOOQ== X-Received: by 10.28.175.135 with SMTP id y129mr1139425wme.87.1499936646866; Thu, 13 Jul 2017 02:04:06 -0700 (PDT) Received: from localhost (92.40.249.184.threembb.co.uk. [92.40.249.184]) by smtp.gmail.com with ESMTPSA id f45sm7244049wrf.2.2017.07.13.02.04.05 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Jul 2017 02:04:06 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org Subject: [72/77] Pass scalar_mode to scalar_mode_supported_p References: <8760ewohsv.fsf@linaro.org> Date: Thu, 13 Jul 2017 10:04:05 +0100 In-Reply-To: <8760ewohsv.fsf@linaro.org> (Richard Sandiford's message of "Thu, 13 Jul 2017 09:35:44 +0100") Message-ID: <87iniwbtdm.fsf@linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 This patch makes the scalar_mode_supported_p target hook take a scalar_mode rather than a machine_mode. 2017-07-13 Richard Sandiford Alan Hayward David Sherwood gcc/ * target.def (scalar_mode_supported_p): Take a scalar_mode instead of a machine_mode. * targhooks.h (default_scalar_mode_supported_p): Likewise. * targhooks.c (default_scalar_mode_supported_p): Likewise. * config/aarch64/aarch64.c (aarch64_scalar_mode_supported_p): Likewise. * config/alpha/alpha.c (alpha_scalar_mode_supported_p): Likewise. * config/arm/arm.c (arm_scalar_mode_supported_p): Likewise. * config/avr/avr.c (avr_scalar_mode_supported_p): Likewise. * config/c6x/c6x.c (c6x_scalar_mode_supported_p): Likewise. * config/i386/i386.c (ix86_scalar_mode_supported_p): Likewise. * config/ia64/ia64.c (ia64_scalar_mode_supported_p): Likewise. * config/mips/mips.c (mips_scalar_mode_supported_p): Likewise. * config/msp430/msp430.c (msp430_scalar_mode_supported_p): Likewise. * config/pa/pa.c (pa_scalar_mode_supported_p): Likewise. * config/pdp11/pdp11.c (pdp11_scalar_mode_supported_p): Likewise. * config/powerpcspe/powerpcspe.c (rs6000_scalar_mode_supported_p): Likewise. * config/rs6000/rs6000.c (rs6000_scalar_mode_supported_p): Likewise. * config/s390/s390.c (s390_scalar_mode_supported_p): Likewise. * config/spu/spu.c (spu_scalar_mode_supported_p): Likewise. * config/tilegx/tilegx.c (tilegx_scalar_mode_supported_p): Likewise. * config/tilepro/tilepro.c (tilepro_scalar_mode_supported_p): Likewise. * doc/tm.texi: Regenerate. gcc/c-family/ * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call into scalar_mode_supported_p call. (handle_mode_attribute): Update call to scalar_mode_supported_p. Index: gcc/target.def =================================================================== --- gcc/target.def 2017-07-13 09:18:51.667770394 +0100 +++ gcc/target.def 2017-07-13 09:18:57.574337591 +0100 @@ -3304,7 +3304,7 @@ The default version of this hook returns required to handle the basic C types (as defined by the port).\n\ Included here are the double-word arithmetic supported by the\n\ code in @file{optabs.c}.", - bool, (machine_mode mode), + bool, (scalar_mode mode), default_scalar_mode_supported_p) /* Similarly for vector modes. "Supported" here is less strict. At Index: gcc/targhooks.h =================================================================== --- gcc/targhooks.h 2017-07-13 09:18:51.668770318 +0100 +++ gcc/targhooks.h 2017-07-13 09:18:57.575337520 +0100 @@ -71,7 +71,7 @@ extern void default_print_operand_addres extern bool default_print_operand_punct_valid_p (unsigned char); extern tree default_mangle_assembler_name (const char *); -extern bool default_scalar_mode_supported_p (machine_mode); +extern bool default_scalar_mode_supported_p (scalar_mode); extern bool default_libgcc_floating_mode_supported_p (scalar_float_mode); extern opt_scalar_float_mode default_floatn_mode (int, bool); extern bool targhook_words_big_endian (void); Index: gcc/targhooks.c =================================================================== --- gcc/targhooks.c 2017-07-13 09:18:51.667770394 +0100 +++ gcc/targhooks.c 2017-07-13 09:18:57.574337591 +0100 @@ -394,7 +394,7 @@ default_mangle_assembler_name (const cha supported by optabs.c. */ bool -default_scalar_mode_supported_p (machine_mode mode) +default_scalar_mode_supported_p (scalar_mode mode) { int precision = GET_MODE_PRECISION (mode); Index: gcc/config/aarch64/aarch64.c =================================================================== --- gcc/config/aarch64/aarch64.c 2017-07-13 09:18:51.583776726 +0100 +++ gcc/config/aarch64/aarch64.c 2017-07-13 09:18:57.498343016 +0100 @@ -15053,7 +15053,7 @@ aarch64_libgcc_floating_mode_supported_p if MODE is HFmode, and punt to the generic implementation otherwise. */ static bool -aarch64_scalar_mode_supported_p (machine_mode mode) +aarch64_scalar_mode_supported_p (scalar_mode mode) { return (mode == HFmode ? true Index: gcc/config/alpha/alpha.c =================================================================== --- gcc/config/alpha/alpha.c 2017-07-13 09:18:51.585776575 +0100 +++ gcc/config/alpha/alpha.c 2017-07-13 09:18:57.499342945 +0100 @@ -688,7 +688,7 @@ resolve_reload_operand (rtx op) indicates only DFmode. */ static bool -alpha_scalar_mode_supported_p (machine_mode mode) +alpha_scalar_mode_supported_p (scalar_mode mode) { switch (mode) { Index: gcc/config/arm/arm.c =================================================================== --- gcc/config/arm/arm.c 2017-07-13 09:18:30.892502525 +0100 +++ gcc/config/arm/arm.c 2017-07-13 09:18:57.510342160 +0100 @@ -256,7 +256,7 @@ static bool arm_output_addr_const_extra static bool arm_allocate_stack_slots_for_args (void); static bool arm_warn_func_return (tree); static tree arm_promoted_type (const_tree t); -static bool arm_scalar_mode_supported_p (machine_mode); +static bool arm_scalar_mode_supported_p (scalar_mode); static bool arm_frame_pointer_required (void); static bool arm_can_eliminate (const int, const int); static void arm_asm_trampoline_template (FILE *); @@ -23598,7 +23598,7 @@ arm_promoted_type (const_tree t) special-cased in the default hook. */ static bool -arm_scalar_mode_supported_p (machine_mode mode) +arm_scalar_mode_supported_p (scalar_mode mode) { if (mode == HFmode) return (arm_fp16_format != ARM_FP16_FORMAT_NONE); Index: gcc/config/avr/avr.c =================================================================== --- gcc/config/avr/avr.c 2017-07-13 09:18:55.158511776 +0100 +++ gcc/config/avr/avr.c 2017-07-13 09:18:57.511342088 +0100 @@ -882,7 +882,7 @@ avr_regno_reg_class (int r) /* Implement `TARGET_SCALAR_MODE_SUPPORTED_P'. */ static bool -avr_scalar_mode_supported_p (machine_mode mode) +avr_scalar_mode_supported_p (scalar_mode mode) { if (ALL_FIXED_POINT_MODE_P (mode)) return true; Index: gcc/config/c6x/c6x.c =================================================================== --- gcc/config/c6x/c6x.c 2017-07-13 09:18:22.915279989 +0100 +++ gcc/config/c6x/c6x.c 2017-07-13 09:18:57.512342017 +0100 @@ -6255,7 +6255,7 @@ c6x_preferred_simd_mode (machine_mode mo /* Implement TARGET_SCALAR_MODE_SUPPORTED_P. */ static bool -c6x_scalar_mode_supported_p (machine_mode mode) +c6x_scalar_mode_supported_p (scalar_mode mode) { if (ALL_FIXED_POINT_MODE_P (mode) && GET_MODE_PRECISION (mode) <= 2 * BITS_PER_WORD) Index: gcc/config/i386/i386.c =================================================================== --- gcc/config/i386/i386.c 2017-07-13 09:18:30.896502154 +0100 +++ gcc/config/i386/i386.c 2017-07-13 09:18:57.530340732 +0100 @@ -45064,7 +45064,7 @@ ix86_expand_reduc (rtx (*fn) (rtx, rtx, /* Target hook for scalar_mode_supported_p. */ static bool -ix86_scalar_mode_supported_p (machine_mode mode) +ix86_scalar_mode_supported_p (scalar_mode mode) { if (DECIMAL_FLOAT_MODE_P (mode)) return default_decimal_float_supported_p (); Index: gcc/config/ia64/ia64.c =================================================================== --- gcc/config/ia64/ia64.c 2017-07-13 09:18:51.593775972 +0100 +++ gcc/config/ia64/ia64.c 2017-07-13 09:18:57.531340661 +0100 @@ -309,7 +309,7 @@ static tree ia64_handle_version_id_attri static void ia64_encode_section_info (tree, rtx, int); static rtx ia64_struct_value_rtx (tree, int); static tree ia64_gimplify_va_arg (tree, tree, gimple_seq *, gimple_seq *); -static bool ia64_scalar_mode_supported_p (machine_mode mode); +static bool ia64_scalar_mode_supported_p (scalar_mode mode); static bool ia64_vector_mode_supported_p (machine_mode mode); static bool ia64_legitimate_constant_p (machine_mode, rtx); static bool ia64_legitimate_address_p (machine_mode, rtx, bool); @@ -10963,7 +10963,7 @@ ia64_struct_value_rtx (tree fntype, } static bool -ia64_scalar_mode_supported_p (machine_mode mode) +ia64_scalar_mode_supported_p (scalar_mode mode) { switch (mode) { Index: gcc/config/mips/mips.c =================================================================== --- gcc/config/mips/mips.c 2017-07-13 09:18:51.603775218 +0100 +++ gcc/config/mips/mips.c 2017-07-13 09:18:57.535340375 +0100 @@ -13312,7 +13312,7 @@ mips_vector_mode_supported_p (machine_mo /* Implement TARGET_SCALAR_MODE_SUPPORTED_P. */ static bool -mips_scalar_mode_supported_p (machine_mode mode) +mips_scalar_mode_supported_p (scalar_mode mode) { if (ALL_FIXED_POINT_MODE_P (mode) && GET_MODE_PRECISION (mode) <= 2 * BITS_PER_WORD) Index: gcc/config/msp430/msp430.c =================================================================== --- gcc/config/msp430/msp430.c 2017-07-13 09:18:51.603775218 +0100 +++ gcc/config/msp430/msp430.c 2017-07-13 09:18:57.535340375 +0100 @@ -870,7 +870,7 @@ msp430_option_override (void) #define TARGET_SCALAR_MODE_SUPPORTED_P msp430_scalar_mode_supported_p static bool -msp430_scalar_mode_supported_p (machine_mode m) +msp430_scalar_mode_supported_p (scalar_mode m) { if (m == PSImode && msp430x) return true; Index: gcc/config/pa/pa.c =================================================================== --- gcc/config/pa/pa.c 2017-07-13 09:18:19.085698082 +0100 +++ gcc/config/pa/pa.c 2017-07-13 09:18:57.536340304 +0100 @@ -142,7 +142,7 @@ static rtx pa_expand_builtin (tree, rtx, static rtx hppa_builtin_saveregs (void); static void hppa_va_start (tree, rtx); static tree hppa_gimplify_va_arg_expr (tree, tree, gimple_seq *, gimple_seq *); -static bool pa_scalar_mode_supported_p (machine_mode); +static bool pa_scalar_mode_supported_p (scalar_mode); static bool pa_commutative_p (const_rtx x, int outer_code); static void copy_fp_args (rtx_insn *) ATTRIBUTE_UNUSED; static int length_fp_args (rtx_insn *) ATTRIBUTE_UNUSED; @@ -6424,7 +6424,7 @@ hppa_gimplify_va_arg_expr (tree valist, 2 * BITS_PER_WORD isn't equal LONG_LONG_TYPE_SIZE. */ static bool -pa_scalar_mode_supported_p (machine_mode mode) +pa_scalar_mode_supported_p (scalar_mode mode) { int precision = GET_MODE_PRECISION (mode); Index: gcc/config/pdp11/pdp11.c =================================================================== --- gcc/config/pdp11/pdp11.c 2017-02-23 19:54:22.000000000 +0000 +++ gcc/config/pdp11/pdp11.c 2017-07-13 09:18:57.537340232 +0100 @@ -160,7 +160,7 @@ static void pdp11_function_arg_advance ( static void pdp11_conditional_register_usage (void); static bool pdp11_legitimate_constant_p (machine_mode, rtx); -static bool pdp11_scalar_mode_supported_p (machine_mode); +static bool pdp11_scalar_mode_supported_p (scalar_mode); /* Initialize the GCC target structure. */ #undef TARGET_ASM_BYTE_OP @@ -1909,7 +1909,7 @@ pdp11_legitimate_constant_p (machine_mod /* Implement TARGET_SCALAR_MODE_SUPPORTED_P. */ static bool -pdp11_scalar_mode_supported_p (machine_mode mode) +pdp11_scalar_mode_supported_p (scalar_mode mode) { /* Support SFmode even with -mfloat64. */ if (mode == SFmode) Index: gcc/config/powerpcspe/powerpcspe.c =================================================================== --- gcc/config/powerpcspe/powerpcspe.c 2017-07-13 09:18:51.616774238 +0100 +++ gcc/config/powerpcspe/powerpcspe.c 2017-07-13 09:18:57.550339304 +0100 @@ -39158,7 +39158,7 @@ rs6000_eh_return_filter_mode (void) /* Target hook for scalar_mode_supported_p. */ static bool -rs6000_scalar_mode_supported_p (machine_mode mode) +rs6000_scalar_mode_supported_p (scalar_mode mode) { /* -m32 does not support TImode. This is the default, from default_scalar_mode_supported_p. For -m32 -mpowerpc64 we want the Index: gcc/config/rs6000/rs6000.c =================================================================== --- gcc/config/rs6000/rs6000.c 2017-07-13 09:18:51.625773559 +0100 +++ gcc/config/rs6000/rs6000.c 2017-07-13 09:18:57.559338662 +0100 @@ -36162,7 +36162,7 @@ rs6000_eh_return_filter_mode (void) /* Target hook for scalar_mode_supported_p. */ static bool -rs6000_scalar_mode_supported_p (machine_mode mode) +rs6000_scalar_mode_supported_p (scalar_mode mode) { /* -m32 does not support TImode. This is the default, from default_scalar_mode_supported_p. For -m32 -mpowerpc64 we want the Index: gcc/config/s390/s390.c =================================================================== --- gcc/config/s390/s390.c 2017-07-13 09:18:51.628773334 +0100 +++ gcc/config/s390/s390.c 2017-07-13 09:18:57.563338376 +0100 @@ -1225,7 +1225,7 @@ s390_unwind_word_mode (void) /* Return true if the back end supports mode MODE. */ static bool -s390_scalar_mode_supported_p (machine_mode mode) +s390_scalar_mode_supported_p (scalar_mode mode) { /* In contrast to the default implementation reject TImode constants on 31bit TARGET_ZARCH for ABI compliance. */ Index: gcc/config/spu/spu.c =================================================================== --- gcc/config/spu/spu.c 2017-07-13 09:18:51.630773183 +0100 +++ gcc/config/spu/spu.c 2017-07-13 09:18:57.565338234 +0100 @@ -287,7 +287,7 @@ spu_option_override (void) be manipulated in non-trivial ways. In particular, this means all the arithmetic is supported. */ static bool -spu_scalar_mode_supported_p (machine_mode mode) +spu_scalar_mode_supported_p (scalar_mode mode) { switch (mode) { Index: gcc/config/tilegx/tilegx.c =================================================================== --- gcc/config/tilegx/tilegx.c 2017-07-13 09:18:51.632773032 +0100 +++ gcc/config/tilegx/tilegx.c 2017-07-13 09:18:57.566338162 +0100 @@ -106,7 +106,7 @@ tilegx_option_override (void) /* Implement TARGET_SCALAR_MODE_SUPPORTED_P. */ static bool -tilegx_scalar_mode_supported_p (machine_mode mode) +tilegx_scalar_mode_supported_p (scalar_mode mode) { switch (mode) { Index: gcc/config/tilepro/tilepro.c =================================================================== --- gcc/config/tilepro/tilepro.c 2017-07-13 09:18:19.139692095 +0100 +++ gcc/config/tilepro/tilepro.c 2017-07-13 09:18:57.568338020 +0100 @@ -83,7 +83,7 @@ tilepro_option_override (void) /* Implement TARGET_SCALAR_MODE_SUPPORTED_P. */ static bool -tilepro_scalar_mode_supported_p (machine_mode mode) +tilepro_scalar_mode_supported_p (scalar_mode mode) { switch (mode) { Index: gcc/doc/tm.texi =================================================================== --- gcc/doc/tm.texi 2017-07-13 09:18:51.636772730 +0100 +++ gcc/doc/tm.texi 2017-07-13 09:18:57.571337806 +0100 @@ -4213,7 +4213,7 @@ hook returns true for both @code{ptr_mod Define this to return nonzero if the memory reference @var{ref} may alias with the system C library errno location. The default version of this hook assumes the system C library errno location is either a declaration of type int or accessed by dereferencing a pointer to int. @end deftypefn -@deftypefn {Target Hook} bool TARGET_SCALAR_MODE_SUPPORTED_P (machine_mode @var{mode}) +@deftypefn {Target Hook} bool TARGET_SCALAR_MODE_SUPPORTED_P (scalar_mode @var{mode}) Define this to return nonzero if the port is prepared to handle insns involving scalar mode @var{mode}. For a scalar mode to be considered supported, all the basic arithmetic and comparisons Index: gcc/c-family/c-attribs.c =================================================================== --- gcc/c-family/c-attribs.c 2017-07-13 09:18:37.622901759 +0100 +++ gcc/c-family/c-attribs.c 2017-07-13 09:18:57.494343302 +0100 @@ -1308,7 +1308,6 @@ handle_destructor_attribute (tree *node, vector_mode_valid_p (machine_mode mode) { enum mode_class mclass = GET_MODE_CLASS (mode); - machine_mode innermode; /* Doh! What's going on? */ if (mclass != MODE_VECTOR_INT @@ -1323,14 +1322,12 @@ vector_mode_valid_p (machine_mode mode) if (targetm.vector_mode_supported_p (mode)) return true; - innermode = GET_MODE_INNER (mode); - /* We should probably return 1 if requesting V4DI and we have no DI, but we have V2DI, but this is probably very unlikely. */ /* If we have support for the inner mode, we can safely emulate it. We may not have V2DI, but me can emulate with a pair of DIs. */ - return targetm.scalar_mode_supported_p (innermode); + return targetm.scalar_mode_supported_p (GET_MODE_INNER (mode)); } @@ -1406,7 +1403,8 @@ handle_mode_attribute (tree *node, tree case MODE_UFRACT: case MODE_ACCUM: case MODE_UACCUM: - valid_mode = targetm.scalar_mode_supported_p (mode); + valid_mode + = targetm.scalar_mode_supported_p (as_a (mode)); break; case MODE_COMPLEX_INT: