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/98849] [11 Regression] ICE in expand_shift_1, at expmed.c:2658 since g:7432f255b70811dafaf325d9403
Date: Wed, 27 Jan 2021 13:28:23 +0000	[thread overview]
Message-ID: <bug-98849-4-wq0kEArgya@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-98849-4@http.gcc.gnu.org/bugzilla/>

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ktkachov at gcc dot gnu.org,
                   |                            |rearnsha at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Ah, so on powerpc64le this works fine, expand_binop has:
1558      /* If this is a vector shift by a scalar, see if we can do a vector
1559         shift by a vector.  If so, broadcast the scalar into a vector.  */
1560      if (mclass == MODE_VECTOR_INT)
1561        {
1562          optab otheroptab = unknown_optab;
1563    
1564          if (binoptab == ashl_optab)
1565            otheroptab = vashl_optab;
1566          else if (binoptab == ashr_optab)
1567            otheroptab = vashr_optab;
1568          else if (binoptab == lshr_optab)
1569            otheroptab = vlshr_optab;
1570          else if (binoptab == rotl_optab)
1571            otheroptab = vrotl_optab;
1572          else if (binoptab == rotr_optab)
1573            otheroptab = vrotr_optab;
1574    
1575          if (otheroptab
1576              && (icode = optab_handler (otheroptab, mode)) !=
CODE_FOR_nothing)
1577            {
1578              /* The scalar may have been extended to be too wide. 
Truncate
1579                 it back to the proper size to fit in the broadcast vector.
 */
1580              scalar_mode inner_mode = GET_MODE_INNER (mode);
1581              if (!CONST_INT_P (op1)
1582                  && (GET_MODE_BITSIZE (as_a <scalar_int_mode> (GET_MODE
(op1)))
1583                      > GET_MODE_BITSIZE (inner_mode)))
1584                op1 = force_reg (inner_mode,
1585                                 simplify_gen_unary (TRUNCATE, inner_mode,
op1,
1586                                                     GET_MODE (op1)));
1587              rtx vop1 = expand_vector_broadcast (mode, op1);
1588              if (vop1)
1589                {
1590                  temp = expand_binop_directly (icode, mode, otheroptab,
op0, vop1,
1591                                                target, unsignedp, methods,
last);
1592                  if (temp)
(gdb) 
1593                    return temp;
1594                }
1595            }
1596        }
code for this.  It doesn't work in the ARM case, because it doesn't support
either vec_duplicate_optab nor vec_init_optab for the mode.

I'm declaring this a backend bug, it shouldn't advertise such vector shifts in
configurations in which it can't even init such vectors.

  parent reply	other threads:[~2021-01-27 13:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27  9:00 [Bug target/98849] New: " marxin at gcc dot gnu.org
2021-01-27  9:00 ` [Bug target/98849] " marxin at gcc dot gnu.org
2021-01-27 11:28 ` jakub at gcc dot gnu.org
2021-01-27 11:40 ` jakub at gcc dot gnu.org
2021-01-27 13:06 ` jakub at gcc dot gnu.org
2021-01-27 13:28 ` jakub at gcc dot gnu.org [this message]
2021-01-27 13:34 ` jakub at gcc dot gnu.org
2021-01-27 13:37 ` ktkachov at gcc dot gnu.org
2021-01-27 13:38 ` clyon at gcc dot gnu.org
2021-01-27 13:39 ` clyon at gcc dot gnu.org
2021-01-27 13:40 ` jakub at gcc dot gnu.org
2021-01-27 13:44 ` jakub at gcc dot gnu.org
2021-01-27 15:51 ` jakub at gcc dot gnu.org
2021-01-27 18:00 ` clyon at gcc dot gnu.org
2021-01-28 15:57 ` jakub at gcc dot gnu.org
2021-01-29 10:55 ` cvs-commit at gcc dot gnu.org
2021-01-29 11:03 ` 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-98849-4-wq0kEArgya@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).