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/106346] [11/12/13/14 Regression] Potential regression on vectorization of left shift with constants since r11-5160-g9fc9573f9a5e94 Date: Fri, 04 Aug 2023 12:50:34 +0000 [thread overview] Message-ID: <bug-106346-4-Rb1bdaxyNJ@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-106346-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106346 --- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tamar Christina <tnfchris@gcc.gnu.org>: https://gcc.gnu.org/g:451391a6477f5b012faeca42cdba1bfb8e6eecc0 commit r14-2991-g451391a6477f5b012faeca42cdba1bfb8e6eecc0 Author: Tamar Christina <tamar.christina@arm.com> Date: Fri Aug 4 13:49:23 2023 +0100 AArch64: Undo vec_widen_<sur>shiftl optabs [PR106346] In GCC 11 we implemented the vectorizer optab for widening left shifts, however this optab is only supported for uniform shift constants. At the moment GCC still has two loop vectorization strategy (classical loop and SLP based loop vec) and the optab is implemented as a scalar pattern. This means that when we apply it to a non-uniform constant inside a loop we only find out during SLP build that the constants aren't uniform. At this point it's too late and we lose SLP entirely. Over the years I've tried various options but none of it works well: 1. Dissolving patterns during SLP built (problematic, also dissolves them for non-slp). 2. Optionally ignoring patterns for SLP build (problematic, ends up interfearing with relevancy detection). 3. Relaxing contraint on SLP build to allow non-constant values and dissolving them after SLP build using an SLP pattern. (problematic, ends up breaking shift reassociation). As a result we've concluded that for now this pattern should just be removed and formed during RTL. The plan is to move this to an SLP only pattern once we remove classical loop vectorization support from GCC, at which time we can also properly support SVE's Top and Bottom variants. This removes the optab and reworks the RTL to recognize both the vector variant and the intrinsics variant. Also just simplifies all these patterns. gcc/ChangeLog: PR target/106346 * config/aarch64/aarch64-simd.md (vec_widen_<sur>shiftl_lo_<mode>, vec_widen_<sur>shiftl_hi_<mode>): Remove. (aarch64_<sur>shll<mode>_internal): Renamed to... (aarch64_<su>shll<mode>): .. This. (aarch64_<sur>shll2<mode>_internal): Renamed to... (aarch64_<su>shll2<mode>): .. This. (aarch64_<sur>shll_n<mode>, aarch64_<sur>shll2_n<mode>): Re-use new optabs. * config/aarch64/constraints.md (D2, DL): New. * config/aarch64/predicates.md (aarch64_simd_shll_imm_vec): New. gcc/testsuite/ChangeLog: PR target/106346 * gcc.target/aarch64/pr98772.c: Adjust assembly. * gcc.target/aarch64/vect-widen-shift.c: New test.
next prev parent reply other threads:[~2023-08-04 12:50 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-07-18 18:28 [Bug tree-optimization/106346] New: Potential regression on vectorization of left shift with constants manolis.tsamis at vrull dot eu 2022-07-19 6:52 ` [Bug target/106346] " rguenth at gcc dot gnu.org 2022-07-19 13:09 ` manolis.tsamis at vrull dot eu 2022-07-22 10:11 ` [Bug target/106346] Potential regression on vectorization of left shift with constants since r11-5160-g9fc9573f9a5e94 marxin at gcc dot gnu.org 2022-07-22 11:00 ` tnfchris at gcc dot gnu.org 2022-07-27 7:27 ` [Bug target/106346] [11/12/13 Regression] " tnfchris at gcc dot gnu.org 2022-07-27 7:48 ` rguenth at gcc dot gnu.org 2022-07-27 8:26 ` tnfchris at gcc dot gnu.org 2022-07-27 8:50 ` rguenther at suse dot de 2023-07-31 15:30 ` [Bug target/106346] [11/12/13/14 " tnfchris at gcc dot gnu.org 2023-08-04 12:50 ` cvs-commit at gcc dot gnu.org [this message] 2023-08-04 13:58 ` tnfchris 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-106346-4-Rb1bdaxyNJ@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).