public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "asolokha at gmx dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/96791] ICE in convert_mode_scalar, at expr.c:412
Date: Mon, 31 Aug 2020 09:28:52 +0000	[thread overview]
Message-ID: <bug-96791-4-3I9yuq17ps@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-96791-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #6 from Arseny Solokha <asolokha at gmx dot com> ---
There's also a seemingly related case where gcc ICES in branch

  if (GET_MODE_CLASS (to_mode) == MODE_PARTIAL_INT)

instead.

The following testcase is reduced from
gcc/testsuite/gcc.target/powerpc/pr96125.c:

void __attribute__ ((target ("cpu=power10")))
le (__vector_quad *ql)
{
  __vector_quad hg;

  __builtin_mma_xxsetaccz (&hg);
  *ql = hg;
}

% powerpc-e300c3-linux-gnu-gcc-11.0.0 -c ihgsd1rx.c
during RTL pass: expand
ihgsd1rx.c: In function 'le':
ihgsd1rx.c:7:7: internal compiler error: in convert_mode_scalar, at expr.c:394
    7 |   *ql = hg;
      |   ~~~~^~~~
0x5ef679 convert_mode_scalar
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/expr.c:394
0xa2f11b convert_modes(machine_mode, machine_mode, rtx_def*, int)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/expr.c:737
0xa0ea12 extract_integral_bit_field
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/expmed.c:1961
0xa0ea12 extract_bit_field_1
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/expmed.c:1846
0xa0f0b2 extract_bit_field(rtx_def*, poly_int<1u, unsigned long>, poly_int<1u,
unsigned long>, int, rtx_def*, machine_mode, machine_mode, bool, rtx_def**)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/expmed.c:2118
0xa19b88 expand_misaligned_mem_ref
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/expr.c:8620
0xa284cf expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/expr.c:10517
0xa34c1b store_expr(tree_node*, rtx_def*, int, bool, bool)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/expr.c:5858
0xa36f21 expand_assignment(tree_node*, tree_node*, bool)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/expr.c:5594
0x90062f expand_gimple_stmt_1
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/cfgexpand.c:3749
0x90062f expand_gimple_stmt
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/cfgexpand.c:3847
0x90655a expand_gimple_basic_block
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/cfgexpand.c:5888
0x90814f execute
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/cfgexpand.c:6572

And compiling w/ -O1 yields the following instead:

% powerpc-e300c3-linux-gnu-gcc-11.0.0 -O1 -c ihgsd1rx.c
ihgsd1rx.c: In function 'le':
ihgsd1rx.c:8:1: error: insn does not satisfy its constraints:
    8 | }
      | ^
(insn 53 52 54 2 (set (mem/c:POI (plus:SI (reg/f:SI 1 1)
                (const_int 16 [0x10])) [3 %sfp+-80 S32 A128])
        (reg:POI 32 0 [ _1 ])) 2190 {*movpoi}
     (nil))
during RTL pass: pro_and_epilogue
ihgsd1rx.c:8:1: internal compiler error: in extract_constrain_insn, at
recog.c:2195
0x65b80d _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/rtl-error.c:108
0x65b839 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/rtl-error.c:118
0x659e71 extract_constrain_insn(rtx_insn*)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/recog.c:2195
0xcf731c copyprop_hardreg_forward_1
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/regcprop.c:802
0xcf8101 copyprop_hardreg_forward_bb_without_debug_insn(basic_block_def*)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/regcprop.c:1181
0xd56f3d prepare_shrink_wrap
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/shrink-wrap.c:451
0xd56f3d try_shrink_wrapping(edge_def**, rtx_insn*)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/shrink-wrap.c:674
0xa92dc0 thread_prologue_and_epilogue_insns()
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/function.c:5909
0xa934c6 rest_of_handle_thread_prologue_and_epilogue
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/function.c:6394
0xa934c6 execute
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/function.c:6470

(Of course I can file a separate PR if this case is not related to the one
reported in comment 0.)

  parent reply	other threads:[~2020-08-31  9:28 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-26  3:33 [Bug target/96791] New: " asolokha at gmx dot com
2020-08-27 18:50 ` [Bug target/96791] " dje at gcc dot gnu.org
2020-08-27 19:24 ` wschmidt at gcc dot gnu.org
2020-08-27 19:38 ` acsawdey at gcc dot gnu.org
2020-08-27 23:21 ` wschmidt at gcc dot gnu.org
2020-08-28  0:58 ` acsawdey at gcc dot gnu.org
2020-08-31  9:28 ` asolokha at gmx dot com [this message]
2020-08-31 14:20 ` acsawdey at gcc dot gnu.org
2020-09-02 14:02 ` acsawdey at gcc dot gnu.org
2020-09-09 23:32 ` acsawdey at gcc dot gnu.org
2020-09-11  2:18 ` acsawdey at gcc dot gnu.org
2020-11-17 16:10 ` cvs-commit at gcc dot gnu.org
2020-11-24  2:46 ` asolokha at gmx dot com
2020-11-24  2:47 ` asolokha at gmx dot com
2020-11-25  0:49 ` bergner at gcc dot gnu.org
2020-11-25  1:04 ` segher at gcc dot gnu.org
2020-11-25  1:06 ` segher at gcc dot gnu.org
2020-11-25  3:29 ` asolokha at gmx dot com
2020-11-25 20:10 ` bergner at gcc dot gnu.org
2020-11-25 20:31 ` segher at gcc dot gnu.org
2020-11-25 20:39 ` segher at gcc dot gnu.org
2020-11-25 20:42 ` bergner at gcc dot gnu.org
2020-11-25 21:12 ` meissner at gcc dot gnu.org
2020-11-25 22:28 ` segher at gcc dot gnu.org
2021-09-02 22:15 ` bergner at gcc dot gnu.org
2021-09-02 22:53 ` segher 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-96791-4-3I9yuq17ps@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).