From: Juergen Christ <jchrist@linux.ibm.com>
To: Sam James <sam@gentoo.org>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH v2] Do not emulate vectors containing floats.
Date: Fri, 23 Feb 2024 15:01:08 +0100 [thread overview]
Message-ID: <ZdilJDm4yfqchF7R@li-3a824ecc-34fe-11b2-a85c-eae455c7d911.ibm.com> (raw)
In-Reply-To: <87frxjjnar.fsf@gentoo.org>
Am Fri, Feb 23, 2024 at 01:57:12PM +0000 schrieb Sam James:
>
> Juergen Christ <jchrist@linux.ibm.com> writes:
>
> > The emulation via word mode tries to perform integer arithmetic on floating
> > point values instead of floating point arithmetic. This leads to
> > mis-compilations.
>
> Is the bug ref + test missing?
Sorry, forgot to add the "bootstrapped and tested on s390x and x86_64".
Not sure how to reference a bugzilla here. There is 114075 that
should be solved with this, too.
> >
> > Failure occured on s390x on these existing test cases:
> > gcc.dg/vect/tsvc/vect-tsvc-s112.c
> > gcc.dg/vect/tsvc/vect-tsvc-s113.c
> > gcc.dg/vect/tsvc/vect-tsvc-s119.c
> > gcc.dg/vect/tsvc/vect-tsvc-s121.c
> > gcc.dg/vect/tsvc/vect-tsvc-s131.c
> > gcc.dg/vect/tsvc/vect-tsvc-s132.c
> > gcc.dg/vect/tsvc/vect-tsvc-s2233.c
> > gcc.dg/vect/tsvc/vect-tsvc-s421.c
> > gcc.dg/vect/vect-alias-check-14.c
> > gcc.target/s390/vector/partial/s390-vec-length-epil-run-1.c
> > gcc.target/s390/vector/partial/s390-vec-length-epil-run-3.c
> > gcc.target/s390/vector/partial/s390-vec-length-full-run-3.c
> >
> > gcc/ChangeLog:
> >
> > * tree-vect-stmts.cc (vectorizable_operation): Don't emulate floating
> > point vectors
> >
> > Signed-off-by: Juergen Christ <jchrist@linux.ibm.com>
> > ---
> > gcc/tree-vect-stmts.cc | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
> > index 09749ae38174..f95ff2c2aa34 100644
> > --- a/gcc/tree-vect-stmts.cc
> > +++ b/gcc/tree-vect-stmts.cc
> > @@ -6756,7 +6756,8 @@ vectorizable_operation (vec_info *vinfo,
> > those through even when the mode isn't word_mode. For
> > ops we have to lower the lowering code assumes we are
> > dealing with word_mode. */
> > - if ((((code == PLUS_EXPR || code == MINUS_EXPR || code == NEGATE_EXPR)
> > + if (!INTEGRAL_TYPE_P (TREE_TYPE (vectype))
> > + || (((code == PLUS_EXPR || code == MINUS_EXPR || code == NEGATE_EXPR)
> > || !target_support_p)
> > && maybe_ne (GET_MODE_SIZE (vec_mode), UNITS_PER_WORD))
> > /* Check only during analysis. */
>
next prev parent reply other threads:[~2024-02-23 14:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-23 13:43 Juergen Christ
2024-02-23 13:57 ` Sam James
2024-02-23 14:01 ` Juergen Christ [this message]
2024-02-23 18:17 ` Jakub Jelinek
2024-02-26 8:00 ` Richard Biener
2024-02-26 8:33 ` Jakub Jelinek
2024-02-26 8:53 ` Richard Biener
2024-02-26 9:07 ` Jakub Jelinek
2024-02-26 9:19 ` Richard Biener
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=ZdilJDm4yfqchF7R@li-3a824ecc-34fe-11b2-a85c-eae455c7d911.ibm.com \
--to=jchrist@linux.ibm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=sam@gentoo.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).