From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by sourceware.org (Postfix) with ESMTPS id D9F343858D35 for ; Tue, 27 Jun 2023 23:05:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D9F343858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1b7fb1a82c4so19780755ad.1 for ; Tue, 27 Jun 2023 16:05:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687907121; x=1690499121; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=PoqWIsQ5dpLcw8BiDbImQIJcASpnwmhZl4T5rbEpX9Y=; b=QE+xr7/Gi9S/D7Wp9VEMqtcrhLeI8kIzwahN+LssdW0TsZl99n36MJa3sHKsBqU8rE qJ2RXlxQGMZuUKcYMy0EoF/rbAXwlLI0RYrJaXJrQ8sg8CvkDGjSmxuCoPTqmexK/Igl 2AqvRxteaQOla4UCc2e/4VNFPt+DCLxGGyOZhcv4DZkkWaE0m8x942r079Ml+uwOFhf/ B4EhYCQCbhzzW2nRhV9cgyHP2Zb7e7ClmFfrwfM9oP7Ra4RG03VuWZNOn0T7Wj6btjOS osuhgeeXvHFeKjRjLvAyy+F7SlAR1Rs+NW7lS2gQAjBV/4ZkrSqHL+KFA3Gp4w6qFFIW veNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687907121; x=1690499121; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PoqWIsQ5dpLcw8BiDbImQIJcASpnwmhZl4T5rbEpX9Y=; b=FD1nTlTGg3jKiKrzukcju73EPbjqZ46E7zz6eY+5lFKk1BfrnzNnNSIpyj7PAg8z8E Rgkavk8+4KdbXksbGwqqMeFAv1SUJIwgGJLnxfVae0axcs8SX6Ka3A6Byx3midCJNbG3 T05XYUdlXzCdMEwYuWlIjDvaDSMNBaDuYCeyWZuKSPBDAmK0rkkI61w9h2n89DG7t3cF 89wt3AZ45hjH6WyADg4JAgsNGMYfZuUlCsufTHVRA3jkH6nifO57VUHOGYGR8mNdDeDH tvwQD1b7cYrIHKfIUg9/YHn4tKshtMlsqPmvALqTB4jZHHu/RVQV6A84hzsh1lSQZLrR G9Uw== X-Gm-Message-State: AC+VfDz0FbK37XesV6HzvaEtAA9wyBJdbURnQkTfhwxrXFCCqwPQed+l 8fQlw/ntEU4E0/ItqR6+RHq6h5F83Nlo5CinlPk= X-Google-Smtp-Source: ACHHUZ7pZwQmi+lFqEIAl8CNPnfFQo/UTF62svWF0XB9M5GiQhbiyUyD2OG6PTiTXmkaZr04UoPBkngIVFF1cwj6E6w= X-Received: by 2002:a17:90a:5e:b0:263:11fb:61ca with SMTP id 30-20020a17090a005e00b0026311fb61camr1382376pjb.48.1687907121422; Tue, 27 Jun 2023 16:05:21 -0700 (PDT) MIME-Version: 1.0 References: <3fc809a1-6667-daca-e95a-b0a58825e16f@gmail.com> <0ea59340-7946-51dc-a060-6f0fc1ccdda0@gmail.com> <802f50c6-6e1d-9e93-a75c-ce947bd1784b@gmail.com> <65b66423-d93d-c5f1-05da-7540a13a0bec@gmail.com> <22a65c8e-7d58-87f1-e902-6ba0bbcf3eca@gmail.com> In-Reply-To: <22a65c8e-7d58-87f1-e902-6ba0bbcf3eca@gmail.com> From: Andrew Pinski Date: Tue, 27 Jun 2023 16:05:08 -0700 Message-ID: Subject: Re: [PATCH] match.pd: Use element_mode instead of TYPE_MODE. To: Robin Dapp Cc: Richard Biener , gcc-patches , Tamar.Christina@arm.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, Jun 27, 2023 at 8:56=E2=80=AFAM Robin Dapp via Gcc-patches wrote: > > > You can put it into the original one. > > Bootstrap and testsuite run were successful. > I'm going to push the attached, thanks. I am reducing a bug report which I think will be fixed by this change (PR 110444). I will double check to see if this has fixed this issue once I finished reducing it. I will commit a testcase if this patch fixed the issue. Thanks, Andrew Pinski > > Regards > Robin > > diff --git a/gcc/match.pd b/gcc/match.pd > index 33ccda3e7b6..83bcefa914b 100644 > --- a/gcc/match.pd > +++ b/gcc/match.pd > @@ -7454,10 +7454,12 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) > values representable in the TYPE to be within the > range of normal values of ITYPE. */ > (if (element_precision (newtype) < element_precision (itype= ) > + && (!VECTOR_MODE_P (TYPE_MODE (newtype)) > + || target_supports_op_p (newtype, op, optab_defaul= t)) > && (flag_unsafe_math_optimizations > || (element_precision (newtype) =3D=3D element_pre= cision (type) > - && real_can_shorten_arithmetic (TYPE_MODE (ity= pe), > - TYPE_MODE (typ= e)) > + && real_can_shorten_arithmetic (element_mode (= itype), > + element_mode (= type)) > && !excess_precision_type (newtype))) > && !types_match (itype, newtype)) > (convert:type (op (convert:newtype @1) >