public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/106586] riscv32 still broke with zba_zbb_zbc_zbs, ICE in do_SUBST in C++ code
Date: Thu, 11 Aug 2022 18:47:15 +0000	[thread overview]
Message-ID: <bug-106586-4-B6Kqb2B62N@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106586-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
index 5a0adffb5ce..b4a08de6b93 100644
--- a/gcc/config/riscv/riscv.cc
+++ b/gcc/config/riscv/riscv.cc
@@ -426,7 +426,9 @@ riscv_build_integer_1 (struct riscv_integer_op
codes[RISCV_MAX_INTEGER_OPS],
         sign-extended (negative) representation (-1 << 31) for the
         value, if we want to build (1 << 31) in SImode.  This will
         then expand to an LUI instruction.  */
-      if (mode == SImode && value == (HOST_WIDE_INT_1U << 31))
+      if (TARGET_64BIT
+         && mode == SImode
+         && value == (HOST_WIDE_INT_1U << 31))
        codes[0].value = (HOST_WIDE_INT_M1U << 31);

       return 1;


Fixes that ICE but there is still another ICE with the same reduced testcase:
0xd9898c wi::int_traits<std::pair<rtx_def*, machine_mode> >::decompose(long*,
unsigned int, std::pair<rtx_def*, machine_mode> const&)
        ../../src/gcc/rtl.h:2288
0x1136bf7 wide_int_ref_storage<false,
false>::wide_int_ref_storage<std::pair<rtx_def*, machine_mode>
>(std::pair<rtx_def*, machine_mode> const&, unsigned int)
        ../../src/gcc/wide-int.h:1034
0x1136bf7 generic_wide_int<wide_int_ref_storage<false, false>
>::generic_wide_int<std::pair<rtx_def*, machine_mode> >(std::pair<rtx_def*,
machine_mode> const&, unsigned int)
        ../../src/gcc/wide-int.h:790
0x1136bf7 wi::binary_traits<std::pair<rtx_def*, machine_mode>,
std::pair<rtx_def*, machine_mode>, wi::int_traits<std::pair<rtx_def*,
machine_mode> >::precision_type, wi::int_traits<std::pair<rtx_def*,
machine_mode> >::precision_type>::result_type wi::add<std::pair<rtx_def*,
machine_mode>, std::pair<rtx_def*, machine_mode> >(std::pair<rtx_def*,
machine_mode> const&, std::pair<rtx_def*, machine_mode> const&)
        ../../src/gcc/wide-int.h:2442
0x1136bf7 simplify_const_binary_operation(rtx_code, machine_mode, rtx_def*,
rtx_def*)
        ../../src/gcc/simplify-rtx.cc:5004
0x113de58 simplify_context::simplify_binary_operation(rtx_code, machine_mode,
rtx_def*, rtx_def*)
        ../../src/gcc/simplify-rtx.cc:2569
0x10d1b75 simplify_binary_operation(rtx_code, machine_mode, rtx_def*, rtx_def*)
        ../../src/gcc/rtl.h:3475
0x10d1b75 simplify_while_replacing
        ../../src/gcc/recog.cc:686
0x10d1b75 validate_replace_rtx_1
        ../../src/gcc/recog.cc:890
0x10fefb4 note_uses(rtx_def**, void (*)(rtx_def**, void*), void*)
        ../../src/gcc/rtlanal.cc:2065
0x10cd9b2 validate_replace_src_group(rtx_def*, rtx_def*, rtx_insn*)
        ../../src/gcc/recog.cc:979
0x1945e30 try_replace_reg
        ../../src/gcc/cprop.cc:752
0x1946509 constprop_register
        ../../src/gcc/cprop.cc:1023
0x194688b do_local_cprop
        ../../src/gcc/cprop.cc:1208
0x194688b local_cprop_pass
        ../../src/gcc/cprop.cc:1271
0x194688b one_cprop_pass
        ../../src/gcc/cprop.cc:1772
0x194688b execute_rtl_cprop
        ../../src/gcc/cprop.cc:1926
0x194688b execute
        ../../src/gcc/cprop.cc:1966
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Still debugging this.

  parent reply	other threads:[~2022-08-11 18:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-11 17:40 [Bug target/106586] New: " pinskia at gcc dot gnu.org
2022-08-11 17:42 ` [Bug target/106586] " pinskia at gcc dot gnu.org
2022-08-11 17:46 ` pinskia at gcc dot gnu.org
2022-08-11 18:37 ` pinskia at gcc dot gnu.org
2022-08-11 18:47 ` pinskia at gcc dot gnu.org [this message]
2022-08-11 19:14 ` pinskia at gcc dot gnu.org
2022-08-11 22:16 ` pinskia at gcc dot gnu.org
2022-08-12  1:48 ` jiawei at iscas dot ac.cn
2022-08-12  1:55 ` pinskia at gcc dot gnu.org
2022-08-15 18:58 ` pinskia at gcc dot gnu.org
2022-08-15 21:37 ` pinskia at gcc dot gnu.org
2022-08-15 22:13 ` pinskia at gcc dot gnu.org
2022-08-15 22:20 ` pinskia at gcc dot gnu.org
2022-08-15 23:16 ` pinskia at gcc dot gnu.org
2022-08-24 19:20 ` cvs-commit at gcc dot gnu.org
2022-08-24 19:21 ` pinskia 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-106586-4-B6Kqb2B62N@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).