public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "xry111 at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/112483] [14 Regression] gfortran.dg/ieee/ieee_2.f90 fails on loongarch64-linux-gnu at -O1 or above
Date: Mon, 13 Nov 2023 08:44:10 +0000	[thread overview]
Message-ID: <bug-112483-4-5WVLg9Xn8Z@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-112483-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112483

--- Comment #17 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
(In reply to Xi Ruoyao from comment #16)
> (In reply to Andrew Pinski from comment #12)
> > What about this patch:
> > ```
> > diff --git a/gcc/simplify-rtx.cc b/gcc/simplify-rtx.cc
> > index 69d87579d9c..f3745d86aea 100644
> > --- a/gcc/simplify-rtx.cc
> > +++ b/gcc/simplify-rtx.cc
> > @@ -4392,7 +4392,7 @@ simplify_ashift:
> >           real_convert (&f1, mode, CONST_DOUBLE_REAL_VALUE (trueop1));
> >           rtx tmp = simplify_gen_unary (ABS, mode, op0, mode);
> >           if (REAL_VALUE_NEGATIVE (f1))
> > -           tmp = simplify_gen_unary (NEG, mode, op0, mode);
> > +           tmp = simplify_unary_operation (NEG, mode, tmp, mode);
> >           return tmp;
> >         }
> >        if (GET_CODE (op0) == NEG || GET_CODE (op0) == ABS)
> > 
> > ```
> > 
> > We only generate NEG if it simplifies from the ABS. Most likely due to
> > constants.
> 
> I'm trying this out on LoongArch.

Works for me.  Will you send the simplify_gen_unary -> simplify_unary_operation
change to gcc-patches?

  parent reply	other threads:[~2023-11-13  8:44 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-11 21:54 [Bug target/112483] New: " xry111 at gcc dot gnu.org
2023-11-12 13:32 ` [Bug target/112483] " xry111 at gcc dot gnu.org
2023-11-12 13:42 ` xry111 at gcc dot gnu.org
2023-11-12 13:46 ` xry111 at gcc dot gnu.org
2023-11-12 13:54 ` xry111 at gcc dot gnu.org
2023-11-12 14:06 ` [Bug rtl-optimization/112483] " xry111 at gcc dot gnu.org
2023-11-12 18:57 ` tschwinge at gcc dot gnu.org
2023-11-12 19:25 ` tnfchris at gcc dot gnu.org
2023-11-12 19:26 ` xry111 at gcc dot gnu.org
2023-11-12 20:22 ` xry111 at gcc dot gnu.org
2023-11-12 20:27 ` xry111 at gcc dot gnu.org
2023-11-12 21:16 ` pinskia at gcc dot gnu.org
2023-11-13  7:40 ` xry111 at gcc dot gnu.org
2023-11-13  7:46 ` pinskia at gcc dot gnu.org
2023-11-13  7:52 ` cvs-commit at gcc dot gnu.org
2023-11-13  7:53 ` xry111 at gcc dot gnu.org
2023-11-13  7:54 ` tnfchris at gcc dot gnu.org
2023-11-13  8:03 ` xry111 at gcc dot gnu.org
2023-11-13  8:10 ` rguenth at gcc dot gnu.org
2023-11-13  8:44 ` xry111 at gcc dot gnu.org [this message]
2023-11-13 18:42 ` pinskia at gcc dot gnu.org
2023-11-14 10:06 ` xry111 at gcc dot gnu.org
2023-11-16 23:46 ` cvs-commit at gcc dot gnu.org
2023-11-16 23:46 ` xry111 at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-112483-4-5WVLg9Xn8Z@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).