From: Edwin Lu <ewlu@rivosinc.com>
To: gcc-patches@gcc.gnu.org
Cc: gnu-toolchain@rivosinc.com, Edwin Lu <ewlu@rivosinc.com>
Subject: [PATCH] RISC-V: Finish Typing Un-Typed Instructions and Turn on Assert
Date: Mon, 11 Sep 2023 15:52:54 -0700 [thread overview]
Message-ID: <20230911225308.2275313-1-ewlu@rivosinc.com> (raw)
Updates autovec instruction that was added after last patch and turns on the
assert statement to ensure all new instructions have a type.
* config/riscv/autovec-opt.md: Update type
* config/riscv/riscv.cc (riscv_sched_variable_issue): Remove assert
Signed-off-by: Edwin Lu <ewlu@rivosinc.com>
---
gcc/config/riscv/autovec-opt.md | 3 ++-
gcc/config/riscv/riscv.cc | 2 --
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/gcc/config/riscv/autovec-opt.md b/gcc/config/riscv/autovec-opt.md
index 58e80044f1e..f1d058ce911 100644
--- a/gcc/config/riscv/autovec-opt.md
+++ b/gcc/config/riscv/autovec-opt.md
@@ -649,7 +649,8 @@ (define_insn_and_split "*cond_<optab><mode>"
gen_int_mode (GET_MODE_NUNITS (<MODE>mode), Pmode)};
riscv_vector::expand_cond_len_unop (icode, ops);
DONE;
-})
+}
+[(set_attr "type" "vector")])
;; Combine vlmax neg and UNSPEC_VCOPYSIGN
(define_insn_and_split "*copysign<mode>_neg"
diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
index 12926b206ac..d3b09543ba0 100644
--- a/gcc/config/riscv/riscv.cc
+++ b/gcc/config/riscv/riscv.cc
@@ -7708,11 +7708,9 @@ riscv_sched_variable_issue (FILE *, int, rtx_insn *insn, int more)
if (get_attr_type (insn) == TYPE_GHOST)
return 0;
-#if 0
/* If we ever encounter an insn with an unknown type, trip
an assert so we can find and fix this problem. */
gcc_assert (get_attr_type (insn) != TYPE_UNKNOWN);
-#endif
return more - 1;
}
--
2.34.1
next reply other threads:[~2023-09-11 22:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-11 22:52 Edwin Lu [this message]
2023-09-12 0:49 ` Jeff Law
2023-09-15 22:51 ` [Committed] " Edwin Lu
2023-09-15 22:51 ` Edwin Lu
2023-09-12 2:33 ` [PATCH] " Lehua Ding
2023-09-12 3:00 ` Jeff Law
2023-09-12 3:17 ` Lehua Ding
2023-09-12 3:47 ` Jeff Law
2023-09-12 6:18 ` Lehua Ding
2023-09-17 13:46 ` Jeff Law
2023-09-18 7:29 ` Lehua Ding
2023-09-19 17:23 ` Jeff Law
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=20230911225308.2275313-1-ewlu@rivosinc.com \
--to=ewlu@rivosinc.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gnu-toolchain@rivosinc.com \
/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).