public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bergner at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/109179] [13 Regression] addkf3-sw.c:51:1: internal compiler error: RTL check: expected elt 3 type 'e' or 'u', have '0'
Date: Fri, 17 Mar 2023 22:03:50 +0000 [thread overview]
Message-ID: <bug-109179-4-foqQQav4FE@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109179-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109179
--- Comment #19 from Peter Bergner <bergner at gcc dot gnu.org> ---
(In reply to Peter Bergner from comment #18)
> (In reply to Jakub Jelinek from comment #16)
> > Can't you move all the tests that don't need id or static_id (all but one)
> > before the
> > lra_insn_recog_data_t id = lra_get_insn_recog_data (to);
> > struct lra_static_insn_data *static_id = id->insn_static_data;
> > instead?
> > Ok, single_set is also a call, so maybe keep that one too?
> >
> > I know, microoptimizations...
>
> Looking at lra_get_insn_recog_data() versus the common case for
> single_set(), I think moving the single_set() call earlier is fine too, and
> it simplifies the final code with just the one early out tests rather than
> splitting them up.
Ah, nevermind, we have the "|| id->used_insn_alternative == LRA_UNKNOWN_ALT"
which we can't move. Then I'll keep the single_set() close to it's use of the
result just after. How about this?
--- a/gcc/lra-constraints.cc
+++ b/gcc/lra-constraints.cc
@@ -5014,14 +5014,19 @@ combine_reload_insn (rtx_insn *from, rtx_insn *to)
enum reg_class to_class, from_class;
int n, nop;
signed char changed_nops[MAX_RECOG_OPERANDS + 1];
- lra_insn_recog_data_t id = lra_get_insn_recog_data (to);
- struct lra_static_insn_data *static_id = id->insn_static_data;
/* Check conditions for second memory reload and original insn: */
if ((targetm.secondary_memory_needed
== hook_bool_mode_reg_class_t_reg_class_t_false)
- || NEXT_INSN (from) != to || CALL_P (to)
- || id->used_insn_alternative == LRA_UNKNOWN_ALT
+ || NEXT_INSN (from) != to
+ || !NONDEBUG_INSN_P (to)
+ || CALL_P (to))
+ return false;
+
+ lra_insn_recog_data_t id = lra_get_insn_recog_data (to);
+ struct lra_static_insn_data *static_id = id->insn_static_data;
+
+ if (id->used_insn_alternative == LRA_UNKNOWN_ALT
|| (set = single_set (from)) == NULL_RTX)
return false;
from_reg = SET_DEST (set);
next prev parent reply other threads:[~2023-03-17 22:03 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-17 19:38 [Bug target/109179] New: " bergner at gcc dot gnu.org
2023-03-17 19:39 ` [Bug target/109179] " bergner at gcc dot gnu.org
2023-03-17 19:43 ` bergner at gcc dot gnu.org
2023-03-17 20:05 ` bergner at gcc dot gnu.org
2023-03-17 20:12 ` bergner at gcc dot gnu.org
2023-03-17 20:14 ` bergner at gcc dot gnu.org
2023-03-17 20:18 ` [Bug rtl-optimization/109179] " bergner at gcc dot gnu.org
2023-03-17 20:29 ` vmakarov at gcc dot gnu.org
2023-03-17 20:29 ` [Bug rtl-optimization/109179] [13 Regression] " pinskia at gcc dot gnu.org
2023-03-17 20:38 ` jakub at gcc dot gnu.org
2023-03-17 20:46 ` bergner at gcc dot gnu.org
2023-03-17 20:48 ` vmakarov at gcc dot gnu.org
2023-03-17 20:50 ` bergner at gcc dot gnu.org
2023-03-17 20:51 ` jakub at gcc dot gnu.org
2023-03-17 21:04 ` bergner at gcc dot gnu.org
2023-03-17 21:09 ` bergner at gcc dot gnu.org
2023-03-17 21:13 ` vmakarov at gcc dot gnu.org
2023-03-17 21:23 ` bergner at gcc dot gnu.org
2023-03-17 21:27 ` jakub at gcc dot gnu.org
2023-03-17 21:34 ` bergner at gcc dot gnu.org
2023-03-17 21:54 ` bergner at gcc dot gnu.org
2023-03-17 22:03 ` bergner at gcc dot gnu.org [this message]
2023-03-17 22:06 ` jakub at gcc dot gnu.org
2023-03-17 22:13 ` vmakarov at gcc dot gnu.org
2023-03-18 0:03 ` cvs-commit at gcc dot gnu.org
2023-03-18 0:05 ` bergner 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-109179-4-foqQQav4FE@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).