public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/99544] [11 Regression] ICE in expand_mult, at expmed.c:3582
Date: Fri, 12 Mar 2021 10:34:06 +0000	[thread overview]
Message-ID: <bug-99544-4-Wu1UQxRmny@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99544-4@http.gcc.gnu.org/bugzilla/>

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I think this is another case that the PR98287 proposed patch would fix, again
after vec lowering some pass (seems vrp2 in this case), this time it is the
/* Canonicalize X + (X << C) into X * (1 + (1 << C)) and
   (X << C1) + (X << C2) into X * ((1 << C1) + (1 << C2)).  */
match.pd rule, where the target apparently supports V2DImode left shift by
scalar constant and addition, but doesn't support V2DImode multiplication.
Maybe in this particular case it would be worth guarding the pattern on
existing optab for vector multiplication or disable it for vectors altogether
(apparently it was myself who has added that), because at least if the target
doesn't have particular vector multiplications, I'd say doing the additions and
shifts must be better than scalarizing it.  If multiplications are supported, I
guess best would be to let the expansion decide what is better, it has code to
turn scalar multiplications by constant into additions and shifts, so perhaps
could use that also for vector by uniform constants?

  parent reply	other threads:[~2021-03-12 10:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-11  7:43 [Bug target/99544] New: " asolokha at gmx dot com
2021-03-11  8:45 ` [Bug target/99544] " rguenth at gcc dot gnu.org
2021-03-11 12:24 ` eochoa at gcc dot gnu.org
2021-03-12 10:34 ` jakub at gcc dot gnu.org [this message]
2021-03-12 10:48 ` [Bug tree-optimization/99544] " jakub at gcc dot gnu.org
2021-03-12 11:00 ` rguenth at gcc dot gnu.org
2021-03-12 11:00 ` jakub at gcc dot gnu.org
2021-03-12 11:38 ` rguenther at suse dot de
2021-03-13  8:00 ` cvs-commit at gcc dot gnu.org
2021-03-13  8:55 ` jakub 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-99544-4-Wu1UQxRmny@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).