]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V: Finish Typing Un-Typed Instructions and Turn on Assert
authorEdwin Lu <ewlu@rivosinc.com>
Tue, 12 Sep 2023 16:31:40 +0000 (09:31 -0700)
committerEdwin Lu <ewlu@rivosinc.com>
Tue, 12 Sep 2023 16:31:40 +0000 (09:31 -0700)
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): Enable assert

Reviewed-by: Jeff Law <jlaw@ventanamicro.com>
Signed-off-by: Edwin Lu <ewlu@rivosinc.com>
gcc/config/riscv/autovec-opt.md
gcc/config/riscv/riscv.cc

index 58e80044f1ee5382065fe868df2001815e2ee99b..f1d058ce911b223ca5b758e45ad0f0b6943c68ee 100644 (file)
                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"
index 0ecda795b3885442936e734d1a8224bb1c07d68d..9d04ddd69e07e14bed4a6b128fb10a81b2e75429 100644 (file)
@@ -7721,11 +7721,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;
 }