public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/97040] incorrect fused multiply add/subtract instruction generated from C code
Date: Wed, 09 Feb 2022 19:13:07 +0000	[thread overview]
Message-ID: <bug-97040-4-DYjpfLZL1d@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-97040-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jeff Law <law@gcc.gnu.org>:

https://gcc.gnu.org/g:eefec38c992e3622a69de9667e91f0cafbff03cc

commit r12-7145-geefec38c992e3622a69de9667e91f0cafbff03cc
Author: Jeff Law <jeffreyalaw@gmail.com>
Date:   Wed Feb 9 14:10:53 2022 -0500

    Avoid using predefined insn name for instruction with different semantics

    This isn't technically a regression, but it only impacts the v850 target
and
    fixes a long standing code correctness issue.

    As outlined in slightly more detail in the PR, the v850 is using the
pattern
    name "fnmasf4" and "fnmssf4" to generate fnmaf.s and fnmsf.s instructions
     respectively.

    Unfortunately fnmasf4 is expected to produce (-a * b) + c and
    fnmssf4 (-a * b) - c.  Those v850 instructions actually negate the entire
    result.

    The fix is trivial.  Use a different pattern name so that the combiner can
    still generate those instructions, but prevent those instructions from
being
    used to implement GCC's notion of what fnmas and fnmss should be.

    This fixes pr97040 as well as a handful of testsuite failures for the v3e5
    multilib.

    gcc/
            PR target/97040
            * config/v850/v850.md (*v850_fnmasf4): Renamed from fnmasf4.
            (*v850_fnmssf4): Renamed from fnmssf4

  parent reply	other threads:[~2022-02-09 19:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-13 17:14 [Bug target/97040] New: " ddiculoiu at dspace dot de
2022-02-06 18:20 ` [Bug target/97040] " law at gcc dot gnu.org
2022-02-09 19:06 ` law at gcc dot gnu.org
2022-02-09 19:13 ` cvs-commit at gcc dot gnu.org [this message]
2022-02-11 16:58 ` law 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-97040-4-DYjpfLZL1d@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).