public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rdapp at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/107617] New: SCC-VN with len_store and big endian
Date: Thu, 10 Nov 2022 14:56:42 +0000 [thread overview]
Message-ID: <bug-107617-4@http.gcc.gnu.org/bugzilla/> (raw)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107617
Bug ID: 107617
Summary: SCC-VN with len_store and big endian
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: rdapp at gcc dot gnu.org
CC: richard.guenther at gmail dot com
Target Milestone: ---
Target: s
Created attachment 53871
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53871&action=edit
s390 patch for len_load/len_store
Hi,
Richard and I already quickly discussed this on the mailing list but I didn't
manage to progress analyzing as I was tied up with other things. Figured I
open a bug for tracking purposes and the possibility to maybe fix it in a later
stage.
I'm evaluating len_load/len_store support on s390 via the attached patch and
seeing a FAIL in
testsuite/gfortran.dg/power_3.f90
built with -march=z16 -O3 --param vect-partial-vector-usage=1
The problem seems to be that we evaluate a vector constant
{-1, 1, -1, 1} loaded with length 11 + 1(bias) = 12 as
{1, -1, 1} instead of {-1, 1, -1}.
Richard wrote on the mailing list:
> The error is probably in vn_reference_lookup_3 which assumes that
> 'len' applies to the vector elements in element order. See the part
> of the code where it checks for internal_store_fn_p. If 'len' is with
> respect to the memory and thus endianess has to be taken into
> account then for the IFN_LEN_STORE
>
> else if (fn == IFN_LEN_STORE)
> {
> pd.rhs_off = 0;
> pd.offset = offset2i;
> pd.size = (tree_to_uhwi (len)
> + -tree_to_shwi (bias)) * BITS_PER_UNIT;
> if (ranges_known_overlap_p (offset, maxsize,
> pd.offset, pd.size))
> return data->push_partial_def (pd, set, set,
> offseti, maxsizei);
>
> likely needs to adjust rhs_off from zero for big endian?
next reply other threads:[~2022-11-10 14:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-10 14:56 rdapp at gcc dot gnu.org [this message]
2022-11-10 14:57 ` [Bug middle-end/107617] " rdapp at gcc dot gnu.org
2022-11-10 15:01 ` rdapp at gcc dot gnu.org
2022-11-11 7:42 ` [Bug tree-optimization/107617] " rguenth at gcc dot gnu.org
2022-11-28 11:38 ` rguenth at gcc dot gnu.org
2022-11-28 11:41 ` rguenth at gcc dot gnu.org
2022-12-11 13:36 ` rguenth at gcc dot gnu.org
2022-12-13 6:25 ` rdapp at linux dot ibm.com
2022-12-13 14:48 ` rdapp at linux dot ibm.com
2022-12-14 7:48 ` cvs-commit at gcc dot gnu.org
2022-12-14 7:49 ` rguenth 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-107617-4@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).