From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by sourceware.org (Postfix) with ESMTPS id 0628B3858401 for ; Wed, 28 Jun 2023 07:27:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0628B3858401 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-pj1-x1032.google.com with SMTP id 98e67ed59e1d1-262ec7b261bso2499690a91.3 for ; Wed, 28 Jun 2023 00:27:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687937235; x=1690529235; 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=riWF1JrUJYnPmmsw1hmIWxlTT8hzTeJUJtOItPddwFk=; b=hhCE9NCqBFszNvMJU5KVjg6niIkN1SRnW3D0XWVC9vl3au0QcSD9zHuOZTfSRTZx+7 rf3josA7YJ4Lgft+Fumi1S+gqDJozsxNyJ6O/peXhQVWE6gw3SLKGYFJg6CzrAa8AXIq MjvXldPi2SGBzUrUQMIeX6BfWzwbRwtudDHCxIiprKTqJPzIgt0pP1YK0AeFTyXQ06dE JTAsBLuWjJ/u8yRa/gwqxNn4o3eHiYdwrpHw5MH7jx6rCNGhLYfeG87fBYhQ9KOm1RLV aP9AVb89ELfmWHvJ5h7w1NUSstwtngg4s0hc+H5C7rzbXeIIGq5oAf8XxODtGg5aBE/w Lglw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687937235; x=1690529235; 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=riWF1JrUJYnPmmsw1hmIWxlTT8hzTeJUJtOItPddwFk=; b=fQAY1iYSty/fjwuXT5AHwHl09wFO9kYaBJjs1kpFuhcwimIBY6VcqmyVEqNJCGEk4T 3XagCrDKJ74A8US2/CtaFNaHTDAEQ4tagznntR52HZtLK7Puf3MI1HhoYMd45qwY4f5z U8yK3++TvBzvoPbTfdSk4RrKFrVgU6uyTTpvni4J6l6IPsp3xVNhKsIYL8Uj8ZD9YjPr /KCzHE5nnJr7nb81IZMj5cmIKndRDlMg0inQmuh+zdARpFMMe6cBt+gAFmbDavAKJwoQ KmaGjdT/ZOoBxdfaSI/b2Twa7LFV4wWGXgMa/HFrEryDgpRZgQrwc/bsLbEOFNR3/yUZ TA5A== X-Gm-Message-State: AC+VfDyG3Dxh5CHQL5g3FykRYU+ExLQR6oYX5yDR2//TSskAoZ9CjwY/ PIDRTVqhWmkRY4JC2sEsUVJePPk/xmFOz7A7iHY= X-Google-Smtp-Source: ACHHUZ5594JLmDioStY6bPaZirto0yVS5dgiDq9NuJBHzfuaUPaC74u81Ermqc2shXh8Yu9+/ZNHH9jiCFhoLgDIdCU= X-Received: by 2002:a17:90a:4611:b0:262:f99b:a530 with SMTP id w17-20020a17090a461100b00262f99ba530mr6824490pjg.34.1687937234795; Wed, 28 Jun 2023 00:27:14 -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: From: Andrew Pinski Date: Wed, 28 Jun 2023 00:27:02 -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.7 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 4:05=E2=80=AFPM Andrew Pinski w= rote: > > 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. Yes it was fixed by this change. Committed the testcase as r14-2151-g857e1f93ff8e3b93a7a3dc . Thanks, Andrew Pinski > > 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 (ity= pe) > > + && (!VECTOR_MODE_P (TYPE_MODE (newtype)) > > + || target_supports_op_p (newtype, op, optab_defa= ult)) > > && (flag_unsafe_math_optimizations > > || (element_precision (newtype) =3D=3D element_p= recision (type) > > - && real_can_shorten_arithmetic (TYPE_MODE (i= type), > > - TYPE_MODE (t= ype)) > > + && real_can_shorten_arithmetic (element_mode= (itype), > > + element_mode= (type)) > > && !excess_precision_type (newtype))) > > && !types_match (itype, newtype)) > > (convert:type (op (convert:newtype @1) > >