Thanks, I found that it can also be solved by changing the default mtune
in file "configure" of riscv-gnu-toolchain and I will prepare a PR to
riscv-gnu-toolchain repo.
Dongyan Chen
在 2025/6/19 15:55, Kito Cheng 写道:
Thanks, pushed with one minor change.
Robin has mentioned that maybe we could name it generic-in-order, but
I think this could be a follow up patch if we want, I would like to
have -mtune=generic even though we added that since clang/LLVM already
provided -mtune=generic :)
diff --git
a/gcc/testsuite/gcc.target/riscv/zicond-primitiveSemantics_compare_reg_reg_return_reg_reg.c
b/gcc/testsuite/gcc.target/riscv/zicond-primitiveSemantics_compare_reg_reg_return_reg_reg.c
new file mode 100644
index 000000000000..b759ab339dad
--- /dev/null
+++
b/gcc/testsuite/gcc.target/riscv/zicond-primitiveSemantics_compare_reg_reg_return_reg_reg.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gc_zicond -mabi=lp64d" { target { rv64 } } } */
+/* { dg-options "-march=rv32gc_zicond -mabi=ilp32f" { target { rv32 } } } */
^^^ I added -mtune=generic here since riscv-gnu-toolchain pass
--with-tune=rocket by default, that cause the CI unhappy