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 tree-optimization/98726] [10/11 Regression] SVE: tree check: expected integer_cst, have poly_int_cst in to_wide, at tree.h:5984 Date: Fri, 23 Apr 2021 09:10:50 +0000 [thread overview] Message-ID: <bug-98726-4-2MFHdT1jOH@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-98726-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98726 --- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Richard Sandiford <rsandifo@gcc.gnu.org>: https://gcc.gnu.org/g:dc9233a4f65a67ca280903d60d57c5fd5d95303e commit r10-9753-gdc9233a4f65a67ca280903d60d57c5fd5d95303e Author: Richard Sandiford <richard.sandiford@arm.com> Date: Fri Apr 23 10:09:41 2021 +0100 Handle CONST_POLY_INTs in CONST_VECTORs [PR97141, PR98726] This PR is caused by POLY_INT_CSTs being (necessarily) valid in tree-level VECTOR_CSTs but CONST_POLY_INTs not being valid in RTL CONST_VECTORs. I can't tell/remember how deliberate that was, but I'm guessing not very. In particular, valid_for_const_vector_p was added to guard against symbolic constants rather than CONST_POLY_INTs. I did briefly consider whether we should maintain the current status anyway. However, that would then require a way of constructing variable-length vectors from individiual elements if, say, we have: { [2, 2], [3, 2], [4, 2], ⦠} So I'm chalking this up to an oversight. I think the intention (and certainly the natural thing) is to have the same rules for both trees and RTL. The SVE CONST_VECTOR code should already be set up to handle CONST_POLY_INTs. However, we need to add support for Advanced SIMD CONST_VECTORs that happen to contain SVE-based values. The patch does that by expanding such CONST_VECTORs in the same way as variable vectors. gcc/ PR rtl-optimization/97141 PR rtl-optimization/98726 * emit-rtl.c (valid_for_const_vector_p): Return true for CONST_POLY_INT_P. * rtx-vector-builder.h (rtx_vector_builder::step): Return a poly_wide_int instead of a wide_int. (rtx_vector_builder::apply_set): Take a poly_wide_int instead of a wide_int. * rtx-vector-builder.c (rtx_vector_builder::apply_set): Likewise. * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Return false for CONST_VECTORs that cannot be forced to memory. * config/aarch64/aarch64-simd.md (mov<mode>): If a CONST_VECTOR is too complex to force to memory, build it up from individual elements instead. gcc/testsuite/ PR rtl-optimization/97141 PR rtl-optimization/98726 * gcc.c-torture/compile/pr97141.c: New test. * gcc.c-torture/compile/pr98726.c: Likewise. * gcc.target/aarch64/sve/pr97141.c: Likewise. * gcc.target/aarch64/sve/pr98726.c: Likewise. (cherry picked from commit 1b5f74e8be4dd7abe5624ff60adceff19ca71bda)
prev parent reply other threads:[~2021-04-23 9:10 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-01-18 11:44 [Bug tree-optimization/98726] New: aarch64: " acoplan at gcc dot gnu.org 2021-01-18 11:44 ` [Bug tree-optimization/98726] SVE: " acoplan at gcc dot gnu.org 2021-01-18 12:25 ` [Bug tree-optimization/98726] [10/11 Regression] " ktkachov at gcc dot gnu.org 2021-01-26 12:29 ` rguenth at gcc dot gnu.org 2021-01-26 12:30 ` rguenth at gcc dot gnu.org 2021-01-26 12:42 ` rguenth at gcc dot gnu.org 2021-01-26 13:27 ` cvs-commit at gcc dot gnu.org 2021-01-26 13:30 ` rguenth at gcc dot gnu.org 2021-02-19 12:26 ` avieira at gcc dot gnu.org 2021-02-19 12:27 ` avieira at gcc dot gnu.org 2021-03-17 15:41 ` rsandifo at gcc dot gnu.org 2021-03-30 11:04 ` rsandifo at gcc dot gnu.org 2021-03-31 18:34 ` cvs-commit at gcc dot gnu.org 2021-03-31 20:38 ` rsandifo at gcc dot gnu.org 2021-04-23 9:10 ` cvs-commit at gcc dot gnu.org 2021-04-23 9:10 ` cvs-commit at gcc dot gnu.org [this message]
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-98726-4-2MFHdT1jOH@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: linkBe 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).