From patchwork Thu Jul 13 08:52:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 107625 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1935177qge; Thu, 13 Jul 2017 01:53:47 -0700 (PDT) X-Received: by 10.98.39.2 with SMTP id n2mr47355920pfn.35.1499936026980; Thu, 13 Jul 2017 01:53:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499936026; cv=none; d=google.com; s=arc-20160816; b=ORXhtmya88/O8gdHxia2aai0CvFDUhv1BrgZyiAOhs4Ez5f4UE7YYf6z/YzTKLjQXn 8bCKWtzdifldrDYPDzsxfym2HDQTd1jxAkaF4RHmosE/gbe0kvYtTS7bvG1WeiPrTctK SidQ6/bOZFBm5JBIPrzoTalVZyWUu9V9yo28hEOKeE5SpZa0sTvlhgM+UOk7oj7jUo09 ISPCFsAw9lf/fRVcF78H+8dyShfTeFrBgZx7q8B8v1SMMwCDhapWLjuqnWjy6p5/e2h+ /Bzr7YsaGIbB0oH7OdBsZ2V9OsUqecJijou7Rde9Xz9iHSPEYuK42AopQqTttvcIPxSe zSPw== 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=GzTo5o7iHXOGo8Yy9JHka0iv4U+qJwIxfXRCFLpbOfg=; b=thZK3DZG8JZ0SU3RGbPZJ6N2isSB5n5abBqgS1qmQDcUFfyhdgqjB/ZV91MkFKMcyZ N/8FP6RVcq0OwEqsUDnv6dDl3RWstGIpFSYDK217zgN1pTg7HBSRxw6iItmV1NjYrDnN e5w7HfwKI1qXXjcunpZlHzgXUS6jSzfrOsgGGSzbyjH0F9JFvJkSH1VN1ioTufYPzKa7 HlVjFGDCBlcIgkdPPCibtHyI9VXrf3Y5SQCqEnYOxD7/IJXJJDModKw4WeP1iL1Pm25A JSwB7J/xbV4Kqiacnw88xMyVi+LWgWQKrkDpRbOEIAMmeeL4OEyOI4O4wD3QW/Ggm77/ 4YpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.b=snm20J63; spf=pass (google.com: domain of gcc-patches-return-458030-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-458030-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 q85si3763147pfa.458.2017.07.13.01.53.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jul 2017 01:53:46 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-458030-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=snm20J63; spf=pass (google.com: domain of gcc-patches-return-458030-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-458030-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=pGkBce72vBbId55xBDONr63lhiTJJ m2qOIDfzJAT17GKhSUCXlVhP5ouSQrVLHuQrMFrTLvvo0LNI3K0JrKtB4PfTxeI+ frQXcDUXDawh9YWR0fW21VVzdlRWYu8e0CR7DDL7vDP60Josuqh0t5eY/oqajNtx inZ9jTN8uhaE9U= 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=BlGwCWzp4XaatGZq0dJNz06xmIM=; b=snm 20J63ojXrK3logSs4fKbJQ+dggpvGooDsCczSVRS5MN57JshGxNZzay7IxGvlF3A tSdObDQHUnDmV9o3sBGd1uxglAjCL44Cf4RjM2GREtVVdaMVZU1mrlu9LC8a4VEk CznXZW1zleYKzziWUCC8dDMWAiRbsLBhYXhgc6+E= Received: (qmail 69815 invoked by alias); 13 Jul 2017 08:52:46 -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 69080 invoked by uid 89); 13 Jul 2017 08:52:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=boundaries X-HELO: mail-wr0-f178.google.com Received: from mail-wr0-f178.google.com (HELO mail-wr0-f178.google.com) (209.85.128.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 13 Jul 2017 08:52:34 +0000 Received: by mail-wr0-f178.google.com with SMTP id r103so49559213wrb.0 for ; Thu, 13 Jul 2017 01:52:33 -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=GzTo5o7iHXOGo8Yy9JHka0iv4U+qJwIxfXRCFLpbOfg=; b=cbR4qvNY5j+B0De5FicOKvtTr96aGtGDfc708jxs547E8Yur2eMyhJCkfz4Zop3Qdk 5x1K1XU/UT44phSERGJttP0cjs1oSfxMBFkmdsouZvyNRBraEKZEaOeDd5ayVfqD9kVA wxPHpykWhP9SwQO7VMeHD8gC8Mqp+9BG4a7HK4LHcss9RsgKIGOGIIZBZAcKDq5ros+N rsJNo0FN/SIdD7AMHvCQQ2EZGDNw8E9K9Jt29R8gdE3M3B6AhcMF1gMXx+7zmQ6Xnlad 4xgERGOVw/qvAYJb9pFQDKF8cBPgLUlbwB43bQ8q2AUyR5tdHoyyqkXS0emHGGR/8NvS u1/g== X-Gm-Message-State: AIVw112JpFHtUxkJkDoVBDTDvjVMJ+vdVlHGDMH+lD2eAOisNN2TkuOW EGkCa89QZedqmk/5XdWZ2g== X-Received: by 10.223.164.23 with SMTP id d23mr911579wra.58.1499935951621; Thu, 13 Jul 2017 01:52:31 -0700 (PDT) Received: from localhost (92.40.249.184.threembb.co.uk. [92.40.249.184]) by smtp.gmail.com with ESMTPSA id m26sm4661872wrm.4.2017.07.13.01.52.30 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Jul 2017 01:52:30 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org Subject: [39/77] Two changes to the get_best_mode interface References: <8760ewohsv.fsf@linaro.org> Date: Thu, 13 Jul 2017 09:52:29 +0100 In-Reply-To: <8760ewohsv.fsf@linaro.org> (Richard Sandiford's message of "Thu, 13 Jul 2017 09:35:44 +0100") Message-ID: <87h8yghg6q.fsf@linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 get_best_mode always returns a scalar_int_mode on success, so this patch makes that explicit in the type system. Also, the "largest_mode" argument is used simply to provide a maximum size, and in practice that size is always a compile-time constant, even when the concept of variable-sized modes is added later. The patch therefore passes the size directly. 2017-07-13 Richard Sandiford Alan Hayward David Sherwood gcc/ * machmode.h (bit_field_mode_iterator::next_mode): Take a pointer to a scalar_int_mode instead of a machine_mode. (bit_field_mode_iterator::m_mode): Change type to opt_scalar_int_mode. (get_best_mode): Return a boolean and use a pointer argument to store the selected mode. Replace the limit mode parameter with a bit limit. * expmed.c (adjust_bit_field_mem_for_reg): Use scalar_int_mode for the values returned by bit_field_mode_iterator::next_mode. (store_bit_field): Update call to get_best_mode. (store_fixed_bit_field): Likewise. (extract_fixed_bit_field): Likewise. * expr.c (optimize_bitfield_assignment_op): Likewise. * fold-const.c (optimize_bit_field_compare): Likewise. (fold_truth_andor_1): Likewise. * stor-layout.c (bit_field_mode_iterator::next_mode): As above. Update for new type of m_mode. (get_best_mode): As above. Index: gcc/machmode.h =================================================================== --- gcc/machmode.h 2017-07-13 09:18:38.043865449 +0100 +++ gcc/machmode.h 2017-07-13 09:18:41.680558844 +0100 @@ -618,11 +618,11 @@ extern machine_mode mode_for_vector (mac bit_field_mode_iterator (HOST_WIDE_INT, HOST_WIDE_INT, HOST_WIDE_INT, HOST_WIDE_INT, unsigned int, bool); - bool next_mode (machine_mode *); + bool next_mode (scalar_int_mode *); bool prefer_smaller_modes (); private: - machine_mode m_mode; + opt_scalar_int_mode m_mode; /* We use signed values here because the bit position can be negative for invalid input such as gcc.dg/pr48335-8.c. */ HOST_WIDE_INT m_bitsize; @@ -636,11 +636,9 @@ extern machine_mode mode_for_vector (mac /* Find the best mode to use to access a bit field. */ -extern machine_mode get_best_mode (int, int, - unsigned HOST_WIDE_INT, - unsigned HOST_WIDE_INT, - unsigned int, - machine_mode, bool); +extern bool get_best_mode (int, int, unsigned HOST_WIDE_INT, + unsigned HOST_WIDE_INT, unsigned int, + unsigned HOST_WIDE_INT, bool, scalar_int_mode *); /* Determine alignment, 1<=result<=BIGGEST_ALIGNMENT. */ Index: gcc/expmed.c =================================================================== --- gcc/expmed.c 2017-07-13 09:18:41.241595261 +0100 +++ gcc/expmed.c 2017-07-13 09:18:41.678559010 +0100 @@ -459,7 +459,7 @@ adjust_bit_field_mem_for_reg (enum extra bit_field_mode_iterator iter (bitsize, bitnum, bitregion_start, bitregion_end, MEM_ALIGN (op0), MEM_VOLATILE_P (op0)); - machine_mode best_mode; + scalar_int_mode best_mode; if (iter.next_mode (&best_mode)) { /* We can use a memory in BEST_MODE. See whether this is true for @@ -477,7 +477,7 @@ adjust_bit_field_mem_for_reg (enum extra fieldmode)) limit_mode = insn.field_mode; - machine_mode wider_mode; + scalar_int_mode wider_mode; while (iter.next_mode (&wider_mode) && GET_MODE_SIZE (wider_mode) <= GET_MODE_SIZE (limit_mode)) best_mode = wider_mode; @@ -1092,7 +1092,8 @@ store_bit_field (rtx str_rtx, unsigned H bit region. */ if (MEM_P (str_rtx) && bitregion_start > 0) { - machine_mode bestmode; + scalar_int_mode best_mode; + machine_mode addr_mode = VOIDmode; HOST_WIDE_INT offset, size; gcc_assert ((bitregion_start % BITS_PER_UNIT) == 0); @@ -1102,11 +1103,13 @@ store_bit_field (rtx str_rtx, unsigned H size = (bitnum + bitsize + BITS_PER_UNIT - 1) / BITS_PER_UNIT; bitregion_end -= bitregion_start; bitregion_start = 0; - bestmode = get_best_mode (bitsize, bitnum, - bitregion_start, bitregion_end, - MEM_ALIGN (str_rtx), VOIDmode, - MEM_VOLATILE_P (str_rtx)); - str_rtx = adjust_bitfield_address_size (str_rtx, bestmode, offset, size); + if (get_best_mode (bitsize, bitnum, + bitregion_start, bitregion_end, + MEM_ALIGN (str_rtx), INT_MAX, + MEM_VOLATILE_P (str_rtx), &best_mode)) + addr_mode = best_mode; + str_rtx = adjust_bitfield_address_size (str_rtx, addr_mode, + offset, size); } if (!store_bit_field_1 (str_rtx, bitsize, bitnum, @@ -1140,10 +1143,10 @@ store_fixed_bit_field (rtx op0, unsigned if (GET_MODE_BITSIZE (mode) == 0 || GET_MODE_BITSIZE (mode) > GET_MODE_BITSIZE (word_mode)) mode = word_mode; - mode = get_best_mode (bitsize, bitnum, bitregion_start, bitregion_end, - MEM_ALIGN (op0), mode, MEM_VOLATILE_P (op0)); - - if (mode == VOIDmode) + scalar_int_mode best_mode; + if (!get_best_mode (bitsize, bitnum, bitregion_start, bitregion_end, + MEM_ALIGN (op0), GET_MODE_BITSIZE (mode), + MEM_VOLATILE_P (op0), &best_mode)) { /* The only way this should occur is if the field spans word boundaries. */ @@ -1152,7 +1155,7 @@ store_fixed_bit_field (rtx op0, unsigned return; } - op0 = narrow_bit_field_mem (op0, mode, bitsize, bitnum, &bitnum); + op0 = narrow_bit_field_mem (op0, best_mode, bitsize, bitnum, &bitnum); } store_fixed_bit_field_1 (op0, bitsize, bitnum, value, reverse); @@ -1942,11 +1945,9 @@ extract_fixed_bit_field (machine_mode tm { if (MEM_P (op0)) { - machine_mode mode - = get_best_mode (bitsize, bitnum, 0, 0, MEM_ALIGN (op0), word_mode, - MEM_VOLATILE_P (op0)); - - if (mode == VOIDmode) + scalar_int_mode mode; + if (!get_best_mode (bitsize, bitnum, 0, 0, MEM_ALIGN (op0), + BITS_PER_WORD, MEM_VOLATILE_P (op0), &mode)) /* The only way this should occur is if the field spans word boundaries. */ return extract_split_bit_field (op0, bitsize, bitnum, unsignedp, Index: gcc/expr.c =================================================================== --- gcc/expr.c 2017-07-13 09:18:39.589733813 +0100 +++ gcc/expr.c 2017-07-13 09:18:41.678559010 +0100 @@ -4682,13 +4682,14 @@ optimize_bitfield_assignment_op (unsigne unsigned HOST_WIDE_INT offset1; if (str_bitsize == 0 || str_bitsize > BITS_PER_WORD) - str_mode = word_mode; - str_mode = get_best_mode (bitsize, bitpos, - bitregion_start, bitregion_end, - MEM_ALIGN (str_rtx), str_mode, 0); - if (str_mode == VOIDmode) + str_bitsize = BITS_PER_WORD; + + scalar_int_mode best_mode; + if (!get_best_mode (bitsize, bitpos, bitregion_start, bitregion_end, + MEM_ALIGN (str_rtx), str_bitsize, false, &best_mode)) return false; - str_bitsize = GET_MODE_BITSIZE (str_mode); + str_mode = best_mode; + str_bitsize = GET_MODE_BITSIZE (best_mode); offset1 = bitpos; bitpos %= str_bitsize; Index: gcc/fold-const.c =================================================================== --- gcc/fold-const.c 2017-07-13 09:18:38.661812628 +0100 +++ gcc/fold-const.c 2017-07-13 09:18:41.680558844 +0100 @@ -3966,7 +3966,8 @@ optimize_bit_field_compare (location_t l tree type = TREE_TYPE (lhs); tree unsigned_type; int const_p = TREE_CODE (rhs) == INTEGER_CST; - machine_mode lmode, rmode, nmode; + machine_mode lmode, rmode; + scalar_int_mode nmode; int lunsignedp, runsignedp; int lreversep, rreversep; int lvolatilep = 0, rvolatilep = 0; @@ -4013,12 +4014,11 @@ optimize_bit_field_compare (location_t l /* See if we can find a mode to refer to this field. We should be able to, but fail if we can't. */ - nmode = get_best_mode (lbitsize, lbitpos, bitstart, bitend, - const_p ? TYPE_ALIGN (TREE_TYPE (linner)) - : MIN (TYPE_ALIGN (TREE_TYPE (linner)), - TYPE_ALIGN (TREE_TYPE (rinner))), - word_mode, false); - if (nmode == VOIDmode) + if (!get_best_mode (lbitsize, lbitpos, bitstart, bitend, + const_p ? TYPE_ALIGN (TREE_TYPE (linner)) + : MIN (TYPE_ALIGN (TREE_TYPE (linner)), + TYPE_ALIGN (TREE_TYPE (rinner))), + BITS_PER_WORD, false, &nmode)) return 0; /* Set signed and unsigned types of the precision of this mode for the @@ -5621,7 +5621,7 @@ fold_truth_andor_1 (location_t loc, enum int ll_unsignedp, lr_unsignedp, rl_unsignedp, rr_unsignedp; int ll_reversep, lr_reversep, rl_reversep, rr_reversep; machine_mode ll_mode, lr_mode, rl_mode, rr_mode; - machine_mode lnmode, rnmode; + scalar_int_mode lnmode, rnmode; tree ll_mask, lr_mask, rl_mask, rr_mask; tree ll_and_mask, lr_and_mask, rl_and_mask, rr_and_mask; tree l_const, r_const; @@ -5807,10 +5807,9 @@ fold_truth_andor_1 (location_t loc, enum to be relative to a field of that size. */ first_bit = MIN (ll_bitpos, rl_bitpos); end_bit = MAX (ll_bitpos + ll_bitsize, rl_bitpos + rl_bitsize); - lnmode = get_best_mode (end_bit - first_bit, first_bit, 0, 0, - TYPE_ALIGN (TREE_TYPE (ll_inner)), word_mode, - volatilep); - if (lnmode == VOIDmode) + if (!get_best_mode (end_bit - first_bit, first_bit, 0, 0, + TYPE_ALIGN (TREE_TYPE (ll_inner)), BITS_PER_WORD, + volatilep, &lnmode)) return 0; lnbitsize = GET_MODE_BITSIZE (lnmode); @@ -5872,10 +5871,9 @@ fold_truth_andor_1 (location_t loc, enum first_bit = MIN (lr_bitpos, rr_bitpos); end_bit = MAX (lr_bitpos + lr_bitsize, rr_bitpos + rr_bitsize); - rnmode = get_best_mode (end_bit - first_bit, first_bit, 0, 0, - TYPE_ALIGN (TREE_TYPE (lr_inner)), word_mode, - volatilep); - if (rnmode == VOIDmode) + if (!get_best_mode (end_bit - first_bit, first_bit, 0, 0, + TYPE_ALIGN (TREE_TYPE (lr_inner)), BITS_PER_WORD, + volatilep, &rnmode)) return 0; rnbitsize = GET_MODE_BITSIZE (rnmode); Index: gcc/stor-layout.c =================================================================== --- gcc/stor-layout.c 2017-07-13 09:18:38.663812457 +0100 +++ gcc/stor-layout.c 2017-07-13 09:18:41.680558844 +0100 @@ -2722,15 +2722,15 @@ fixup_unsigned_type (tree type) available, storing it in *OUT_MODE if so. */ bool -bit_field_mode_iterator::next_mode (machine_mode *out_mode) +bit_field_mode_iterator::next_mode (scalar_int_mode *out_mode) { - for (; m_mode != VOIDmode; - m_mode = GET_MODE_WIDER_MODE (m_mode).else_void ()) + for (; m_mode.exists (); m_mode = GET_MODE_WIDER_MODE (*m_mode)) { - unsigned int unit = GET_MODE_BITSIZE (m_mode); + scalar_int_mode mode = *m_mode; + unsigned int unit = GET_MODE_BITSIZE (mode); /* Skip modes that don't have full precision. */ - if (unit != GET_MODE_PRECISION (m_mode)) + if (unit != GET_MODE_PRECISION (mode)) continue; /* Stop if the mode is too wide to handle efficiently. */ @@ -2757,12 +2757,12 @@ bit_field_mode_iterator::next_mode (mach break; /* Stop if the mode requires too much alignment. */ - if (GET_MODE_ALIGNMENT (m_mode) > m_align - && SLOW_UNALIGNED_ACCESS (m_mode, m_align)) + if (GET_MODE_ALIGNMENT (mode) > m_align + && SLOW_UNALIGNED_ACCESS (mode, m_align)) break; - *out_mode = m_mode; - m_mode = GET_MODE_WIDER_MODE (m_mode).else_void (); + *out_mode = mode; + m_mode = GET_MODE_WIDER_MODE (mode); m_count++; return true; } @@ -2789,12 +2789,14 @@ bit_field_mode_iterator::prefer_smaller_ memory access to that range. Otherwise, we are allowed to touch any adjacent non bit-fields. - The underlying object is known to be aligned to a boundary of ALIGN bits. - If LARGEST_MODE is not VOIDmode, it means that we should not use a mode - larger than LARGEST_MODE (usually SImode). + The chosen mode must have no more than LARGEST_MODE_BITSIZE bits. + INT_MAX is a suitable value for LARGEST_MODE_BITSIZE if the caller + doesn't want to apply a specific limit. If no mode meets all these conditions, we return VOIDmode. + The underlying object is known to be aligned to a boundary of ALIGN bits. + If VOLATILEP is false and SLOW_BYTE_ACCESS is false, we return the smallest mode meeting these conditions. @@ -2805,17 +2807,18 @@ bit_field_mode_iterator::prefer_smaller_ If VOLATILEP is true the narrow_volatile_bitfields target hook is used to decide which of the above modes should be used. */ -machine_mode +bool get_best_mode (int bitsize, int bitpos, unsigned HOST_WIDE_INT bitregion_start, unsigned HOST_WIDE_INT bitregion_end, unsigned int align, - machine_mode largest_mode, bool volatilep) + unsigned HOST_WIDE_INT largest_mode_bitsize, bool volatilep, + scalar_int_mode *best_mode) { bit_field_mode_iterator iter (bitsize, bitpos, bitregion_start, bitregion_end, align, volatilep); - machine_mode widest_mode = VOIDmode; - machine_mode mode; + scalar_int_mode mode; + bool found = false; while (iter.next_mode (&mode) /* ??? For historical reasons, reject modes that would normally receive greater alignment, even if unaligned accesses are @@ -2874,14 +2877,15 @@ get_best_mode (int bitsize, int bitpos, so that the final bitfield reference still has a MEM_EXPR and MEM_OFFSET. */ && GET_MODE_ALIGNMENT (mode) <= align - && (largest_mode == VOIDmode - || GET_MODE_SIZE (mode) <= GET_MODE_SIZE (largest_mode))) + && GET_MODE_BITSIZE (mode) <= largest_mode_bitsize) { - widest_mode = mode; + *best_mode = mode; + found = true; if (iter.prefer_smaller_modes ()) break; } - return widest_mode; + + return found; } /* Gets minimal and maximal values for MODE (signed or unsigned depending on